minerllabs / minerl

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

How do I get the seed used for each recording in the dataset? #229

Closed Sohojoe closed 5 years ago

Sohojoe commented 5 years ago

I am looking to implement Inverse Reinforcement Learning by having the environment use the same seed as the recording and step through to the step number I want to train from. \

brandonhoughton commented 5 years ago

Unfortunately, seeding is a relatively new feature for MineRL - as such it was not implemented on the data collection server.

It is possible to achieve the same world state using the file world loader, and introducing new teleportation logic into the malmo commands for loading worlds from file, however mob spawning mechanics, random events, and other elements fixed using seeding would not be accounted for.

Sohojoe commented 5 years ago

thanks - I could give it a try and see if it deviates. can you give me some hints on how to do the file world loader and teleport? I'm new to MineRL

brandonhoughton commented 5 years ago

If you look at treechop.xml the file world loader is used there. Additionally we would need to expose absolute x,y positions of the agents while rending the data. Then it would be as simple as making a new decorator similar to the RandomizedStartDecoratorImplementation that uses a fixed starting position to teleport the agent to the same starting location as the human demonstration. Note that mob-spawning, time-of-day, and item sprite locations (from breaking blocks) will not be consistent!