minerl icon indicating copy to clipboard operation
minerl copied to clipboard

Is there any way to get the agent's location, i.e. (x,y,z) coordinates during the simulation?

Open mwang808 opened this issue 2 years ago • 3 comments

Is there any way to get the agent's location, i.e. (x,y,z) coordinates during the simulation? Thanks.

mwang808 avatar Oct 28 '22 13:10 mwang808

Hey! If you create this environment, you should see more entries in the obs than just the image (or in the info variable), which should also contain position information somewhere in there. Sorry for lack of details, stopping by atm ^^

Miffyli avatar Oct 29 '22 13:10 Miffyli

Thanks for the reply. Is there any easy way to enable the position info in some pre-defined environment?

For example: In the tutorial: Hello World: Your First Agent (https://minerl.readthedocs.io/en/stable/tutorials/first_agent.html)

env = gym.make('MineRLBasaltFindCave-v0')

Is it possible to insert several lines of code to enable the position info?

mwang808 avatar Oct 29 '22 15:10 mwang808

You would have to modify the MineRL code a bit and copy stuff from here (in HumanSurvival env) to here in a right way, but that should do the trick.

PS: Just for clarity, modifying environment in the BASALT competition is not allowed. Highlighting this as the competition is currently ongoing :)

Miffyli avatar Oct 29 '22 16:10 Miffyli