tetris_mcts
tetris_mcts copied to clipboard
Cannot include pyTetris.h
Hi!
Very nice project,
I'm trying to get it to run locally, and I think have installed everything (including pyTetris) as instructed but I cannot run the project.
The error I'm getting is:
/home/serdil/workspace/ypp/tetris_mcts/agents/cppmodule/.rendered.agent.cpp:12:9: fatal error: pyTetris.h: No such file or directory
#include<pyTetris.h>
^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Also, I've changed the line in agent.mcts
to sys.path.append('/home/serdil/workspace/ypp/pyTetris/')
(where I've cloned the pyTetris repo) and also tried adding the line to the entrypoint (play.py) but I've had no luck so far.
And I don't know if it's related but, I cannot see a pyTetris.h in the pyTetris project as well, is it supposed to be generated automatically by pybind11? I've also tried changing the pyTetris.h includes to pyTetris.cpp but it still gives me the same kind of error (pyTetris.cpp: No such file or directory). Am I doing something wrong here?
(Btw, I can include pyTetris in the python shell after installing it)
Thanks for the help in advance!
Thanks for reporting!
Can't believe I forgot to push my local commits to GitHub.
It should work now, and if it doesn't, please let me know!
Thanks for the quick reply and updates!
I still wasn't able to run it as is after reinstalling pyTetris (might be something that I'm not doing correctly), but I managed to run it by manually copying the sources in pyTetris to cppmodule.
The project looks very exciting, I figure I'm gonna play around with it a LOT. (I'm also trying to create an RL AI for a tetris-like game, and initially tried DQN to no avail)
No problem!
It is highly probable that I'm doing something wrong because this is actually the first time I tried to integrate C++ code into Python.
My experience with DQN was also unsatisfying, which is why I created this project! Hopefully, you'll be able to find something useful in this pile of spaghetti code.