Skip to content

About

A JAR file that trains a TDL agent to play Connect 4. The Minimax agent and the Connect 4 Framework is taken from MarkusThill/Connect-Four.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

77 Commits

Folders and files

Repository files navigation

Connect-Four

A JAR file that trains a TDL agent to play Connect 4. The Minimax agent and the Connect 4 Framework is taken from MarkusThill/Connect-Four.

Running the JAR file

java -jar c4console.jar trainAgainstMinimax alpha epsilon
  • trainAgainstMinimax (true/false): Determines whether the TDL agent is trained through self-play or against a Minimax agent. The default value is false.
  • alpha (positive real): Determines the initial learning rate. Default is 0.004.
  • epsilon (positive real): Determines the exploreation rate. Default is 0.1.

Output

The program generates the file results.csv, which includes the score of the TDL agent measured after every 25000 training games. The score is a value between 0 and 100 that is determined over 100 evaluation games against the Minimax agent. Since the Minimax agent can force a win if it goes first, the TDL agent goes first and the Minimax agent go second. For each game, the TDL agent is awarded 1 point for a win, 0.5 points for a draw, and 0 points for a loss.

Results

Comparison of training through self-play vs training against optimal agent

graph1

Comparison of different initial values of alpha

graph2

Comparison of different alpha decay schemes

graph3

Comparison of different initial values of epsilon

graph4

More sample results and graphs can be found under the "Results" folder.

About

A JAR file that trains a TDL agent to play Connect 4. The Minimax agent and the Connect 4 Framework is taken from MarkusThill/Connect-Four.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages