Sapeli 1.0 - New chess engine

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

Moderators: hgm, Rebel, chrisw

JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Sapeli 1.72 released!

Master: https://github.com/SamuraiDangyo/Sapeli
Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.72

+ I noticed Sapeli was happily getting into drawn endgames. And not knowing when tu turn bad position into drawn endings. This release fixes it.
+ Plus tons of simplifications.
+ Test suites rerun 10s per position.

Example:
Sapeli isn't blind anymore to drawish endings. Here Sapeli scales down this theoretical draw ending.
[d]8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1

Code: Select all

exclude: none best +tail                                          
dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 14	+2,87 	149,6M	0:13.22	Bb2 
 13	+2,87 	55,8M  	0:04.90	h5 
 12	+2,79 	20,8M  	0:01.87	h5 
 11	+2,85 	3,91M  	0:00.39	h5 
 10	+2,85 	1,60M  	0:00.17	h5 
  9	+2,78 	637078	0:00.07	h5 
  8	+2,73 	155452	0:00.03	h5 
  7	+2,52 	57291  	0:00.01	h5 
  6	+2,51 	20855  	0:00.00	h5 
  5	+2,47 	5323    	0:00.00	h5 
  4	+2,40 	1700    	0:00.00	h5 
  3	+2,36 	809      	0:00.00	h5 
  2	+2,38 	138      	0:00.00	h5 
  1	+2,33 	38        	0:00.00	Bd4+ 
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 »

JohnWoe wrote: Fri Feb 07, 2020 3:51 pm Sapeli 1.72 released!

Master: https://github.com/SamuraiDangyo/Sapeli
Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.72

+ I noticed Sapeli was happily getting into drawn endgames. And not knowing when tu turn bad position into drawn endings. This release fixes it.
+ Plus tons of simplifications.
+ Test suites rerun 10s per position.

Example:
Sapeli isn't blind anymore to drawish endings. Here Sapeli scales down this theoretical draw ending.
[d]8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
...
[/code]
I have added the new version compilations to the downloads at rwbc.
The eval for this position is compressed by more than 50% now compared to previous version.

I think though it should be even more scaled down for the special case of B+wrong pawn at least,
if it can be done w/o losing much speed, as it is quite rare?
Haven't looked at the source yet, if you have some general endgame scaling, or added special cases?

Code: Select all

Sapeli 1.71 by Toni Helminen
GNU General Public License version 3; for details see 'sapeli -license'
uci
...
position fen 8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
go depth 16
info depth 1 nodes 38 time 0 nps 0 score cp 484 pv h7h5
info depth 2 nodes 135 time 0 nps 0 score cp 488 pv h7h5
info depth 3 nodes 802 time 0 nps 0 score cp 493 pv h7h5
info depth 4 nodes 1744 time 0 nps 0 score cp 491 pv h7h5
info depth 5 nodes 5442 time 0 nps 0 score cp 514 pv h7h5
info depth 6 nodes 21032 time 10 nps 2103200 score cp 504 pv h7h5
info depth 7 nodes 66893 time 30 nps 2229766 score cp 518 pv h7h5
info depth 8 nodes 169818 time 70 nps 2425971 score cp 568 pv h7h5
info depth 9 nodes 652572 time 210 nps 3107485 score cp 580 pv h7h5
info depth 10 nodes 1594449 time 400 nps 3986122 score cp 582 pv h7h5
info depth 11 nodes 3871309 time 820 nps 4721108 score cp 582 pv h7h5
info depth 12 nodes 17507638 time 3000 nps 5835879 score cp 580 pv h7h5
info depth 13 nodes 49377659 time 7910 nps 6242434 score cp 587 pv h7h5
info depth 14 nodes 146185621 time 22810 nps 6408839 score cp 587 pv h7h5

Code: Select all

