New Giraffe

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

Moderators: hgm, Rebel, chrisw

matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe

Post by matthewlai »

Kirk wrote:
matthewlai wrote:A few months ago I promised a cleaned up version of Giraffe, but since that actually requires quite a bit of work, I haven't had a chance to get to it till now.

New version: https://bitbucket.org/waterreaction/gir ... 161023.zip

* The biggest change is porting the neural network code from my own DIY framework to Torch (http://torch.ch/). The neural network code was by far the messiest part of Giraffe, and so I'm very happy to have gotten rid of that. However, calling Torch through the Lua interpreter during play is way too slow, so I wrote partial (evaluation only, no training support) Eigen implementations of the Torch modules I use. That means if you are building Giraffe yourself, unless you want to train the net, there's no dependency on Torch. This also means training on Windows is now totally impossible.

* I have removed the move evaluator net for now. I haven't ported that to Torch, and the benefit from that isn't that big anyways.

* ~200 Elo improvement in self-play through optimizing the training process. The only real difference is in eval.

* Network format changed completely. Don't try to use the new net (included in the zip file) with old Giraffe, or old net with new Giraffe. Both will fail spectacularly.

64-bit and 32-bit Windows compiles included. As always, the 32-bit compile was not tested on a 32-bit machine, because I haven't even seen one in years. Also, the 32-bit compile is very slow (~half speed) because Giraffe really needs SSE and ideally SSE2, and for some reason enabling them makes the 32-bit build crash (though strangely, not under wine - only real Windows). It could be due to Eigen (since they do explicit vectorization), or something else. This is unfortunate, but building portable code on Windows is such a big clusterfuck that I'm not going to waste any more time on this. The 64-bit build runs on almost all 64-bit processors. POPCNT doesn't benefit Giraffe noticeably so isn't enabled. It does use SSE3, but the only 64-bit CPUs without SSE3 are early AMD K8s from ~2003.

STS: 9736/15000 @ 1s.
Hi,

Any plans to upgrade the engine to SMP and able to show Multi-PV?

Thanks!
SMP maybe. Multi-PV probably not. The way the code is structured at the moment makes that difficult.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: New Giraffe

Post by JoshPettus »

MikeB wrote:
matthewlai wrote:
MikeB wrote:Thank you Matthew -

Below is a link to a MacOS exe version

https://www.dropbox.com/s/89emxa87zyqx2 ... S.zip?dl=1

source is here:
https://bitbucket.org/waterreaction/giraffe/overview
Thanks Mike! I am so sorry but I just realized there's one last change that I forgot to push. It fixed a bug that made Giraffe quite a lot weaker. Didn't think someone would grab the sources that quickly!

Would be really nice if you can pull and do another build!

Thanks!

PS. The Windows version is fine. It was already built with the fix.
Not a problem - MacOS exe updated - same link as before - timestamped 11/23/16 2:53 PM ET.
Hey Mike, Thanks! But it looks like you forgot to statically compile in libgcc

Code: Select all

dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib
Didn't clang implement openmp in v3.7? Was there anything else stopping it from being viable?
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: New Giraffe

Post by Guenther »

matthewlai wrote: New version: https://bitbucket.org/waterreaction/gir ... 161023.zip
...

Code: Select all

Ex-author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview
Matthew shouldn't you change your signature now? :)
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe

Post by matthewlai »

Guenther wrote:
matthewlai wrote: New version: https://bitbucket.org/waterreaction/gir ... 161023.zip
...

Code: Select all

Ex-author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview
Matthew shouldn't you change your signature now? :)
I should :).
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe

Post by matthewlai »

JoshPettus wrote:Didn't clang implement openmp in v3.7? Was there anything else stopping it from being viable?
Not that I'm aware of, but that hasn't been tested.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: New Giraffe

Post by supersharp77 »

matthewlai wrote:A few months ago I promised a cleaned up version of Giraffe, but since that actually requires quite a bit of work, I haven't had a chance to get to it till now.

New version: https://bitbucket.org/waterreaction/gir ... 161023.zip

* ~200 Elo improvement in self-play through optimizing the training process. The only real difference is in eval.

* Network format changed completely. Don't try to use the new net (included in the zip file) with old Giraffe, or old net with new Giraffe. Both will fail spectacularly.

