/TCG_Project

Theory of Computer Game course projects.

Primary LanguageC++

TCG_Project

Theory of Computer Game course projects.

Introduction:

An AI agent which is able to play 2584 game and reach human-level performance.
Implement it with Temporal Difference Learning and N-tuple network to extract features of the board.

Instructions:

To make the sample program
👉$ make #see makefile for deatils

To run the sample program
👉$ ./2584 #by default the program will run for 1000 games

To specify the total games to run
👉$ ./2584 --total=100000

To save the statistic result to a file
👉$ ./2584 --save=stat.bin #existing file will be overwrited

To load and review the statistic result from a file
👉$ ./2584 --load=stat.bin --summary

To display the statistic every 1000 episodes
👉$ ./2584 --total=100000 --block=1000

To save the weights of player to a file
👉$ ./2584 --play="save=weights.bin"

To load the weights of player from a file
👉$ ./2584 --play="load=weights.bin"

To train the network 100000 games, and save the weights to a file
👉$ ./2584 --total=100000 --block=1000 --play="save=weights.bin"

To load the weights from a file, train the network for 100000 games, and save the weights
👉$ ./2584 --total=100000 --block=1000 --play="load=weights.bin save=weights.bin"

To set the learning rate of training
👉$ ./2584 --play="alpha=0.0025"

To load the weights from a file, test the network for 1000 games, and save the statistic
👉$ ./2584 --total=1000 --play="load=weights.bin alpha=0" --save="stat.bin"