CECP/WB2 protocl extension suggestion: feature metainfo=1
Posted: 03 Jan 2020, 15:26
Sorry to barge in with this as my first post, but I noticed something I find worth addressing:
E.g. Arena Chess GUI ships with the author name, country, and a nice logo for some engines, but has an apparently brittle matching of engine name to entry (supposedly to allow matching for future versions, it can lead to false positives). Also, obviously that info can be outdated for other reasons too. This made me wonder, there is myname="..." already, so why isn't there some way to specify more than just an engine's name through the protocol?
Therefore I propose the feature metainfo extension to allow a GUI to query an engine for name, logo, author,...:
Addition to "Initial Handshake" specs section:
Addition to "Frills" specs section:
Full usage example:
Maybe this is a bad idea for reasons I don't see, or really overkill - but I would like it if future engine releases more often came with more extensive info about themselves built-in, or even the logos. Wouldn't that be nice? I dunno, I can't help but like the idea
PS: I don't care for copyright or attribution for the text suggestions above in any way
E.g. Arena Chess GUI ships with the author name, country, and a nice logo for some engines, but has an apparently brittle matching of engine name to entry (supposedly to allow matching for future versions, it can lead to false positives). Also, obviously that info can be outdated for other reasons too. This made me wonder, there is myname="..." already, so why isn't there some way to specify more than just an engine's name through the protocol?
Therefore I propose the feature metainfo extension to allow a GUI to query an engine for name, logo, author,...:
Addition to "Initial Handshake" specs section:
- Code: Select all
Initial Handshake
[...]
feature NAME1=VALUE1 NAME2=VALUE2 ...
Feature commands are mostly used to control the commands the GUI [...]
* metainfo (0) This specifies that the engine understands the "metainfo" command.
This command allows an engine to provide more info about itself like name, author, etc.
Addition to "Frills" specs section:
- Code: Select all
Frills
[...]
metainfo
Can be sent from the GUI to the engine to ask for the metainfo fields it supports.
This metainfo can be displayed by the GUI in some way during an engine tournament,
or in advanced engine info dialogs, or other ways it sees fit.
The engine must either ignore this, or answer with:
Available info: KEY1,KEY2,KEY3
Every such key must be ascii and without space characters,
and any key refers to a metadata field name the engine makes available for query.
Suggested metainfo fields to implement are:
name (the engine's canonical name), author (name of the engine's creator),
license (a short description of the engine's licensing situation, or the full license text),
logo (base64 encoded image that should be JPEG and have aspect ratio 2:1),
country (country of origin of the engine's creator fully spelled out),
elo (the engine's supposed full playing strength as integer ELO number),
website (an URL specifying the engine's website starting with http:// or https://).
This is a non-exhaustive list, and any engine author may add more fields at their discretion.
metainfo KEY
Sent by the GUI to query the given metadata field from the engine.
The GUI must have checked through a generic "metainfo" query the field exists.
The engine may send "Error (...some reason...): metainfo" if it cannot answer.
Otherwise, it must respond with the field contents which may contain line breaks,
and terminate the field contents with a line containing just a dot.
Please note this means no metainfo response may ever contain a line with just a
dot anywhere other than at the end of the output, since this is the designated end of output.
A metainfo response may also never start with "Error " unless there was an error.
Example response to request: metainfo license
Copyright (C) All Rights Reserved.
.
(Please note the empty line with dot to terminate the output)
The engine should avoid sending overly long lines.
This applies especially for the logo metadata field when it responds base64:
an engine should break up too long lines into multiple ones to ease processing
for the GUI.
If a GUI expects a certain format, like base64 JPG for the logo,
then it must NOT crash if it's not met and is suggested to find other ways
to display the metainfo field data to the user, e.g. as plain text.
If the GUI doesn't get a well-formed response back with an
empty line with dot at the end, then it is STRONGLY encouraged to fully ignore it.
This shall encourage engine authors to always terminate their output properly.
Full usage example:
- Code: Select all
theGUI: metainfo
engine: Available info: name, author, country, license
theGUI: metainfo author
engine: John Doe
engine: .
theGUI: metainfo license
engine: Copyright (C) John Doe 2018-2020
engine: All Rights Reserved.
engine: .
Maybe this is a bad idea for reasons I don't see, or really overkill - but I would like it if future engine releases more often came with more extensive info about themselves built-in, or even the logos. Wouldn't that be nice? I dunno, I can't help but like the idea
PS: I don't care for copyright or attribution for the text suggestions above in any way