zurichess bern released

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

Moderators: hgm, Rebel, chrisw

brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

zurichess bern released

Post by brtzsnr »

Hello, everyone!

I'm happy to release a new version of my engine, zurichess bern.

The source code for this release can be browsed from https://bitbucket.org/brtzsnr/zurichess ... lease.bern
The release binaries can be downloaded at: https://bitbucket.org/brtzsnr/zurichess/downloads
Linux AMD64 https://bitbucket.org/brtzsnr/zurichess ... inux-amd64
Windows AMD64 https://bitbucket.org/brtzsnr/zurichess ... -amd64.exe

Since last release

Code: Select all

* Implement Principal Variation Search (PVS).
* Reduce late quiet moves (LMR).
* Optimize move ordering. Penalize moves threatened by pawns in quiescence search.
* Optimize check extension. Do not extend many bad checks.
* Change zobrist key to be equal to polyglot key. No book support, but better hashing.
* Add some integration tests such as mate in one and mate in two.
* Usual code clean ups, speed ups and bug fixes.
bern release is ~130ELO stronger than basel.

Code: Select all

472 @ 40/60+0.05
280 - 102 - 90
ELO 137.83±29.98

As usual the source code can be found at https://bitbucket.org/brtzsnr/zurichess/overview
The latest development Linux AMD64 binary can downloaded from drone.io
https://drone.io/bitbucket.org/brtzsnr/ ... /zurichess


Please test the new version if you maintain a rating list.

Regards,
Alexandru
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: zurichess bern released

Post by brtzsnr »

This is almost the version that played yesterday in the "On-line engine blitz tourney June".
User avatar
Graham Banks
Posts: 41428
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: zurichess bern released

Post by Graham Banks »

Nice progress. Keep it up! :)
gbanksnz at gmail.com
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: zurichess bern released

Post by Ferdy »

The engine played very fast given movetime 199.

Code: Select all

Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
id name zurichess bern
Hash: 128, Threads: 1, time/pos: 0.199s
Test duration: 00:00:10
Expected time to finish: 00:05:43
STS rating: 1627

  STS ID   STS1   STS2   STS3   STS4   STS5   STS6   STS7   STS8   STS9  STS10  STS11  STS12  STS13  STS14  STS15    ALL
  NumPos    100    100    100    100    100    100    100    100    100    100    100    100    100    100    100   1500
 BestCnt     30     31     32     29     42     39     24     12     20     54     18     23     40     37     13    444
   Score    407    448    447    369    508    635    364    263    288    632    294    336    507    478    324   6300
Score(%)   40.7   44.8   44.7   36.9   50.8   63.5   36.4   26.3   28.8   63.2   29.4   33.6   50.7   47.8   32.4   42.0
  Rating   1569   1752   1747   1400   2019   2584   1378    928   1039   2571   1066   1253   2014   1885   1200   1627
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: zurichess bern released

Post by brtzsnr »

Can you explain the test you are running?

With one move remaining (e.g. go movetime 200) zurichess will use a wide margin in order not to get over the time limit. It's useful in the games not to lose on time. Proper search stop is going to come in the next version I think.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: zurichess bern released

Post by Ferdy »

brtzsnr wrote:Can you explain the test you are running?

With one move remaining (e.g. go movetime 200) zurichess will use a wide margin in order not to get over the time limit. It's useful in the games not to lose on time. Proper search stop is going to come in the next version I think.
I am running the STS test suite, from my tool.
https://sites.google.com/site/strategictestsuite/

Sample log from the engine and tool.

Code: Select all

Starting engine zurichess-bern-windows-386.exe ...
>> uci
<< zurichess bern https&#58;//bitbucket.org/brtzsnr/zurichess
<< build with go1.4 at 2015-06-07 10&#58;45&#58;09, running on 386
<< id name zurichess bern
<< id author Alexandru Mo&#537;oi
<< 
<< option name UCI_AnalyseMode type check default false
<< option name Hash type spin default 128 min 1 max 8192
<< uciok
>> setoption name Hash value 128
>> setoption name Threads value 1
>> setoption name Cores value 1
>> setoption name Max CPUs value 1

Pos 1
1kr5/3n4/q3p2p/p2n2p1/PppB1P2/5BP1/1P2Q2P/3R2K1 w - - bm f5; id "STS&#40;v1.0&#41; Undermine.001"; c0 "f5=10, Be5+=2, Bf2=3, Bg4=2"; c8 "10 2 3 2"; c9 "f4f5 d4e5 d4f2 f3g4";

