SF question for some experts...

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

SF question for some experts...

Post by MikeB »

I have a 4000 position test suite in epd format.

The goal is to run stockfish on the command line or in a script , do say a 24 ply search or a 3 minute search and then output the FEN and the score so they are side by side. Obviously I want to SF to run through the file without spoon feeding the positions. Ideally it is minus all the normal SF output as well.

Has anyone done this? ( I'm sure someone has - but the real questions is how do you do this?)

thanks in advance!
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: SF question for some experts...

Post by Ferdy »

MikeB wrote:I have a 4000 position test suite in epd format.

The goal is to run stockfish on the command line or in a script , do say a 24 ply search or a 3 minute search and then output the FEN and the score so they are side by side. Obviously I want to SF to run through the file without spoon feeding the positions. Ideally it is minus all the normal SF output as well.

Has anyone done this? ( I'm sure someone has - but the real questions is how do you do this?)

thanks in advance!
Could you give an example output fen with score side by side?

What do you mean by spoon feeding the positions?
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: SF question for some experts...

Post by MikeB »

Ferdy wrote:
MikeB wrote:I have a 4000 position test suite in epd format.

The goal is to run stockfish on the command line or in a script , do say a 24 ply search or a 3 minute search and then output the FEN and the score so they are side by side. Obviously I want to SF to run through the file without spoon feeding the positions. Ideally it is minus all the normal SF output as well.

Has anyone done this? ( I'm sure someone has - but the real questions is how do you do this?)

thanks in advance!
Could you give an example output fen with score side by side?

What do you mean by spoon feeding the positions?
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1; score 10

Spoon feeding positions - typing out "setoption name position fen value rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" at the command line interface of SF
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: SF question for some experts...

Post by brianr »

Suggest trying Arena (Engines, Automatic Analysis)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: SF question for some experts...

Post by Ferdy »

Command line:

Code: Select all

epd_analyzer.exe --analyzer "sf8.exe" --hash 128 --threads 1 --inputfile wacnew.epd --outputfile out_wacnew.fen --analysistimems 1000
No support for depth command at the moment, it relies on movetime command that uci engine should support.

Code: Select all

2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1 w - - 0 1; score 31997
8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1; score 147

Download, python src, exe and windows batch file
https://drive.google.com/file/d/0BwAOsu ... sp=sharing
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: SF question for some experts...

Post by MikeB »

Ferdy wrote:Command line:

Code: Select all

epd_analyzer.exe --analyzer "sf8.exe" --hash 128 --threads 1 --inputfile wacnew.epd --outputfile out_wacnew.fen --analysistimems 1000
No support for depth command at the moment, it relies on movetime command that uci engine should support.

Code: Select all

2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1 w - - 0 1; score 31997
8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1; score 147

Download, python src, exe and windows batch file
https://drive.google.com/file/d/0BwAOsu ... sp=sharing
Thanks - will check it out tonight.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: SF question for some experts...

Post by MikeB »

MikeB wrote:
Ferdy wrote:Command line:

Code: Select all

epd_analyzer.exe --analyzer "sf8.exe" --hash 128 --threads 1 --inputfile wacnew.epd --outputfile out_wacnew.fen --analysistimems 1000
No support for depth command at the moment, it relies on movetime command that uci engine should support.

Code: Select all

2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1 w - - 0 1; score 31997
8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1; score 147

Download, python src, exe and windows batch file
https://drive.google.com/file/d/0BwAOsu ... sp=sharing
Thanks - will check it out tonight.
I should have mentioned macOS - but I am good - found this little gem by Jon Dart towards the bottom of the page, tweaked the script a bit and it was perfect.

http://talkchess.com/forum/viewtopic.ph ... 3&start=20

Sample output:

Code: Select all

engine ready

1k1r1b1r/pbpqnpp1/1pn1p2p/1B1pP3/3P4/P1P2N2/NP3PPP/R1BQ1RK1 w - - 1 11

bestmove a2b4
depth 17 seldepth 24 multipv 1 score cp 70 nodes 1531782 nps 1528724 hashfull 629 tbhits 0 time 1002 pv a2b4 d7c8

1k1r1b1r/pp1n1pp1/1qp1bp2/3p3p/3P3P/PP2P1P1/2PN1PB1/R2QK1NR w KQ - 1 11

bestmove g1e2
depth 17 seldepth 27 multipv 1 score cp 3 nodes 1467187 nps 1459887 hashfull 620 tbhits 0 time 1005 pv g1e2
....
and with that we now have an opening book epd file derived from the entire ICCF database of over 400,000 games , filtering to both players rated 2500 and above , in decisive games lasting longer than 20 moves, with no time forfeits or abandonments where the opening position after 20 ply ( 10 moves each side) was between -.75 to .75 as evaluated by the latest SF with a 1 second search , from over 400,000 games initially, this was whittled down to 3779 positions - less than 1% made the cut.

https://www.dropbox.com/s/8xj41b52r5j93 ... d.zip?dl=1

We also have small polyglot book, 20 ply deep, min of two games played with at least 50% score for both W & B from the same database

https://www.dropbox.com/s/g4fvf3lv2gvjs ... n.zip?dl=1
Frank Quisinsky
Posts: 6808
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: SF question for some experts...

Post by Frank Quisinsky »

1. Shredder GUI build 2 files at the same time for the still running analysis:
*.csv, *epd

If you have the *.csv file in an Excel table you can do a lot if your file is ready.

Example:

Code: Select all

epd, ok?, sol time, sol ply, time, ply, eval, nps, nodes, pv
r1bqkb1r/ppp3pp/2np1n2/4p3/4pP2/2NP2P1/PPP3BP/R1BQK1NR w KQkq - id "001", wrong, , , 61, 24, 48, 17123000, 1027505174, dxe4 
r1b1kb1r/pp1ppp1p/2n2np1/2q5/Q7/2N2N2/PPP1PPPP/R1B1KB1R w KQkq - id "002", wrong, , , 60, 26, 30, 17872000, 1072419653, Le3 Db4 
r2qkbnr/pp4pp/2n1bp2/2ppp3/4P3/3P1NP1/PPPN1PBP/R1BQK2R w KQkq - id "003", wrong, , , 60, 24, 13, 16961000, 1017721626, exd5
2. To use Grandmaster games only is in my opinion not a good idea. If you select out positions with bad evals a grandmaster database will have a better results because in correspondence chess much more lines inlcuded players try some experiments. Over 7.500 lines I select out during my FCP Rating List was still running. Most of the lines comes from correspondence games. We are thinking correspondence games must be allways good, players have a lot of time. In reality for the moves after theory grandmaster games have a much higher quality. So I go an other way ...

I added corespondence lines only with depth 6 moves and let engines find the moves (again during my FCP Rating List was still running). So and which much other tricks I optimated my older FCP Live Book.

20 moves depth for all is very high.
Many ECO codes are building after lesser with 4 moves.
Max are building with 14 moves ... so my lines have max a 17 moves. 3 moves after ECO code formed.

I try to make that with 3 moves after ECO was formed. This is absolutely enough for search newer and better theory moves by engines. But it is a lot of work to create such the databases ... 3 moves for each ECO code after formed.

Michael, all is ready and I used material with a higher quality (Informator) for an example:

If you like you can download the database, checked by Stockfish and Komodo ...

Can be found here:
http://www.amateurschach.de/main/_new-opening-book.htm

Also select out are lines engines like to play 3-fold repetion. Can nothing to with such lines. Can be found in around 4.200 possible lines 3 moves after ECO Code was formed (checked by more as 50 TOP engines). Sure more, but this is what I find out.

If I am ready with 10 engine analyzes and have all in Excel so many nice things are possible:

Example:
Houdini's eval is much higher as the eval from Stockfish and Komodo. Houdini standard setting must be Contempt -1 (1 = 0.15). To see the average of eval for 26.146 ... and much other things will be nice in Excel. To have a perfect file for creating opening books.

Shredder GUI is perfect for build the material.

I am sure hat my database (working years on it) is great ... because to all the 500 ECO codes you can find the balanced positions. So work is done. All what is important should be included.

But I am happy if others can give me later an update for that work. Maybe important lines missed here. But if I am looking under Chessbase GUI (with opening tree and withouth doubles / move transpositions, I can see the basics are great).

If you like you can check that.
Download my file ...

Best and good luck!
Frank
theturk1234
Posts: 52
Joined: Tue Jul 12, 2016 5:28 am

Re: SF question for some experts...

Post by theturk1234 »

I did the exact thing that the OP wants to do. I was working for Chess.com; I can't share the code though because it technically belongs to Chess.com once I wrote it :)

David Cimbalista