Saturday, November 20, 2010

Particularities of ChessKISS

ChessKISS has some particularites, let's see some of them:

  • Sequential generation of (not calculated over and over)
    • Total pieces
    • Piece list
    • Piece count per type
    • Board value
    • King
  • No UndoMove() method, rather that complicate the things and adding always new stuff, I've a record with all stuff needed, that record is update playing  or replaced restoring the board (which is a LIFO<T> structure), the good thing is that I don't have to bother undoing the information of the previous point, is just replaced by a whole new record. I don't know how slow is this compared with the proper way, but I'm quite happy with the simplicity.
All information is stored in the TData record, when we backup the board we do FBackup.Push(FData), when we undo we do FData := FBackup.Pop, so a regular move would look like:

FBoard.Backup;
FBoard.Play(move);

FBoard.Switch;
AlphaBeta();
FBoard.Switch;

FBoard.Restore;

I've found some big mistakes, so I hope tomorrow I will uploaded a new version.

No comments:

Post a Comment