Chess Fighter Neural Net release

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Alexander Lim
Posts: 32
Joined: Sun Mar 10, 2019 12:16 am
Full name: Alexander Lim

Chess Fighter Neural Net release

Post by Alexander Lim » Thu Apr 11, 2019 7:14 am

Chess Fighter is now available for download from my Google Drive:
https://drive.google.com/drive/folders/ ... sp=sharing

Download the .rar file and unzip it. Keep everything in the same file.

Chess Fighter only works with a GPU. There will be no CPU only version as it will be too slow (about 100 times slower).

To test if everything is working open chess_fighter.exe.
Type "uci" (without quotations) and hit enter. You should see my name.
Now type "go wtime 5000" and hit enter. If it does a little search then your all ready to install into your chess GUI.

The default settings are: puct 0.7, softmax temperature 0.3, fpu 0.1, batch inference 60.
You can change these through the 'command line parameters'. If you do change anything, you have to enter all 4 parameters. For example to change the batch size to 80 (and leave everything else unchanged) enter:

0.7 0.3 0.1 80

On my 1080ti a batch inference size of 60 is giving me around 11,000 nps. You need to experiment a little to get the best nps. The better your GPU the bigger the batch size.

I've not implemented the full UCI protocol, just enough to play games and do testing. Also I've only tested it with Arena but it should work with most other chess GUI's. Here what it does:

* You can play with fixed time + increment.
* Matches / Gauntlets
* Will display evaluation, total nodes, max search depth.
* The evaluation is the raw net output (between -1 and 1) multiplied by 10 to give a score between -10 and 10.
* You can enter a FEN position.

What it will not do:
* Analysis mode
* If it's thinking you cannot interrupt it.
* You cannot do fixed depth / fixed nodes
* No PV output
* No nodes per second (though you can work it out yourself)

When Chess Fighter first loads it always makes a dummy call to the evaluation function which can sometimes take a few seconds. This is usually not a problem but sometimes is and you have to hit new game a few times. If it is an issue there is an option in Arena for an 'additional delay during engine start phase' that might help.

I would be very grateful if anyone played some gauntlets / matches and posted the results so we can estimate its ELO.
I'm very curious how it would do against Leela. For some reason I can't get LC0 to work on my PC (something to do with the drivers) and have been using the old (slower) Leela 6x64 which is around 2000 nps. So it's not really played a proper LC0 yet. The Leela 6x64 usually had the upper hand though Chess Fighter did have its share of wins.

A match vs the newer/faster 6x64 net would be nice to see (Chess Fighter is a 4x64 net).

The best engine its beaten is Rybka (I think around 2 wins out of 20 games).

Chess Fighter is trained entirely from self-play games starting to random weights (zero knowledge). Each iteration is trained on 4096 positions and the final net was iteration 17723.

Enjoy

Alex

BigBazza
Posts: 3
Joined: Thu Feb 28, 2019 3:52 pm
Full name: Barry Clements

Re: Chess Fighter Neural Net release

Post by BigBazza » Thu Apr 11, 2019 10:58 am

Many thanks Alex, I look forward to trying it

brianr
Posts: 344
Joined: Thu Mar 09, 2006 2:01 pm

Re: Chess Fighter Neural Net release

Post by brianr » Thu Apr 11, 2019 3:05 pm

Tried with Win7.
Had to copy cudart64_92.dll and cublas64_92.dll into the directory.
Always searches for around 38,000 nodes for me, regardless of go <w,b>time n command
Appears to be making the moves, which should not be done.
Some --help info would be, well, helpful.

A very good start.
Did you use one of the various Leelas for training or create your own?

Alexander Lim
Posts: 32
Joined: Sun Mar 10, 2019 12:16 am
Full name: Alexander Lim

Re: Chess Fighter Neural Net release

Post by Alexander Lim » Thu Apr 11, 2019 5:19 pm

brianr wrote:
Thu Apr 11, 2019 3:05 pm
Tried with Win7.
Had to copy cudart64_92.dll and cublas64_92.dll into the directory.
Good point! I must have them somewhere in my Windows directly. Hopefully if others have the same issue they can do the same.
Always searches for around 38,000 nodes for me, regardless of go <w,b>time n command
Hmme that's strange. Not sure why that's happening.
Appears to be making the moves, which should not be done.
Is that something to do with the UCI protocol? I can't remember as its been a long time. I vaguely remember having issues detecting three fold repetition (for the engine evaluation) so I manually made the moves myself as a quick fix. I'll need to look into this at some point if its going to cause issues. But did you get it to work on Arena or anything?
A very good start.
Did you use one of the various Leelas for training or create your own?
Thanks. Everything (the UCI engine, training framework and game generation) is done by myself from scratch in C++.

brianr
Posts: 344
Joined: Thu Mar 09, 2006 2:01 pm

Re: Chess Fighter Neural Net release

Post by brianr » Thu Apr 11, 2019 6:11 pm

I am no UCI expert, but it might not matter if the engine makes the moves as the GUI will send the position and an appropriate move list each time anyway, I think.

Was having some trouble under Arena.
Tried under Winboard.
Does run, but moves instantly.

Have go head off to work.
Will look at it again later.

supersharp77
Posts: 668
Joined: Sat Jul 05, 2014 5:54 am
Location: Southwest USA

Re: Chess Fighter Neural Net release

Post by supersharp77 » Thu Apr 11, 2019 6:41 pm

Alexander Lim wrote:
Thu Apr 11, 2019 7:14 am
Chess Fighter is now available for download from my Google Drive:
https://drive.google.com/drive/folders/ ... sp=sharing

Download the .rar file and unzip it. Keep everything in the same file.

