-
Notifications
You must be signed in to change notification settings - Fork 44
Creating MARLO Agents
Deprecated : Please follow the instructions at the official instructions at : http://marlo.readthedocs.io/
Some initial checks:
-
Ensure that you have the env directory
MALMO_XSD_PATHpointing to the correct Schemas folder. If you are using the conda package for malmo, then you can do a :export MALMO_XSD_PATH=$CONDA_PREFIX/install/Schemas. -
Also do ensure that you have a Minecraft client running on port
10000
You are in the correct place if you want to run a simple random agent or a multi-agent example.
You can also check our section about building Chainer-RL agents.
The following simple script should run a random agent in a single-player environment:
import gym import marlo env = gym.make('MinecraftBasic-v0') env.init( allowContinuousMovement=["move", "turn"], videoResolution=[800, 600] ) env.reset() done = False while not done: env.render() action = env.action_space.sample() obs, reward, done, info = env.step(action) print(action) env.close()
More documentation about configuration options in docs/init.md and available environments in docs/available_envs.md
The multi-agent examples can be run from the marlo directory.
Assuming malmo was installed with pip, you can start Minecraft on ports 1000 and 10001 by running the following in a cmd terminal or shell:
python3 two_agent_minecraft_launch.py
Once two minecraft windows appear, run the multi agent example with:
python3 -m examples.multiagentexample --turn_based --rollouts 10 --mission_file mob_chase.xml