importsfromgooglecode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Use XML for engines #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To make PyChess faster and engine configuration more flexible, we should
store engine information in an xmlfile.
glchess uses a format that looks like this:
<ai type="cecp"
    <name>GnuChess</name>
    <binary>gnuchess</binary>
    <argument>--xboard</argument>
    <level>
        <name>easy</name>
        <option>easy</option>
        <option>depth 1</option>
    </level>
    <level>
        <name>normal</name>
        <option>depth 4</option>
    </level>
    <level>
        <name>hard</name>
        <option>hard</option>
    </level>
</ai>
I see it as a good start, but I'd like a few more things:
Alias - possibility to overwrite engine names
Description - on how this engine is special
Stats - how many games the engine has lost/won
Local ELO - in order to complete issue 78
UCI options - in order to give a complete UCI control panel on engines.

The <level> tags should also be worked on. I don't think names are
necessary, and the options will probably be very different in CECP and UCI.

Original issue reported on code.google.com by lobais on 3 Jan 2007 at 4:03

GoogleCodeExporter commented 9 years ago
Also we should use attributes for any key/value pair, that will never appear 
more
than once per tag.
The description should be an element, as it should have a lang attribute.

Original comment by lobais on 3 Jan 2007 at 4:32

GoogleCodeExporter commented 9 years ago
For UCI engines I have tags like:
<option name="Hash">16</option>

I originally had attributes for each option value but it's probably more 
reliable to
query the engine for these.

I agree with moving the <level> name as an attribute - it's only used in 
glChess to
connect this level with the values in the combo box. I expect in the future to 
add
more levels.

I'm completely with you on adding more information and keeping the format 
standard
between games (we should consider working with the Knights developers too).

Finally the statistics will probably have to go in a separate file - the 
default file
will not be user writeable (though it could be copied and then modified).

Original comment by robert.a...@gmail.com on 4 Jan 2007 at 9:50

GoogleCodeExporter commented 9 years ago
I think it is a good idea to let the <option>'s have name attributes. We 
probably
can't use them for cecp though, but perhaps stuff like <command>depth 
10</command> or
something?

Another question if is we should have a <ucioptions> element, listing all the
possible ucioptions for the engine.
This list though, will be more easy to generate at first run as it might change
between engine versions.

I see you point about having an unwriteable file, however I'm not sure if it is
possible, as stuff like the <level>'s might be changed too.
Perhaps having a template file, and a user file is a good idea. That will also 
make a
"Revert settings" button possible.

Original comment by lobais on 4 Jan 2007 at 9:18

GoogleCodeExporter commented 9 years ago
A project to write the format has been created: 
http://code.google.com/p/chess-standards/

Original comment by lobais on 31 Jan 2007 at 5:34

GoogleCodeExporter commented 9 years ago
PyChess now saves all information about engines in xml.

Original comment by lobais on 31 Aug 2007 at 11:06