go-chess-perft

command
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 12 Imported by: 0

README

go-chess-perft

The utility for counting all possible chess moves (based on the perft function).

Features

  • counting all possible moves:
    • parameters:
      • 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);
      • position;
      • color that moves first;
      • analysis deep;
  • profiling:
    • targets:
      • CPU usage;
      • memory usage;
    • storing the results to files.

Installation

$ go install github.com/thewizardplusplus/go-chess-models/cmd/go-chess-perft@latest

Usage

$ go-chess-perft -h | -help | --help
$ go-chess-perft [options]

Options:

  • -h, -help, --help — show the help message and exit;
  • -storage {map|slice|bits} — piece storage kind (default: slice);
  • -fen STRING — board in Forsyth-Edwards Notation (default: rnbqk/ppppp/5/PPPPP/RNBQK, i.e., Gardner's minichess);
  • -color {black|white} — color that moves first (default: white);
  • -deep INTEGER — analysis deep (should be greater than or equal to zero; default: 5);
  • -cpuProfile STRING — file for CPU profile writing;
  • -memoryProfile STRING — file for memory profile writing.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL