Sunday, March 6, 2011

ChessKISS, new version 1.0

After some hard work, here we go...


06/03/11, 1.0 update

-Board
  New ColDistance()
  New HasPiecesInCol()
  New RowDistance()
  Fixed a value in the PinnedMap[]
  IsPinned() fixed
  All move generation functions optimized
  GetEndType(): TEnding (new)
  NonPawnMaterial(): int (new)
  SameColor() uses a different approach (fixed)
  Added pawnhash
  Added cache in InCheck()
  New GetMaterialDiff()
  New HasPawns()
  New MoveGivesCheck()
  New NonPawnCount
  New PlayNull()
  Hashes calculated incrementally
  Pawn move generation creates underpromotions while pawn capture generation created queen promotions
  New AsString() which returns a material string (KRKP for instance)
  Material incremental counters split in two (pawn and non pawn)
  Replaced incremental Pieces array with an array per piece type (faster access to index)

-Book
  The engine now tries the best move from all available moves

-Cache
  Cache keys are now 32 bits
  Transactions optimized
  New Used()
  New TCheckCache class

-Definition
  Changed the value of king from 10000 to 12000, since R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/pp1Q4/kBNN1KB1 w - - 0 1, scores 11500 and therefore all moves were better than capture the king

-Draw
  Fixed a material which was draw but it wasn't (KBB vs K)
  Improved

-Engine
  New command "debug"
  Fixed a silly error, but the engine detects a game as draw, before tried first the fifty moves rule which needs a piece and of course was nil because a draw has no move
  New command "stats" (shows move statistics)
  New command "used"  (shows cache usage)
  New command "help"

-EndGame (new!)
  Following ends are implemented: KBNK, KRKB, KRKN, KQKR, KBBKN, KXK

-Evaluation
  New mobility values
  New pinned bonus
  Passers properly handled
  General optimization
  Imbalance fixed
  Added passive penalties
  King defense and attack not done if opponent has no queen
  Fixed small error in passed pawns (>= was >)
  Pawn shield
  Added pawn chains
  Endgame added
  TPawnData does not longer use member Passed: bool
  Preliminary candidate passed pawns (more sentries than sentinels)
  Fixed a bug in the passed pawn, comparing must be against MinRank, not MaxRank (the case is that a pawn in between two opponent pawns make think that is was more advanced)
  PawnsInSecondRank(), used in rook eval
  If the king is not in the board the calculation does not longer crash
  Added KingDistance[] to the passers evaluation
  New king contacted in the queen evaluation
  Added ThreatBonus[] into the knight evaluation
  Improved undeveloped penalty
  Adjusted bishop pair bonus
  Added King in Danger concept

-History
  changed index [from][to] to [TPieceIndex][index]
  overflow handled

-MovePicker (new!)
  Improved
  Once again I switch from MMVLVA to SEE...
  Added context
  Now takes into account checks, generating new phases: phCaptures and phNonCapturesCheck

-Pieces
  Fixed a bug where removing the last piece of a set did not clear properly the array
  PawnScores changed

-Search
  Move refactoring, code went to MovePicker
  Trying a dynamic aspiration window based on previous iterations
  Fixed a possible bug in recaptures
  Extensions refactored
  Added stats
  Finally fractional extensions added
  Added single reply extensions
  New pruning stuff based on material
  Removed contempt factor
  PV nodes are not used in cached moves, null moves and futility pruning reductions
  Extensions restricted to one play

-Stats (new!)

-Utils
  New GetRow()
  New GetValueA() & GetValueB() & MakeValue() to help work values stored in lower/upper 16 bits of an integer
  Flip() and Flop() new functions

No comments:

Post a Comment