All Projects → netcan → AnimalChess

netcan / AnimalChess

Licence: MIT license
Animal Fight Chess Game(斗兽棋) written in rust.

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to AnimalChess

Alphazero gomoku
An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
Stars: ✭ 2,570 (+3281.58%)
Mutual labels:  board-game, monte-carlo-tree-search, alphazero
Chess-Zero
Chess reinforcement learning by AlphaZero methods.
Stars: ✭ 36 (-52.63%)
Mutual labels:  chess, alphazero
Alpha Zero General
A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more
Stars: ✭ 2,617 (+3343.42%)
Mutual labels:  monte-carlo-tree-search, alphazero
shogi-pieces
Shogi (Japanese Chess) pieces and boards
Stars: ✭ 25 (-67.11%)
Mutual labels:  board-game, chess
ludorum.js
A board game framework, focused not on graphics or user interfaces, but on artificial players design, implementation and testing.
Stars: ✭ 13 (-82.89%)
Mutual labels:  alpha-beta-pruning, monte-carlo-tree-search
Mzinga
Open-source software to play the board game Hive.
Stars: ✭ 57 (-25%)
Mutual labels:  board-game, chess
Zerofish
An implementation of the AlphaZero algorithm for chess
Stars: ✭ 34 (-55.26%)
Mutual labels:  chess, alphazero
othello-prolog
📜 A fully functional Othello (Reversi) game, with several AIs, made in prolog for swipl.
Stars: ✭ 12 (-84.21%)
Mutual labels:  board-game, minmax
alpha sigma
A pytorch based Gomoku game model. Alpha Zero algorithm based reinforcement Learning and Monte Carlo Tree Search model.
Stars: ✭ 134 (+76.32%)
Mutual labels:  monte-carlo-tree-search, alphazero
chess
The game of Chess
Stars: ✭ 25 (-67.11%)
Mutual labels:  board-game, chess
checkers
A game of checkers written using minmax algorithm and alpha-beta pruning.
Stars: ✭ 19 (-75%)
Mutual labels:  alpha-beta-pruning, minmax
UCThello
UCThello - a board game demonstrator (Othello variant) with computer AI using Monte Carlo Tree Search (MCTS) with UCB (Upper Confidence Bounds) applied to trees (UCT in short)
Stars: ✭ 26 (-65.79%)
Mutual labels:  board-game, monte-carlo-tree-search
seven-wonders
A digital version of the 7 Wonders board game
Stars: ✭ 31 (-59.21%)
Mutual labels:  board-game
eschecs
UCI chess GUI
Stars: ✭ 32 (-57.89%)
Mutual labels:  chess
saltzero
Machine learning bot for ultimate tic-tac-toe based on DeepMind's AlphaGo Zero paper. C++ and Python.
Stars: ✭ 27 (-64.47%)
Mutual labels:  alphazero
king of tokyo
👑 King of Tokyo Multiplayer Board Game using Phoenix LiveView
Stars: ✭ 25 (-67.11%)
Mutual labels:  board-game
computer-go-dataset
datasets for computer go
Stars: ✭ 133 (+75%)
Mutual labels:  alphazero
coronate
A Swiss-style chess tournament management app.
Stars: ✭ 96 (+26.32%)
Mutual labels:  chess
magic-bits
A C++ header-only library for efficient move generation in Chess using "magic bitboards" technique
Stars: ✭ 26 (-65.79%)
Mutual labels:  chess
ChessLiteGUI
A lightweight Chess GUI for playing Chess on a personal computer.
Stars: ✭ 2 (-97.37%)
Mutual labels:  chess

Animal Chess

Animal Fight Chess Game(斗兽棋) written in rust, using Alpha-Beta-Pruning algorithm, and implement AlphaZero algorithm for training.

assets/animal_chess.png

How To Play

To win the game, one player must successfully move any animal into the Den(兽穴) of the opponent. See rules:

How To Run

It need rust nightly version.

Prerequisite

$ rustup default nightly

Play

$ git clone https://github.com/netcan/AnimalChess.git
$ cd AnimalChess
$ cargo run --release

Developing

$ sudo apt-get install python3-dev python-dev
$ pip3 install virtualenv ipython
$ cd pymodule
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ maturin develop
(venv) $ ipython
In [1]: import animal_chess_pymodule

In [2]: board = animal_chess_pymodule.Board('l5t/1d3c1/r1p1w1e/7/7/7/E1W1P1R/1C3D1/T5L w - - 0 1')

In [3]: board
Out[3]:
l #@# t
 d # c
r p w e
 ~~ ~~
 ~~ ~~
 ~~ ~~
E W P R
 C # D
T #@# L

In [4]: board.generate_all_steps()
Out[4]:
[24688,
 24673,
 24656,
 25202,
 25187,
 25185,
 25716,
 25701,
 25699,
 26230,
 26198,
 26213,
 29057,
 29042,
 29025,
 29040,
 30085,
 30070,
 30053,
 30068,
 32897,
 32880,
 34422,
 34437]

In [5]: board.move_chess(24688)

In [6]: board
Out[6]:
l #@# t
 d # c
r p w e
 ~~ ~~
 ~~ ~~
 ~~ ~~
  W P R
EC # D
T #@# L

Todo

  • Seperate game.rs to gui.rs and board.rs
  • Add Monte Carlo Tree Search Algorithm
  • benmark board operation
  • export module for python3
  • add some test
  • benmark pymodule
  • encode/decode move
  • generate fen
  • repr board
  • patch sdl2 to support load_texture from buffer
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].