2015-06-07T17&#58;53&#58;43.361000 >> isready
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;63&#58; for line&#58; setoption name Threads value 1
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;64&#58; error&#58; unhandled option value
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;63&#58; for line&#58; setoption name Cores value 1
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;64&#58; error&#58; unhandled option value
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;63&#58; for line&#58; setoption name Max CPUs value 1
2015-06-07T17&#58;53&#58;43.394000 << info string main.go&#58;64&#58; error&#58; expected third field 'value', got name
2015-06-07T17&#58;53&#58;43.394000 << readyok
2015-06-07T17&#58;53&#58;43.394000 >> ucinewgame
2015-06-07T17&#58;53&#58;43.394000 >> position fen 1kr5/3n4/q3p2p/p2n2p1/PppB1P2/5BP1/1P2Q2P/3R2K1 w - - 0 1
2015-06-07T17&#58;53&#58;43.394000 >> go movetime 199
2015-06-07T17&#58;53&#58;43.405000 << info depth 1 score cp 11 nodes 329 time 0 nps 329000000000 pv d1e1 g5f4 e2e6 a6e6 e1e6
2015-06-07T17&#58;53&#58;43.408000 << info depth 2 score cp 43 nodes 2593 time 3 nps 864275 pv d4e5 b8a7 f3d5 e6d5 d1d5
2015-06-07T17&#58;53&#58;43.408000 << info string uci.go&#58;206&#58; hash&#58; size 8388608, hit 210, miss 311, ratio 40.31%
2015-06-07T17&#58;53&#58;43.408000 << bestmove d4e5
Engine best move is in alternative moves!

Pos 2
1n5k/3q3p/pp1p2pB/5r2/1PP1Qp2/P6P/6P1/2R3K1 w - - bm c5; id "STS&#40;v1.0&#41; Undermine.002"; c0 "c5=10, Qd4+=4, b5=4, g4=3"; c8 "10 4 4 3"; c9 "c4c5 e4d4 b4b5 g2g4";

2015-06-07T17&#58;53&#58;43.408000 >> isready
2015-06-07T17&#58;53&#58;43.408000 << readyok
2015-06-07T17&#58;53&#58;43.408000 >> ucinewgame
2015-06-07T17&#58;53&#58;43.408000 >> position fen 1n5k/3q3p/pp1p2pB/5r2/1PP1Qp2/P6P/6P1/2R3K1 w - - 0 1
2015-06-07T17&#58;53&#58;43.408000 >> go movetime 199
2015-06-07T17&#58;53&#58;43.410000 << info depth 1 score cp 54 nodes 106 time 0 nps 106000000000 pv h6f4
2015-06-07T17&#58;53&#58;43.411000 << info depth 2 score cp 30 nodes 1327 time 1 nps 1326998 pv e4d4 f5e5 h6f4
2015-06-07T17&#58;53&#58;43.414000 << info depth 3 score cp 107 nodes 4167 time 4 nps 1041697 pv e4d4 h8g8 h6f4 b8c6 d4d6
2015-06-07T17&#58;53&#58;43.414000 << info string uci.go&#58;206&#58; hash&#58; size 8388608, hit 573, miss 650, ratio 46.85%
2015-06-07T17&#58;53&#58;43.414000 << bestmove e4d4
Engine best move is in alternative moves!
The suite consists of 15 themes, each with 100 positions. There are moves with score and the engine will get points depending on the move it chooses. Given the score percentage I have the formula (thru linear regression) to get its STS rating, approximating to that of CCRL 40/4.

Code: Select all

STS1 Undermining
STS2 Open Files and Diagonals
STS3 Knight Outposts
STS4 Square Vacancy
STS5 Bishop vs Knight
STS6 Re-Capturing
STS7 Offer of Simplification
STS8 Advancement of f/g/h pawns
STS9 Advancement of a/b/c pawns
STS10 Simplification
STS11 Activity of the King
STS12 Center Control
STS13 Pawn Play in the Center
STS14 Queens and Rooks to the 7th Rank
STS15 Avoid Pointless Exchange
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: zurichess bern released

Post by brtzsnr »

I found a bug for movetime. I pushed new binaries.

Windows amd64 https://bitbucket.org/brtzsnr/zurichess ... -amd64.exe
Linux amd64 https://bitbucket.org/brtzsnr/zurichess ... inux-amd64

Code: Select all

position fen 1n5k/3q3p/pp1p2pB/5r2/1PP1Qp2/P6P/6P1/2R3K1 w - - 0 1
go movetime 199
info depth 1 score cp 54 nodes 106 time 6 nps 15845 pv h6f4
info depth 2 score cp 30 nodes 1327 time 11 nps 117863 pv e4d4 f5e5 h6f4
info depth 3 score cp 107 nodes 4167 time 13 nps 307674 pv e4d4 h8g8 h6f4 b8c6 d4d6
info depth 4 score cp 107 nodes 6115 time 15 nps 404723 pv e4d4 h8g8 h6f4 b8c6 d4d6
info depth 5 score cp 107 nodes 14669 time 20 nps 705154 pv e4d4 h8g8 h6f4 b8c6 d4d6 d7e8
info depth 6 score cp 124 nodes 27882 time 28 nps 976789 pv e4d4 h8g8 h6f4 b8c6 d4d6 f5f7 c1e1
info string uci.go&#58;206&#58; hash&#58; size 8388608, hit 4940, miss 7343, ratio 40.22%
bestmove e4d4
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: zurichess bern released