Sapeli 1.72 by Toni Helminen
GNU General Public License version 3; for details see 'sapeli -license'
uci
...
position fen 8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
go depth 16
info depth 1 nodes 38 time 0 nps 0 score cp 233 pv f6d4
info depth 2 nodes 138 time 0 nps 0 score cp 238 pv h7h5
info depth 3 nodes 809 time 0 nps 0 score cp 236 pv h7h5
info depth 4 nodes 1704 time 0 nps 0 score cp 240 pv h7h5
info depth 5 nodes 5332 time 10 nps 533200 score cp 247 pv h7h5
info depth 6 nodes 20826 time 10 nps 2082600 score cp 251 pv h7h5
info depth 7 nodes 56630 time 20 nps 2831500 score cp 252 pv h7h5
info depth 8 nodes 154791 time 40 nps 3869775 score cp 273 pv h7h5
info depth 9 nodes 648068 time 140 nps 4629057 score cp 279 pv h7h5
info depth 10 nodes 1635304 time 340 nps 4809717 score cp 285 pv h7h5
info depth 11 nodes 3968839 time 752 nps 5277711 score cp 285 pv h7h5
info depth 12 nodes 21481767 time 3462 nps 6205016 score cp 279 pv h7h5
info depth 13 nodes 52010840 time 8062 nps 6451356 score cp 288 pv h7h5
info depth 14 nodes 158320911 time 24212 nps 6538943 score cp 289 pv h7h5
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 »

Guenther wrote: Sat Feb 08, 2020 12:52 pm
JohnWoe wrote: Fri Feb 07, 2020 3:51 pm Sapeli 1.72 released!

Master: https://github.com/SamuraiDangyo/Sapeli
Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.72

+ I noticed Sapeli was happily getting into drawn endgames. And not knowing when tu turn bad position into drawn endings. This release fixes it.
+ Plus tons of simplifications.
+ Test suites rerun 10s per position.

Example:
Sapeli isn't blind anymore to drawish endings. Here Sapeli scales down this theoretical draw ending.
[d]8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
...
[/code]
I have added the new version compilations to the downloads at rwbc.
The eval for this position is compressed by more than 50% now compared to previous version.

I think though it should be even more scaled down for the special case of B+wrong pawn at least,
if it can be done w/o losing much speed, as it is quite rare?
Haven't looked at the source yet, if you have some general endgame scaling, or added special cases?

Code: Select all

Sapeli 1.71 by Toni Helminen
GNU General Public License version 3; for details see 'sapeli -license'
uci
...
position fen 8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
go depth 16
info depth 1 nodes 38 time 0 nps 0 score cp 484 pv h7h5
info depth 2 nodes 135 time 0 nps 0 score cp 488 pv h7h5
info depth 3 nodes 802 time 0 nps 0 score cp 493 pv h7h5
info depth 4 nodes 1744 time 0 nps 0 score cp 491 pv h7h5
info depth 5 nodes 5442 time 0 nps 0 score cp 514 pv h7h5
info depth 6 nodes 21032 time 10 nps 2103200 score cp 504 pv h7h5
info depth 7 nodes 66893 time 30 nps 2229766 score cp 518 pv h7h5
info depth 8 nodes 169818 time 70 nps 2425971 score cp 568 pv h7h5
info depth 9 nodes 652572 time 210 nps 3107485 score cp 580 pv h7h5
info depth 10 nodes 1594449 time 400 nps 3986122 score cp 582 pv h7h5
info depth 11 nodes 3871309 time 820 nps 4721108 score cp 582 pv h7h5
info depth 12 nodes 17507638 time 3000 nps 5835879 score cp 580 pv h7h5
info depth 13 nodes 49377659 time 7910 nps 6242434 score cp 587 pv h7h5
info depth 14 nodes 146185621 time 22810 nps 6408839 score cp 587 pv h7h5

Code: Select all

Sapeli 1.72 by Toni Helminen
GNU General Public License version 3; for details see 'sapeli -license'
uci
...
position fen 8/7p/5b2/8/8/6k1/8/6K1 b - - 1 1
go depth 16
info depth 1 nodes 38 time 0 nps 0 score cp 233 pv f6d4
info depth 2 nodes 138 time 0 nps 0 score cp 238 pv h7h5
info depth 3 nodes 809 time 0 nps 0 score cp 236 pv h7h5
info depth 4 nodes 1704 time 0 nps 0 score cp 240 pv h7h5
info depth 5 nodes 5332 time 10 nps 533200 score cp 247 pv h7h5
info depth 6 nodes 20826 time 10 nps 2082600 score cp 251 pv h7h5
info depth 7 nodes 56630 time 20 nps 2831500 score cp 252 pv h7h5
info depth 8 nodes 154791 time 40 nps 3869775 score cp 273 pv h7h5
info depth 9 nodes 648068 time 140 nps 4629057 score cp 279 pv h7h5
info depth 10 nodes 1635304 time 340 nps 4809717 score cp 285 pv h7h5
info depth 11 nodes 3968839 time 752 nps 5277711 score cp 285 pv h7h5
info depth 12 nodes 21481767 time 3462 nps 6205016 score cp 279 pv h7h5
info depth 13 nodes 52010840 time 8062 nps 6451356 score cp 288 pv h7h5
info depth 14 nodes 158320911 time 24212 nps 6538943 score cp 289 pv h7h5
Thanks for the feedback!
I tried to add a general rule for these drawish endgames. No pawns then 50% score. Usually less pawns on board means drawish. And only 1 minor/major then 33%. But the factor was too much. I need to fix this thing.

