The first 100 game, 5 minute time control match has completed. Symbolic's score vs FairyMax was 53-27-20 (+92 elo).
The games: https://dl.dropboxusercontent.com/u/316 ... 9-1.pgn.gz
Symbolic vs tscp: more match results
Moderators: hgm, Rebel, chrisw
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Symbolic vs FairyMax
Well, Symbolic also clearly passed Fairy-Max in strength, although not yet by so much that testing against the latter has become meaningless. In any case it is confirmed that Fairy-Max is some 200 Elo stronger than TSCP. (Which is not bad for an AI of only some 150 lines of code.)
Should you tire of Fairy-Max, you could switch to the still stronger KingSlayer/Simple. The latest commit in my on-line repository has now also been tested under Linux. (Of course I fell for the SIGINT trick for the umptieth time, so previous versions were killed by XBoard...) It now also has a Makefile, complete with install target that should also work on OS X (no "cp -u", and install in /usr/local/bin). It even includes a logo!
Should you tire of Fairy-Max, you could switch to the still stronger KingSlayer/Simple. The latest commit in my on-line repository has now also been tested under Linux. (Of course I fell for the SIGINT trick for the umptieth time, so previous versions were killed by XBoard...) It now also has a Makefile, complete with install target that should also work on OS X (no "cp -u", and install in /usr/local/bin). It even includes a logo!
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Symbolic vs FairyMax
100 games between King Slayer and Fairy-Max at 40/1min on Linux ended in an 82.5% victory for King Slayer (75+ 15= 10-). And that is almost all due to the better move ordering of King Slayer, as most of its evaluation terms were not even switched on. So it bungled some games because it did not know that KNK is a draw.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: Symbolic vs FairyMax
After making a few changes to Symbolic, I ran another 100 game match against FairyMax using a 5 minute time control. The result this time was 67-16-17 (+196 elo).
The games: https://dl.dropboxusercontent.com/u/316 ... 930.pgn.gz
The games: https://dl.dropboxusercontent.com/u/316 ... 930.pgn.gz
-
- Posts: 895
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Symbolic vs FairyMax
If I'm not mistaken, this puts Symbolic at about 2200 Elo (CCRL scale). Sungorus is 2300, so you may as well make it the next target. And in about two weeks, I am planning to release "Mini-Rodent". There is still much code refactoring and commenting to do, but the thing is beating Sungorus by 80%, so may well serve as the next hurdle to overcome.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Symbolic vs FairyMax
At 5min sudden-death the difference grows even larger. King Slayer is leading by 87.5% (22+ 5= 1-) there.
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: Symbolic vs tscp: more match results
I downloaded from this URL:hgm wrote:From http://hgm.nubati.net/cgi-bin/gitweb.cgi you can always download the latest 'snapshot' of all my open-source projects as a tar ball. The Fairy-Max sources include a Makefile, and you can build it with "make install". A slightly stronger engine is in the simple.git section there; this project is so fresh that I have not included a Makefile yet. But you can compile with
gcc -O2 simple.c -o simple
http://hgm.nubati.net/cgi-bin/gitweb.cg ... 155;sf=tgz
This is what I get:
Code: Select all
make
cc -O2 -s simple.c -o kingslayer
simple.c:325:10: warning: equality comparison result unused
[-Wunused-comparison]
if(stm == side, 1) return 0; // on our move we migh...
~~~~^~~~~~~
simple.c:325:10: note: use '=' to turn this equality comparison into an
assignment
if(stm == side, 1) return 0; // on our move we migh...
^~
=
simple.c:335:27: warning: if statement has empty body [-Wempty-body]
if(pawn == (promo^16));
^
simple.c:335:27: note: put the semicolon on a separate line to silence this
warning
simple.c:365:72: warning: if statement has empty body [-Wempty-body]
...& 7) == 0 && dist[hisKing - (king^2)] < 2 - myTurn); // own King is tra...
^
simple.c:365:72: note: put the semicolon on a separate line to silence this
warning
simple.c:379:63: warning: '&&' within '||' [-Wlogical-op-parentheses]
...== king + 2*forward) return (!lastRank || next && myTurn); // oppose K n...
~~ ~~~~~^~~~~~~~~
simple.c:379:63: note: place parentheses around the '&&' expression to silence
this warning
...== king + 2*forward) return (!lastRank || next && myTurn); // oppose K n...
^
( )
simple.c:383:23: warning: & has lower precedence than ==; == will be evaluated
first [-Wparentheses]
return (!lastRank & dist[king + 2*forward - hisKing] + myTurn == 1)...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:383:23: note: place parentheses around the '==' expression to silence
this warning
return (!lastRank & dist[king + 2*forward - hisKing] + myTurn == 1)...
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:383:23: note: place parentheses around the & expression to evaluate it
first
return (!lastRank & dist[king + 2*forward - hisKing] + myTurn == 1)...
^
( )
simple.c:442:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
simple.c:572:17: warning: '&&' within '||' [-Wlogical-op-parentheses]
if(f != 0 && board[sq-17] == WHITE+PAWN || /...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
simple.c:572:17: note: place parentheses around the '&&' expression to silence
this warning
if(f != 0 && board[sq-17] == WHITE+PAWN |...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:573:17: warning: '&&' within '||' [-Wlogical-op-parentheses]
f != 7 && board[sq-15] == WHITE+PAWN ) ...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:573:17: note: place parentheses around the '&&' expression to silence
this warning
f != 7 && board[sq-15] == WHITE+PAWN ) ...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:596:17: warning: '&&' within '||' [-Wlogical-op-parentheses]
if(f != 0 && board[sq+15] == BLACK+PAWN || /...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
simple.c:596:17: note: place parentheses around the '&&' expression to silence
this warning
if(f != 0 && board[sq+15] == BLACK+PAWN |...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:597:17: warning: '&&' within '||' [-Wlogical-op-parentheses]
f != 7 && board[sq+17] == BLACK+PAWN ) ...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:597:17: note: place parentheses around the '&&' expression to silence
this warning
f != 7 && board[sq+17] == BLACK+PAWN ) ...
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:621:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
simple.c:808:29: warning: '&&' within '||' [-Wlogical-op-parentheses]
iterDepth >= depth && bestScore >= beta) // or for reduce...
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
simple.c:808:29: note: place parentheses around the '&&' expression to silence
this warning
iterDepth >= depth && bestScore >= beta) // or for reduce...
^
( )
simple.c:812:63: warning: implicit declaration of function 'TimeIsUp' is invalid
in C99 [-Wimplicit-function-declaration]
if((nodeCount++ & 0x3FF) == 0 && !forceMove) abortFlag |= TimeIsUp(3...
^
simple.c:851:62: warning: operator '<<' has lower precedence than '+'; '+' will
be evaluated first [-Wshift-op-parentheses]
...moves[--captures] = to | from<<8 | QUEEN-PAWN+0x8000<<16;// add promotio...
~~~~~~~~~~^~~~~~~~~
simple.c:851:62: note: place parentheses around the '+' expression to silence
this warning
...moves[--captures] = to | from<<8 | QUEEN-PAWN+0x8000<<16;// add promotio...
~~~~~~~~~~^~~~~~~
simple.c:852:58: warning: operator '<<' has lower precedence than '-'; '-' will
be evaluated first [-Wshift-op-parentheses]
...moves[lastMove++] = to | from<<8 | KNIGHT-PAWN<<16; // and under-pr...
~~~~~~^~~~~~~
simple.c:852:58: note: place parentheses around the '-' expression to silence
this warning
...moves[lastMove++] = to | from<<8 | KNIGHT-PAWN<<16; // and under-pr...
~~~~~~^~~~~
simple.c:855:59: warning: operator '<<' has lower precedence than '-'; '-' will
be evaluated first [-Wshift-op-parentheses]
...moves[--captures] = to | from<<8 | key[victim]-type << 24; // add capt...
~~~~~~~~~~~^~~~~ ~~
simple.c:855:59: note: place parentheses around the '-' expression to silence
this warning
...moves[--captures] = to | from<<8 | key[victim]-type << 24; // add capt...
^
( )
simple.c:880:62: warning: operator '<<' has lower precedence than '+'; '+' will
be evaluated first [-Wshift-op-parentheses]
...moves[--captures] = to | from<<8 | QUEEN-PAWN+0x6000<<16;// add promotio...
~~~~~~~~~~^~~~~~~~~
simple.c:880:62: note: place parentheses around the '+' expression to silence
this warning
...moves[--captures] = to | from<<8 | QUEEN-PAWN+0x6000<<16;// add promotio...
~~~~~~~~~~^~~~~~~
simple.c:881:58: warning: operator '<<' has lower precedence than '-'; '-' will
be evaluated first [-Wshift-op-parentheses]
...moves[lastMove++] = to | from<<8 | KNIGHT-PAWN<<16; // under-pr...
~~~~~~^~~~~~~
simple.c:881:58: note: place parentheses around the '-' expression to silence
this warning
...moves[lastMove++] = to | from<<8 | KNIGHT-PAWN<<16; // under-pr...
~~~~~~^~~~~
simple.c:884:61: warning: operator '<<' has lower precedence than '+'; '+' will
be evaluated first [-Wshift-op-parentheses]
...moves[lastMove++] = to+step | from<<8 | 0x80+to<<16; // add double p...
~~~~^~~~~
simple.c:884:61: note: place parentheses around the '+' expression to silence
this warning
...moves[lastMove++] = to+step | from<<8 | 0x80+to<<16; // add double p...
^
( )
simple.c:907:58: warning: operator '<<' has lower precedence than '+'; '+' will
be evaluated first [-Wshift-op-parentheses]
moves[lastMove++] = king+2*dir | king<<8 | king+dir+0x80<<16; // ad...
~~~~~~~~^~~~~~~
simple.c:907:58: note: place parentheses around the '+' expression to silence
this warning
moves[lastMove++] = king+2*dir | king<<8 | king+dir+0x80<<16; // ad...
^
( )
simple.c:1012:25: warning: expression result unused [-Wunused-value]
...iterDepth <= 1 && eval + value[victim] + value[epVictim] < alpha - 200,0...
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:1076:34: warning: while loop has empty body [-Wempty-body]
while((*p++ = *pvSP++)); pvSP = p; // append da...
^
simple.c:1076:34: note: put the semicolon on a separate line to silence this
warning
simple.c:1113:54: warning: '&&' within '||' [-Wlogical-op-parentheses]
!ply && !forceMove && iterDepth < maxDepth && !TimeIsUp(1)); /...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
simple.c:1113:54: note: place parentheses around the '&&' expression to silence
this warning
!ply && !forceMove && iterDepth < maxDepth && !TimeIsUp(1)); /...
^
( )
simple.c:1118:36: warning: '&' within '|' [-Wbitwise-op-parentheses]
bucket->move[slot] = hashMove & 0xFFFFFF | checker << 24; // pack c...
~~~~~~~~~^~~~~~~~~~ ~
simple.c:1118:36: note: place parentheses around the '&' expression to silence
this warning
bucket->move[slot] = hashMove & 0xFFFFFF | checker << 24; // pack c...
^
( )
simple.c:1175:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
simple.c:1195:21: warning: operator '>>' has lower precedence than '-'; '-' will
be evaluated first [-Wshift-op-parentheses]
pstEval += (4 - (i&8) >> 2)*pst[i][sqr]; // update PST eva...
~~^~~~~~~ ~~
simple.c:1195:21: note: place parentheses around the '-' expression to silence
this warning
pstEval += (4 - (i&8) >> 2)*pst[i][sqr]; // update PST eva...
^
( )
simple.c:1214:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
MakeMove (int move)
^
simple.c:1239:12: warning: if statement has empty body [-Wempty-body]
if(s[4]) ; // TODO: promotion
^
simple.c:1239:12: note: put the semicolon on a separate line to silence this
warning
simple.c:1296:16: warning: '&&' within '||' [-Wlogical-op-parentheses]
if(score > 0 && stm == WHITE || score < 0 && stm == BLACK) printf("1-0\n");
~~~~~~~~~~^~~~~~~~~~~~~~~ ~~
simple.c:1296:16: note: place parentheses around the '&&' expression to silence
this warning
if(score > 0 && stm == WHITE || score < 0 && stm == BLACK) printf("1-0\n");
~~~~~~~~~~^~~~~~~~~~~~~~~
simple.c:1296:45: warning: '&&' within '||' [-Wlogical-op-parentheses]
if(score > 0 && stm == WHITE || score < 0 && stm == BLACK) printf("1-0\n");
~~ ~~~~~~~~~~^~~~~~~~~~~~~~~
simple.c:1296:45: note: place parentheses around the '&&' expression to silence
this warning
if(score > 0 && stm == WHITE || score < 0 && stm == BLACK) printf("1-0\n");
~~~~~~~~~~^~~~~~~~~~~~~~~
30 warnings generated.
When I run it, an easy win:
Code: Select all
./kingslayer
go
0-1
[Account deleted]
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Symbolic vs tscp: more match results
This is the version that crushes Fairy-Max. I never claimed that it was finished. Almost all eval terms are currently disabled by default, and the code calculating them is not tested or debugged.
The compiler is right to consider the if(... ,1) suspicious, but the ",1" is actually just a temporary addition to force an immediate null-return for a routine that is not yet finished (KQKPdraw). The empty-body statement is in that disabled routine (and one of the reasons for disabling it). The empty body on line 365 (KPKdraw) could be a genuine error, though, thanks for spotting it. On line 1239 the empty body is accompanied by a 'TODO' comment; the body will be supplied when I decide how to handle under-promotions at game level, so that I would know what has to be done here.
The missing return value in the Fortress1 function is a bad error; I am surprised that my compiler does not complain about that. (I get no warnings at all when I compile with gcc.) The function is not yet active (recognizers = 0, forcing an immediate null return, so the error in KPKdraw mentioned above is also in inactive code). The same error in PawnEval is just because the latter should have been declared as 'void' anyway; it is called only in one place, where the value is not used.
Your compiler seems to take offense to an implicit declaration; mine apparently doesn't (and they always seem to work correctly).
The 'unused value' is a temporary disabling of not-yet-woking code for futility pruning by suffixing it with ",0".
The missing return in TimeIsUp would be non-reachable; I can put one there just to silence the warning.
The rest of the warnings is just nonsense about unnecessary parantheses. Perhaps compiling with -Wnosillywarnings would adequately deal with those.
As to your easy win:
It seems you did forget to give the 'new' command to start a game. Not much of an achievement to beat an opponent that has no pieces!
(Actually a bit strange that it does not claim this as a stalemate, though. But the code was not designed to handle the absence of Kings, so the check detection could very well go haywire here.)
The compiler is right to consider the if(... ,1) suspicious, but the ",1" is actually just a temporary addition to force an immediate null-return for a routine that is not yet finished (KQKPdraw). The empty-body statement is in that disabled routine (and one of the reasons for disabling it). The empty body on line 365 (KPKdraw) could be a genuine error, though, thanks for spotting it. On line 1239 the empty body is accompanied by a 'TODO' comment; the body will be supplied when I decide how to handle under-promotions at game level, so that I would know what has to be done here.
The missing return value in the Fortress1 function is a bad error; I am surprised that my compiler does not complain about that. (I get no warnings at all when I compile with gcc.) The function is not yet active (recognizers = 0, forcing an immediate null return, so the error in KPKdraw mentioned above is also in inactive code). The same error in PawnEval is just because the latter should have been declared as 'void' anyway; it is called only in one place, where the value is not used.
Your compiler seems to take offense to an implicit declaration; mine apparently doesn't (and they always seem to work correctly).
The 'unused value' is a temporary disabling of not-yet-woking code for futility pruning by suffixing it with ",0".
The missing return in TimeIsUp would be non-reachable; I can put one there just to silence the warning.
The rest of the warnings is just nonsense about unnecessary parantheses. Perhaps compiling with -Wnosillywarnings would adequately deal with those.
As to your easy win:
It seems you did forget to give the 'new' command to start a game. Not much of an achievement to beat an opponent that has no pieces!
(Actually a bit strange that it does not claim this as a stalemate, though. But the code was not designed to handle the absence of Kings, so the check detection could very well go haywire here.)
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: Symbolic vs tscp: more match results
hgm wrote:The rest of the warnings is just nonsense about unnecessary parantheses. Perhaps compiling with -Wnosillywarnings would adequately deal with those.
Unfortunately that increases the number of warnings by 1:
Code: Select all
cc -O2 -s -Wnosillywarnings simple.c -o kingslayer
warning: unknown warning option '-Wnosillywarnings'; did you mean '-W#warnings'?
[-Wunknown-warning-option]
[...]
31 warnings generated.
As to your easy win:
It seems you did forget to give the 'new' command to start a game. Not much of an achievement to beat an opponent that has no pieces!
(Actually a bit strange that it does not claim this as a stalemate, though. But the code was not designed to handle the absence of Kings, so the check detection could very well go haywire here.)
Code: Select all
./kingslayer
new
go
0-1
I quickly browsed through simple.c. You use all globals, which is not bad by itself for this purpose. But I can recommend to declare everything as 'static', to avoid accidental name clashes and all you want to have externally visible is 'main' anyway. (I was once bitten by naming a global variable 'exp', and that crashed nicely on some platforms.)
[Account deleted]
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Symbolic vs tscp: more match results
Oh, it seems that the 0-1 happens because you give it zero time. This immediately aborts the search after the first move in the root returns, so that no valid move was found, and this leads to resign.
So
./kingslayer
new
time 10000
go
works fine. Like you say, XBoard would do this, and King Slayer plays fine there. Swintching on any of its options is at your own risk, although drawishness in combination with recognizers wold probably work in the version I just pushed,and be an improvement. Other options could be so purely tuned that they weaken play even if they are bug-free. (Current match result 37+ 7= 2- in favor of King Slayer at 5+0.)
So
./kingslayer
new
time 10000
go
works fine. Like you say, XBoard would do this, and King Slayer plays fine there. Swintching on any of its options is at your own risk, although drawishness in combination with recognizers wold probably work in the version I just pushed,and be an improvement. Other options could be so purely tuned that they weaken play even if they are bug-free. (Current match result 37+ 7= 2- in favor of King Slayer at 5+0.)