Skip to content

Using an DQN agent trained on Tic-Tac-Toe and Connect Four as a base for an dynamically balanced opponent. (Student Project)

Notifications You must be signed in to change notification settings

egrund/Self-Play_DQN_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-Play_DQN_Project

IANNWTF Project WS22/23
Eosandra Grund and Fabian Kirsch

The project was created using Python 3.10.8. The package requirements can be found in requirements.txt. It is our final project for the course 'Implementing Artificial Neural Networks in Tensorflow' given in the winter semester 22/23 at Osnabrück University.

We trained DQN agents to play Tic-Tac-Toe and Connect Four using self-play. And then used them as a base for an adapting agent that creates a more balanced game and hopefully a better playing experience. The adapting agents where created by changing the action decions formula in the method action_choice of Agent.

Results:

As you can see in the following plots, our agents learned well.

Training progress of our best Tic-Tac-Toe agent in loss
Training progress of our best Tic-Tac-Toe agent in loss.

Training progress of our best Tic-Tac-Toe agent in ratio of rewards. The red line shows which agent we chose as the best one.
Training progress of our best Tic-Tac-Toe agent in ratio of rewards.

The plots for Connect Four can be found in here.

The adapting agents worked well, but not perfect yet. The following is a plot of one method for Tic-Tac-Toe. On the x-axis are different strong opponents from strong to weak and on the y-axis is the percentage for every reward. Testing AdaptingAgent against different opponents

Files:

About

Using an DQN agent trained on Tic-Tac-Toe and Connect Four as a base for an dynamically balanced opponent. (Student Project)

Topics

Resources

Stars

Watchers

Forks

Languages