Giraffe 20150801

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

Moderator: Ras

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

Giraffe 20150801

Post by matthewlai »

New Giraffe fresh from the zoo!

If you didn't catch it last time, Giraffe is a new experimental engine using deep learning. It tries to figure out all its chess knowledge by itself through self-play.

More details here if interested - http://talkchess.com/forum/viewtopic.php?t=56913

What's new in this version:
Eval
- Much better feature representation allowing better learning of game phase-dependent knowledge.
- SEE maps (http://talkchess.com/forum/viewtopic.php?t=57045), hopefully making it easier for Giraffe to learn space and control-based features
- Improvements in neural network architecture
- Improvements in how it generates test positions
- This brain has been trained for a much loooooonger time (48 hours on 20-core Xeon E5-2660 v2), and it was actually still learning at 48 hours
- End result: 8400/15000 on STS (1s per position), compared to 6100/15000 for the last release

Search
- Switched from depth-based search to node-based search (http://talkchess.com/forum/viewtopic.php?t=57092)
- Tactically, Giraffe is still quite weak, though significantly stronger than previous version
- node-based search hopefully makes end games much better, as well as things like deciding whether to exchange pieces or not
- Node budget allocation is still static. Will become neural-network-based in a week or 2. Hopefully that will make it much stronger tactically
- Depth reports are now completely meaningless. I added a simple formula to convert between node budget and depth just because the protocol assumes the engine to be doing depth-based search, but it really has nothing to do with depth.

Overall, switching to node-based search gave it about 26 Elo, and other search improvements gave it another 50-100. I'm not sure how much Elo the eval improvements give, but I'm guessing at least a good few hundred.

Just like last time, scores are probabilistic, and not in centipawns. A score of +10,000 (reported as +100.00 by many interfaces) means the engine thinks the moving side is surely going to win. Conversely for -10,000. Some interfaces will mis-interpret these scores as mate scores. It will not affect play.

Download: https://bitbucket.org/waterreaction/gir ... 150801.zip

32-bit Windows compile now available as well, though it has never been tested on an actual 32-bit machine, since it has been almost a decade since I last owned one.

Additional acknowledgements:
Miguel Ballicora, for Gaviota Tablebases. It's used to speed up training, and is not intended to be used during normal gameplay.

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.
melajara
Posts: 213
Joined: Thu Dec 16, 2010 4:39 pm

Re: Giraffe 20150801

Post by melajara »

Thanks for making this fascinating engine.

The previous version, playing over FICS had most of the time quite an impressive endgame judgment notwithstanding what you said about the lack of endgame testing positions in the training dataset.

I'm guessing this new version is not yet playing over FICS.

I had much fun playing it over FICS, managed to win a couple of games, drew some more and was sometime unable to convert a game with one piece up as ShortGiraffe is stubborn and really clever at finding tricks.

Please continue the good work!
Per ardua ad astra
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe 20150801

Post by matthewlai »

melajara wrote:Thanks for making this fascinating engine.

The previous version, playing over FICS had most of the time quite an impressive endgame judgment notwithstanding what you said about the lack of endgame testing positions in the training dataset.

I'm guessing this new version is not yet playing over FICS.

I had much fun playing it over FICS, managed to win a couple of games, drew some more and was sometime unable to convert a game with one piece up as ShortGiraffe might be really clever at finding tricks.

Please continue the good work!
That is very good to know. Thanks!

The version playing on FICS is actually somewhere between the previous version and this version, but probably closer to this version. I'll be putting this version up shortly.

This version probably isn't much stronger than the FICS version, though the neural net is trained from scratch using different features, so it's possible that it managed to learn different things.

I probably watched a few of your games, though I don't know which ones :). It's always good to get comments though, because you guys play at a much higher level than I do (as a human), and a lot of times I don't pick up on this kind of things :).

PS. It still really likes to push the h pawn in the opening, and I still don't know why! Any idea?
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.
melajara
Posts: 213
Joined: Thu Dec 16, 2010 4:39 pm

Re: Giraffe 20150801

Post by melajara »

I'm assuming the NN connections strength are frozen and there is no learning anymore from the positions played on actual games (e.g. over FICS), correct?

If so, would it be difficult for the program to continue to learn by qualifying its eval and chosen move from the outcome of the game (or the eval a couple of moves down) and accordingly update the NN itself?

This would be a real breakthrough in computer chess analysis as "learning" currently and for eons has been restricted to some form of permanent hash, with possibly huge files.
Per ardua ad astra
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Giraffe 20150801

Post by carldaman »

melajara wrote:I'm assuming the NN connections strength are frozen and there is no learning anymore from the positions played on actual games (e.g. over FICS), correct?

If so, would it be difficult for the program to continue to learn by qualifying its eval and chosen move from the outcome of the game (or the eval a couple of moves down) and accordingly update the NN itself?

This would be a real breakthrough in computer chess analysis as "learning" currently and for eons has been restricted to some form of permanent hash, with possibly huge files.
Thanks for this very interesting engine, Matthew! :)

I've also noticed, as Mel did, that the eval.net file no longer gets updated, as was the case with the first version. Does it mean it can't learn anymore?

Regards,
CL
melajara
Posts: 213
Joined: Thu Dec 16, 2010 4:39 pm

Re: Giraffe 20150801

Post by melajara »

PS. It still really likes to push the h pawn in the opening, and I still don't know why! Any idea?
In my tournament activity, I consistently found that FM level players, up to weak IM (2400) love to push the a pawn in the opening phase to win some space edge. Often the best countermeasure is the symmetric pawn push (e.g. a4, ..a5) It's more seldom with the h pawn as castling short is much more usual as castling long. Odd enough, this compulsory a pawn move is fading at GM level.

Now Giraffe is currently about at FM level in its "evolved" understanding of the game. More than an coincidence to me, a fascinating engine indeed.
Per ardua ad astra
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe 20150801

Post by matthewlai »

melajara wrote:I'm assuming the NN connections strength are frozen and there is no learning anymore from the positions played on actual games (e.g. over FICS), correct?

If so, would it be difficult for the program to continue to learn by qualifying its eval and chosen move from the outcome of the game (or the eval a couple of moves down) and accordingly update the NN itself?

This would be a real breakthrough in computer chess analysis as "learning" currently and for eons has been restricted to some form of permanent hash, with possibly huge files.
That is correct. The neural nets are only updated in special training mode.

It would be pretty easy to modify it to learn from actual games as well (and this has been done, for example, by KnightCap, which learned exclusively from online games [1]).

However, the problem is I am using a much more flexible model with orders of magnitudes higher degrees of freedom, and that requires many more games/positions to train. His model was only flexible in linear weights. He didn't mention how many weights there are, but it couldn't have been more than a few hundred. In my case, I have a few hundred thousand weights.

So it's possible, but I don't think a few hundred games on FICS will really affect the neural net much. For comparison, the model converges in about 100,000 iterations in training, and each iteration looks at 100 positions, playing for 12 half-moves from each position.

[1] http://arxiv.org/pdf/cs/9901002v1.pdf
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: Giraffe 20150801

Post by matthewlai »

carldaman wrote:
melajara wrote:I'm assuming the NN connections strength are frozen and there is no learning anymore from the positions played on actual games (e.g. over FICS), correct?

If so, would it be difficult for the program to continue to learn by qualifying its eval and chosen move from the outcome of the game (or the eval a couple of moves down) and accordingly update the NN itself?

This would be a real breakthrough in computer chess analysis as "learning" currently and for eons has been restricted to some form of permanent hash, with possibly huge files.
Thanks for this very interesting engine, Matthew! :)

