An amateur attempt at breeding a chess-playing AI.
This program attempts to create a chess-playing AI by playing prospective AIs against each and letting the winners produce mutated copies. As evidence that this has a chance of working, here's a plot from a recent run of the value that the AIs place on each type of piece.
It took awhile (tens of thousands of generations), but it did figure out the correct ordering and relative value of the major pieces. Pawns have other genes measuring the influence of their positions, so their absolute value tends to be zero instead of the traditional one.
gcc
or clang
./create_Makefile gcc
(or clang
)make release
make user_manual
for the User Manual PDF (requires pdflatex
)
doc/reference.tex
with TexWriter or similar.make code_docs
for HTML source code references
make docs
for both-genetic genome_example.txt
genome_example.txt
argument with the file name and ID number of the best specimen from the
gene pool.gene_pool_config_example.txt
to adjust the number of simultaneous
games to a number less than or equal to the number of processors on your
computer.<bin location>/genetic_chess -gene-pool gene_pool_config_example.txt
Ctrl-Z
(Linux) or Ctrl-C
(on Windows) and run python3 analysis/run_genetic_plots.py gene_pool_config_example.txt
to generate plots and other data showing the evolution and behavior of the specimens.
numpy
, and matplotlib
to run.