GithubHelp home page GithubHelp logo

othello-rl's Introduction

Deep Reinforcement Learning

In this assignment, I implemented an Othello agent with the application of Deep Q-Network and Prioritized Experience Replay.

alt text

Game.py

This file contains the main logic for the Othello game. It uses the Pygame library for graphics and user interaction. The game board is represented as a 2D array and the players make moves by selecting valid positions on the board. The game loop handles the flow of the game and updates the board state accordingly.

DeepQNetwork.py

This file implements the Deep Q-Network (DQN) algorithm for playing Othello. It uses a neural network model to approximate the Q-values of different game states. The DQN agent learns from experience by replaying past game episodes and adjusting its Q-values based on the observed rewards. The agent chooses actions based on the highest Q-value for a given state.

Minimax.py

This file contains the implementation of the Minimax algorithm for playing Othello. The Minimax algorithm is a classic approach for finding the best move in a game with perfect information. It explores the game tree and evaluates the utility of different moves to determine the optimal move.

Othello.py

This file defines the Othello class, which represents the game environment. It provides methods for initializing the game, making moves, and checking for game over conditions. The Othello class is used by both the DQN and Minimax algorithms to interact with the game.

SumTree.py

This file implements a binary sum tree data structure used in the DQN algorithm for prioritized experience replay. The sum tree allows efficient sampling of experiences based on their priorities.

Usage

To play the game or test the algorithms, run the Game.py file. You can modify the parameters in the file to adjust the game settings, such as board size and AI difficulty.

References

othello-rl's People

Contributors

hyuugakojiro1612 avatar

Watchers

Kostas Georgiou 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.