I've also noticed, as Mel did, that the eval.net file no longer gets updated, as was the case with the first version. Does it mean it can't learn anymore?

Regards,
CL
Thanks for trying it out!

That is right. It only learns in a special training mode, where it basically plays extremely fast games (or fragments of games). The reason for that is in the other post. Essentially boils down to the complexity of the model requiring very many positions to train, and games played at human (or near-human) speeds would take a very long time to have any noticeable effect on the net.
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: Giraffe 20150801

Post by matthewlai »

melajara wrote:
PS. It still really likes to push the h pawn in the opening, and I still don't know why! Any idea?
In my tournament activity, I consistently found that FM level players, up to weak IM (2400) love to push the a pawn in the opening phase to win some space edge. Often the best countermeasure is the symmetric pawn push (e.g. a4, ..a5) It's more seldom with the h pawn as castling short is much more usual as castling long. Odd enough, this compulsory a pawn move is fading at GM level.

Now Giraffe is currently about at FM level in its "evolved" understanding of the game. More than an coincidence to me, a fascinating engine indeed.
I didn't know that. That's really cool!
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: 1262
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: Giraffe 20150801 w32 errors XP

Post by supersharp77 »

Matthew Lai

New Giraffe fresh from the zoo!

If you didn't catch it last time, Giraffe is a new experimental engine using deep learning. It tries to figure out all its chess knowledge by itself through self-play.

More details here if interested - http://talkchess.com/forum/viewtopic.php?t=56913
-------------------------------------------------------------------
Downloaded the new one and was about to do some serious testing (XP)
but alas no luck windows xp error ( Giraffe w32 has encountered a problem and needs to close error code 0xc000001d) AR :? :cry: