cutechess-cli in python

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

nionita
Posts: 175
Joined: Fri Oct 22, 2010 9:47 pm
Location: Austria

Re: cutechess-cli in python

Post by nionita »

Thanks Matthew, this worked!
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

Hello Lucas and Andrew,

Kudos for your efforts to pythonize those auxiliary programs. I see the value of zinc not so much for improving on cutechess-cli but more so improving the parameter-optimization programs included in fishtest and especially spsa or any future tuner.

Currently, spsa.pl written by Joona is accessed remotely by an api. Because there are many parameters and data which must be transferred to and fro, the fishtest network greatly suffers because of this heavy traffic. Although spsa.pl is a little programming gem by itself (I have tried several different modifications of the tuning algorithms and these work like magic given the fact that I have zero programming skills), the circumstance that it is written in Perl makes it difficult to be run on testers' computers and thus avoid heavy traffic (the testers should install perl interpreter in addition to the python one). Writing it in python and bundling in the fishtest package would be a small breakthrough. On the other hand, cutechess-cli as a binary is bundled in the package and there is no problem for the tester to run the matches on his computer with little overhead (for sprt and fixed-games tests).
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: cutechess-cli in python

Post by Michel »

Currently, spsa.pl written by Joona is accessed remotely by an api. Because there are many parameters and data which must be transferred to and fro, the fishtest network greatly suffers because of this heavy traffic.
Correct me if I am wrong but I thought that spsa.pl has long been converted to Python on Fishtest.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

Gary knows better, of course, what is in the fishtest server but I draw my information from the fishtest-master package. spsa.py or anything similar is not present there. Neither is there spsa code in the other *.py files. There is a file spsa.js but this is a Javascript code for rendering the spsa test web page. In the file api.py there is an api for connecting to a remote spsa program. If this program is .py or something else, I don't know. But if it is in python, there is no logic for it to stay in the server and not be included in the fishtest package.
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

In the fishtest GitHub repository branch spsa in the file games.py there is some code that allows cutechess to run in a spsa mode. However, it still gets the recalculated parameters at each iteration from an external program through api interface which creates the traffic.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: cutechess-cli in python

Post by Michel »

In the fishtest GitHub repository branch spsa in the file games.py there is some code that allows cutechess to run in a spsa mode. However, it still gets the recalculated parameters at each iteration from an external program through api interface which creates the traffic.
AFAICS there is no "external program" involved.

The worker simply queries fishtest for the next round of spsa parameters. These are computed here

https://github.com/glinscott/fishtest/b ... t/rundb.py

See "request_spsa".

Certainly no "spsa.pl" as you were first claiming.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

You are right. Sorry for the noise. This was helpful, though
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

Openings are not randomized in zinc. This is a very useful feature in cutechess-cli and easy to implement.
User avatar
lantonov
Posts: 216
Joined: Sun Apr 13, 2014 5:19 pm

Re: cutechess-cli in python

Post by lantonov »

For the tournaments, in addition to round-robin and gauntlet, a tuning mode would be useful: 2 engines, with the possibility for one engine to change parameters in uci