ChessCore

From Chessprogramming wiki
Revision as of 23:37, 29 March 2020 by GerdIsenberg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Home * Engines * ChessCore

ChessBin.com chess [1]

ChessCore, (ChessBin.com)
a chess engine by Adam Berent, written in C#. The ChessBin.com chess engine was documented in a blog format [2], and has been converted to cross-platform .NET Core dubbed ChessCore, open source under the MIT License published on GitHub [3]. The program makes heavy use of the .NET Core garbage collector (GC) [4] and is mentioned as buggy in Ron Murawski's engine list [5].

Evaluate Moves

One sample of ChessCore's extensive GC usage demonstrates its Alpha-Beta search - at each node it generates and sorts all moves (or captures in quiescence) [6], and allocates the move list and each generated move on the heap [7]: For some reason, internal class position encapsulates the move.

private static List<Position> EvaluateMoves(Board examineBoard, byte depth) {
  ...
  List<Position> positions = new List<Position>();
  for (byte x = 0; x < 64; x++) { ...
    Piece piece = examineBoard.Squares[x].Piece;
    ... continue if empty or opponent piece
    foreach (byte dst in piece.ValidMoves) { ...
      Position move = new Position(x, dst);
      ... Score move, killers, etc ..
      positions.Add(move); 
    }
  }
  return positions;
}

Publications

Forum Posts

External Links

References

Up one level