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

python version hfo.step() is very slow #45

Open
liyuanl6666 opened this issue Sep 20, 2017 · 4 comments
Open

python version hfo.step() is very slow #45

liyuanl6666 opened this issue Sep 20, 2017 · 4 comments

Comments

@liyuanl6666
Copy link

Can you check why the python version hfo.step() is so slow?
I'm trying to use the python interface; found that the step() function is much much slower than the C version (with the caffe code): for example, the time used to generate actions with actor network is about 40 seconds (across multiple episodes), and the time to execute hfo.step() is about 50 seconds... this is way much slower than the c++ version.

@drallensmith
Copy link
Contributor

50 seconds for each execution of hfo.step()? That does not accord with my experience. Could you try running some of the Python examples and see how long they're taking per episode (which has multiple invocations of hfo.step(), of course)?

@liyuanl6666
Copy link
Author

42.94 seconds spent on hfo.step() in 2000 plays(each play has roughly 100 steps)
While for the c++ version, the code can finish 2000 plays within 32 seconds(not only the time used on hfo.step, but all).

@mhauskn
Copy link
Member

mhauskn commented Sep 21, 2017 via email

@drallensmith
Copy link
Contributor

drallensmith commented Sep 21, 2017

Also:

  • hfo.step(), from a python profiling standpoint, is going to include everything being done by the c++ code.
  • What actions is the python code using (how high-level) vs the c++ code? Higher-level actions (with the somewhat odd exception of intercept vs go_to_ball) tend to have more processing needed.
  • Similarly, what state interface is the python code using and what state interface is the c++ code using?

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