Chess Fighter only works with a GPU. There will be no CPU only version as it will be too slow (about 100 times slower).

To test if everything is working open chess_fighter.exe.
Type "uci" (without quotations) and hit enter. You should see my name.
Now type "go wtime 5000" and hit enter. If it does a little search then your all ready to install into your chess GUI.

The default settings are: puct 0.7, softmax temperature 0.3, fpu 0.1, batch inference 60.
You can change these through the 'command line parameters'. If you do change anything, you have to enter all 4 parameters. For example to change the batch size to 80 (and leave everything else unchanged) enter:

0.7 0.3 0.1 80

On my 1080ti a batch inference size of 60 is giving me around 11,000 nps. You need to experiment a little to get the best nps. The better your GPU the bigger the batch size.

I've not implemented the full UCI protocol, just enough to play games and do testing. Also I've only tested it with Arena but it should work with most other chess GUI's. Here what it does:

* You can play with fixed time + increment.
* Matches / Gauntlets
* Will display evaluation, total nodes, max search depth.
* The evaluation is the raw net output (between -1 and 1) multiplied by 10 to give a score between -10 and 10.
* You can enter a FEN position.

What it will not do:
* Analysis mode
* If it's thinking you cannot interrupt it.
* You cannot do fixed depth / fixed nodes
* No PV output
* No nodes per second (though you can work it out yourself)

When Chess Fighter first loads it always makes a dummy call to the evaluation function which can sometimes take a few seconds. This is usually not a problem but sometimes is and you have to hit new game a few times. If it is an issue there is an option in Arena for an 'additional delay during engine start phase' that might help.

I would be very grateful if anyone played some gauntlets / matches and posted the results so we can estimate its ELO.
I'm very curious how it would do against Leela. For some reason I can't get LC0 to work on my PC (something to do with the drivers) and have been using the old (slower) Leela 6x64 which is around 2000 nps. So it's not really played a proper LC0 yet. The Leela 6x64 usually had the upper hand though Chess Fighter did have its share of wins.

A match vs the newer/faster 6x64 net would be nice to see (Chess Fighter is a 4x64 net).

The best engine its beaten is Rybka (I think around 2 wins out of 20 games).

Chess Fighter is trained entirely from self-play games starting to random weights (zero knowledge). Each iteration is trained on 4096 positions and the final net was iteration 17723.

Enjoy

Alex
Thx for the download! Went to check it out and it says 166Mb......Hey whats in there? A large NN file?
We really do need CPU(No high speed GPU for me currently) and Android (and Rasberry Pi) options at some point for certain on these NN programs You say the best victory so far is against Rybka? What about Fritz or Stockfish or Sugar? any pgn games? Let me know Thx AR :) :wink:

Dicaste
Posts: 87
Joined: Mon Apr 16, 2012 5:23 pm
Location: Istanbul, TURKEY

Re: Chess Fighter Neural Net release

Post by Dicaste » Thu Apr 11, 2019 7:00 pm

Allie v2 (Lc0 41800 network) vs Chess Fighter: starting position Sicilian: Najdorf


Alexander Lim
Posts: 32
Joined: Sun Mar 10, 2019 12:16 am
Full name: Alexander Lim

Re: Chess Fighter Neural Net release

Post by Alexander Lim » Thu Apr 11, 2019 8:02 pm

Dicaste wrote:
Thu Apr 11, 2019 7:00 pm
Allie v2 (Lc0 41800 network) vs Chess Fighter: starting position Sicilian: Najdorf

Thanks for the post! It's good to see that it does work on other peoples computers. Which GUI were you using?
I presume those moves in brackets are what Allie was expecting from Chess Fighter? Interesting how many times they differed. Different nets with different ideas? Or just a difference in strength :oops:
Be warned, Chess Fighter 2 is training up as we speak!

Dicaste
Posts: 87
Joined: Mon Apr 16, 2012 5:23 pm
Location: Istanbul, TURKEY

Re: Chess Fighter Neural Net release

Post by Dicaste » Fri Apr 12, 2019 12:51 am

Alexander Lim wrote:
Thu Apr 11, 2019 8:02 pm
Dicaste wrote:
Thu Apr 11, 2019 7:00 pm
Allie v2 (Lc0 41800 network) vs Chess Fighter: starting position Sicilian: Najdorf

Thanks for the post! It's good to see that it does work on other peoples computers. Which GUI were you using?
I presume those moves in brackets are what Allie was expecting from Chess Fighter? Interesting how many times they differed. Different nets with different ideas? Or just a difference in strength :oops:
Be warned, Chess Fighter 2 is training up as we speak!
Aquarium 2019. It's hard to see it's working because no of no pv. I almost end match but it played.

Dokterchen
Posts: 100
Joined: Wed Aug 15, 2007 10:18 am
Location: Munich

Re: Chess Fighter Neural Net release

Post by Dokterchen » Fri Apr 12, 2019 5:14 am

Alexander Lim wrote:
Thu Apr 11, 2019 5:19 pm
brianr wrote:
Thu Apr 11, 2019 3:05 pm
Tried with Win7.
Had to copy cudart64_92.dll and cublas64_92.dll into the directory.
Good point! I must have them somewhere in my Windows directly. Hopefully if others have the same issue they can do the same.
Hi Alexander,

first of all a big thanj you for releasing your engine!

Why you are using the old CUDA 9 instead of CUDA 10 like LcO and Allie? However I just renamed the cudart64_10.dll and cublas64_10.dll to cudart64_92.dll and cublas64_92.dll and now Chess Fighter starts on my machine with a RTX 2070 and i am getting around 10 K nps. But I am not sure wether it works properly.

KR
Torsten
Torsten Schoop

Post Reply