This may crash your engine!

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

This may crash your engine!

Postby Jyrki Vesterinen » 11 Jan 2013, 13:37

Check what happens when your engine receives "go" in a checkmate or stalemate position. :)

Project Invincible used to crash. Fixed in SVN.
Jyrki Vesterinen
 
Posts: 15
Joined: 15 Dec 2012, 10:53

Re: This may crash your engine!

Postby crystalclear » 13 Jan 2013, 23:53

See
UCI protocol question - what is bestmove when mated?
viewtopic.php?f=2&t=52662

Yes, I noticed that Arena was sending my engine go commands when already checkmated.
A bestmove reply is required to go command and I was asking what would be best.
The reply was a null move (0000) but I am not sure that 0000 is standard enough that Arena would accept it.
I still haven't implemented anything much more than a basic "info string Checkmate" to let myself know that it is still happening.

This is the information in that Arena gives from its menus "Help, About", which they call "Help, Information ...."

Code: Select all
Arena 3.0 (Public)

 Windows 6.1 (64 Bit) Codepage:1252

Programming:
   Martin Blume

SOS for Arena:
   Rudolf Huber

Gaviota:
   Miguel A. Ballicora

Graphics, Arena Logos:
   Wilhelm Hudetz

Thanks to:

Tim Mann (Winboard), Aaron Tay (WinBoard FAQ), Dave Dahlem (Graphics), Jörg Borchardt (Sound files), Dr. Frank Schubert (ELOStat), Francois Piette (Telnet-Suite), Prof. Dr. Djordje Vidanovic and Vladan Vuckovic (Axon Bench, Test),  Stefan Meyer-Kahlen (UCI),  Alexander Schmidt (UCIengines.de),  Leo Dijksman (WBEC Ridderkerk),  Reinhard Schnarnagel (FRC) 

Partners:
   DGT projects (http://www.dgtprojects.com)
   Schach Niggemann (http://www.schachversand.de)

Command line:
   "C:\Program Files (x86)\Arena3\Arena.exe"


Apparently I have build 2542 of Arena.
I don't know if there are any other GUIs that send go commands when already checkmated.

Did you find the problem with Arena or with another GUI?
crystalclear
 
Posts: 91
Joined: 22 Sep 2011, 14:19

Re: This may crash your engine!

Postby Jyrki Vesterinen » 14 Jan 2013, 15:22

In my case, the problem was entirely my fault. In addition, Project Invincible uses Chess Engine Communication Protocol rather than UCI. (This is WinBoard forum after all.)

It indeed occurred with Arena, though. Apparently when having an engine play on an ICS, Arena sometimes resets the engine to the start position by sending a bunch of "undo" commands. I haven't implemented undo, so Project Invincible remained in the final position of the previous game. And then Arena sent "go"...

I will implement undo (it's quite important feature), but I decided to fix the crash anyway. Project Invincible should not crash even if invalid commands are sent.
Jyrki Vesterinen
 
Posts: 15
Joined: 15 Dec 2012, 10:53

Re: This may crash your engine!

Postby H.G.Muller » 15 Jan 2013, 18:14

It is not against protocol in CECP to set an engine thinking when checkmated. The engine can simply respond with a game-result (0-1 or 1-0) message, which it also should do after it receives the move that checkmates it when it was already set playing. That brings you into a logically equivalent situation as after 'go'.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 20 guests