-
Notifications
You must be signed in to change notification settings - Fork 9
Trying BurlapCraft
Install Minecraft Forge version 1.7.10. WikiHow has a step-by-step tutorial for installing Minecraft Forge and adding mods. We recommend disabling other mods before trying BurlapCraft. We have tested these instructions on Ubuntu 14.04 and Mac; some version of them should work on other operating systems, but your mileage may vary. (We have been working with forge-1.7.10-10.13.3.1428-1.7.10-installer.jar.)
Use the jar file built from this source and place it in the mods folder of your minecraft installation. To verify that the mod has been added, open Minecraft, select the 'forge' profile, press 'Play', click on 'Mods' and check to see if BurlapCraft is listed among the mods. If it is, you're all set!
Create a new world in survival mode and give Minecraft a minute to load everything before you start moving around. You should see some dungeons above you.
Invoking aspects of BurlapCraft is done using Minecraft's chat/command system. You can invoke this from within Minecraft by typing the '/' key and then the rest of the command. Many of the tasks in Minecraft run in "dungeons" small contained areas in which various planning and learning algorithms can be well behaved and not crumble of the enormous state space that Minecraft provides. BurlapCraft comes with a variety of test dungeons build and you can always build your own by adding your own code. To go to a dungeon, use the /tele command, followed by the dungeon to which you wish to teleport. For example, the Grid dungeon is a grid-world where the agent needs to move around the world to reach a goal location. The goal is marked with a gold block. (Note: If you spawned in a snowy Biome, there are some bugs and planning will not work; just kill Minecraft, start over until you get one without snow.)
- Teleport to the grid dungeon. Enter
/tele grid
. - Leave a dungeon. To leave a dungeon at any time, enter
/tele out
. - When in the dungeon, run breadth-first search planning with
/bfs
. This module uses a pre-defined model of the dungeon. After entering the command, the agent should move and follow the plan to reach the cell adjacent to the gold block. If you move the agent around the cell, and rerun /bfs, it should move to the yellow block from wherever it is currently standing. - Run A-star planning. This algorithm works similarly to BFS, using a pre-defined model, but incorporates a reward function that says "lava is bad". In this case the heuristic is actually 0 everywhere, which makes this special case of A* equivalent to uniform cost search. To run it, enter
/astar
. The default mode executes the algorithm in a closed-loop mode which will account for commands entered by the user and recover from errors online. To run in open-loop mode, enter/astar open
; this plans once upon execution and will not account for input given by the user mid-execution. - Next try to learn a model. We recommend doing this in the finder dungeon since it's small (run
tele finder
). This algorithm learns the transition and reward function for the dungeon using a tabular representation. To run it, enter/rmax
When you run it, you should see the agent begin moving around the dungeon.
Try your hand at a maze!
- Enter
/tele maze0
and you will be transported to the zeroth maze. This maze is easily solved with BFS or astar. Go ahead and give it a try! Both algorithms should take you to the golden goal block. - It's also fun to watch from third person mode. Press F5 to have an out-of-body experience. If you press F5 some more, you can cycle back into first person mode.
- Now let's try the first maze. Enter
/tele maze1
to get there. This maze is similar to the zeroth but has some blocks in the way. Try to solve it as before. What happens? Nothing. Why? The state space has now exploded. Each block can be destroyed, collected, and potentially placed in many locations. - Fortunately, there is an elementary action prior that can prune the resulting search space down to a tractable size. Enter
/astar closed noplace
to tell the agent that it need not consider placing blocks when forming its plan. The agent should make its way to the goal block, destroying only those blocks that lie in its path. BFS should work, too.
- Teleport to the bridge dungeon by typing
/tele small_bridge
in the Minecraft console. The agent should teleport to a small dungeon with lava. Run/astar
and the agent should approach the block, mine it, go to the trench, create a bridge with the mined block, and walk across the bridge to the goal.
- Teleport to the cleanup dungeon by typing
/tele cleanup
in the Minecraft console. The agent should teleport to a dungeon with multi colored rooms. - Teach the agent a command like
Take the blue block to the blue room
by typing/learn take the blue block to the blue room
, demonstrating it manually and then typing/endLearn
. - Now you want to write the language data to a file. Check the current filesystem path by typing
/currentPath
in the Minecraft console. Go to the path in the filesystem and create a folder and give it any name you like. Now, go back to Minecraft and type/writeLanguageData (folder name)
, followed by/readLanguageData (folder name)
. You should get a message saying,Beginning training.
followed byFinished training.
- Now, move to any place in the dungeon and type
say take the blue block to the blue room
. You should see that the agent has successfully learned from your demonstration and is now able to perform the task whenever you issue the command using thesay
keyword.