pre-announcement: 10x8 tourney

Discussion of chess software programming and technical issues.

Moderator: Ras

Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

Evert wrote:
Ferdy wrote: Q2B4/1h1h3h/1khh4/3P3h/P2P4/5P2/2h3P1/6K1 b - - 0 1
[d]Q2B4/1p1p3p/1kpp4/3P3p/P2P4/5P2/2p3P1/6K1 b - - 0 1
Black here still survived by promoting to a king, c2b1k.
I hope your fix will also address this.
Survived is a bit of a generous term. ;)
I would guess that promotion to king is treated as an underpromotion and so not easily fixed... this situation probably happens rarely enough that it doesn't really matter in practice.
Hi Evert, I am testing my new spartan chess engine vs the ff engines.

Code: Select all

Oberon 0.04
Catalyst
Fairy-Max 4.8R
Sjaak 263
Each opponent will play 100 games from 50 start pgn games, color reversed. The goal is to see if it will play as intended. So far it plays legally. Next I will be playing it vs Nebiyu. By the way do you have perft records?
User avatar
hgm
Posts: 28390
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pre-announcement: 10x8 tourney

Post by hgm »

Evert wrote:Survived is a bit of a generous term. ;)
I would guess that promotion to king is treated as an underpromotion and so not easily fixed... this situation probably happens rarely enough that it doesn't really matter in practice.
Indeed, this is extra painful because it occurs in a totally won prosition. But like you say, it is not easily fixed. Except perhaps by letting Fairy-Max refrain from making any mate claims when it is playing against the Spartans, and leave that purely to the opponent or GUI. It then still would think this is a mate, and play accordingly, but it would then simply be unpleasantly surprised when for the next search it gets presented a position where black has promoted to King. (It might still have thrown away the game at that time, of course, but this is what you get for not considering under-promotions.)

Not very elegant, but it could harvest a point, occasionally. I don't mind so much complicating the game-level MakeMove in Fairy-Max, so I could put in a test that only suppresses mate claims when playing white in Spartan Chess when there are black Hoplites on 2nd rank. Spartan Chess is really unique in that the legality of a promotion move can depend on what you promote to.

For testing input-move legality I already added code to set the King count to 2 before the legality test when performing a promotion to King, to suppress an illegal-move claim even when the legality test assumes promotion to Warlord.
Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

Hi Evert, I am testing my new spartan chess engine vs the ff engines.

Code: Select all

Oberon 0.04
Catalyst
Fairy-Max 4.8R
Sjaak 263
Each opponent will play 100 games from 50 start pgn games, color reversed. The goal is to see if it will play as intended. So far it plays legally. Next I will be playing it vs Nebiyu. By the way do you have perft records?[/quote]

My perft for spartan chess from starting position.

Code: Select all

 a2a3 - 1
 a2a4 - 1
 b2b3 - 1
 b2b4 - 1
 c2c3 - 1
 c2c4 - 1
 d2d3 - 1
 d2d4 - 1
 e2e3 - 1
 e2e4 - 1
 f2f3 - 1
 f2f4 - 1
 g2g3 - 1
 g2g4 - 1
 h2h3 - 1
 h2h4 - 1
 b1a3 - 1
 b1c3 - 1
 g1f3 - 1
 g1h3 - 1

 Perft 1 Summary
 Counts: 20

Code: Select all

 a2a3 - 32
 a2a4 - 32
 b2b3 - 32
 b2b4 - 32
 c2c3 - 32
 c2c4 - 32
 d2d3 - 32
 d2d4 - 32
 e2e3 - 32
 e2e4 - 32
 f2f3 - 32
 f2f4 - 32
 g2g3 - 32
 g2g4 - 32
 h2h3 - 32
 h2h4 - 32
 b1a3 - 32
 b1c3 - 32
 g1f3 - 32
 g1h3 - 32

 Perft 2 Summary
 Counts: 640

Code: Select all

 g2g3 - 672
 g2g4 - 674
 a2a3 - 608
 a2a4 - 672
 b2b3 - 672
 b2b4 - 674
 c2c3 - 672
 c2c4 - 705
 d2d3 - 862
 d2d4 - 896
 e2e3 - 959
 e2e4 - 961
 f2f3 - 608
 f2f4 - 641
 h2h3 - 608
 h2h4 - 672
 b1a3 - 640
 b1c3 - 704
 g1f3 - 704
 g1h3 - 640

 Perft 3 Summary
 Counts: 14244

Code: Select all

 h2h3 - 20264
 h2h4 - 22366
 b2b3 - 22322
 b2b4 - 22288
 g2g3 - 22400
 g2g4 - 22390
 a2a3 - 20264
 a2a4 - 22370
 e2e3 - 31874
 e2e4 - 31851
 c2c3 - 22376
 c2c4 - 23343
 f2f3 - 20264
 f2f4 - 21246
 d2d3 - 28707
 d2d4 - 29658
 b1a3 - 21288
 b1c3 - 23349
 g1f3 - 23368
 g1h3 - 21294

 Perft 4 Summary
 Counts: 473282

Code: Select all

 b2b3 - 514935
 b2b4 - 516545
 c2c3 - 539981
 c2c4 - 576876
 g2g3 - 520959
 g2g4 - 514825
 f2f3 - 430537
 f2f4 - 474038
 e2e3 - 983721
 e2e4 - 987438
 a2a3 - 434168
 a2a4 - 523087
 h2h3 - 434197
 h2h4 - 525108
 d2d3 - 792247
 d2d4 - 867919
 b1a3 - 476731
 b1c3 - 561923
 g1f3 - 560396
 g1h3 - 476884

 Perft 5 Summary
 Counts: 11712515

Code: Select all

 b2b3 - 17852989
 b2b4 - 17767267
 h2h3 - 15137689
 h2h4 - 18279353
 g2g3 - 18167235
 g2g4 - 17854666
 c2c3 - 18781609
 c2c4 - 19904214
 e2e3 - 34143618
 e2e4 - 34110467
 a2a3 - 15137201
 a2a4 - 18212175
 f2f3 - 15006559
 f2f4 - 16384078
 d2d3 - 27586700
 d2d4 - 29930527
 b1a3 - 16560624
 b1c3 - 19451039
 g1f3 - 19428214
 g1h3 - 16576919

 Perft 6 Summary
 Counts: 406273143

Code: Select all

 a2a3 - 363494251
 a2a4 - 467882972
 b2b3 - 450426801
 b2b4 - 451515206
 c2c3 - 503965382
 c2c4 - 539759604
 d2d3 - 784506591
 d2d4 - 917751479
 e2e3 - 1088420608
 e2e4 - 1095629272
 f2f3 - 350818440
 f2f4 - 404314273
 g2g3 - 464024869
 g2g4 - 446343402
 h2h3 - 363427755
 h2h4 - 472163885
 b1a3 - 412598052
 b1c3 - 508103133
 g1f3 - 503580926
 g1h3 - 412889919

 Perft 7 Summary
 Counts: 11001616820
From Sjaak, ref: http://talkchess.com/forum/viewtopic.ph ... ht=spartan

Code: Select all

 1         20  0.00    540540.54nps 
 2        640  0.00   3422459.89nps 
 3      14244  0.00   5859317.15nps 
 4     473282  0.10   4653295.19nps 
 5   11712515  1.94   6026986.97nps 
 6  406273143 87.56   4639727.10nps 
Numbers up to perft 6 are looking good :)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: pre-announcement: 10x8 tourney

Post by Evert »

Ferdy wrote:By the way do you have perft records?
Not on hand, but you can generate them easily if you can compile Sjaak yourself: one of the programs that come with it is "sjperft", which is a commandline utility. Just run "sjperft [depth] -variant spartan [file.epd]" to get the perft values for the specified epd (default: starting position) up to the specified depth (default: 6).
Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

Evert wrote:
Ferdy wrote:By the way do you have perft records?
Not on hand, but you can generate them easily if you can compile Sjaak yourself: one of the programs that come with it is "sjperft", which is a commandline utility. Just run "sjperft [depth] -variant spartan [file.epd]" to get the perft values for the specified epd (default: starting position) up to the specified depth (default: 6).
At this stage I am comfortable with perft 6 which agrees with the result from Sjaak.