Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment. --- For installation instructions, scroll down to *Getting Started* below, or visit the project page for more information:
MIT License
Bot releases are visible (Hide)
Addresses various async io issues on MacOS. For use with the MarLo crowdai competion.
Published by AndKram almost 6 years ago
With new Python only implementation of Open AI gym environment.
Published by AndKram over 6 years ago
For Malmo to be used widely for both exploring and teaching reinforcement learning in a games environment, it needs to be simple to build and install on multiple operating systems. This release addresses some of the cross platform build issues by removing the C++ XSD code generation and using a modern version of CMake (without custom extensions). This unfortunately entails dropping direct support for Lua and Mono, focusing the project on Python (version 3), while still providing direct support for C++; C# (on Windows and hopefully supporting .NET Core soon) and Java. Other languages that can link to C/C++ (Lua included) can easily be added using Swig (http://www.swig.org/), JVM or other cross language interop mechanism.
We can now provide a pip3 installable (native) Python module (“pip3 install malmo”) for Windows, MacOS and Linux. There are some remaining strict dependencies on Python 3, Boost and Java 8 that still need to be pre-installed but we hope that being able to install Malmo from the network will make it significantly easier to start using Malmo.
Other changes in this release address the set-up and reliability of communications between the Malmo agent and the Minecraft Mod.
Published by AndKram over 6 years ago
Published by DaveyBiggers over 6 years ago
It's been a while since we had a release, and a lot of work has been going on, so we've skipped straight to 0.34.0.
The main focus has been on Malmo's usefulness as a tool for gathering data, particularly in imitation learning scenarios. A secondary focus has been on stability.
my_mission_record.recordBitmaps(MalmoPython.FrameType.DEPTH_MAP)
.ObservationFromHuman
handler to your mission xml, and take control of Minecraft (by hitting the Enter
key) - Malmo will receive mouse deltas and keyboard events. There is a matching HumanLevelCommands
handler which can replay the recorded events.agentHost.killClient(clientinfo)
will cause Malmo to kill that particular Minecraft client and start up a new one - provided that launchClient.bat/sh was run with the -replaceable
flag. This is useful for long-running experiments - we've found that Minecraft becomes unresponsive over time, and periodically restarting it can be helpful.ObservationFromSystem
observation handler to return stats on Minecraft's health (eg render/server/client ticks per second) - use in combination with the restart option to keep Minecraft healthy.DrawSign
allows signposts to be drawn with specific text.ObservationFromRay
, to return JSON NBTTagCompound for tile entities.Many fixes in the area of mission recording - this should now be much more stable.
In addition, the python samples have been tweaked so that they can be run headless as part of the integration test suite.
From time to time we find ourselves creating python scripts to carry out some data-processing task on Malmo recorded data, or Malmo log files, etc. These now have a home in scripts/tools
, on the grounds that they might possibly provide useful material for carrying out other tasks in the future.
In a bid to simplify the Malmo build process, we now build the release binaries using docker containers. The dockerfiles in scripts/docker
set up build environments, with all necessary dependencies installed. This should make releasing new versions of Malmo significantly easier. They can also serve as a form of documentation - consider them to be a more detailed and up-to-date (but slightly less readable) version of the doc/build_linux.md
file.
You can also use them to create your own build environment, should you want an easy way to grab a build of the latest code from master. Put the kettle on while you wait for the docker container to build though.
We are beginning to drop support for some of the older Linux distributions. In particular:
future
to make the Python code cross-compatible with Python 2 and 3, and this requires Python 3.3 as a minimum.) We've included the Debian 7 Python 3 build for completeness, but it's untested.Published by DaveyBiggers about 7 years ago
HEADLINE CHANGE: New Video Producers!!!
Other changes:
Python 3 support!
All our sample/test python code has been "futurised" to work with both Python 2 and Python 3. This shouldn't be a breaking change, but there may now be an extra dependency to install - try pip install future
if the samples don't seem to be working.
Published by DaveyBiggers over 7 years ago
WE'VE UPGRADED TO A NEWER MINECRAFT!!!!
It was time - while we've been stuck with Minecraft 1.8, four new versions have come out...
We've updated to almost the bleeding edge - Minecraft 1.11.
This means:
mob_zoo.py
sample for a complete list.There have been significant changes to Minecraft, and Forge (which we use for modding), so there may well be some new quirks we've not yet spotted in our testing. The changes we know about are:
Published by DaveyBiggers over 7 years ago
The bulk of the work for this release has been centered around adding logging code to both the Mod and platform, which should significantly help us to track down and fix any future issues with Malmo's socket code, etc.
You can switch the Mod logging on by going to the Mod options (in the Minecraft GUI) - be warned, if you turn the detail up too high this will produce a LOT of logging...
The logs are stored in the logs subdir of the Minecraft folder, and are named after the date/time when that Minecraft instance was run.
On the platform side, switch it on by doing something like this:
MalmoPython.setLogging("where_I_want_it.log", MalmoPython.LoggingSeverityLevel.LOG_ALL)
Again, this will generate a lot of noise unless you opt for something like LOG_WARNINGS, etc.
The two log formats are the same - they start with a timestamp formatted the same way, followed by an "M" for Mod or a "P" for platform, so in theory the two files could be merged and sorted together, which should make forensic debugging a bit easier.
Users can append a line to the platform log by calling, eg, MalmoPython.appendToLog(MalmoPython.LoggingSeverityLevel.LOG_INFO, "Here's some important info...")
This is just intended to make debugging easier - it's not intended as a general purpose log for the user's code. It can be used to add signposts to the log - eg "INFO: started episode #242" which should make searching for problems easier.
Hopefully nothing...
Published by DaveyBiggers over 7 years ago
Hopefully nothing...
Published by DaveyBiggers over 7 years ago
Hopefully none!
Unless you want to use the Arcade Learning Environment, avoid the _withALE builds.
Published by DaveyBiggers almost 8 years ago
Hopefully nothing... but the work on version checking is fairly drastic - if versions don't match, fatal errors will be thrown. This should allow everyone to catch potentially confusing version mismatch errors straight away; keep an eye out for error messages!
Linking statically with boost is also a fairly major change to the releases. It should put an end to errors like #427, #395, #179 etc.etc. If building from source, boost can be linked dynamically as before.
Unless you want to use the Arcade Learning Environment, avoid the _withALE builds.
The Redhat build was made with Fedora 23 but may work with other Redhat flavors.
The Ubuntu 16 build was built (statically) against boost 1.62.
Published by DaveyBiggers about 8 years ago
It's a while since we've built a release, so quite a lot has gone into 0.18...
RewardForStructureCopying
and BuildBattleDecorator
. (#337)WorldTime
and TotalTime
added to ObservationFromFullStats
. (#262)MissionQuitCommands
. (#170)startAtWithPitchAndYaw
to API. (#295)DrawingDecorator
. (#322)ObservationFromGrid
has new optional attribute absoluteCoords
for fixed-location grids. (#293)AbsoluteMovementCommands
can now teleport outside the current chunk. (#353)FileWorldGenerator
load issue + file_test.py
to test fix. (#342)ContinuousMovementCommands
now allow the setting of yaw/pitch by Discrete or Absolute movement commands. (#255)Most of these are subtle changes which are unlikely to affect anyone, but they do carry the potential to change results / break existing code:
Fix: The centre of the grid observation was being rounded to the nearest int in the y-axis. (#370)
This will change your results for cases where the agent is in between blocks in the y-axis, eg if they are jumping / falling / climbing stairs. The grid observation will now be centred on floor(y) rather than floor(y+0.5)
Fix: temp folder and "mission_recordings" now removed from path of files in recordings. (#298)
This means the folder structure of your mission recording files has changed - if you've written any automated tools for parsing recordings, you may need to tweak them.
New: AbsoluteMovementCommands
tpx
, tpy
, tpz
now applied immediately.
Previously you could combine these commands by sending them immediately after each other - eg to teleport from the current location to (4,200,12) you could send:
tpx 4 tpy 200 tpz 12
and (most of the time) all three actions would be applied together at the next tick. In fact, in previous versions there was no other way to do this, since we hadn't provided a
tp x y z
command.
This latest change, however, means that each individual action will be applied consecutively, so if the agent starts at, say, (16,32,64), they will now visit the intermediate points (4,32,64) and (4,200,64) before arriving at (4,200,12).
Fix: Extra block properties returned by ObservationFromRay
are now prefixed with "prop_" to prevent collisions. (#355)
New: Mission worlds are now deleted after use unless destroyAfterUse
is false. (#76)
The default is for
destroyAfterUse
to be true - so, by default, starting with this version, any Minecraft saved worlds that get created to run the mission will eventually be deleted again after use. (Previous saved worlds won't be touched, and your own worlds should be safe.) If you rely on your saved worlds hanging around, make sure you explicitly set this flag in your XML.
Unless you want to use the Arcade Learning Environment, avoid the _withALE builds.
The Redhat build was made with Fedora 23 but may work with other Redhat flavors.
The Ubuntu 16 build was built against boost 1.61; if you still have boost 1.58 installed then use the Ubuntu 15 build.
Published by timhutton about 8 years ago
Fix: Discrete use and attack now affect the inventory. (#247)
Fix: Rewards would occasionally get doubled. (#275)
Fix: Stopped mobs spawing illegally. (#280)
New: Added has_mission_begun flag to world state, to solve problems with short missions. (#118, #236)
Fix: [BREAKING CHANGE] Rewards now sent as simple strings rather than XML, for speed - changes recorded rewards format. (#261)
New: ALEAgentHost.setSeed allows ALE experiments to be seeded. (#254)
Fix: No longer need a fresh MissionRecordSpec for each call to startMission. (#256)
New: [BREAKING CHANGE] MissionRecordSpec.getTemporaryDirectory() now moved to AgentHost.getRecordingTemporaryDirectory().
New: MALMO_TEMP_PATH environment variable now used to determine where temp recording files are created. (#21)
New: TimestampedFrame now includes xPos,yPos,zPos,yaw and pitch information. (#257, #250, #231)
_withALE
builds.Redhat
build was made with Fedora23 but may work with other Redhat flavors.<int>:<float>
.MissionRecordSpec.getTemporaryDirectory()
then you will need to change it to be AgentHost.getTemporaryDirectory()
Published by DaveyBiggers about 8 years ago
Some necessary changes to the ALE wrapping.
Published by DaveyBiggers about 8 years ago
New: DiscreteCommandHandler now supports AgentQuitFromTouchingBlockType and RewardForTouchingBlockType. (#241)
New: MissionSpec has get/setSummary, getListOfCommandHandlers, getAllowedCommands. (#217)
New: DiscreteCommandHandler now supports attack and use commands. (#219)
New: Bonus - added AllowedMobs to ServerInitialConditions to control which mobs are allowed to spawn (does not affect mob_spawners)
New: Bonus - can now draw mob_spawner blocks and specify the entity they spawn as a variant.
New: ObservationFromRay returns info about nearest block/item/entity in the agent's direct line of sight. (#184)
Fix: RewardForDiscardingItem/RewardForCollectingItem now work with variations, colours etc.
Fix: Inventory and Entity observations now return information in the same format we use to specify things (eg Type, Variation, Colour)
New: More types supported in BlockDrawing, Inventory initialisation etc - see FlowerTypes, EntityTypes, MonsterEggTypes
New: AgentQuitFromCollectingItem (#171)
New: ObservationsFromFullStats now additionally returns Air (#214)
New: Cross-platform Human Action Component
_withALE
builds.Redhat
build was made with Fedora23 but may work with other Redhat flavors.Let us know if you need more builds.
Previous syntax:
<Waypoints quantity="10">
<WaypointItem>cookie</WaypointItem>
</Waypoints>
New syntax:
<Waypoints quantity="10">
<WaypointItem type="cookie"/>
</Waypoints>
This allows us to add variants, colours etc - eg, to add spawn eggs of various types:
<Waypoints quantity="10">
<WaypointItem type="spawn_egg" variant="Creeper Skeleton Spider Ozelot"/>
</Waypoints>
ObservationFromHotbar
, ObservationFromFullInventory
, ObservationFromNearbyEntities
etc now return data in the same format as Types.xsdeg instead of returning a string like "item.dyePowder.red", they will now break the data down into the types / variants / colours found in Types.xsd, and return them separately.
This means that data is now returned in the same format that we send it (eg in DrawItem
, InventoryObject
, RewardForCollectingItem
, etc.etc.)
InventoryItem
and InventoryBlock
have been deprecated in favour of a single new entity, InventoryObject
. Existing inventory XML will continue to work, but InventoryObject
is now the preferred way to go. It avoids having to make a distinction in the inventory code between blocks and items, and also allows item variations and colours to be specified.Published by timhutton over 8 years ago
New: Added ObservationFromNearbyEntities (#89) and updated reward_for_items_test.py to demonstrate it.
New: Simplified inventory movement with swapInventoryItems command (#148).
New: Can combine inventory slots using new combineInventoryItems command (#189).
New: Free-floating blocks can now be placed using DrawItem, and used in RewardForDiscardingItem/RewardForCollectingItem.
New: Crafting now triggers RewardForDiscardingItem/RewardForCollectingItem.
New: Python bindings changed for videoframe pixels - now returns a native python array, for faster use in numpy/PIL etc. (#187)
_withALE
builds.Redhat
build was made with Fedora23 but may work with other Redhat flavors.Let us know if you need more builds.
selectInventoryItem 3
dropInventoryItem 30
Now:
swapInventoryItems 3 30
for frame in world_state.video_frames:
image = Image.frombytes('RGB', (frame.width, frame.height), str( frame.pixels ) )
Published by timhutton over 8 years ago
New: Basic, first stage crafting support added (issue #11).
New: ObservationsFromMazeOptimalPath has been turned into general purpose ObservationFromSubgoalPositionList
New: Maze generator can now take care of quitting mission when agent reaches goal (issue #103)
New: AgentQuitFromReachingCommandQuota (issue #109).
Rewards are now only sent when triggered (issue #120).
Multi-dimensional rewards are now possible, using a 'dimension' parameter on each RewardProducer.
Pitch command had positive as up, which was inconsistent with Minecraft and Placement section.
for reward in world_state.rewards:
print reward.value
are now accessed like this:
for reward in world_state.rewards:
print reward.getValue()
Published by timhutton over 8 years ago
New: tp x y z command (issue #112)
Fix: Hotbar commands moved from ContinuousMovementCommands to InventoryCommands
Fix: Client quit producers are now queried between executing commands, in cases where commands get clustered.
New: Test for AgentQuitFromReachingPosition
Some MissionSpec calls now take float coordinates to match XML (issue #107). MissionSpec::endAt now takes tolerance parameter.
peekWorldState and getWorldState now return WorldState instances rather than smart pointers (issue #124).
New: API call MissionSpec::setViewpoint to change the camera viewpoint.
Fix: ALE_HAC.py was broken (issue #114).
Published by timhutton over 8 years ago
New: Issue #55 (added forceReset flag to FlatWorldGenerator, DefaultWorldGenerator and FileWorldGenerator).
New: Issue #84 (added seed to FlatWorldGenerator and DefaultWorldGenerator).
Add: Issue #82 (new RewardForDiscardingItem mission handler).
Add: Issue #73 (added new DiscardCurrentItem command to InventoryCommands).
Add: Issue #4 (Overclocking) - can set tick length, and limit onscreen render. (Required XSD change, hence bumping to 0.12)
Fix: Issue #48 (Grid observer crippled by bad TCP string sending method).
Fix: Issue #52 (Malmo's internal Minecraft client/server messages limited to 64k data per message).
Fix: Issue #40 (added tostring() methods to Lua and Python classes).
Fix: Issue #7 (requesting depth map would break the recorded video).
Fix: Issue #81 (changing video size between missions could crash the platform).
Fix: Issue #2 (XSDs no longer need to be in the current folder).
Add: New API call: MissionSpec::requestVideoWithDepth.
Add: New API call: AgentHost::peekWorldState.
N.B. This release contains a bug in ALE_HAC.py. This is fixed in master and will be fixed in the next release.