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

C++-Bindings - Example does not run #58

Open
kschoos opened this issue Dec 17, 2017 · 3 comments
Open

C++-Bindings - Example does not run #58

kschoos opened this issue Dec 17, 2017 · 3 comments

Comments

@kschoos
Copy link

kschoos commented Dec 17, 2017

After installing all the prerequisites and trying to run the random_agent.cpp in
cpp bindings, it threw an Error, saying it cannot convert a certain value to float.
Changing from Breakout-v0 to CartPole-v0 made it work for the time being.

@BoltzmannBrain
Copy link

BoltzmannBrain commented Sep 30, 2018

@kschoos how did you compile and run the C++ example?
I'm unable to compile (OSX 10.14):

$ g++ -o gym_exec random_agent.cpp -I include/gym/
Undefined symbols for architecture x86_64:
  "Gym::client_create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
      _main in random_agent-0dd3a4.o
  "Gym::Space::sample()", referenced from:
      run_single_environment(boost::shared_ptr<Gym::Client> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in random_agent-0dd3a4.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@BoltzmannBrain
Copy link

Found an old makefile here.

@oroojlooy
Copy link

The implementation does not support 3D states, i.e., image inputs. You need to call Breakout-ram-v0.

After installing all the prerequisites and trying to run the random_agent.cpp in
cpp bindings, it threw an Error, saying it cannot convert a certain value to float.
Changing from Breakout-v0 to CartPole-v0 made it work for the time being.

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