Skip to content

Parallel

Tambet Matiisen edited this page Oct 15, 2016 · 5 revisions

Running permanent Minecraft process in background

Firstly you have to figure out the folder where minecraft_py installed Malmo. This is printed out when you launch the environment with at least INFO level logging. Launch the same command in other window.

/home/tambet/code/minecraft-py/minecraft_py/Malmo/Minecraft/launchClient.sh

In your agent code skip the start_minecraft=True and it will connect to an existing Minecraft instance.

import gym
import gym_minecraft

env = gym.make('MinecraftBasic-v0')
env.reset()

done = False
while not done:
        env.render()
        action = env.action_space.sample()
        obs, reward, done, info = env.step(action)

env.close()

You can run the code several times and it will start without any startup delays.

Clone this wiki locally