-
Notifications
You must be signed in to change notification settings - Fork 0
Minecraft
**Standard 'world' disclaimer: Worlds are intended to drive platform research, not as useful places in themselves. As such they are bare skeletons to find where the platform breaks, or as challenges for tool construction. Don't expect this one to do anything useful **
Having said that, current (1/11/2026) tools seem to be the beginning of basic navigation capability in Minecraft. Nothing is ever guaranteed in minecraft, the challenge for the planner is to recover and adapt in a hostile (in the sense of unpredictable) environment.
Minecraft support enables agents to interact with a Minecraft world via the Minescript 4.0 bridge. Minecraft is a large and complex software stack, if you aren't familiar with it, be prepared for learning curve to get all the pieces running.
-
Minecraft Server (1.20.4):
java -Xmx4G -Xms2G -jar server-1.20.4.jar nogui
-
Minecraft client:
- find the minecraft-launcher client somewhere and download it.
-
Fabric Mod Loader:
- Install Fabric API:
fabric-api-0.97.3+1.20.4.jar - Place in
~/.minecraft/mods/
- Install Fabric API:
-
Minescript Bridge:
- Copy (or better, ln -s)
scenarios/minecraft/bridge.pyto~/.minecraft/mods/ - run minecraft-launcher to launch the client
- In Minecraft client, type
\bridgeto start the bridge - Bridge runs on
http://localhost:3003(default) (sometimes it hangs on to port on exit, which will cause problems on restart, beware)
- Copy (or better, ln -s)
-
Client Configuration:
- Press
F3 + Pto prevent pause on focus loss - Open chat (
/or '') to free mouse cursor - Optional:
/op <username>to grant superuser powers
- Press
cd src
python3 launcher.py scenarios/jill-minecraft.yaml --uiNavigation state is stored as a list (most recent first):
{
"nav": [
{
"pose": {"x": -123.5, "y": 73.0, "z": -153.5, "yaw": 180},
"support_here": "solid",
"fell": false,
"was_fall": false,
"timestamp": "2024-01-15T10:30:00"
},
...
]
}Properties:
- Bounded to 100 entries (oldest discarded)
-
nav[0]is current state -
nav[1:]is history (for backtracking) - Yaw normalized to 0-360 range (never negative)
The init tool (minecraft/init) is automatically executed on executor startup:
- Gets current status via
mc-status - Normalizes pose via
nav-turn(block center, cardinal yaw, pitch zero) - Updates
world_state.nav[0]with normalized state
nav-turn - Change orientation:
- Directions:
right(+90°),left(-90°),back(+180°),forward(align only) - Always results in cardinal yaw (0°, 90°, 180°, 270°)
- Snaps to block center, sets pitch to 0°
- Never changes position
nav-move - Single forward step:
- Moves forward one block (relative to facing)
- Validates landing with
mc-status+mc-observe-blocks - Snaps to block center after move
- Updates
world_state.navhistory
nav-climb - Climb up one block:
- Checks clearance above
- Jumps if needed
- Validates landing
- Updates nav history
nav-descend - Descend one block:
- Checks drop distance
- Moves forward and down
- Validates landing
- Updates nav history
nav-backtrack - Recover previous position:
- Uses
world_state.nav[1:]history - Attempts to return to previous safe position
- Useful after falls or dead ends
path-frontier - Find unexplored directions:
- Analyzes current cell and adjacent cells
- Returns directions with unexplored terrain
- Uses SpatialMap for cell data
path-explore - Systematic exploration:
- Uses
path-frontierto find unexplored directions - Moves toward frontier
- Updates map as it explores
mc-status - Get agent state:
- Position, yaw (normalized 0-360), pitch
- Health, food, vertical state
- Returns structured data with normalized yaw
mc-observe-blocks - Observe nearby blocks:
- Scans blocks in a region around agent
- Returns block types and positions
- Used by
mc-map-updatefor mapping
mc-observe-entities - Observe entities:
- Mobs, items, other entities
- Returns entity types and positions
mc-observe-items - Observe items:
- Items on ground or in containers
- Returns item types and positions
Minecraft uses a cell-based spatial memory (SpatialMap) instead of Collection-based logs:
- Cells keyed by
(x, z)coordinates - Each cell stores: support, surface, hazards, resources, observability, waypoints
- Persisted to
scenarios/minecraft/resources/Jill_spatial_map.json
mc-map-update - Update spatial map:
- Checks if current location is already mapped
- Auto-invokes
mc-observe-blocksif unmapped - Updates cell data with observation results
- Auto-saves SpatialMap
mc-map-query - Query spatial map:
- Query types:
cell,nearest,waypoint,unexplored - Returns cell data or lists of matching cells
- Legacy Collection-based queries deprecated
mc-map-visualize - Visualize map:
- Generates visualization of mapped cells
- Shows support, hazards, resources
mc-waypoint - Mark waypoint:
- Stores waypoint name in SpatialMap cell
- Auto-queries
mc-statusif coordinates not provided - Queryable via
mc-map-querywithquery_type: "waypoint"
mc-attack - Attack entity/block
mc-dig - Break block
mc-place - Place block
mc-place-until-supported - Place block with support check
mc-pickup - Pick up item
mc-drop - Drop item
mc-open - Open container/block
mc-close - Close container
mc-use - Use item/block
mc-craft - Craft item
mc-equip - Equip item
mc-unequip - Unequip item
mc-inventory - List inventory
mc-respawn - Respawn agent
mc-wait - Wait for duration
mc-stop - Stop current action
mc-say - Send chat message
All Minecraft tools:
- Use
executor._create_uniform_return()for results - Update
world_state.navon position/orientation changes - Normalize yaw to 0-360 before storing
- Use
executor.execute_action_with_log()for nested calls - Follow uniform return format (see Tools)
-
SpatialMap:
scenarios/minecraft/resources/Jill_spatial_map.json -
Documentation:
scenarios/minecraft/*.mdfiles loaded intominecraftCollection -
Bridge:
scenarios/minecraft/bridge.py(Minescript 4.0)
Check status:
{"type": "mc-status", "out": "$status"}
Navigate and map:
{"type": "nav-turn", "direction": "right", "out": "$turn"}
{"type": "nav-move", "out": "$move"}
{"type": "mc-map-update", "out": "$map"}
Explore systematically:
{"type": "path-frontier", "out": "$frontier"}
{"type": "path-explore", "out": "$explore"}
- All yaw values normalized to 0-360 (Minescript may return negative values)
- Navigation history bounded to 100 entries
- SpatialMap replaces legacy Collection-based map storage
-
inittool auto-executes on startup to normalize initial pose