openai / neural-mmo

Code for the paper "Neural MMO: A Massively Multiagent Game Environment for Training and Evaluating Intelligent Agents"
https://openai.com/blog/neural-mmo/
MIT License
1.58k stars 261 forks source link

Frames Per Second Per Core? #24

Closed kumarict closed 5 years ago

kumarict commented 5 years ago

(Note: This is a question, not a bug or issue with function/performance! Also, wasn't sure where else to ask this, so apologies if this is the wrong place - kindly let me know the proper place if there is one!)

I found that Facebook ELF (https://github.com/facebookresearch/ELF) lists the number of (AI) frames per second per core (40k). What is the frames per second per core for Neural MMO? When running this code, how many cores are used? Thank you.

Thank you to everyone who worked on this. This is quite amazing and you should all be proud of the great work you have done!

jsuarez5341 commented 5 years ago

Hello! This is the correct place for questions for now -- I'll likely be implementing something better concurrent with the first major patch. I actually do not know this off the top of my head because training is done on the same cores as the environment. I am working on an update that will make it easier to swap in/out models -- once I have a random agent or the like, I should be able to provide a better estimate. I'll leave this open for now so I remember to do this :)

jsuarez5341 commented 5 years ago

Update after a very long time: it's dependent on your policy. The better the model is doing, the more agents coexist in the world.

Edit: my earlier computation was way off. There's a certain amount of slow base computation per step; I only see around 600 fps/core. However, most of that gets amortized across the population of agents (50-100 for semi-reasonable models), which brings it in line with other environments. However, I should note that there is zero optimization whatsoever on the environment itself. In practice, training/communication are always the bottlenecks. In my work, I end up just sticking it on the same cores as the rollout workers, and it only takes around 2% of the cpu time as compared to the model.