Page 3 of 16

Re: Chess Tools

Posted: Sun Mar 18, 2018 6:38 pm
by Ferdy
Laskos wrote:
Ferdy wrote:
Laskos wrote:
Ferdy wrote:You may describe here the chess tools/utilities that you need. If I have time and knowledge, I may create it. Or other programmers may also do it.
It can be FEN, EPD, and PGN processing, engine use, website scraping, data analysis and others.
Ferdi, can you write something which takes a Cutechess-Cli PGN file, and computes average time per move used by move number, after exiting the book, for each engine?

Say:
Engine: Houdini 6.03

Code: Select all

Move   Time per move
   1          1.237s
   2          1.156s
  ...           ....

  40          0.371s
  ...           ....

  90          0.121s
Maybe up to move 120 or 150 or so. The output format I would like would be:
{{1, 1.237},{2,1.156},...,{40,0.371},...{90,0.121}...}

It's easy to use it in Mathematica.
Try this, python source, exe, batch and sample pgn files are included. Try to check it first on small games, I just checked the values randomly.

https://drive.google.com/open?id=14jI67 ... QdjHO7HHC5

Code: Select all

mte.exe --help
usage: mte.exe [-h] [-i PGN] [-o OUTPUT] -p PLAYER [-m MINMOVE]

Read games from cutechess pgn output and calculate move time average by engine

optional arguments:
  -h, --help            show this help message and exit
  -i PGN, --pgn PGN     input pgn file
  -o OUTPUT, --output OUTPUT
                        csv output filename, default=out.txt
  -p PLAYER, --player PLAYER
                        player name
  -m MINMOVE, --minmove MINMOVE
                        minimum move number, default=300

MTE (Move Time Evaluator) v0.1

Code: Select all

mte.exe --pgn sf9.pgn --player "Stockfish 9" --minmove 80 --output sf9_output.txt

Code: Select all

{{1,0.00},{2,0.00},{3,0.00},{4,0.55},{5,0.32},{6,1.57},{7,1.00},{8,1.85},{9,0.28}, ...
Just notice, that

Code: Select all

--minmoves 80
is actually maxmoves.
So move 81 will not be included. I will correct that option name later, after your check.
Thanks, the "exe" works. Opening the result as "txt" in Notepad has some encoding problems, I open it in another editor. The averages are fine (I used 2 games :) ). The python file doesn't run, it asks for "chess module", which I don't have. Thank you very much!
This is a bug of notepad. So that notepad would display correctly, I can modify the output to.

Code: Select all

