gym-http-api
gym-http-api copied to clipboard
C++-Bindings - Example does not run
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.
@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)
Found an old makefile here.
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.