minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
703 stars 155 forks source link

how to run game in background / leave malmo instance open? #582

Open culurciello opened 3 years ago

culurciello commented 3 years ago

Hi, I am trying to find a way in OS X or Ubuntu to run the game and then run scripts, as it takes a long time to load and run the game instance. Is there a way to keep an instance running and then run script on that instance? Could not easily find docs... maybe wrong keywords?

Thanks a lot for the great work and package, we all owe you a lot! E

Miffyli commented 3 years ago

Hey there! Unfortunately there is no ready-made solution for what you are asking. A closest thing I could come up with is creating the MineRL/Minecraft instance in an another process and your main codes in another, and then pass step/reset calls between the two.

There is a hacky piece of code using Pyro to facilitate something similar in the competitions. See this code which runs pyro nameserver, creates an instance manager and then runs the code. However this is very hacky and quite dirty, so I would not recommend using that and instead trying to write something simpler yourself.