For example KNKR is almost always a draw but for example Stockfish 11 has special code to try squeeze out victory.

This opposite color bishop ending / and similar endings( KNBK / KQKR etc ) are quite rare and I don't think it's worth adding special code for it. I try to keep Sapeli pretty minimalistic anyway. I see those endings sometimes. And sometimes Sapeli manages to convert / save a draw and sometimes doesn't.

I forgot to mention that when analyzing on GUI and there's only 1 legal move. A chess engine needs to send also "info ..." string and not just bestmove. Otherwise there's nothing on analyze window. This is fixed now.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Released Sapeli 1.73

Master: https://github.com/SamuraiDangyo/Sapeli
Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.73
Contains: Linux + Android + Windows builds. Plus a debian package for Debian OS. sapeli is the fastest build.

Tons of tiny fixes and speedups. Searching 7,000,000 NPS on single core.
Finally worked on search and this version destroys all the older Sapelis. I would estimate +50elo.

Code: Select all

Score of Sapeli 1.73 vs Sapeli 1.72: 522 - 384 - 236  [0.560] 1142
Elo difference: 42.19 +/- 18.04
Suites. 10s / position :
WAC.epd : Improved 267 -> 272. This was a pleasant surprise.
STS : 678/1500
camava
Posts: 42
Joined: Tue Apr 09, 2019 8:10 pm
Full name: mario varela

Re: Sapeli 1.0 - New chess engine

Post by camava »

Hi It doesn't run for me in Android(Droidfish,Android 9)
Thkz
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

camava wrote: Tue Feb 25, 2020 7:25 pm Hi It doesn't run for me in Android(Droidfish,Android 9)
Thkz
Hello.
Thanks for trying! Some of my Android builds are missing something. Can't see any other reason why Droidfish won't accept my engine.

I also released a better version:
Sapeli 1.74: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.74

+ QSearch improvements.
camava
Posts: 42
Joined: Tue Apr 09, 2019 8:10 pm
Full name: mario varela

Re: Sapeli 1.0 - New chess engine

Post by camava »

JohnWoe wrote: Tue Feb 25, 2020 11:00 pm
camava wrote: Tue Feb 25, 2020 7:25 pm Hi It doesn't run for me in Android(Droidfish,Android 9)
Thkz
Hello.
Thanks for trying! Some of my Android builds are missing something. Can't see any other reason why Droidfish won't accept my engine.

I also released a better version:
Sapeli 1.74: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.74

+ QSearch improvements.
Hi.
Look.
With 1.74 version i have same error.
https://photos.app.goo.gl/o1SzEJERJYxi5s4D7
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Sapeli 1.75 released.

Contains binaries for Linux+Android+Windows. All 64bit I don't care about 32bit.

Release: https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.75

Basically nothing but simplifications. It is much better in 1 second games. Thanks to finishing depth 1-4 really fast now.

make system improved: Sapeli can be easily installed with:

Code: Select all

make clean build-profile debug=no strip id install
camava
Posts: 42
Joined: Tue Apr 09, 2019 8:10 pm
Full name: mario varela

Re: Sapeli 1.0 - New chess engine

Post by camava »

Thanks Mr JohnWoe but like i have same problem to run the engine for android version.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Sapeli 1.0 - New chess engine

Post by JohnWoe »

Released Sapeli 1.76:

https://github.com/SamuraiDangyo/Sapeli ... /tag/v1.76

master: https://github.com/SamuraiDangyo/Sapeli

This is a big bug fix version. Simplified the code base a lot(MACROS -> simple functions). Contains builds for different OSes. Profile build should be used. As Sapeli depends on speed. :D