I setup icsdroneng and polyglot for zurichess play on FICS. It seems that in some games zurichess is resigning for no reason: http://www.ficsgames.org/cgi-bin/show.cgi?ID=392713173 . I disabled resign from polyglot and looked into logs to see what happens:
Fri Mar 11 07:25:20 2016:DEBUG:engine->icsdrone: 13 +2198 769 1633776 (Nxc3) Nxc3+ Ke1 Nd4 bxc3 Nc2+ Kf1 Nxa1 Bc4 Rhf8 Ke2 Rfe8+ Kf1 Rd1+ Kg2 Rd2+ Kg3 Bc7+ f4\012
Fri Mar 11 07:25:22 2016:DEBUG:icsdrone->ics: ping_655738918\012
Fri Mar 11 07:25:22 2016:DEBUG:ping counter is now: 1
Fri Mar 11 07:25:22 2016:DEBUG:Creating timer over non-NULL pointer.Calling "delete_timer".
Fri Mar 11 07:25:22 2016:DEBUG:Select interrupted without data. A timer fired?
Fri Mar 11 07:25:22 2016:DEBUG:1 timer events processed
Fri Mar 11 07:25:22 2016:DEBUG:ics->icsdrone: fics% ping_655738918: Command not found.\012
Fri Mar 11 07:25:27 2016:DEBUG:ics->icsdrone: fics% \012
Fri Mar 11 07:25:27 2016:DEBUG:ics->icsdrone: <12> --kr---r pp---ppp -bn----- ---n---- -------- --p--P-- PP--B--P RN--K--- B -1 0 0 0 0 1 99 JeffreyNSmith zurichess 1 3 1 15 25 148 152 20 K/d1-e1 (0:15) Ke1 1 1 0\012
Fri Mar 11 07:25:27 2016:DEBUG:icsdrone->engine: time 15200\012otim 14800\012
Fri Mar 11 07:25:27 2016:INFO:Move from ICS: d1e1 Ke1
Fri Mar 11 07:25:27 2016:DEBUG:icsdrone->engine: usermove d1e1\012
Fri Mar 11 07:25:27 2016:DEBUG:ics->icsdrone: \012
Fri Mar 11 07:25:27 2016:DEBUG:engine->icsdrone: # bestmove d5c3 ponder d1e1\012
Fri Mar 11 07:25:27 2016:DEBUG:engine->icsdrone: \012
Fri Mar 11 07:25:28 2016:DEBUG:ics->icsdrone: fics% \012
Fri Mar 11 07:25:28 2016:DEBUG:ics->icsdrone: Your opponent has added 1 seconds to your clock.\012
Fri Mar 11 07:25:28 2016:DEBUG:icsdrone->ics: say Thanks for the extra time but I don't need it.\012
Fri Mar 11 07:25:28 2016:DEBUG:ics->icsdrone: fics% \012
Fri Mar 11 07:25:28 2016:DEBUG:ics->icsdrone: <12> --kr---r pp---ppp -bn----- ---n---- -------- --p--P-- PP--B--P RN--K--- B -1 0 0 0 0 1 99 JeffreyNSmith zurichess 1 3 1 15 25 148 153 20 K/d1-e1 (0:15) Ke1 1 1 0\012
Fri Mar 11 07:25:28 2016:DEBUG:icsdrone->engine: time 15300\012otim 14800\012
Fri Mar 11 07:25:28 2016:INFO:Move from ICS: d1e1 Ke1
Fri Mar 11 07:25:28 2016:DEBUG:icsdrone->engine: usermove d1e1\012
Fri Mar 11 07:25:28 2016:DEBUG:engine->icsdrone: Illegal move: d1e1\012
Fri Mar 11 07:25:28 2016:DEBUG:Something bad happened. Bailing out.
Fri Mar 11 07:25:28 2016:DEBUG:icsdrone->ics: resign\012
So it looks like FICS is sending the same position twice and icsdroneng bails out and resigns. Anyone knows how to fix this?
icsdroneng and polyglot
Moderator: Ras
-
brtzsnr
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
icsdroneng and polyglot
zurichess - http://www.zurichess.xyz
-
hgm
- Posts: 28461
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: icsdroneng and polyglot
It seems the opponent triggered this by offering you 1 extra second. FICS then sends a new board to adjust your clock. icsdrone can apparently not handle this, and resigns. The opponent obviously knows about this bug, this is wy he does it. It wouldn't make any sense to give a computer opponent 1 sec of extra time otherwise...
-
brtzsnr
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: icsdroneng and polyglot
Thanks. I added a couple of players to my noplay list. Reported this particular user for abuse.
zurichess - http://www.zurichess.xyz
-
Michel
- Posts: 2292
- Joined: Mon Sep 29, 2008 1:50 am
Re: icsdroneng and polyglot
I released icsdrone 0.29. This is an interim release to fix this bug.
http://hardy.uhasselt.be/Toga/icsdroneng-release/
or
https://sourceforge.net/projects/icsdro ... rce=navbar
Icsdrone had already code to handle moretime. However the code contained a race condition which a malicious user could exploit by sending the command many times and let probability theory do its work. I think this has now been fixed.
Here is the complete changelog for this release:
http://hardy.uhasselt.be/Toga/icsdroneng-release/
or
https://sourceforge.net/projects/icsdro ... rce=navbar
Icsdrone had already code to handle moretime. However the code contained a race condition which a malicious user could exploit by sending the command many times and let probability theory do its work. I think this has now been fixed.
Here is the complete changelog for this release:
- Bugfix: wild/8 and wild/8a were not allowing castling.
- Send proper iset command to allow wildcastle.
- More feedback when resigning because of technical trouble.
- New option -bailoutStrategy to indicate how to handle things that
should not happen.
- Icsdrone now recognizes engine resigns like "0-1 {White resigns}".
- Fix race condition in moretime handling. This was used for abuse.
- The generated pgn now contains variant and FEN tags for variant/shuffle
games. These are currently incorrect for adjourned games, but so was
omitting them...
- Throttling of opponent challenges was broken.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Without ideas there is nothing to simplify.
-
hgm
- Posts: 28461
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: icsdroneng and polyglot
It should be possible to do this entriely without race conditions. Boards contain the side to move and the move number. If these are the same as the board you already received, you can savely ignore the current board.
-
brtzsnr
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: icsdroneng and polyglot
Thanks Michel. Does the sourceforce version compile for you? This is what I get
gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
utils.c: In function ‘SetColor’:
utils.c:73:6: error: ‘set_a_foreground’ undeclared (first use in this function)
if(set_a_foreground){
^
utils.c:73:6: note: each undeclared identifier is reported only once for each function it appears in
utils.c:74:5: warning: implicit declaration of function ‘tparm’ [-Wimplicit-function-declaration]
p=tparm(set_a_foreground,color);
^
utils.c:75:5: warning: implicit declaration of function ‘putp’ [-Wimplicit-function-declaration]
putp(p);
^
utils.c:78:8: error: ‘enter_bold_mode’ undeclared (first use in this function)
if(enter_bold_mode){
^
utils.c: In function ‘ResetColor’:
utils.c:87:6: error: ‘set_a_foreground’ undeclared (first use in this function)
if(set_a_foreground && orig_pair){
^
utils.c:87:26: error: ‘orig_pair’ undeclared (first use in this function)
if(set_a_foreground && orig_pair){
^
utils.c:90:6: error: ‘enter_standout_mode’ undeclared (first use in this function)
if(enter_standout_mode && exit_attribute_mode){
^
utils.c:90:29: error: ‘exit_attribute_mode’ undeclared (first use in this function)
if(enter_standout_mode && exit_attribute_mode){
^
Makefile:338: recipe for target 'utils.o' failed
make[1]: *** [utils.o] Error 1
make[1]: Leaving directory '/home/alexandru/icsdroneng-0.29'
Makefile:220: recipe for target 'all' failed
make: *** [all] Error 2
gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
utils.c: In function ‘SetColor’:
utils.c:73:6: error: ‘set_a_foreground’ undeclared (first use in this function)
if(set_a_foreground){
^
utils.c:73:6: note: each undeclared identifier is reported only once for each function it appears in
utils.c:74:5: warning: implicit declaration of function ‘tparm’ [-Wimplicit-function-declaration]
p=tparm(set_a_foreground,color);
^
utils.c:75:5: warning: implicit declaration of function ‘putp’ [-Wimplicit-function-declaration]
putp(p);
^
utils.c:78:8: error: ‘enter_bold_mode’ undeclared (first use in this function)
if(enter_bold_mode){
^
utils.c: In function ‘ResetColor’:
utils.c:87:6: error: ‘set_a_foreground’ undeclared (first use in this function)
if(set_a_foreground && orig_pair){
^
utils.c:87:26: error: ‘orig_pair’ undeclared (first use in this function)
if(set_a_foreground && orig_pair){
^
utils.c:90:6: error: ‘enter_standout_mode’ undeclared (first use in this function)
if(enter_standout_mode && exit_attribute_mode){
^
utils.c:90:29: error: ‘exit_attribute_mode’ undeclared (first use in this function)
if(enter_standout_mode && exit_attribute_mode){
^
Makefile:338: recipe for target 'utils.o' failed
make[1]: *** [utils.o] Error 1
make[1]: Leaving directory '/home/alexandru/icsdroneng-0.29'
Makefile:220: recipe for target 'all' failed
make: *** [all] Error 2
zurichess - http://www.zurichess.xyz
-
Michel
- Posts: 2292
- Joined: Mon Sep 29, 2008 1:50 am
Re: icsdroneng and polyglot
Hmm this is weird... Which system is this?
The errors are for variables found in <term.h>. <term.h> is pulled in if readline is available. Normally the availability of readline is autodetected by configure.
It appears that configure detected readline but then did not manage to find term.h. This would give the indicated behaviour.
A work around should be to disable readline all together with
./configure --without-readline
The errors are for variables found in <term.h>. <term.h> is pulled in if readline is available. Normally the availability of readline is autodetected by configure.
It appears that configure detected readline but then did not manage to find term.h. This would give the indicated behaviour.
A work around should be to disable readline all together with
./configure --without-readline
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Without ideas there is nothing to simplify.
-
Michel
- Posts: 2292
- Joined: Mon Sep 29, 2008 1:50 am
Re: icsdroneng and polyglot
Ok on a Debian derived system this is cured by
sudo apt-get install libncurses5-dev
I am testing for this in configure.ac but then I do not actually use the information afterwards. I will fix this.
sudo apt-get install libncurses5-dev
I am testing for this in configure.ac but then I do not actually use the information afterwards. I will fix this.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Without ideas there is nothing to simplify.