{{1, 0.00},{2, 0.00},{3, 0.00},...
Now with space between numbers. Would that be fine?

Re: Chess Tools

Posted: Sun Mar 18, 2018 6:58 pm
by Ferdy
Ovyron wrote:
Ferdy wrote:If the scores 0.30 and 0.25 are SPOV (Side Point Of View) then the disfavorable for master would be the line d4 Nf6 line with a score of 0.25 for master.
Master is black, which wants to get the scores in black's favor (negative scores) as much as possible, so the higher the scores, the most disfavorable it gets for black, and 0.01 is more disfavorable for black than 0.00. A score of 0.25 is more favorable for to black than 0.30.
All right I get it, the scores 0.30 and 0.25 for black you mentioned are WPOV, since the root position is white to move (for slaves) the master will take the opposite side and that is black. When the root position is black to move, the master will take the white side and in this case the lower score will be followed. I will try to create this one.

Re: Chess Tools

Posted: Sun Mar 18, 2018 6:59 pm
by Laskos
Ferdy wrote:
Laskos wrote:
Ferdy wrote:
Laskos wrote:
Ferdy wrote:You may describe here the chess tools/utilities that you need. If I have time and knowledge, I may create it. Or other programmers may also do it.
It can be FEN, EPD, and PGN processing, engine use, website scraping, data analysis and others.
Ferdi, can you write something which takes a Cutechess-Cli PGN file, and computes average time per move used by move number, after exiting the book, for each engine?

Say:
Engine: Houdini 6.03

Code: Select all

Move   Time per move
   1          1.237s
   2          1.156s
  ...           ....

  40          0.371s
  ...           ....

  90          0.121s
Maybe up to move 120 or 150 or so. The output format I would like would be:
{{1, 1.237},{2,1.156},...,{40,0.371},...{90,0.121}...}

It's easy to use it in Mathematica.
Try this, python source, exe, batch and sample pgn files are included. Try to check it first on small games, I just checked the values randomly.

https://drive.google.com/open?id=14jI67 ... QdjHO7HHC5

Code: Select all

mte.exe --help
usage: mte.exe [-h] [-i PGN] [-o OUTPUT] -p PLAYER [-m MINMOVE]

Read games from cutechess pgn output and calculate move time average by engine

optional arguments:
  -h, --help            show this help message and exit
  -i PGN, --pgn PGN     input pgn file
  -o OUTPUT, --output OUTPUT
                        csv output filename, default=out.txt
  -p PLAYER, --player PLAYER
                        player name
  -m MINMOVE, --minmove MINMOVE
                        minimum move number, default=300

MTE (Move Time Evaluator) v0.1

Code: Select all

mte.exe --pgn sf9.pgn --player "Stockfish 9" --minmove 80 --output sf9_output.txt

Code: Select all

{{1,0.00},{2,0.00},{3,0.00},{4,0.55},{5,0.32},{6,1.57},{7,1.00},{8,1.85},{9,0.28}, ...
Just notice, that

Code: Select all

--minmoves 80
is actually maxmoves.
So move 81 will not be included. I will correct that option name later, after your check.
Thanks, the "exe" works. Opening the result as "txt" in Notepad has some encoding problems, I open it in another editor. The averages are fine (I used 2 games :) ). The python file doesn't run, it asks for "chess module", which I don't have. Thank you very much!
This is a bug of notepad. So that notepad would display correctly, I can modify the output to.

Code: Select all

{{1, 0.00},{2, 0.00},{3, 0.00},...
Now with space between numbers. Would that be fine?
Leave it as it is, I use several editors which display "txt" just fine. Then "Mathematica" has no problems. Thanks!

Re: Chess Tools

Posted: Sun Mar 18, 2018 7:08 pm
by Ferdy
Laskos wrote:
Ferdy wrote:
Laskos wrote:
Ferdy wrote:
Laskos wrote:
Ferdy wrote:You may describe here the chess tools/utilities that you need. If I have time and knowledge, I may create it. Or other programmers may also do it.
It can be FEN, EPD, and PGN processing, engine use, website scraping, data analysis and others.
Ferdi, can you write something which takes a Cutechess-Cli PGN file, and computes average time per move used by move number, after exiting the book, for each engine?

Say:
Engine: Houdini 6.03

Code: Select all

Move   Time per move
   1          1.237s
   2          1.156s
  ...           ....

  40          0.371s
  ...           ....

  90          0.121s
Maybe up to move 120 or 150 or so. The output format I would like would be:
{{1, 1.237},{2,1.156},...,{40,0.371},...{90,0.121}...}

It's easy to use it in Mathematica.
Try this, python source, exe, batch and sample pgn files are included. Try to check it first on small games, I just checked the values randomly.

https://drive.google.com/open?id=14jI67 ... QdjHO7HHC5

Code: Select all

mte.exe --help
usage: mte.exe [-h] [-i PGN] [-o OUTPUT] -p PLAYER [-m MINMOVE]

Read games from cutechess pgn output and calculate move time average by engine

optional arguments:
  -h, --help            show this help message and exit
  -i PGN, --pgn PGN     input pgn file
  -o OUTPUT, --output OUTPUT
                        csv output filename, default=out.txt
  -p PLAYER, --player PLAYER
                        player name
  -m MINMOVE, --minmove MINMOVE
                        minimum move number, default=300

MTE (Move Time Evaluator) v0.1

Code: Select all

mte.exe --pgn sf9.pgn --player "Stockfish 9" --minmove 80 --output sf9_output.txt

Code: Select all

{{1,0.00},{2,0.00},{3,0.00},{4,0.55},{5,0.32},{6,1.57},{7,1.00},{8,1.85},{9,0.28}, ...
Just notice, that

Code: Select all

--minmoves 80
is actually maxmoves.
So move 81 will not be included. I will correct that option name later, after your check.
Thanks, the "exe" works. Opening the result as "txt" in Notepad has some encoding problems, I open it in another editor. The averages are fine (I used 2 games :) ). The python file doesn't run, it asks for "chess module", which I don't have. Thank you very much!
This is a bug of notepad. So that notepad would display correctly, I can modify the output to.

Code: Select all

{{1, 0.00},{2, 0.00},{3, 0.00},...
Now with space between numbers. Would that be fine?
Leave it as it is, I use several editors which display "txt" just fine. Then "Mathematica" has no problems. Thanks!
v0.2 replacing --minmove with --maxmove
https://drive.google.com/open?id=1ngHTl ... 9NL5A-hYpl

Re: Chess Tools

Posted: Sun Mar 18, 2018 7:39 pm
by Rebel
Ferdy wrote:You may describe here the chess tools/utilities that you need. If I have time and knowledge, I may create it. Or other programmers may also do it.
It can be FEN, EPD, and PGN processing, engine use, website scraping, data analysis and others.
MEA update for WB engines :wink:

Re: Chess Tools

Posted: Sun Mar 18, 2018 7:39 pm
by Laskos
Ferdy wrote: v0.2 replacing --minmove with --maxmove
https://drive.google.com/open?id=1ngHTl ... 9NL5A-hYpl
Thanks, works. I will probably have to download the "chess module" for running the python file, but "exe" works just fine. Thanks!

Re: Chess Tools

Posted: Sun Mar 18, 2018 10:26 pm
by Ovyron
Ferdy wrote:I will try to create this one.
Sounds great! This thread seems like some kind of genie lamp for computer chess, I like a lot that we now have something like this, thank you.

Re: Chess Tools

Posted: Sun Mar 18, 2018 10:54 pm
by Frank Quisinsky
Hi Ferdinand,

sorry for my late answere.
Prof. work today on Sunday.

I will check all tomorrow in the evening.

Short question:
Can I added later the tool on my download area to your other nice programs?

Thanks for it!

Later ... tomorrow!

Best
Frank

Re: Chess Tools

Posted: Mon Mar 19, 2018 3:55 am
by Ferdy
Rebel wrote:
Ferdy wrote:You may describe here the chess tools/utilities that you need. If I have time and knowledge, I may create it. Or other programmers may also do it.
It can be FEN, EPD, and PGN processing, engine use, website scraping, data analysis and others.
MEA update for WB engines :wink:
Working on it :oops:

Re: Chess Tools

Posted: Mon Mar 19, 2018 4:08 am
by Ferdy
Frank Quisinsky wrote:Hi Ferdinand,

sorry for my late answere.
Prof. work today on Sunday.

I will check all tomorrow in the evening.

Short question:
Can I added later the tool on my download area to your other nice programs?

Thanks for it!

Later ... tomorrow!

Best
Frank
Yes you can add, also I will add a GPLv3 license to this tool that uses python-chess. This is a requirement when using python-chess. I will upload a new package later.