This repository contains an implementation of AlphaZero, a Deep Reinforcement Learning (DRL) algorithm for playing complex strategy games. AlphaZero, developed by DeepMind, is known for its impressive performance in games like Go, Chess, and Shogi.
AlphaZero combines deep neural networks with Monte Carlo Tree Search (MCTS) to achieve superhuman performance in various board games. This implementation aims to provide a clear and adaptable codebase for experimenting with AlphaZero in different games.
- Modular Design: The implementation is designed to be modular, allowing easy integration with different board games.
- Efficient Training: Utilizes parallelism and GPU acceleration for efficient training of neural networks.
- Self-Play: Implements self-play mechanism to generate training data.
- Model Evaluation: Evaluates the trained models against baseline agents or human players.
- Visualization: Provides tools for visualizing gameplay and training progress. (In-progress)
- Tic-Tac-Toe
- Connect Four
- Chess
- Go
- Shogi
- Python 3.x
- PyTorch
- NumPy
- Clone this repository:
git clone https://github.com/yourusername/AlphaZero-Implementation.git'
- Create and activate a new environment:
conda create -n alphazero
conda activate alphazero
- Install conda an pip dependencies:
conda env update -f conda_environment.yml
pip install -r requirements.txt
- Run AlphaZero.ipynb notebook
python AlphaZero.ipynb
- Navigate to
cd TicTacToe_UI
- Navigate to
cd backend
- Run
app.py
file to start the backend server (Make sure environment is activated)
python app.py
- In a separate terminal, navigate to
cd frontend
- Start frontend server by:
npm install
npm start
- Navigate to
cd ConnectFour_UI
- Navigate to
cd backend
- Run
app.py
file to start the backend server (Make sure environment is activated)
python app.py
- In a separate terminal, navigate to
cd frontend
- Start frontend server by:
npm install
npm start