Uri Blass wrote: ↑Mon Jan 14, 2019 8:36 am
Do I need to copy the programs in python first to my computer?
Yes copy the text posted on b.py and save it as b.py, this is the script that will be run by python, or download the b.py
https://drive.google.com/file/d/148IkCC ... sp=sharing
Also download the wacnew.epd
https://drive.google.com/file/d/11-t1oy ... sp=sharing
And the batch file to run b.py and wacnew.epd
https://drive.google.com/file/d/1Sw8BcU ... sp=sharing
The entry in epd2diag.bat (or batch file) is
Code: Select all
python b.py wacnew.epd wac_test.html 2 random 20 300 coor
pause
2 = number of columns in html
random = the epd will be randomly selected
20 = number of positions
300 the image size in pixels
coor = to enable coordinates in diag
usage:
Code: Select all
python b.py <epd filename> <html filename> <html num_column> <[random | seq]> <num_pos> <image_size> <[coor | nocoor]>
Uri Blass wrote: ↑Mon Jan 14, 2019 8:36 amsearching in my computer I see that I have python2.7.3 in my computer but I never used it and never wrote code in it.
Since you did not use it, uninstall that python 2.7.3. Then install python 3.7.2 from
https://www.python.org/downloads/
Uri Blass wrote: ↑Mon Jan 14, 2019 8:36 amEdit:I wonder if it works on the following epd file that I created based on positions from one game in the world blitz women championship
when in all the positions there is a move that is significantly better than other moves.
This one
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - 0 6 bm cxd5(not Nxd5) easy positional problem
is not a valid EPD
To make it a valid epd remove the "0 6 bm cxd5(not Nxd5) easy positional problem"
0 = hmvc = halfmove clock (for fifty move rule)
6 = fmvn = fullmove number
bm = bestmove
So the minimal valid epd is
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq -
It only consist of 4 fields
Field 1: r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R
Field 2: b
Field 3: KQkq
Field 4: -
Field1: Piece types and locations
Field 2: side to move
Field 3: castling rights
Field 4: en passant square
An example epd with en passant square is
rnbqkbnr/ppp3pp/4p3/3pPp2/3P4/8/PPP2PPP/RNBQKBNR w KQkq f6
f6 is the en passant square
You can add the halfmove clock info specially if it is close to fifty move or 100 ply, if it is 0, you can ignore it.
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0;
You can add the fullmove number
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0; fmvn 6;
You can add bm
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0; fmvn 6; bm cxd5;
You can add am or avoid move
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0; fmvn 6; bm cxd5; am Nxd5;
You can add comment, enclose it in double quotes.
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0; fmvn 6; bm cxd5; am Nxd5; c0 "(not Nxd5) easy positional problem";
You can add another comment.
r2qkb1r/pp1npppp/2p2n2/3P1b2/8/1P3NP1/PB1PPP1P/RN1QKB1R b KQkq - hmvc 0; fmvn 6; bm cxd5; am Nxd5; c0 "easy positional problem"; c1 "Women's Championships";
hmvc, fmvn, bm am and c0 are called opcodes.
https://www.chessprogramming.org/Extend ... escription
After the installation of python 3.7.2, install the
python-chess lib from
https://github.com/niklasf/python-chess
How to install python-chess in windows?
Open your cmd shell perhaps run as administrator to be sure then type
pip install python-chess
The program pip is supposed to be included in python 3.7.2, this is why install first the python 3.7.2.
Once python 3.7.2 and python-chess are installed, you can run the epd2diag.bat by double-clicking it. You can then open the html file. You can modify the batch file to use other epd file or adjust the html columns, image size and others.
Place the b.py, wacnew.epd and epd2diag.bat in a directory, example c:\epd2diag2html.