New Giraffe (Aug 28)

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

New Giraffe (Aug 28)

Post by matthewlai »

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

Windows 64-bit WB, Windows 32-bit WB, and 64-bit UCI included (thanks to Odd Gunnar Malin's Wb2Uci adapter). If you want 32-bit UCI, edit Wb2Uci.eng, and replace all "w64" by "w32".

This version is 320 Elo stronger than the last in self-play.

Most of the improvements are in eval. It is now both more accurate AND faster. The more I work Giraffe, the more I am convinced that chess is really all about eval. When I work on search, I get single digit gains if I am lucky. When I work on eval, I get double-digits all the time.

It now scores about 9750/15000 on the Strategic Test Suite at 1s per position. That's higher than almost all other engines, besides Stockfish (didn't check Komodo, because I am too cheap to buy a copy). When adjusted for the difference in NPS, I think it will have a fair chance of beating Stockfish.

I don't know if Stockfish was ever tuned based on STS results (if not, that's pretty impressive!), but Giraffe wasn't! It figured out all the knowledge by itself that happens to allow it to score very high on the STS.

This is also the first release where move ordering and node allocation are done using a second neural network. It reduces/extends (which are the same thing for a normalized probabilistic search) very aggressively, and doesn't follow a fixed LMR schedule. The neural net figures out node allocations for each move individually. When adjusted for slowdown, this resulted in a 40 Elo increase. However, it also made Giraffe slower. With the slowdown included, there's only a 20 Elo increase. This hasn't really been optimized yet, so it's just a first implementation. Just thought I would include it now since it does provide a net increase in strength.

My thesis is now also almost done, so the next release (or maybe the one after that) will be open source. After I submit my thesis I'll also have more time to do more non-machine-learning related stuff like opening book (just to save thinking time - Giraffe will generate its own opening book since it does play openings quite well already), SMP, and more search optimizations.

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.
Werewolf
Posts: 2044
Joined: Thu Sep 18, 2008 10:24 pm

Re: New Giraffe (Aug 28)

Post by Werewolf »

Your work is crossing a new frontier and is mind blowing.

Well done!

Very surprised by your search/ eval comments though, a decent search is needed to sort the tactics out.

But anyway, whatever you're doing, it's working! Well done.
tmokonen
Posts: 1362
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: New Giraffe (Aug 28)

Post by tmokonen »

Amazing progress, Matthew. It's good to see something truly new and exciting in the computer chess world.
User avatar
Bloodbane
Posts: 154
Joined: Thu Oct 03, 2013 4:17 pm

Re: New Giraffe (Aug 28)

Post by Bloodbane »

I'll keep this short since I am a bit drunk: great progress, Mr. Lai. I look forward to reading your thesis, even though I might not understand much of the math involved.
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe (Aug 28)

Post by matthewlai »

Werewolf wrote:Your work is crossing a new frontier and is mind blowing.

Well done!

Very surprised by your search/ eval comments though, a decent search is needed to sort the tactics out.

But anyway, whatever you're doing, it's working! Well done.
Thanks!

A decent search is certainly important. Almost all Giraffe losses now are due to tactics. I don't think there are many engines that can outplay Giraffe in positional play.

One cool thing I find is that with a very good eval, a lot of times it can guess the right tactical moves without being able to actually see material advantage. Obviously there's a limit to this, and it's better to be able to actually see advantage.

It's surprising (and sometimes hilarious) how well a good eval can hold against fast search. For example, it's now slightly stronger than Sungorus, and Sungorus searches at something like 10x the speed of Giraffe.

But yes, tactics is something Giraffe needs to work on :). All it takes is 1 wrong guess to lose a game.
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
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: New Giraffe (Aug 28)

Post by cdani »

Congratulations for this improvements!!
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: New Giraffe (Aug 28)

Post by matthewlai »

tmokonen wrote:Amazing progress, Matthew. It's good to see something truly new and exciting in the computer chess world.
Thanks. It's exciting for me as well! Won't be beating Stockfish any time soon, but always refreshing to be working on new algorithms :).
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 (Aug 28)

Post by matthewlai »

Bloodbane wrote:I'll keep this short since I am a bit drunk: great progress, Mr. Lai. I look forward to reading your thesis, even though I might not understand much of the math involved.
Thanks! The math isn't actually too crazy!

Also, I love the coding style of Hakkapeliitta. Giraffe is also C++11, but isn't anywhere near that clean! I'll just blame that on "research code" :).
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 (Aug 28)

Post by matthewlai »

cdani wrote:Congratulations for this improvements!!
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
Graham Banks
Posts: 44719
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: New Giraffe (Aug 28)

Post by Graham Banks »

matthewlai wrote:Download: https://bitbucket.org/waterreaction/gir ... 150828.zip

Windows 64-bit WB, Windows 32-bit WB, and 64-bit UCI included (thanks to Odd Gunnar Malin's Wb2Uci adapter). If you want 32-bit UCI, edit Wb2Uci.eng, and replace all "w64" by "w32".

This version is 320 Elo stronger than the last in self-play..........
Roughly how strong do you believe that Giraffe is now (in CCRL terms).

Graham.
gbanksnz at gmail.com