QueensGambit / CrazyAra

A Deep Learning UCI-Chess Variant Engine written in C++ & Python :parrot:
https://lichess.org/@/CrazyAra
GNU General Public License v3.0
248 stars 42 forks source link

Support for other variants #32

Open ghost opened 4 years ago

ghost commented 4 years ago

Greetings,

Crazyara was really well done and it's one of the finest works I've ever seen.

However I do have a really basic question, does it support other variants besides crazyhouse?

I downloaded Crazyara 0.7 and it shows up crazyhouse plus giveaway chess in the UCI_Variant options, and since I saw references for all the lichess variants I'm curious about it.

Best Regards,

QueensGambit commented 4 years ago

Hello @fjscabral , thank you for your motivating words.

I downloaded Crazyara 0.7 and it shows up crazyhouse plus giveaway chess in the UCI_Variant options, and since I saw references for all the lichess variants I'm curious about it.

Yes, you noted correctly that the code base now includes a multi variant input and output representation which supports all lichess variants.

In a subchapter of my master thesis, I briefly evaluated whether it is advantageous to train a model for multiple variants at once or each variant separately.

image

image

-- Deep Reinforcement Learning for Crazyhouse, Johannes Czech (2019)

I trained neural networks for the chess960, giveaway, atomic, king of the hill, 3-check and horde variant so far using games from the lichess.org database. Moreover, I started to integrate these networks into the MCTS search starting with the giveaway variant. Later, I focused on improving the reinforcement learning setup which is the main part of my master thesis; therefore multi-variant support is still work in progress. Hopefully I will be able to publish the thesis soon, then you can take a look at it in more detail.

From my experience it seems NN+MCTS approaches seem to excel in highly complex environments. In principle, Shogi and Xiangqi could also be supported if the board representation from Fairy-Stockfish were integrated.

For the next steps I plan to address the known issues of release 0.7.0 first and to extend CrazyAra to classical chess using supervised and reinforcement learning. Classical chess has received much attention in the past with a broad set of competitors; hence it should help to put the results and hardware requirements to learn crazyhouse into perspective.

ghost commented 4 years ago

Thank You! Best of wishes for your thesis!

QueensGambit commented 4 years ago

My master thesis is now available on the website of the Machine Learning Lab, TU Darmstadt:

musketeerchess commented 4 years ago

Hi Nice work.

Can you please reach me by mail at musketeerchess (a) gmail.com I have something interesting i would like to discuss with you and your team.

Zied

Hello @fjscabral , thank you for your motivating words.

I downloaded Crazyara 0.7 and it shows up crazyhouse plus giveaway chess in the UCI_Variant options, and since I saw references for all the lichess variants I'm curious about it.

Yes, you noted correctly that the code base now includes a multi variant input and output representation which supports all lichess variants.

In a subchapter of my master thesis, I briefly evaluated whether it is advantageous to train a model for multiple variants at once or each variant separately.

image

image

-- Deep Reinforcement Learning for Crazyhouse, Johannes Czech (2019)

I trained neural networks for the chess960, giveaway, atomic, king of the hill, 3-check and horde variant so far using games from the lichess.org database. Moreover, I started to integrate these networks into the MCTS search starting with the giveaway variant. Later, I focused on improving the reinforcement learning setup which is the main part of my master thesis; therefore multi-variant support is still work in progress. Hopefully I will be able to publish the thesis soon, then you can take a look at it in more detail.

From my experience it seems NN+MCTS approaches seem to excel in highly complex environments. In principle, Shogi and Xiangqi could also be supported if the board representation from Fairy-Stockfish were integrated.

For the next steps I plan to address the known issues of release 0.7.0 first and to extend CrazyAra to classical chess using supervised and reinforcement learning. Classical chess has received much attention in the past with a broad set of competitors; hence it should help to put the results and hardware requirements to learn crazyhouse into perspective.

musketeerchess commented 3 years ago

Hi It would be nice if CrazyAra supports more Chess Variants. 2 Families of interesting Chess Variants: Bigger Board with additional Pieces (Janus Chess, Capablanc Chess, Shako etc). And Same Board Size with additional Pieces (Musketeer Chess, Seirawan Chess). The latter suggestions are chess variants that support drop mechanisms to introduce the pieces. CrazyAra already supports drops of pieces in CrazyChess So it should be the perfect addition for a Chess variant more dynamic than Classic Chess, with drops allowed (not for every captured piece by why not a Hybrid Crazy Musketeer or Crazy Seirawan Chess).

musketeerchess commented 3 years ago

Hi I would like to be part of a master thesis, using CrazyAra and training NN for some new interesting chess variants. The ones i talk about are Musketeer Chess, Seirawan Chess, Capablanca Chess and Gemini Chess. Musketeer and Seirawan are played on an 8x8 Board and differ from Chess adding 2 pieces (more piece choices with Musketeer Chess). These additional pieces are introduced by a drop mechanism. The drop mechanism is different when comparing Musketeer and Seirawan. The uniqueness of the Drop mechanism itself in Musketeer Chess is an important element of the game balance as this propably limits White's advantage as the side starting the game. When studying this part and training an engine with a specific NN this could be a fundamental finding in the Chess Variants research and for the future of chess and chess variants.

Capablanca and Gemini Chess are played on a 10x8 Board. 2 additional pieces are used (Archbishop = B+N and Chancellor = R + N in Capablanca and 2 Archbishops in Gemini).

These are quite popular and interesting Variants. And they could be played using the Fischer Random Chess rules also.

I'm willing to help finance a thesis for one of your students and providing a Nice CPU time (64 threads Threadripper Station with 3 GPU's). Please email me at musketeerchess @ gmail.com