Closed appletomato closed 4 years ago
There is an example in the repository: Tools/run-perft
I don't know what the messages you give mean. Just typed 'make' and 'make test' and it still works.
Ah wait, in an earlier edition there was also a standalone executable. But I removed it:
Author: Marcel van Kervinck marcelk@bitpit.net Date: Sat Aug 22 10:58:22 2015 +0200
Remove the cli tool. This is now just a python extension module.
Thank you for your answer! The quoted example executes python through a bash pipe:
<some cmd> | time python Tools/perft.py
I was wondering if it was possible to run your module directly without python, reducing the computational overhead on startup.
In my use case I am reading a pgn-file from disc and would send the parsed moves to your module in order to get the FEN after each move. Currently I am doing this with JavaScript/chess.js and for a large pgn-file extracting the FENs takes about ~2s for a fairly big pgn-file with a lot of (sub-) variations. I want to make the FEN-processing as fast as possible but I am not sure if it is feasible if I have to tell JavaScript to execute a bash command which executes a python script which executes a C function, if you understand what I mean ...
I think I removed it because the overhead of the C executable was larger than running it through Python.
The Python module is able to process streams of positions. The CLI tool could only handle one for each call. Something like that.
The Python module is able to process streams of positions.
This seems the way to go. I have played around with the provided test.py script and was able to parse 1000 positions in less than 100ms. This is the kind of speedup I was looking for. Thank you for your help and quick response!
Great to know!
Hi, thank you for your project!
I have figured out how to use chessmoves in a python script after running make, but could you please provide instructions on how to run it as a (standalone) shell/bash -script?
What I have tried so far:
Compile from source:
Running make and then compile the .so from the build-directory:
Somehow I am stuck at the moment and cannot figure out what the above error messages are trying to tell me. Thank you for your help!