Re:zero is a web application that can play Reversi against AI based on the AlphaZero (AZ) algorithm.
Note: Re:zero is a work in progress. In the future, Re:zero will be able to play against other players.
- Play against AZ
- You can also write posts and comments on the community
.
├── alphazero # AlphaZero
│ ├── app.py # Flask application (no longer used)
│ ├── dual_network.py # Dual network that outputs the policy and value using ResNet
│ ├── evaluate_best_player.py # Evaluate the best player
│ ├── evaluate_network.py # Evaluate the network
│ ├── game.py # Reversi game logic
│ ├── human_play.py # Human play
│ ├── pv_mcts.py # PV MCTS algorithm
│ ├── self_play.py # Self play
│ ├── train_cycle.py # Train cycle
│ ├── train_network.py # Train network
│ └── model # Trained best model
│ └── best.h5
│
├── server # Laravel server
│ └── ...
├── webapp # Next.js web application
│ ├── public # Static files
│ │ └── assets # Next.js assets
│ ├── components # Next.js components
│ ├── lib
│ │ ├── api # Ajax calls to the server
│ │ ├── othello # Reversi game logic for the webapp
│ │ └── ...
│ ├── pages # Next.js pages
│ ├── store # Zustand store (Does not used yet)
│ ├── hooks # Next.js hooks
│ ├── typings # type definitions
│ └── ...
└── README.md
This is an example of how you may give instructions on setting up Re:zero locally. To get a local copy up and running follow these simple example steps.
- Node.js (version >= 14.x)
- PHP (version >= 8.1)
- Python (version >= 3.9)
- Yarn (version >= 1.22) (recommended)
- Clone the repository
git clone https://github.com/1ncursio/laravel-othello.git
- Install NPM dependencies for the frontend
cd laravel-othello/webapp
yarn install
- Run the frontend server
yarn dev
- Install Composer dependencies for the backend
cd laravel-othello/server
composer require
- Migrate the database
php artisan migrate
- Copy
.env.example
to.env
and fill in the required values
cp .env.example .env
- Run the backend server
php artisan serve
Then open your browser and navigate to http://localhost:3000/
- Refactor the code to use the Zustand
- Write tests
- Deploy the project
- Implement multi-player mode
- Migrate Backend Framework (e.g. Nest.js, fastify, django, etc.)
- Support i18n
- Support PWA
- Implement Scalable Game Board (e.g. 6x6, 8x8, 10x10, etc.)
Distributed under the MIT License. See LICENSE for more information.