"debug" command

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

Moderator: Andres Valverde

"debug" command

Postby stegemma » 16 Aug 2014, 08:28

To test my engine Satana, i've added a custom command to the engine:

debug [options...]

I think it could be usefull for any programmer if the command were in the standard so that it could be activated from any winboard/xboard like interface (i can use it only in console mode). The command should be a "black-box" command, and any programmer can use it at its own needing. For me it set debugging mode on/off, execute "post" command and maybe "setboard".

What do you think about that command?
stegemma
 
Posts: 15
Joined: 03 Nov 2009, 23:30

Re: "debug" command

Postby H.G.Muller » 17 Aug 2014, 13:43

Why not stick with existing protocol and make it an engine-defined option? That seems more natural anyway: I cannot imagine that it would be useful to centrally operate it for all engines as well, such as the hash setting. There never should be any reason for a GUI to emit this command, other than that the user specifically orders it for this particular engine. If the protocol does not specify what exactly it should do, it makes it even more natural to just treat it as an engine-defined option in the Engine Settings dialog.

From the command line you could simply type option debug, if it is a -button option. If you consider that still too much typing, you can always let the engine parser understand the command db as a synonym. As I am a naturally lazy person I usually let my engines understand the non-compliant commands 'q' for 'quit', '1' to '9' for setting up any preprogrammed test positions, and 'p' for printing the internal board as ascii matrix. And let it understand plain moves even when the protocol would specify a 'usermove' prefix. But there isn't any reason why a GUI should want to emit these.
User avatar
H.G.Muller
 
Posts: 3080
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: "debug" command

Postby stegemma » 27 Aug 2014, 12:03

Yes, using program defined options would be better. I've seen that even other programmers use user-defined commands for theyr purpose. They use free names but maybe the protocol itself could define a standard, for sample: "user-defined commands name starts with _ and will be ignored by the interface".

If nobody is interested, well, it is not very important or usefull.

Thanks
stegemma
 
Posts: 15
Joined: 03 Nov 2009, 23:30


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron