Page 1 of 1
"debug" command
Posted:
16 Aug 2014, 08:28
by stegemma
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?
Re: "debug" command
Posted:
17 Aug 2014, 13:43
by H.G.Muller
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.
Re: "debug" command
Posted:
27 Aug 2014, 12:03
by stegemma
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