Chess960 / Fischer Random Perft Wiki Results

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: Chess960 / Fischer Random Perft Wiki Results

Post by zenpawn »

AndrewGrant wrote: Mon May 11, 2020 1:35 pm I did not know that this dataset made its way to the wiki. Cool to know, and hopefully useful.
Definitely useful. Thank you, Andrew. Sorry to have misreported these discrepancies.

I've now corrected the mismatches RM was experiencing.

Drilling down a bit on some of these, you get to positions like:

[d]nrkb2nr/ppppp1p1/6bp/5p2/1PP1P1P1/8/P1NPBP1P/qRK1BQNR w HBhb - 0 11
where castling queenside is illegal.
Erin Dame
Author of RookieMonster
jonkr
Posts: 178
Joined: Wed Nov 13, 2019 1:36 am
Full name: Jonathan Kreuzer

Re: Chess960 / Fischer Random Perft Wiki Results

Post by jonkr »

This post was useful to me as it turns out I also wasn't checking for this case (even in 960), and was a quick fix to correct.
I guess Stockfish must have a test for this case that's only activated in Chess960 mode, whereas when not in Chess960 mode I assume the castling flags are invalid if rooks aren't on standard start squares and don't allow castling.
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: Chess960 / Fischer Random Perft Wiki Results

Post by Sesse »

My Chess.js fork seemingly handles this situation correctly, although I have no idea why. =)
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Chess960 / Fischer Random Perft Wiki Results

Post by lucasart »

Joerg Oster wrote: Mon May 11, 2020 10:06 am
zenpawn wrote: Mon May 11, 2020 2:25 am Stockfish 11 disagrees with some of the results reported at https://www.chessprogramming.org/Chess960_Perft_Results
That's because you're doing something wrong!
Can you figure it out?

Hint: do you SF expect to know that you are giving a Chess960 fen?
True. But that's because the SF implementation of casting is clumsy. If you do it well, the code can be 100% FRC agnostic.

In Demolito, everything is written for FRC, and normal chess as just a particular starting position. There is not a single Chess960 in the code, except to deal with the UCI protocol inconsistency. If the UCI protocol could be corrected, there would be no need for it.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: Chess960 / Fischer Random Perft Wiki Results

Post by zenpawn »

lucasart wrote: Tue May 12, 2020 6:32 am
Joerg Oster wrote: Mon May 11, 2020 10:06 am
zenpawn wrote: Mon May 11, 2020 2:25 am Stockfish 11 disagrees with some of the results reported at https://www.chessprogramming.org/Chess960_Perft_Results
That's because you're doing something wrong!
Can you figure it out?

Hint: do you SF expect to know that you are giving a Chess960 fen?
True. But that's because the SF implementation of casting is clumsy. If you do it well, the code can be 100% FRC agnostic.

In Demolito, everything is written for FRC, and normal chess as just a particular starting position. There is not a single Chess960 in the code, except to deal with the UCI protocol inconsistency. If the UCI protocol could be corrected, there would be no need for it.
To be fair to Stockfish (and myself), I didn't expect it to know that I wanted Chess960, I just got the UCI syntax wrong for telling it. :oops: But, you make a good point that special-casing for Fischer Random is not really necessary. Note: Winboard too has a variant command for "fischerandom".
Erin Dame
Author of RookieMonster
AndrewGrant
Posts: 1752
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Chess960 / Fischer Random Perft Wiki Results

Post by AndrewGrant »

lucasart wrote: Tue May 12, 2020 6:32 am
Joerg Oster wrote: Mon May 11, 2020 10:06 am
zenpawn wrote: Mon May 11, 2020 2:25 am Stockfish 11 disagrees with some of the results reported at https://www.chessprogramming.org/Chess960_Perft_Results
That's because you're doing something wrong!
Can you figure it out?

Hint: do you SF expect to know that you are giving a Chess960 fen?
True. But that's because the SF implementation of casting is clumsy. If you do it well, the code can be 100% FRC agnostic.

In Demolito, everything is written for FRC, and normal chess as just a particular starting position. There is not a single Chess960 in the code, except to deal with the UCI protocol inconsistency. If the UCI protocol could be corrected, there would be no need for it.
Likewise for Ethereal. If UCI could handle O-O-O and O-O, there would be no need for any special code at all.

Code: Select all

void moveToString(uint16_t move, char *str, int chess960) {

    int from = MoveFrom(move), to = MoveTo(move);

    // FRC reports using KxR notation, but standard does not
    if (MoveType(move) == CASTLE_MOVE && !chess960)
        to = castleKingTo(from, to);
Above is the only line of code that cares at all about whether its FRC or not.
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: Chess960 / Fischer Random Perft Wiki Results

Post by Sesse »

I am still running Chess.js on the depth 6 results…

nrbbnk1r/pp2pppq/8/2pp3p/3P2P1/1N6/PPP1PP1P/1RBBNKQR w HBhb - 0 9. Chess.js perf depth 6 on my machine: 2526 seconds. Stockfish 11: Below 9 seconds! Clearly, there is some room for improvement here. =)
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Chess960 / Fischer Random Perft Wiki Results

Post by xr_a_y »

Sesse wrote: Thu May 14, 2020 10:33 am I am still running Chess.js on the depth 6 results…

nrbbnk1r/pp2pppq/8/2pp3p/3P2P1/1N6/PPP1PP1P/1RBBNKQR w HBhb - 0 9. Chess.js perf depth 6 on my machine: 2526 seconds. Stockfish 11: Below 9 seconds! Clearly, there is some room for improvement here. =)
SF is fast here ! Mostly because it doesn't apply leaf nodes

Code: Select all

cnt = leaf ? MoveList<LEGAL>(pos).size() : perft<false>(pos, depth - 1);
Minic took 44 sec...
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Chess960 / Fischer Random Perft Wiki Results

Post by JohnWoe »

Instead of a big ass list of FRC fens. One could simply play 100000 games against some stable FRC engine to see there's no illegal moves. Some study like positions are ok for unit testing.

About this position: [d]nrbbnk1r/pp2pppq/8/2pp3p/3P2P1/1N6/PPP1PP1P/1RBBNKQR w HBhb - 0 9

SF: Need to pipe in stdin and time it because it lacks functionality. But its movegen is fast.

Code: Select all

Nodes searched: 1310683359
real	0m9,890s
user	0m9,863s
sys	0m0,024s
Sapeli 1.89: depth 6 nodes 1310683359 time 34.979 mnps 37.470

LastEmperor:

Code: Select all

[ nrbbnk1r/pp2pppq/8/2pp3p/3P2P1/1N6/PPP1PP1P/1RBBNKQR w HBhb - 0 9 ]
Depth               Nodes        Mnps        Time
    0                   1       0.000       0.000
    1                  29       0.000       0.000
    2               1,036       0.000       0.000
    3              31,344      31.344       0.001
    4           1,139,166      29.978       0.038
    5          35,627,310      43.395       0.821
    6       1,310,683,359      82.113      15.962
=================================================
                    Nodes        Mnps        Time
Total       1,347,482,245      80.102      16.822
Summarum:
SF: 9.8s
LastEmperor: 16.8s
Sapeli: 35.229s