Hi everyone,
I would like to announce a new chess engine: Chess Fighter! It's a neural net engine based on AlphaZero although there are many many changes in my implementation. It's written in C++ and uses Dlib for the neural net. The project is private and the source code (and some of its novel techniques) will remain private for now. It does not use any Stockfish or Leela code.
It's probably around ELO 2500-2600 and although it's still training, its possible it may not go much further using my current methods and network size. It's trained entirely on self-play games from random weights and this has been done all on one PC with one 1080ti GPU!
Chess Fighter learns very fast: it takes about 1.5 minutes for one iteration and each iteration is about 19.2 games. Its had many many training runs which I've stopped and started and abandoned as I discovered new bugs and ideas. The current run (which I'm going to try to see to the end) is on iteration 14,000 == 268,000 games == 350 hours.
Generation 9852 (approx 190,000 games) won a 10 game match against AnMon (ELO 2537) +4-2=4, 2 min + 3 sec. And (I think) it started to have the occasional wins against 2500 engines around gen 6000 or so. There was a major bug discovered around gen 7000 that had the effect of CF not caring too much about being a pawn down. And another minor bug relating to the inputs was found later. Fortunately both issues were recoverable through further training (so no restart needed!) and there was a noticeable increase in strength (especially as it stopped giving away free pawns!)
It does use custom input planes in addition to the pieces though I do have a version that takes only the pieces as input and it trains just as fast. The fully zero version is on hold for now whilst I finish of this semi-zero version.
There is one very noticeable difference between Chess Fighter and Leela (aside from strength) and that is Chess Fighter does not troll! It is strictly a no-troll engine . Of course in some situations when it can't find the way forward it may shuffle a bit but in general it always goes for the win (including in endgame play) in a very efficient manner just like a classical engine.
Here are some details:
Name: Chess Fighter
Other names: Chess Fighter Zero
Gender: Male (sorry guys)
Value net: 4x64
Policy net: 6x96
Search algorithm: MCTS/PUCT
Learning: RL Self-play games (800 node play-outs)
ELO: 2500-2600
Training time: 268,000 games / 350 hours.
Creation date: 20-02-2019 at 2:26 am. Chess Fighter became self-aware a few hours later and then started to display unusual signs of an aptitude towards chess.
Acknowledgements:
Davies E King, author of the dlib C++ machine learning library.
Deep Mind for making public the methods used in AlphaZero.
Author of the Vice chess engine for making the excellent youtube series on programming a chess engine in C.
If you're looking to beat Stockfish you probably might need 1000's of GPU's but if you want to create a GM level engine (or possibly up to 3000 ELO) that plays very natural moves then you can definitely do it in the comfort of your own bedroom!
I will post some of the Chess Fighter games in a bit.
Alex
Chess Fighter Neural Net
Moderators: hgm, chrisw, Rebel
-
- Posts: 43
- Joined: Sun Mar 10, 2019 1:16 am
- Full name: Alexander Lim
-
- Posts: 1632
- Joined: Tue Aug 21, 2018 7:52 pm
- Full name: Dietrich Kappe
Re: Chess Fighter Neural Net
Excellent news. The more the merrier.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
-
- Posts: 1250
- Joined: Sat Jul 05, 2014 7:54 am
- Location: Southwest USA
Re: Chess Fighter Neural Net
Interesting project...you mean it played 270,000 games in one month? (less than a month) based on alpha0 or leela0Alexander Lim wrote: ↑Fri Mar 15, 2019 1:10 am Hi everyone,
I would like to announce a new chess engine: Chess Fighter! It's a neural net engine based on AlphaZero although there are many many changes in my implementation. It's written in C++ and uses Dlib for the neural net. The project is private and the source code (and some of its novel techniques) will remain private for now. It does not use any Stockfish or Leela code.
It's probably around ELO 2500-2600 and although it's still training, its possible it may not go much further using my current methods and network size. It's trained entirely on self-play games from random weights and this has been done all on one PC with one 1080ti GPU!
Chess Fighter learns very fast: it takes about 1.5 minutes for one iteration and each iteration is about 19.2 games. Its had many many training runs which I've stopped and started and abandoned as I discovered new bugs and ideas. The current run (which I'm going to try to see to the end) is on iteration 14,000 == 268,000 games == 350 hours.
Generation 9852 (approx 190,000 games) won a 10 game match against AnMon (ELO 2537) +4-2=4, 2 min + 3 sec. And (I think) it started to have the occasional wins against 2500 engines around gen 6000 or so. There was a major bug discovered around gen 7000 that had the effect of CF not caring too much about being a pawn down. And another minor bug relating to the inputs was found later. Fortunately both issues were recoverable through further training (so no restart needed!) and there was a noticeable increase in strength (especially as it stopped giving away free pawns!)
It does use custom input planes in addition to the pieces though I do have a version that takes only the pieces as input and it trains just as fast. The fully zero version is on hold for now whilst I finish of this semi-zero version.
There is one very noticeable difference between Chess Fighter and Leela (aside from strength) and that is Chess Fighter does not troll! It is strictly a no-troll engine . Of course in some situations when it can't find the way forward it may shuffle a bit but in general it always goes for the win (including in endgame play) in a very efficient manner just like a classical engine.
Here are some details:
Name: Chess Fighter
Other names: Chess Fighter Zero
Gender: Male (sorry guys)
Value net: 4x64
Policy net: 6x96
Search algorithm: MCTS/PUCT
Learning: RL Self-play games (800 node play-outs)
ELO: 2500-2600
Training time: 268,000 games / 350 hours.
Creation date: 20-02-2019 at 2:26 am. Chess Fighter became self-aware a few hours later and then started to display unusual signs of an aptitude towards chess.
Acknowledgements:
Davies E King, author of the dlib C++ machine learning library.
Deep Mind for making public the methods used in AlphaZero.
Author of the Vice chess engine for making the excellent youtube series on programming a chess engine in C.
If you're looking to beat Stockfish you probably might need 1000's of GPU's but if you want to create a GM level engine (or possibly up to 3000 ELO) that plays very natural moves then you can definitely do it in the comfort of your own bedroom!
I will post some of the Chess Fighter games in a bit.
Alex
(or both)? no code on github?.....opening book? Been playing games online? Self play only? Whats the objective for your 'project'? Thx AR
-
- Posts: 43
- Joined: Sun Mar 10, 2019 1:16 am
- Full name: Alexander Lim
Re: Chess Fighter Neural Net
Yes that sounds about right though I didn't have it running all the time otherwise it would of been allot quicker! It churns out around 12-13 games per minute which includes the training as well. The main bottleneck turns out to be the training process itself. Game generation has to stop whilst it's actually training on the data.Interesting project...you mean it played 270,000 games in one month? (less than a month) based on alpha0 or leela0
(or both)?
Remember the nets I'm using are quite small (4x64). The whole process can easily double or triple when larger nets are used.
No. I'm not a professional programmer. This is a hobby.no code on github?
What is it with you and opening books?? (your prev post). Anyway, I'm not sure what your getting at in the context of this post. Please clarify I would like to answer......opening book?
Show me how! Chess Fighter would love to play online .Been playing games online?
Seriously, Chess Fighter has not played online and I don't (yet) know how to implement that kind of stuff. Though I hope to get some help through this forum.
Yes.Self play only?
Is that a serious question?Whats the objective for your 'project'? Thx AR
-
- Posts: 6363
- Joined: Mon Mar 13, 2006 2:34 pm
- Location: Acworth, GA
Re: Chess Fighter Neural Net
How does it perform tactics-wise? Do you mind sharing some sample games?
Thanks and best wishes.
UPDATE: I just saw your other post "Chess Fighter Games"
Thanks and best wishes.
UPDATE: I just saw your other post "Chess Fighter Games"
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
__________________________________________________________________
Ted Summers
-
- Posts: 3657
- Joined: Wed Nov 18, 2015 11:41 am
- Location: hungary
Re: Chess Fighter Neural Net
Congratulations.
Bat what you mean:
"...and that is Chess Fighter does not troll. It is strictly a no-troll engine."?
Bat what you mean:
"...and that is Chess Fighter does not troll. It is strictly a no-troll engine."?
-
- Posts: 2846
- Joined: Mon Feb 11, 2008 3:53 pm
- Location: Denmark
- Full name: Damir Desevac
Re: Chess Fighter Neural Net
he means unlike Leela that masturbates in endgames where it plays 300 moves in won game and does not go for the fastest win. Chess Fighter does not do that...
-
- Posts: 4185
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Chess Fighter Neural Net
I have had a similar frustrating experience with reinforcement learning before i deemed it too big a project for one man.
What input planes do you use besides piece placement? I use attack tables and piece counts as additional inputs and they
seem to help accelerate learning.
Do you use replay buffer in your training and how much does it help to stabilize ? I suspect this was one of the key things
I missed when i was doing RL. I was also using value net only (no policy) at the time that makes matters worse. The 6x64 value net
was not improving after 300k games or so.
Good luck.
Daniel
What input planes do you use besides piece placement? I use attack tables and piece counts as additional inputs and they
seem to help accelerate learning.
Do you use replay buffer in your training and how much does it help to stabilize ? I suspect this was one of the key things
I missed when i was doing RL. I was also using value net only (no policy) at the time that makes matters worse. The 6x64 value net
was not improving after 300k games or so.
Good luck.
Daniel
-
- Posts: 3026
- Joined: Wed Mar 08, 2006 9:57 pm
- Location: Rio de Janeiro, Brazil
Re: Chess Fighter Neural Net
Why use only the value net? IIRC, DeepMind said that one of the key changes in AGZ that led to a big increase was combining both value and policy nets.Daniel Shawul wrote: ↑Fri Mar 15, 2019 4:24 pm I have had a similar frustrating experience with reinforcement learning before i deemed it too big a project for one man.
What input planes do you use besides piece placement? I use attack tables and piece counts as additional inputs and they
seem to help accelerate learning.
Do you use replay buffer in your training and how much does it help to stabilize ? I suspect this was one of the key things
I missed when i was doing RL. I was also using value net only (no policy) at the time that makes matters worse. The 6x64 value net
was not improving after 300k games or so.
Good luck.
Daniel
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."
-
- Posts: 4185
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Chess Fighter Neural Net
The dual vs separate resnet is a different question than using only value net.Albert Silver wrote: ↑Fri Mar 15, 2019 7:28 pmWhy use only the value net? IIRC, DeepMind said that one of the key changes in AGZ that led to a big increase was combining both value and policy nets.Daniel Shawul wrote: ↑Fri Mar 15, 2019 4:24 pm I have had a similar frustrating experience with reinforcement learning before i deemed it too big a project for one man.
What input planes do you use besides piece placement? I use attack tables and piece counts as additional inputs and they
seem to help accelerate learning.
Do you use replay buffer in your training and how much does it help to stabilize ? I suspect this was one of the key things
I missed when i was doing RL. I was also using value net only (no policy) at the time that makes matters worse. The 6x64 value net
was not improving after 300k games or so.
Good luck.
Daniel
Sharing the body of resnet and using policy/value heads, instead of two separate resnets for value and policy, helps as they confirmed.
I used to have only value net and used qsearch() for policy when i did selfplay RL -- that has changed now however.
It seems policy net contains a lot of positional knowledge, though it could be inferior to qsearch() interms of tactics.