Interactive Mode minerl.interactor
Warning
Interactor works in MineRL versions 0.3.7 and 0.4.4 (or above).
Install 0.3.7 with pip install minerl==0.3.7
, or the newest MineRL
with pip install git+https://github.com/minerllabs/minerl.git@dev
.
Once you have started training agents, the next step is getting them to interact with human players.
To help achieve this, the minerl
python package provides a interactive Minecraft client called
minerl.interactor
:
The minerl.interactor
allows you to connect a human-controlled Minecraft client
to the Minecraft world that your agent(s) is using and interact with the agent in real time.
Note
For observation-only mode hit the t
key and type /gamemode sp
to enter
spectator mode and become invisible to your agent(s).
Enables human interaction with the environment.
To interact with the environment add make_interactive to your agent’s evaluation code and then run the minerl.interactor.
For example:
env = gym.make('MineRL...')
# set the environment to allow interactive connections on port 6666
# and slow the tick speed to 6666.
env.make_interactive(port=6666, realtime=True)
# reset the env
env.reset()
# interact as normal.
...
Then while the agent is running, you can start the interactor with the following command.
python3 -m minerl.interactor 6666 # replace with the port above.
The interactor will disconnect when the mission resets, but you can connect again with the same command. If an interactor is already started, it won’t need to be relaunched when running the commnad a second time.