Python Examples (Malmo Functionality)

Here is a list of Python examples that might be useful for your assignments/projects: https://github.com/Microsoft/malmo/tree/master/Malmo/samples/Python_examples Links to an external site.

 

File

What can you learn from it?

craft_work.py

  1. Continuous movement toward item when you know in advance the item you want to pick.
  2. Inventory search.
  3. Simple craft commands.
  4. Generating items in the world

build_test.py

  1. Detecting objects in line of sight
  2. Use items (instead of just dropping)
  3. ‘Strafe’ movement
  4. Use of hotbar inventory

tabular_q_learning.py

  1. Simple reinforcement learning algorithm implementation.
  2. Setting rewards in XML
  3. Grid-based states space and actions.
  4. Drawing grid base canvas

mob_fun.py

  1. Spawning enemies.
  2. VERY SIMPLE reinforcement learning for avoiding enemies and collecting life.
  3. Continuous movement to avoid enemies.
  4. Drawing continuous space movement canvas.

agent_visability.py

  1. Detecting things on the map using vision.

discrete _3d_test.py

  1. Moving on a 3d world as if it’s a grid (adding jump stuff).
  2. Creating a complicated world through the XML for movement.

depth_map_runner.py

Use VideoProducer to get pixel values (screenshots) and depth of pixel.

malmo_input_test.py

  1. Allowing input command for the agent during a mission.

MazeRunner.py

  1. Maze movement through PathBlock (XML).
  2. Creating mazes.

moving_target_test.py

  1. Creating targets (moving ones :) )
  2. Turn base movements

Multi_agent_test.py / team_reward_test.py

  1. How to set up multiple agents to use the same environment (same “game”)