64-bit and 32-bit Windows compiles included. As always, the 32-bit compile was not tested on a 32-bit machine, because I haven't even seen one in years. Also, the 32-bit compile is very slow (~half speed) because Giraffe really needs SSE and ideally SSE2, and for some reason enabling them makes the 32-bit build crash (though strangely, not under wine - only real Windows). It could be due to Eigen (since they do explicit vectorization), or something else. This is unfortunate, but building portable code on Windows is such a big clusterfuck that I'm not going to waste any more time on this. The 64-bit build runs on almost all 64-bit processors. POPCNT doesn't benefit Giraffe noticeably so isn't enabled. It does use SSE3, but the only 64-bit CPUs without SSE3 are early AMD K8s from ~2003.
STS: 9736/15000 @ 1s.
This New Giraffe seems to be making moves and thinking well (15 half plys) in the Fritz GUI.....extensive testing now underway
.....Congrats AR :)
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe

Post by matthewlai »

supersharp77 wrote:
matthewlai wrote:A few months ago I promised a cleaned up version of Giraffe, but since that actually requires quite a bit of work, I haven't had a chance to get to it till now.

New version: https://bitbucket.org/waterreaction/gir ... 161023.zip

* ~200 Elo improvement in self-play through optimizing the training process. The only real difference is in eval.

* Network format changed completely. Don't try to use the new net (included in the zip file) with old Giraffe, or old net with new Giraffe. Both will fail spectacularly.

64-bit and 32-bit Windows compiles included. As always, the 32-bit compile was not tested on a 32-bit machine, because I haven't even seen one in years. Also, the 32-bit compile is very slow (~half speed) because Giraffe really needs SSE and ideally SSE2, and for some reason enabling them makes the 32-bit build crash (though strangely, not under wine - only real Windows). It could be due to Eigen (since they do explicit vectorization), or something else. This is unfortunate, but building portable code on Windows is such a big clusterfuck that I'm not going to waste any more time on this. The 64-bit build runs on almost all 64-bit processors. POPCNT doesn't benefit Giraffe noticeably so isn't enabled. It does use SSE3, but the only 64-bit CPUs without SSE3 are early AMD K8s from ~2003.
STS: 9736/15000 @ 1s.
This New Giraffe seems to be making moves and thinking well (15 half plys) in the Fritz GUI.....extensive testing now underway
.....Congrats AR :)
Thanks :)
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: New Giraffe

Post by Laskos »

I did some quick tests, and found quite a good match strength-wise for new Giraffe -- LittleThought 1.052 (2455 ELO CCRL). They are almost equal in strength, Giraffe came +15 ELO points stronger in a test from 2moves_v1.epd openings file (1000 games). It seems you can train the network more extensively on endgame positions. From and endgame epd file, Giraffe came -80 ELO points weaker than LittleThought (1000 games). It is confirmed by the results of test suites STS (general) and MES (endgames). 1s/position.

STS:
Giraffe: 803/1500
LT: 766/1500

MES:
Giraffe: 238/400
LT: 258/400
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe

Post by matthewlai »

Laskos wrote:I did some quick tests, and found quite a good match strength-wise for new Giraffe -- LittleThought 1.052 (2455 ELO CCRL). They are almost equal in strength, Giraffe came +15 ELO points stronger in a test from 2moves_v1.epd openings file (1000 games). It seems you can train the network more extensively on endgame positions. From and endgame epd file, Giraffe came -80 ELO points weaker than LittleThought (1000 games). It is confirmed by the results of test suites STS (general) and MES (endgames). 1s/position.

STS:
Giraffe: 803/1500
LT: 766/1500

MES:
Giraffe: 238/400
LT: 258/400
That is very good to know! I had plans to train different networks for different phases, but haven't gotten around to that yet.

It could be because I'm using EGTB in training, so it doesn't learn how to play end games without one (assuming you aren't using one).
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: New Giraffe

Post by Laskos »

matthewlai wrote:
Laskos wrote:I did some quick tests, and found quite a good match strength-wise for new Giraffe -- LittleThought 1.052 (2455 ELO CCRL). They are almost equal in strength, Giraffe came +15 ELO points stronger in a test from 2moves_v1.epd openings file (1000 games). It seems you can train the network more extensively on endgame positions. From and endgame epd file, Giraffe came -80 ELO points weaker than LittleThought (1000 games). It is confirmed by the results of test suites STS (general) and MES (endgames). 1s/position.

STS:
Giraffe: 803/1500
LT: 766/1500

MES:
Giraffe: 238/400
LT: 258/400
That is very good to know! I had plans to train different networks for different phases, but haven't gotten around to that yet.

It could be because I'm using EGTB in training, so it doesn't learn how to play end games without one (assuming you aren't using one).
I didn't use EGTBs.