Stockfish 3 PA_GTB

Discussion about chess-playing software (engines, hosts, opening books, platforms, etc...)
Post Reply
Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Stockfish 3 PA_GTB

Post by Jeremy Bernstein » Wed May 15, 2013 8:52 pm

I finally found some time to dust off this project and did an update to the Stockfish 3 code base.

I decided to start afresh and fork the source repository from the official Stockfish Github repository so that it's easier to keep this in sync over time. The old sources which worked with Stockfish 2.1.1 are abandoned, but will remain on Github.

The current source code that I'm working from can be found here: https://github.com/jeremybernstein/Stockfish, as well as in the attached archive. Note that the makefiles have not been completely updated yet (I'm using Xcode for building on OSX at the moment). MinGW on Windows creates the fastest builds by far, but I haven't tweaked the makefiles to my satisfaction on that side.

The posted versions are competitive in performance with release versions of Stockfish. At least the 64-bit versions are, I haven't tested the 32-bit versions much. If you want the very best performance while retaining at least some of the benefits of the tablebase access, turn on ProbeOnlyAtRoot. It's disabled by default -- this is an analysis build, after all. I'll play around with PGO builds at some point, but this is a "give it a try" release.

In any case, very few of the ideas in here actually belong to me. I mostly did some cleanup and worried about a bunch of smaller implementation details. So thanks to gaard, BB+, fruity, Peter C and of course the entire Stockfish team for such a wonderfully self-documenting chess engine. And to Uly, wherever he is, for inspiring the ideas.

The versions in the archive are POPCNT builds. If your hardware doesn't support POPCNT, you'll just have to wait a bit, until I or someone else builds non-POPCNT stuff. It's too early in the process to do the extra work for old-hardware builds. The OSX build is a fat 32/64 binary.

I'm sure this is the first of a bunch of releases, as problems are revealed and repaired. But in the spirit of exploration: have at it!

Jeremy
Attachments
stockfish-3-PA_GTB-001.7z
(1.4 MiB) Downloaded 1381 times

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Stockfish 3 PA_GTB

Post by Jeremy Bernstein » Thu May 16, 2013 8:53 pm

Over 250 downloads and not a peep. It just works? Everyone's happy? Awkward silence?

jb

ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Stockfish 3 PA_GTB

Post by ernest » Thu May 16, 2013 11:54 pm

Jeremy Bernstein wrote:Over 250 downloads and not a peep. It just works?
Had it been a non popcnt, I would already have told you... ;)

ernest
Posts: 247
Joined: Thu Sep 02, 2010 10:33 am

Re: Stockfish 3 PA_GTB

Post by ernest » Fri May 17, 2013 12:15 am

That was for the 64-bit...
Concerning the 32-bit, it seems to work well (about 10% slower than the best 32-bit Stockfish 3)

Ace1
Posts: 12
Joined: Thu Dec 20, 2012 4:40 am
Real Name: AceAce

Re: Stockfish 3 PA_GTB

Post by Ace1 » Fri May 17, 2013 2:13 am

Jeremy Bernstein wrote:Over 250 downloads and not a peep. It just works? Everyone's happy? Awkward silence?

jb

Yes im happy :D it works great Thank you! :D

ChessDrone
Posts: 78
Joined: Mon Jan 28, 2013 10:56 am

Re: Stockfish 3 PA_GTB

Post by ChessDrone » Fri May 17, 2013 4:47 am

Hello, I have not tested but I will, thanks for this.

Its over 290 downloads because this file is linked in another forum. I found there http://www.chess2u.com/t7187-stockfish-3-pa-gtb#43115

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Stockfish 3 PA_GTB

Post by Jeremy Bernstein » Fri May 17, 2013 7:06 am

Hm, that's sobering. More posts on chess2u.com than on the originating forum... :|

Moving along, and in partial response to the comments on that forum. The goal of this build is _not_ to perform better than normal Stockfish, but not to perform markedly worse. Otherwise there are exactly 3 new features, from (probably) least to most important:

- lower granularity of evaluation scores (1cp instead of 4cp), may lead to different move choices under some circumstances
- Gaviota tablebase probing support, incl complete PVs at root (up to the MAX_PLY, which has gotten a boost from 100 to 254)
- "preserve analysis": use of transposition table to avoid losing analysis when moving back and forth between moves, or stopping and starting the engine

Hope that's helpful,
Jeremy

Ace1
Posts: 12
Joined: Thu Dec 20, 2012 4:40 am
Real Name: AceAce

Re: Stockfish 3 PA_GTB

Post by Ace1 » Fri May 17, 2013 4:55 pm

@Jeremy Bernstein
Can we have a 3-fold rep=draw in Stockfish 3 PA_GTB? :)

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Stockfish 3 PA_GTB

Post by User923005 » Fri May 17, 2013 7:21 pm

Jeremy Bernstein wrote:Over 250 downloads and not a peep. It just works? Everyone's happy? Awkward silence?

jb
I just want to say thanks.
I have not had a chance to test it yet, but it will be extremely useful for me.
I downloaded it and will run it overnight tonight.
I will try some test compiles of my own as well.

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Stockfish 3 PA_GTB

Post by User923005 » Sat May 18, 2013 10:21 am

This version becomes easily decoupled from the GUI.
Analyzing these two positions:
r1b2rk1/1pq2pbp/p1np1np1/4p3/2P1PB2/2NB1N2/PP2QPPP/R2R2K1 w - -
r1bq1rk1/pp2bppp/2n2n2/2pp4/8/2NP1NP1/PPP2PBP/R1BQ1RK1 w - -

I got this output from Arena:
Analysis of Q:\aconz.epd
5/18/2013 1:59:33 AM Level: 1200 Seconds
Analyzing engine: Stockfish-3-64-PA_GTB-001

1
Avoid move:
Best move (Stockfish-3-64-PA_GTB-001): Bf4-g3
Not found in: 20:00
21/29 00:00 16,333,346 4,532,004 +0.14 Bg3 Bg4 Qe3 Rae8 h3 Bh5 Be2 Bxf3 Qxf3 Nd4 Qd3 Rc8 Bh4 h5 Rac1 Rfe8 Bg5 Nxe2+ Qxe2 Qxc4 Qxc4 Rxc4 Bxf6 Bxf6 Rxd6
22/30+ 00:01 22,002,763 4,460,320 +0.22 Be3 Bg4 Bc2 Nd4 Bxd4 exd4 Rxd4 Qb6 Rd3 Qxb2 Rb1
22/30+ 00:01 22,444,518 4,461,243 +0.30 Be3 Bg4 Bc2 Nd4 Bxd4 exd4 Rxd4 Qb6 Rd3 Qxb2 Rb1
22/30 00:02 27,550,669 4,377,986 +0.16 Bg3 Bg4 Qe3 Rae8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d5 Bxc3 bxc3 Qxa2
5/18/2013 2:14:14 AM, Time for this analysis: 00:14:38, Rated time: 20:00

2
Avoid move:
Best move (Stockfish-3-64-PA_GTB-001): Bf4-g3
Not found in: 20:00
5/18/2013 2:17:59 AM, Time for this analysis: 00:03:41, Rated time: 40:00

0 of 2 matching moves
5/18/2013 2:18:03 AM, Total time: 12:18:30 AM
Rated time: 40:00 = 2400 Seconds

The engine was still running in memory, consuming 98% of 4 CPUs, but it was not writing to the output terminal.
I usually make my own version, with at least unit buffering.
Standard buffered I/O does not work well in Windows via either Winboard or UCI apis.

Post Reply