New Giraffe (Aug 28)

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.
Post Reply
matthewlai
Posts: 736
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

New Giraffe (Aug 28)

Post by matthewlai » Fri Aug 28, 2015 9:22 pm

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!
Author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview

Werewolf
Posts: 929
Joined: Thu Sep 18, 2008 8:24 pm

Re: New Giraffe (Aug 28)

Post by Werewolf » Fri Aug 28, 2015 9:47 pm

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: 901
Joined: Sun Mar 12, 2006 5:46 pm
Location: Vancouver

Re: New Giraffe (Aug 28)

Post by tmokonen » Fri Aug 28, 2015 9:50 pm

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 2:17 pm

Re: New Giraffe (Aug 28)

Post by Bloodbane » Fri Aug 28, 2015 9:57 pm

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: 736
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: New Giraffe (Aug 28)

Post by matthewlai » Fri Aug 28, 2015 10:01 pm

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.
Author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview

User avatar
cdani
Posts: 2047
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: New Giraffe (Aug 28)

Post by cdani » Fri Aug 28, 2015 10:50 pm

Congratulations for this improvements!!

matthewlai
Posts: 736
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: New Giraffe (Aug 28)

Post by matthewlai » Fri Aug 28, 2015 10:50 pm

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 :).
Author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview

matthewlai
Posts: 736
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: New Giraffe (Aug 28)

Post by matthewlai » Fri Aug 28, 2015 11:43 pm

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" :).
Author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview

matthewlai
Posts: 736
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: New Giraffe (Aug 28)

Post by matthewlai » Fri Aug 28, 2015 11:44 pm

cdani wrote:Congratulations for this improvements!!
Thanks!
Author of Giraffe, an engine based on deep reinforcement learning. https://bitbucket.org/waterreaction/giraffe/overview

User avatar
Graham Banks
Posts: 30733
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: New Giraffe (Aug 28)

Post by Graham Banks » Fri Aug 28, 2015 11:58 pm

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.
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

Post Reply