official-stockfish / books

Chess books used to develop Stockfish
147 stars 30 forks source link

Incorrect EPD formatting #40

Open gahtan-syarif opened 4 months ago

gahtan-syarif commented 4 months ago

the EPD files in this repository is incorrectly formatted as it contains raw FEN strings instead of EPD strings. for example the string rnb2rk1/pp2nppp/4p3/q1ppP3/3P2Q1/P1P5/2PB1PPP/R3KBNR w KQ - 5 9 should be rewritten as rnb2rk1/pp2nppp/4p3/q1ppP3/3P2Q1/P1P5/2PB1PPP/R3KBNR w KQ - hmvc 5; fmvn 9;. it is important to fix this as chess programs such as cutechess would automatically reset the halfmove clock and full move number to 0 and 1 respectively when fed with the FEN input. Fixing this is easy and can be done by using a basic python script.

gahtan-syarif commented 4 months ago

fen2epd.zip

gahtan-syarif commented 4 months ago

attached is a python script that can be used to fix the strings contained in the EPD files.