Open Maximusprime3 opened 2 years ago
It works if you use <SimpleCraftCommands/>
in the mission.xml
now all simple craft commands should be possible, those get specified in MalmoPlatform/MalmoEnv/malmoenv/commands.py
this script parses the commands and provides lists of all commands
in line 52 all_simplecraft = ["craft"]
--> only the command "craft" is possible --> this command crashes the server!
but you can replace "craft" with the craft commands of interest.
e.g. I changed it to all_simplecraft = ["craft stone_pickaxe", "craft stick"]
now my agent has two crafting actions that don't crash the server and work fine, they also trigger the
<RewardForCollectingItem>
<Item reward="1000" type="stick"/>
</RewardForCollectingItem>
<RewardForDiscardingItem>
<Item reward="-40" type="stick"/>
</RewardForDiscardingItem>
<AgentQuitFromCollectingItem>
<Item type="stone_pickaxe" />
</AgentQuitFromCollectingItem>
sections in the XML which is nice :D
So I am using MalmoEnv and would like to create my own crafting a stick mission in XML format I found the problem that I can not specify craft commands, any help is appreciated! There is the action_filter which when not specified otherwise will reduce commands to ["move", "turn", "use", "attack"], providing an empty action_filter=[] keeps other commands specified in the mission.xml too.
When I try to specifically allow some craft command in the XML :
I tried XX = craft, craft stick, craft 2 stick = planks. <-- with "XX",{{{XX}}},XX I get an exception:
when I add print(verb) in commands.py, it prints exactly the command i specified in the XML when I skip the check and just append the verb to actions, the server throws:
When I just add this to the agent section in the XML , (without any other commands):
and start the
runmultiagent.py
, the print in commands.py yields 'craft'. And the server starts the Minecraft mission, but then crashes:Anybody had a similar problem or sees what I'm doing wrong? or is it even possible to craft with malmoEnv? Other missions work fine and I already trained an agent in the findTheGoal mission. I really like the framework and would love to get the crafting going!
Kind regards, Max