Giter Site home page Giter Site logo

egrund / self-play_dqn_project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 247.21 MB

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

Python 100.00%
deep-learning deep-q-network deep-reinforcement-learning dqn neural-network self-play tensorflow

self-play_dqn_project's Introduction

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:

self-play_dqn_project's People

Contributors

egrund avatar kirschberg32 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.