Maze-Solving Automaton in Vanilla Minecraft

Build an autonomous glowing automaton that scans obstacles with laser particles and weaves through a glowing cybernetic maze on the fly using commands.

Java EditionMobs & PetsHard24 commandsTested on a real 26.2 & 26.3 server
An armor stand robot navigates a sea lantern maze over a dark prismarine floor in Minecraft. Download the GIF Video & GIF © www.9minecraft.net

Custom MobsTechnologyCyanOrangeRedLearningMini-gameMap MakingArmor standsBlock building (fill/setblock/clone)SoundsRotation math21+ commands

The Maze-Solving Automaton is a fully self-guided armor stand robot that navigates a cybernetic obstacle course without any player controls. Using local raycasting checks in front and to the sides, it detects walls before hitting them, fires cyan and red scanner beams, and calculates sharp 90-degree turns in real time.

As the golden robot glides across the dark prismarine floor, it leaves a glowing trail of electric sparks and dynamically switches between a wall-following logic and obstacle-deflection mode, making it continuously patrol the whole arena on its own.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard objectives add c9_turn dummy
  3. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 dark_prismarine
  4. /fill ~-9 ~ ~-9 ~9 ~1 ~9 sea_lantern outline
  5. /fill ~-8 ~ ~-8 ~8 ~1 ~8 air
  6. /fill ~-6 ~ ~-5 ~2 ~1 ~-5 sea_lantern
  7. /fill ~-2 ~ ~-1 ~6 ~1 ~-1 sea_lantern
  8. /fill ~-6 ~ ~3 ~2 ~1 ~3 sea_lantern
  9. /fill ~-3 ~ ~-4 ~-3 ~1 ~2 waxed_copper_bulb[lit=true]
  10. /summon armor_stand ~-7 ~ ~-7 {Tags:["c9_bot"],CustomName:'{"text":"PATHFINDER-09","color":"aqua"}',CustomNameVisible:1b,NoGravity:1b,Glowing:1b,ShowArms:1b,Rotation:[0f,0f],equipment:{head:{id:"minecraft:observer",count:1},chest:{id:"minecraft:golden_chestplate",count:1},legs:{id:"minecraft:golden_leggings",count:1},feet:{id:"minecraft:golden_boots",count:1}}}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /execute as @e[tag=c9_bot] run scoreboard players add @s c9_timer 1
  2. /execute as @e[tag=c9_bot] at @s run particle dust{color:[0.0,1.0,0.85],scale:1.2} ~ ~0.2 ~ 0.1 0.05 0.1 0 2 force
  3. /execute as @e[tag=c9_bot] at @s run particle electric_spark ^ ^1.4 ^0.8 0.05 0.05 0.05 0.02 2 force
  4. /execute as @e[tag=c9_bot] at @s unless block ^ ^0.5 ^1.1 air run particle dust{color:[1.0,0.15,0.15],scale:1.6} ^ ^1.2 ^0.9 0.15 0.15 0.15 0 6 force
  5. /execute as @e[tag=c9_bot] at @s if block ^ ^0.5 ^1.1 air run tp @s ^ ^ ^0.22
  6. /execute as @e[tag=c9_bot] at @s unless block ^ ^0.5 ^1.1 air run scoreboard players set @s c9_turn 1
  7. /execute as @e[tag=c9_bot,scores={c9_turn=1}] at @s unless block ^1.5 ^0.5 ^ air if block ^-1.5 ^0.5 ^ air run scoreboard players set @s c9_turn 2
  8. /execute as @e[tag=c9_bot,scores={c9_turn=1}] at @s if block ^1.5 ^0.5 ^ air if block ^-1.5 ^0.5 ^ air if score @s c9_timer matches 40.. run scoreboard players set @s c9_turn 2
  9. /execute as @e[tag=c9_bot,scores={c9_turn=1}] at @s run tp @s ~ ~ ~ ~-90 ~
  10. /execute as @e[tag=c9_bot,scores={c9_turn=2}] at @s run tp @s ~ ~ ~ ~90 ~
  11. /execute as @e[tag=c9_bot,scores={c9_turn=1..2}] at @s run playsound block.note_block.bit master @a ~ ~ ~ 0.5 1.8
  12. /execute as @e[tag=c9_bot] run scoreboard players set @s c9_turn 0
  13. /execute as @e[tag=c9_bot,scores={c9_timer=80..}] run scoreboard players set @s c9_timer 0
  14. /execute as @e[tag=c9_bot,scores={c9_timer=40}] at @s if block ^ ^0.5 ^1.1 air if block ^-1.5 ^0.5 ^ air run tp @s ~ ~ ~ ~90 ~

How it works

Frames from the test run

Maze-Solving Automaton in Vanilla Minecraft - frame 1Maze-Solving Automaton in Vanilla Minecraft - frame 2Maze-Solving Automaton in Vanilla Minecraft - frame 3

Recorded on our own test server: 57 frames at about 9.4 fps. Our image check saw: A glowing armor stand robot navigates around sea lantern and copper bulb walls on a dark prismarine maze floor while leaving cyan particles behind.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Enable cheats in a flat creative world and stand at the center of a clear 20x20 area.
  2. Run each of the 10 setup commands in order to create the scoreboards, build the glowing sea lantern maze, and summon the PATHFINDER-09 automaton.
  3. Place a line or column of 14 Repeating Command Blocks set to Always Active outside or beneath the maze.
  4. Paste one loop command into each repeating command block.
  5. Watch the automaton scan the corridors with electric sparks and automatically weave around every barrier.

Use it with real players

You can reshape the maze inside the outer ring while the automaton is running! Simply place or break sea_lantern or waxed_copper_bulb blocks in its path and watch it scan the new obstacles and recalculate its route in real time.

Remove it again 5 commands

  1. /kill @e[tag=c9_bot]
  2. /scoreboard objectives remove c9_timer
  3. /scoreboard objectives remove c9_turn
  4. /fill ~-9 ~ ~-9 ~9 ~2 ~9 air
  5. /fill ~-9 ~-1 ~-9 ~9 ~-1 ~9 grass_block

FAQ

How does the armor stand know where walls are without mods?

It uses Minecraft's local caret coordinates (^ ^ ^) inside an execute if block command to test the blocks directly ahead, to the left, and to the right of where the armor stand is facing.

Can I change the maze layout?

Yes! Because the automaton calculates turns dynamically every tick rather than following a pre-programmed path, you can build any 2-block-wide corridor layout and it will navigate through it.

Commands used

/execute/fill/particle/playsound/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides