Skip to content

Antiking chess AI based on Deepminds AlphaZero Paper

License

Notifications You must be signed in to change notification settings

lintglitch/antilope

Repository files navigation

Antilope Anti-King-Chess engine
------------------------------------------
by Philipp Grosenick ([email protected])


Dependencies
-----------------------
requirements:
	java 64bit >= 8.0
	python3
	Graphviz (only for visualization)

python3 module requirements:
	keras
	tensorflow
	matplotlib (only for visualization)

Was tested on windows and linux. Alternatively there is a Docker image available.


How to Run Quickguide
-----------------------
To play against human:
$ cd antilope_n
$ python3 run.py server &
$ cd ../versus
$ java -jar Versus.jar scripts/singlematch-human.xml

To train sequentially:
$ cd antilope_n
$ python3 run.py server &
$ java -jar antilope.jar

To train in parallel:
$ cd antilope_n
$ python3 run.py train --log_file train.log &
$ java -jar antilope.jar


How to Run Guide
-----------------------

Antilope is based on a Client/Server architecture.

The Neural Network server binary is located in the 'antilope_n' directory. The server
is started by running 'run.py' (typically $python3 run.py server).  If 'run.py' is run
without giving command line parameters help will be displayed.

The versus system for playing against other versus AIs and against humans is in
the 'versus' directory.


Directory structure
-----------------------

AntiAI - java client, it manages the neural network and has the MCTS
antilope_n - python3 server, it contains the neural network
versus - versus environment for running against other AIs or humans


Data
-----------------------
training.log - log of loss over the training generations
games_old - contains CSV of all training games that are already loaded
games - contains CSV of training games that have not yet been loaded
games_error - contains CSV of training games that could not be read for some reason
weights.h5 - most current neural network parameters
generation_120.h5 - copy of the weights at training cycle 120


Docker images
-----------------------
grosenick/antilope:trainer - a gpu-accelerated docker, needs the nvidia docker installed

See start_trainer.sh how to run the docker. The source code location must be given by:
	nvidia-docker run -v /path/to/antilope_n:/data --name trainer --rm grosenick/antilope:trainer

Make sure the antilope_n/games, antilope_n/games_old, antilope_n/games_error exist.

grosenick/antilope:generator - generates self-play games using only CPU
	docker run -v /path/to/antilope_n:/data --name generator1 --rm grosenick/antilope:generator

grosenick/antilope:GPUgenerator - generates self-play games using GPU, cannot share a GPU with the trainer

About

Antiking chess AI based on Deepminds AlphaZero Paper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published