Skip to content

snail-inO/online-xiang-qi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

online-xiang-qi

An online Xiang Qi (Chinese Chess) game web app backend

Description

The project is a web application implements an AI using Monte Carlo Tree Search algorithm with a Convolutional Neural Network in a Chinese Chess Game.
The tree-based AI has a reasonable performance when the rollout times is larger than 50 and depth limit is larger than 100. However, the tree-based AI integrated with NN has worse performance than the tree-based AI without NN, which is possibly due to the inappropriate utility evaluation and the incorrect design of NN model.
The project contains three modules: backend server, frontend application, and NN module.

Get Started

Prerequisites

Deployment

Backend

  1. Clone the repository: $ git clone https://github.com/snail-inO/online-xiang-qi.git
  2. Go to the project code directory: $ cd online-xiang-qi/code
  3. Start Docker client
  4. Run containers: docker-compose up (need to run after building Docker image of frontend, Frontend step4)
  1. Clone the repository: $ git clone https://github.com/snail-inO/online-xiang-qi-frontend.git
  2. Go to the project directory: $ cd online-xiang-qi-frontend
  3. Start Docker client
  4. Build docker image: $ docker build -t front .

Usage

  1. Access http://localhost:3000 on a browser
  2. Enter a user name
  3. Select game modes and problem size (opponet mode cannot set to user mode if your mode isn't user mode)
  4. Red player moves first
  5. Perform a move
  6. (User mode) Click on the piece of your color to select the piece (click one more time to unselect) and click on a valid position on the board to move
  7. (AI mode) Click Next button to perform a move (Do not click the button if opponent's move is not completed)
  8. Wait until opponent's move is completed, then repeat step 5
  9. If you do not perform an action longer than 60 seconds, you will lose the game

Licence

This project is licensed under the GPLv2 License.

About

An online xiang qi web app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages