Sapeli 1.0 - New chess engine

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

Moderators: hgm, Rebel, chrisw

Gregory Owett
Posts: 249
Joined: Fri Mar 10, 2006 10:26 am
Location: France

Re: Sapeli 1.0 - New chess engine

Post by Gregory Owett »

Hi, Is there somewhere an .exe where you can download it ?
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Gregory Owett wrote: Wed May 29, 2019 2:18 pm Hi, Is there somewhere an .exe where you can download it ?
Tirsa Poppins has kindly made some builds:
Sapeli 1.16 POPCNT and SSE3 bins:
http://www.mediafire.com/file/ghcgbgaeq ... p.zip/file

Or you can compile it by yourself from source code. There is also older builds listed: https://github.com/SamuraiDangyo/Sapeli

I have investigated the speed issue. Sapeli 1.16 actually has not lost any speed. It is faster. Eval just has gotten heavier. In fact Sapeli spends most time doing Eval(). When profiling Sapeli.
Gregory Owett
Posts: 249
Joined: Fri Mar 10, 2006 10:26 am
Location: France

Re: Sapeli 1.0 - New chess engine

Post by Gregory Owett »

Thank you for your reply !
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

I released Sapeli 1.17.
Source code: https://github.com/SamuraiDangyo/Sapeli/tree/1.17
Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.17
More info about this version: https://github.com/SamuraiDangyo/Sapeli ... ns.txt#L38

Took my time to make this release. I wanted to make sure this is the fastest and strongest Sapeli version yet.
This Sapeli 1.17 should be really stable. I was able to find a few bugs.
As some people are using Sapeli for their engine development / testing purposes. Stability is absolutely necessary.

clang builds are super slow / Sapeli 1.17 = nodes 15764316 mnps 0.788
gcc = nodes 24037116 mnps 2.256

1 minute Chess960 games vs Sapeli 1.02. 1.17 vs 1.02: 12-6-2
https://pastebin.com/nCXwW01e
[pgn] [Event "Computer Chess Game"] [Site "pc"] [Date "2019.06.04"] [Round "1"] [White "Sapeli 1.17"] [Black "Sapeli 1.02"] [Result "1-0"] [TimeControl "40/60"] [Variant "fischerandom"] [FEN "qnnrkbbr/pppppppp/8/8/8/8/PPPPPPPP/QNNRKBBR w HDhd - 0 1"] [SetUp "1"] {-------------- q n n r k b b r p p p p p p p p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P P P P P P P P Q N N R K B B R white to play --------------} 1. Nc3 {+0,00/8} Nb6 {-0,02/9 2,0} 2. Nb3 {+0,03/10 1,9} d5 {-0,03/10 1,9} 3. O-O-O {+0,08/9 1,9} O-O-O {-0,01/9 1,9} 4. f3 {+0,10/9 1,8} e5 {-0,02/9 1,8} 5. d4 {+0,14/9 1,8} f6 {-0,03/9 1,8} 6. e4 {+0,14/9 1,7} dxe4 {-0,01/9 1,7} 7. fxe4 {+0,11/8 1,6} Be6 {-0,05/9 1,6} 8. Be2 {+0,29/8 1,6} N8d7 {-0,06/8 1,6} 9. d5 {+0,43/7 1,5} Bf7 {-0,02/9 1,5} 10. Be3 {+0,40/7 1,5} a5 {+0,00/9 1,5} 11. Bg4 {+0,40/7 1,4} Kb8 {+0,01/9 1,4} 12. Rd3 {+0,28/6 1,4} a4 {+0,30/9 1,4} 13. Be6 {-0,46/9 1,4} Bg6 {+0,30/10 1,4} 14. Nd2 {-0,46/9 1,4} Nc5 {+0,30/9 1,4} 15. Bxc5 {-0,44/9 1,4} Bxc5 {+0,29/10 1,4} 16. a3 {-0,44/8 1,4} Qa5 {+0,30/9 1,4} 17. Rf1 {-0,38/6 1,4} Bd4 {+0,28/8 1,4} 18. Ne2 {+0,00/8 1,4} c5 {+0,03/9 1,4} 19. Qa2 {+0,14/8 1,4} c4 {+0,04/9 1,4} 20. Rg3 {+0,21/9 1,4} Qc5 {+0,04/10 1,4} 21. Nxd4 {+0,20/8 1,4} Qxd4 {+0,04/9 1,4} 22. Re1 {+0,24/8 1,4} Rd6 {+0,03/8 1,4} 23. Rge3 {+0,28/8 1,4} Qc5 {+0,04/9 1,4} 24. Nb1 {+0,31/7 1,4} Be8 {+0,06/9 1,4} 25. Nc3 {+0,29/7 1,4} Bd7 {+0,05/9 1,4} 26. Bxd7 {+0,21/9 1,4} Rxd7 {+0,05/10 1,4} 27. Kb1 {+0,22/9 1,4} h5 {+0,06/9 1,4} 28. Rf3 {+0,25/9 1,4} Rh6 {+0,06/10 1,4} 29. Qa1 {+0,23/9 1,4} Rg6 {+0,05/9 1,4} 30. g3 {+0,21/9 1,4} Rh6 {+0,05/9 1,4} 31. h3 {+0,23/9 1,4} Rh8 {+0,05/9 1,4} 32. Rff1 {+0,21/8 1,4} h4 {+0,05/9 1,4} 33. g4 {+0,20/9 1,4} Qd4 {+0,04/9 1,4} 34. Rf3 {+0,21/9 1,4} Qd2 {+0,04/10 1,4} 35. Re2 {+0,28/10 1,4} Qd4 {+0,00/10 1,4} 36. Ka2 {+0,29/10 1,4} Qc5 {+0,04/9 1,4} 37. Qc1 {+0,29/8 1,4} Rhd8 {+0,03/8 1,4} 38. Kb1 {+0,30/8 1,4} Re8 {+0,02/9 1,4} 39. Na2 {+0,34/8 1,4} Rdd8 {+0,01/9 1,4} 40. Nb4 {+0,34/9 1,4} Qd4 {+0,00/9 1,4} 41. Qe1 {+0,38/9 2,0} Rh8 {+0,00/10 2,0} 42. Rd2 {+0,36/9 2,0} Qc5 {+0,00/11 2,0} 43. Re3 {+0,36/9 1,9} Nc8 {+0,00/9 1,9} 44. Qf2 {+0,33/9 1,9} Qb6 {+0,00/9 1,8} 45. Na2 {+0,31/9 1,8} Nd6 {+0,01/10 1,8} 46. Nc3 {+0,31/10 1,7} Qa5 {+0,02/10 1,7} 47. Rd1 {+0,31/9 1,7} Nf7 {+0,02/9 1,7} 48. Qf1 {+0,29/8 1,6} Qa6 {+0,02/9 1,6} 49. Rde1 {+0,29/9 1,6} Nd6 {+0,01/9 1,6} 50. Qf2 {+0,31/9 1,5} Rd7 {+0,01/9 1,5} 51. Rf3 {+0,32/9 1,5} Qa5 {+0,01/9 1,5} 52. Qf1 {+0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Rf3 {+0,25/8 1,4} Qa5 {+0,05/10 1,4} 81. Rc3 {+0,24/10 2,1} Qb5 {+0,05/9 2,1} 82. Qg2 {+0,28/9 2,0} Rdd8 {+0,04/10 2,0} 83. Qg4 {+0,25/9 1,9} Qc5 {+0,05/10 1,9} 84. Re1 {+0,27/9 1,9} Nb5 {+0,05/10 1,9} 85. Rce3 {+0,00/10 1,8} c3 {+0,13/9 1,8} 86. Nd3 {+0,00/9 1,7} Qc4 {+0,12/10 1,7} 87. Rd1 {-0,04/9 1,7} cxb2 {+0,21/9 1,7} 88. Nxb2 {-0,35/11 1,6} Nc3+ {+1,28/11 1,6} 89. Kc1 {-1,51/12 1,6} Qc5 {+1,26/10 1,6} 90. Rdd3 {-1,51/10 1,5} Qxa3 {+1,25/10 1,5} 91. Rxc3 {-1,35/11 1,5} Qa1+ {+1,25/11 1,5} 92. Kd2 Qxb2 {+1,19/10 1,4} 93. Qe6 {-1,30/10 1,5} Qb5 {+1,18/10 1,4} 94. Kc1 {-1,18/10 1,5} Qf1+ {+1,15/10 1,4} 95. Kb2 {-1,04/11 1,5} Rhg8 {+1,11/10 1,4} 96. Qf7 {-1,02/10 1,5} Qb5+ {+1,11/11 1,4} 97. Ka3 {-1,02/10 1,5} Rc8 {+1,13/10 1,4} 98. d6 {-0,90/11 1,5} Qb6 {+1,14/10 1,4} 99. d7 {-0,66/11 1,5} Rcf8 {+1,04/10 1,4} 100. Qd5 {+0,07/10 1,5} Rd8 {+0,06/11 1,4} 101. Red3 {+0,33/10 1,5} Rh8 {+0,06/10 1,4} 102. Qf7 {+0,37/9 1,5} Rhf8 {+0,04/10 1,4} 103. Qxg7 {+0,73/10 1,5} Rg8 {-0,11/11 1,4} 104. Qe7 {+0,87/10 1,5} Qa6 {-0,13/10 1,4} 105. g7 {+1,27/9 1,5} Qa5 {-1,34/10 1,4} 106. Rc8+ {+3,24/10 1,5} Rxc8 {-3,53/11 1,4} 107. dxc8=Q+ {+3,45/10 1,5} Rxc8 {-3,53/11 1,4} 108. Qf8 {+3,49/10 1,5} Qc7 {-4,58/12 1,4} 109. g8=Q {+4,55/11 1,4} Rxf8 {-4,59/12 1,4} 110. Qxf8+ {+4,56/12 1,5} Ka7 {-4,65/12 1,4} 111. Qb4 {+4,66/11 1,5} Kb8 {-5,78/12 1,4} 112. c4 {+4,69/10 1,5} Ka8 {-5,68/11 1,4} 113. Rd6 {+5,92/10 1,4} f5 {-5,80/11 1,4} 114. c5 {+6,03/10 1,5} Ka7 {-5,95/12 1,4} 115. exf5 {+6,13/10 1,4} Kb8 {-7,02/12 1,4} 116. Qb6 {+12,94/10 1,5} e4 {-16,00/12 1,4} 117. Rd8+ {+21,77/11 1,4} Qxd8 {-419,43/13 0,2} 118. Qxd8+ {+21,77/9 1,4} Ka7 119. f6 {+21,77/8 1,4} b5 {-419,43/9 0,1} 120. Qb6+ {+104,85/7 0,3} Ka8 121. f7 {+104,85/6 0,1} b4+ {-419,43/5 0,1} 122. Kxb4 {+104,85/4 0,1} e3 {-419,43/3 0,1} 123. f8=Q# {+104,85/2 0,1} {Xboard adjudication: Checkmate} 1-0[/pgn]

shuffle chess: vs fairy: 6-2-2
https://pastebin.com/0uwEZ6FR

Tons of speedups.

1.17 / 2.183 mnps

Code: Select all

./sapeli -bench
~~~ Bench() ~~~
info depth 0 nodes 40 time 0 nps 0 score cp 35 pv e2e4
info depth 1 nodes 280 time 1 nps 280000 score cp 0 pv e2e4
info depth 2 nodes 2717 time 5 nps 543400 score cp 21 pv d2d4
info depth 3 nodes 4940 time 8 nps 617500 score cp 9 pv e2e4
info depth 4 nodes 17280 time 30 nps 576000 score cp 13 pv d2d4
info depth 5 nodes 60846 time 85 nps 715835 score cp 9 pv e2e4
info depth 6 nodes 176659 time 214 nps 825509 score cp 13 pv d2d4
info depth 7 nodes 635169 time 511 nps 1242992 score cp 0 pv b1c3
info depth 8 nodes 1726098 time 1039 nps 1661307 score cp 7 pv d2d4
info depth 9 nodes 6942480 time 3446 nps 2014648 score cp 9 pv g1f3
info depth 10 nodes 25919828 time 11646 nps 2225642 score cp 12 pv e2e4
info depth 11 nodes 50318079 time 22774 nps 2209452 score cp 12 pv e2e4
info depth 12 nodes 65485084 time 30001 nps 2182763 score cp 12 pv e2e4
= nodes 65485084 mnps 2.183 time 30.001
1.17 profile_build / 2.315 mnps / 150 knps faster

Code: Select all

./sapeli -bench
~~~ Bench() ~~~
info depth 0 nodes 40 time 0 nps 0 score cp 35 pv e2e4
info depth 1 nodes 274 time 0 nps 0 score cp 0 pv e2e4
info depth 2 nodes 3052 time 5 nps 610400 score cp 21 pv g1f3
info depth 3 nodes 5760 time 9 nps 640000 score cp 9 pv e2e4
info depth 4 nodes 19768 time 31 nps 637677 score cp 13 pv d2d4
info depth 5 nodes 60560 time 78 nps 776410 score cp 9 pv e2e4
info depth 6 nodes 187980 time 211 nps 890900 score cp 13 pv d2d4
info depth 7 nodes 597715 time 461 nps 1296561 score cp 6 pv g1f3
info depth 8 nodes 1634387 time 930 nps 1757405 score cp 7 pv g1f3
info depth 9 nodes 4848106 time 2328 nps 2082519 score cp 9 pv g1f3
info depth 10 nodes 23965164 time 10160 nps 2358775 score cp 10 pv g1f3
info depth 11 nodes 60180240 time 25582 nps 2352444 score cp 13 pv e2e4
info depth 12 nodes 69445254 time 30001 nps 2314764 score cp 13 pv e2e4
= nodes 69445254 mnps 2.315 time 30.001
1.16 / 1.761 mnps

Code: Select all

> building Sapeli...
> -bench
~~~ Bench() ~~~
info depth 0 nodes 40 time 0 nps 0 score cp 51 pv e2e3
info depth 1 nodes 280 time 0 nps 0 score cp 0 pv e2e3
info depth 2 nodes 2798 time 5 nps 559600 score cp 39 pv d2d4
info depth 3 nodes 6712 time 8 nps 839000 score cp 4 pv d2d4
info depth 4 nodes 30443 time 40 nps 761075 score cp 16 pv e2e3
info depth 5 nodes 170268 time 183 nps 930426 score cp 4 pv e2e4
info depth 6 nodes 325174 time 142 nps 2289957 score cp 14 pv e2e4
info depth 7 nodes 1416870 time 680 nps 2083632 score cp 14 pv e2e4
info depth 8 nodes 7420550 time 3416 nps 2172292 score cp 41 pv g1f3
info depth 9 nodes 19595406 time 6983 nps 2806158 score cp 11 pv e2e3
info depth 10 nodes 54689840 time 19134 nps 2858254 score cp 14 pv g1f3
info depth 11 nodes 105641604 time 30591 nps 3453355 score cp 14 pv g1f3
nodes 105641604 mnps 1.761 time 60.001
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Sapeli 1.0 - New chess engine

Post by Roland Chastain »

Thank you for that release. Here is the results of a little frc tournament against engines from the Luciole division. :)
TC 40/60.

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws
   1 SlowChess 2.96 UCI            429     nan      32   92.2%    3.1%
   2 Galjoen 0.39.2                237     170      32   79.7%    3.1%
   3 AICE 0.99.2                   206     147      32   76.6%    9.4%
   4 Hamsters 0.0.6                137     121      32   68.8%   18.8%
   5 Sapeli 1.17                   -22     117      32   46.9%   12.5%
   6 Roce 0.0390                   -89     126      32   37.5%    6.3%
   7 Pulsar 2009 9a               -112     112      32   34.4%   25.0%
   8 Alouette 0.0.5               -429     398      32    7.8%    9.4%
   9 Luciole 0.0.3                -470     nan      32    6.3%    6.3%
Finished match
Qui trop embrasse mal étreint.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

I published Sapeli 1.18.
I can't help myself. I'm always improving my engine.
Source code: https://github.com/SamuraiDangyo/Sapeli/tree/1.18-final

I noticed Sapeli reported mating score a bit wrong in xboard. + Very very tiny speed boost. No functional/strength difference to 1.17.

benchmark:
1.18
= nodes 66699488 mnps 2.223 time 30.001
1.17
= nodes 65602638 mnps 2.187 time 30.001

Thanks for testing Sapeli.
Very nice to see my engine in various tournaments!
Also great to see chess engines being written in languages such as Lua!
Roland Chastain wrote: Wed Jun 05, 2019 11:10 am Thank you for that release. Here is the results of a little frc tournament against engines from the Luciole division. :)
TC 40/60.

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws
   1 SlowChess 2.96 UCI            429     nan      32   92.2%    3.1%
   2 Galjoen 0.39.2                237     170      32   79.7%    3.1%
   3 AICE 0.99.2                   206     147      32   76.6%    9.4%
   4 Hamsters 0.0.6                137     121      32   68.8%   18.8%
   5 Sapeli 1.17                   -22     117      32   46.9%   12.5%
   6 Roce 0.0390                   -89     126      32   37.5%    6.3%
   7 Pulsar 2009 9a               -112     112      32   34.4%   25.0%
   8 Alouette 0.0.5               -429     398      32    7.8%    9.4%
   9 Luciole 0.0.3                -470     nan      32    6.3%    6.3%
Finished match
Modern Times
Posts: 3546
Joined: Thu Jun 07, 2012 11:02 pm

Re: Sapeli 1.0 - New chess engine

Post by Modern Times »

Is there a Windows x64 exe (popcnt) available yet ?
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Sapeli 1.0 - New chess engine

Post by tpoppins »

Sapeli 1.20
Windoze POPCNT and SSE3 bins

Mediafire: sapeli-120-tp.zip
Filedropper: sapeli-120-tp.zip


I find the release scheme followed by Ethereal and Xiphos most sensible: dev builds in the root dir (or subdir) reflect the latest commits, official releases reserved only for versions that offer significant (i.e. 20+Elo) strength increases or important new features.
Tirsa Poppins
CCRL
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Sapeli 1.0 - New chess engine

Post by Guenther »

tpoppins wrote: Tue Jun 11, 2019 7:34 am Sapeli 1.20
Windoze POPCNT and SSE3 bins

Mediafire: sapeli-120-tp.zip
Filedropper: sapeli-120-tp.zip


I find the release scheme followed by Ethereal and Xiphos most sensible: dev builds in the root dir (or subdir) reflect the latest commits, official releases reserved only for versions that offer significant (i.e. 20+Elo) strength increases or important new features.
Agreed, it would be welcome also, if Toni would add your windows compiles in a bin folder there.
(The mediafire links will expire once and also they take a lot of place in my chronology ;-)
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Been improving Sapeli a little bit. Sapeli used to prune tactical moves too aggressively. Not anymore. Those are searched full depth always. Less stupid mistakes.

I added: Rook belongs to behind passed pawns. Own or enemy's.
https://github.com/SamuraiDangyo/Sapeli ... li.c#L2122

Sapeli 1.21 source code: https://github.com/SamuraiDangyo/Sapeli/tree/1.21

Currently 10-2-3 against 1.20 in 1 minute chess960 games. It is not worse. Probably not much stronger.
tpoppins wrote: Tue Jun 11, 2019 7:34 am Sapeli 1.20
Windoze POPCNT and SSE3 bins

Mediafire: sapeli-120-tp.zip
Filedropper: sapeli-120-tp.zip


I find the release scheme followed by Ethereal and Xiphos most sensible: dev builds in the root dir (or subdir) reflect the latest commits, official releases reserved only for versions that offer significant (i.e. 20+Elo) strength increases or important new features.
Thanks for the builds!
I keep the most stable and best version of Sapeli in master.
Also in own branch if I need to go back.
Some failed experiments like 1.20a / 1.20b / 1.21a etc are in their own branches. Those contain lots of work that just didn't work.
Guenther wrote: Tue Jun 11, 2019 10:41 am

Agreed, it would be welcome also, if Toni would add your windows compiles in a bin folder there.
(The mediafire links will expire once and also they take a lot of place in my chronology ;-)
Thanks for the feedback! I'll add those in a bin folder.