Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use script with other Python / Pip versions #5

Open
tissatussa opened this issue Jan 14, 2025 · 0 comments
Open

use script with other Python / Pip versions #5

tissatussa opened this issue Jan 14, 2025 · 0 comments

Comments

@tissatussa
Copy link

tissatussa commented Jan 14, 2025

I managed to run Numbfish on Xubuntu 22.04
For this, i discovered i can use a different Python / Pip version to install and run.
This was needed, because my default Python version is 3.12.2 which is too new (!?) for your script, but Python v3.10 works for me.

I use a virtual environment to run your Python script by doing :

python3.10 -m venv .venv  # create the environment (only once)
source .venv/bin/activate  # enter the environment (each time before you run the `uci.py` script)

At first i had errors like this :

matplotlib 3.7.1 requires pillow>=6.2.0, which is not installed.
gruut 2.2.3 requires numpy<2.0.0,>=1.19.0, but you have numpy 2.2.1 which is incompatible.
numba 0.56.4 requires numpy<1.24,>=1.18, but you have numpy 2.2.1 which is incompatible.
scipy 1.10.1 requires numpy<1.27.0,>=1.19.5, but you have numpy 2.2.1 which is incompatible.

I had to change the requirements.txt, i succeeded with this config :

numpy==1.21.2
chess==1.9.3
tflite-runtime==2.13.0
pillow==6.2.0

NOTE: i added pillow because it was needed according to the concerning Pip message.

this way all Pip installs went well and i run the script by python3 -u uci.py
it plays a good game in CuteChess GUI !

i experimented with PLAY_5min = True / False in uci.py, as your README states.
indeed, False makes the script think for too long, the engine loses on time ..

i also tried to tweak these values in uci.py :

elif smove.startswith('go'):
    #  default options
    depth = 20
    movetime = 20000
    moves_remain = 60
    our_time = 300000

but it's unclear to me how to set a different time management this way.
can it be done (here) ? if so, can you create UCI options to set those values ?
same for OPENING_BOOK = True / False in numbfish.py : the engine can use the included Perfect2021.bin book but i like to disable any book while playing (to have a fair fight).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant