chess-tuning-tools icon indicating copy to clipboard operation
chess-tuning-tools copied to clipboard

Support matches against multiple engines

Open kiudee opened this issue 3 years ago • 4 comments

Being able to tune against multiple engines would be a nice to have feature, but would require considerable changes to the current script:

  • Setup of the engine matches
  • Parsing of the engine matches
  • Conversion of the results to a suitable score (incorporating matched openings).

kiudee avatar Aug 02 '20 13:08 kiudee

In case of 2 games per iteration I think the opponent engine could be chosen at random, alternatively by alternating in a fixed sequence. Maybe those approaches could be used in case of more games per iteration as well. Not sure if the number of game pairs per iteration must be divisible by the number of opponents, or if the in other cases possible uneven results, could be treated as noise.

Claes1981 avatar Apr 03 '21 06:04 Claes1981

I have now implemented the possibility to tune against multiple engines in my fork (commit https://github.com/Claes1981/chess-tuning-tools/commit/6b0fdf1b7fb45f0c33490bd92fd1dcf8ace978eb and commit https://github.com/Claes1981/chess-tuning-tools/commit/6f767c3f572c2b3089a47968d821150ed4c43b0e, there might still be bugs, though). It chooses "engine2" at random at each iteration. In case of 2 games per iteration, that means it might switch engine every 2 games. In case of more games per iteration, it means that it keeps the same engines through all games of that iteration, which I think is not ideal. Ideally it should choose an opponent at random every two games, I think.

Claes1981 avatar May 31 '21 17:05 Claes1981

That looks like a straightforward way to implement a simple random selection. I have used such a strategy in the past. It is true that it will be slightly confusing to the optimizer, if the optimization landscapes are flipping back and forth randomly.

If you want you can cherry pick those commits onto a new branch and submit a pull request for review.

kiudee avatar May 31 '21 17:05 kiudee

If you want you can cherry pick those commits onto a new branch and submit a pull request for review.

Not sure I know how to do that, but I might try.

You are of course welcome to copy some or all of the code, or the ideas, into Chess Tuning Tools, if you want. :)

Claes1981 avatar May 31 '21 17:05 Claes1981