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

Compiling Issues #1

Open
2020chris opened this issue Apr 22, 2022 · 6 comments
Open

Compiling Issues #1

2020chris opened this issue Apr 22, 2022 · 6 comments

Comments

@2020chris
Copy link

I am having some issues compiling and running main.py, as it is saying it can't find the pathFinder module. Can main.py be compiled in both python2 and python3?

@xphoniex
Copy link
Owner

Use python2.7.

I'm getting an error re print when using python3 so I can't reproduce what you're seeing.

Also, in case you get it working, make sure you set load_model to False on first run.

@2020chris
Copy link
Author

Thanks for the reply. I assume I need to re-install torch with python2.7 also?

Should it be able to start training off the bat by running python main.py? Or do I need to run setup.py to compile and create the extension for pathFinder.cpp? If you could detail some of the intermediate steps to start training(eg. building the pathFinder module), that would be great!

@xphoniex
Copy link
Owner

Thanks for the reply. I assume I need to re-install torch with python2.7 also?

Should it be able to start training off the bat by running python main.py? Or do I need to run setup.py to compile and create the extension for pathFinder.cpp? If you could detail some of the intermediate steps to start training(eg. building the pathFinder module), that would be great!

Yup, you need to install torch for python2.7 as well.

pathFinder is already compiled for you here and you should be able to run the code out of the box on a Linux machine.

Haven't tried any other OS but have you seen setup.py:

# $ python setup.py build
# $ sudo python setup.py install
# $ sudo rm -rf build
...

@2020chris
Copy link
Author

2020chris commented Apr 22, 2022

Yes it started training. Is it possible to run on GPU currently? Since I was having compatibility issues with Python2.7, PyTorch 1.4, and CUDA 11.4 in my conda env.

Also, can you explain how you structured/represented the board you pass to the QuoridorNNet, specifically the dimensions 4xnxn of the pieces field of the Board class? Thanks.

@xphoniex
Copy link
Owner

Is it possible to run on GPU currently?

Yes, you can train on GPU, I trained my own model using Colab.

Also, can you explain how you structured/represented the board you pass to the QuoridorNNet, specifically the dimensions 4xnxn of the pieces field of the Board class?

You're gonna have to more specific.

@Mihonarium
Copy link

Mihonarium commented Aug 1, 2023

If you're still interested, I updated the code so it works with python3: https://github.com/Mihonarium/alphazero-quoridor

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

3 participants