Skip to content

v1.9.0

Latest

Choose a tag to compare

@thewizardplusplus thewizardplusplus released this 10 Dec 05:48

Adding the boards.BitBoard structure; adding the go-chess-moves and go-chess-comparator tools.

Change Log

  • new features:
    • the boards.BitBoard structure:
      • add the boards.BitBoard structure;
      • add the boards.BitBoard structure to the go-chess-perft tool;
    • add the go.mod file;
    • tools:
      • improve the go-chess-perft tool:
        • improve the documentation;
        • improve the options;
        • validate the deep option;
      • add the go-chess-moves tool;
      • add the go-chess-comparator tool;
  • refactoring:
    • fix the code style with the golangci-lint tool;
  • unit testing:
    • improve the tests of the ApplyMove() methods;
  • examples:
    • move the tests of the boards package to the right place.

Features

  • representing the board:
    • as an associative array of pieces with their positions as keys;
    • as a plain array of pieces with exact correspondence array indices to piece positions;
    • as a set of integers corresponding to a particular combination of piece color and type, and where each bit corresponds to a particular piece position (so-called a bitboard);
  • immutable applicating moves to the board via copying the latter;
  • checkings of moves:
    • universal;
    • individual for all types of pieces;
  • generating moves via filtering from all possible ones;
  • move restrictions (abandoned moves):
    • pawn double-move;
    • en passant capture;
    • promotion;
    • castling;
  • perft function;
  • using an abstraction of a piece;
  • Forsyth-Edwards Notation:
    • parsing:
      • of a position;
      • of a move;
      • of a piece kind;
      • of a piece color;
      • of a board;
    • serialization:
      • of a position;
      • of a move;
      • of a piece kind;
      • of a piece color;
      • of a board;
  • utilities:
    • utility for counting all possible moves (based on the perft function);
    • utility for generating all possible chess moves;
    • utility for comparing the generation of all possible chess moves by different board representations.