Post by Ferdy »

This performs much better.

Code: Select all

Intel&#40;R&#41; Core&#40;TM&#41; i7-2600K CPU @ 3.40GHz
id name zurichess bern
Hash&#58; 128, Threads&#58; 1, time/pos&#58; 0.198s
Test duration&#58; 00&#58;01&#58;27
Expected time to finish&#58; 00&#58;05&#58;42
STS rating&#58; 2092

  STS ID   STS1   STS2   STS3   STS4   STS5   STS6   STS7   STS8   STS9  STS10  STS11  STS12  STS13  STS14  STS15    ALL
  NumPos    100    100    100    100    100    100    100    100    100    100    100    100    100    100    100   1500
 BestCnt     46     43     41     31     57     45     36     25     28     50     32     37     51     48     18    588
   Score    562    510    528    434    659    693    512    402    407    594    442    494    634    607    389   7867
Score&#40;%)   56.2   51.0   52.8   43.4   65.9   69.3   51.2   40.2   40.7   59.4   44.2   49.4   63.4   60.7   38.9   52.4
  Rating   2259   2028   2108   1689   2691   2843   2037   1547   1569   2402   1725   1957   2580   2460   1489   2092
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: zurichess bern released

Post by Steve Maughan »

Slightly OT for this thread but how do you automate the STS test suite?

Thanks - Steve
http://www.chessprogramming.net - Maverick Chess Engine
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: zurichess bern released

Post by Ferdy »

Steve Maughan wrote:Slightly OT for this thread but how do you automate the STS test suite?

Thanks - Steve
I started working on STS from this post.
http://talkchess.com/forum/viewtopic.ph ... hlight=sts

I make couple of epd revisions on the move format, convert bm SAN to LAN, create c8 Opcodes for move score, create c9 Opcode for moves in LAN. Also fixed overall formatting on id values (id "STS(v10.0) ...), since this will be read by the tool for summary. The conversion of SAN move to LAN is thru the use of Python Chess Library (PCL) I use version 0.7.0. Each STS are then combined, now included in the uploaded file into one file. Created a tool to read this epd. The tool can only be used by uci engines. It is a python script converted to exe file using py2exe program. But this tool does not use PCL. Py2Exe cannot convert the script to exe when PCL is used. I am using windows. The epd reformatting were done using another script.

Code: Select all

1b1qrr2/1p4pk/1np4p/p3Np1B/Pn1P4/R1N3B1/1Pb2PPP/2Q1R1K1 b - - bm Bxe5; id "STS&#40;v10.0&#41; Simplification.001"; c0 "Bxe5=10, f4=3, Nc4=2"; c8 "10 3 2"; c9 "b8e5 f5f4 b6c4";
Sample batch file is also included.

Code: Select all

&#58;&#58; Run to get sts rating using --getrating option
&#58;&#58; when --getrating is used, num threads will be set to 1, and movetime will also be
&#58;&#58; set by the tool depending on the speed of your machine. On my machine without other loads
&#58;&#58; the movetime per pos used by the tool is 200ms. The tool will run a short benchmark
&#58;&#58; to measure your machine speed to get the movetime, before starting the test suite.

STS_Rating_v2 -f "STS1-STS15_LAN.epd" -e "stockfish 6.exe" -h 128 --getrating --log



&#58;&#58; Normal run to get score, movetime is in millisec

&#58;&#58; STS_Rating_v2 -f "STS1-STS15_LAN.epd" -e "CDrill 1905 v1.exe" -t 1 -h 128 --movetime 500
When --log is enabled, positions not solved are saved, also engine log is created.

Sample run: The tool uses 286 ms because my machine is running with other things. If no other load, the tool will use 200ms/pos.

Code: Select all

Intel&#40;R&#41; Core&#40;TM&#41; i7-2600K CPU @ 3.40GHz
id name Monarch 1.7
Hash&#58; 128, Threads&#58; 1, time/pos&#58; 0.286s
Test duration&#58; 00&#58;10&#58;23
Expected time to finish&#58; 00&#58;07&#58;54
STS rating&#58; 2041

  STS ID   STS1   STS2   STS3   STS4   STS5   STS6   STS7   STS8   STS9  STS10  STS11  STS12  STS13  STS14  STS15    ALL
  NumPos    100    100    100    100    100    100    100    100    100    100    100    100    100    100    100   1500
 BestCnt     32     42     40     48     46     52     32     33     29     44     25     43     47     47     21    581
   Score    452    511    564    574    575    725    439    457    388    554    364    523    573    584    410   7693
Score&#40;%)   45.2   51.1   56.4   57.4   57.5   72.5   43.9   45.7   38.8   55.4   36.4   52.3   57.3   58.4   41.0   51.3
  Rating   1770   2032   2268   2313   2317   2985   1712   1792   1485   2224   1378   2086   2308   2357   1583   2041
Download:
http://www.mediafire.com/download/so49n ... ing_v2.rar