Ah, okay. Yes, the file should be called engines.json and should be placed in the current directory.lucasart wrote:No, I wasn't asking for a new feature. Just wanted to know how to write a JSON file. Should it be called engines.json and be in the current directory ? Do you know where I can find an example of such a file ?ilari wrote:As of now only the engine configuration can be put into a JSON file (engines.json). So what you're asking for is not possible yet, but will be in the next version.lucasart wrote:For the JSON file. Do you have an example of such a file, so I can figure out how to do them? And when you call cutechess-cli, how do you ask to use a JSON file ?
You might want to add a few examples of JSON files in the readme file
The file should obey JSON rules (http://www.json.org/). Probably the most important thing to remember is to escape special characters with a backslash. The file's contents should look like this:
Code: Select all
[
   {
      "command" : "fruit",
      "name" : "Fruit-2.1",
      "options" : [
         {
            "name" : "Hash",
            "value" : 32
         },
         {
            "name" : "OwnBook",
            "value" : false
         },
         {
            "name" : "NullMove Pruning",
            "value" : "Fail High"
         }
      ],
      "protocol" : "uci",
      "workingDirectory" : ""
   },
   {
      "command" : "crafty",
      "name" : "Crafty-23.4",
      "options" : [
         {
            "name" : "memory",
            "value" : 32
         },
         {
            "name" : "cores",
            "value" : 2
         }
      ],
      "protocol" : "xboard",
      "whitepov" : true,
      "workingDirectory" : "",
      "initStrings" : [
         "command 1",
         "command 2"
      ]
   }
]
