Build a self-painting 4-state cellular automaton in vanilla Minecraft where glowing laser pointers weave intricate geometric carpets across a white floor.
SimulationsTechnologyWhiteBluePurpleLearningDecorationBlock displaysSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands
Watch mathematical order emerge from pure chaos right on your Minecraft floor. This command creation runs a 4-color variation of Langton's Ant, a classic two-dimensional cellular automaton where simple directional rules produce complex, symmetrical fractals and woven patterns without any pre-programmed blueprint.
Two glowing floating beacons race across a 29x29 white concrete canvas at 20 steps per second. Every time a beacon lands on a tile, it reads the block color below, rotates 90 degrees left or right, flips the tile to the next vibrant shade of cyan, magenta, or yellow, and leaves a burst of colorful sparks behind.
/fill ~-15 ~-1 ~-15 ~15 ~-1 ~15 minecraft:obsidian/fill ~-14 ~-1 ~-14 ~14 ~-1 ~14 minecraft:white_concrete/setblock ~ ~-1 ~ minecraft:cyan_concrete/setblock ~-1 ~-1 ~ minecraft:magenta_concrete/setblock ~ ~-1 ~-1 minecraft:yellow_concrete/summon minecraft:block_display ~ ~0.2 ~ {Tags:["c9_ant"],Rotation:[0f,0f],Glowing:1b,glow_color_override:65535,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.5f,1.4f,0.5f],translation:[-0.25f,0f,-0.25f]}}/summon minecraft:block_display ~ ~0.2 ~ {Tags:["c9_ant"],Rotation:[180f,0f],Glowing:1b,glow_color_override:16711935,block_state:{Name:"minecraft:ochre_froglight"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.5f,1.4f,0.5f],translation:[-0.25f,0f,-0.25f]}}/execute as @e[tag=c9_ant] at @s run tag @s remove c9_done/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:white_concrete run tp @s ~ ~ ~ ~90 0/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:white_concrete run particle minecraft:dust{color:[0.0,0.9,1.0],scale:1.5} ~ ~0.4 ~ 0.15 0.3 0.15 0 6/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:white_concrete run setblock ~ ~-1 ~ minecraft:cyan_concrete/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run tag @s add c9_done/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run tp @s ~ ~ ~ ~-90 0/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run particle minecraft:dust{color:[1.0,0.1,0.8],scale:1.5} ~ ~0.4 ~ 0.15 0.3 0.15 0 6/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run setblock ~ ~-1 ~ minecraft:magenta_concrete/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:magenta_concrete run tag @s add c9_done/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:magenta_concrete run tp @s ~ ~ ~ ~90 0/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:magenta_concrete run setblock ~ ~-1 ~ minecraft:yellow_concrete/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:yellow_concrete run tag @s add c9_done/execute as @e[tag=c9_ant,tag=!c9_done] at @s if block ~ ~-1 ~ minecraft:yellow_concrete run tp @s ~ ~ ~ ~-90 0/execute as @e[tag=c9_ant] at @s run tp @s ^ ^ ^1setup #1 Builds a 31x31 obsidian border frame around the 29x29 white concrete floor so the automata never wander off the stage.setup #6 Summons the first automaton cursor using a glowing block_display entity scaled into a tall pillar and centered on the block coordinate with a -0.25 translation offset.loop #2 Checks if the block beneath the ant is white concrete, and if so, rotates the entity 90 degrees to the right.loop #4 Flips the white concrete block into cyan concrete and tags the entity with c9_done for this tick so it does not trigger the cyan rule immediately in the same tick.loop #6 If the ant entered the tick on cyan concrete, it rotates 90 degrees to the left (-90) and upgrades the tile to magenta concrete, following the R-L-R-L state machine.loop #14 Moves every ant forward by exactly 1 block in the direction it is now facing (^ ^ ^1) to prepare for the next tick.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: Two glowing pink and cyan markers move across a large white square canvas, leaving a symmetrical cross-shaped pattern of blue, yellow, and purple blocks.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
You can join the grid as a live obstacle or seed painter by giving yourself boots that flip tiles under your feet: run /execute at @a if block ~ ~-1 ~ minecraft:white_concrete run setblock ~ ~-1 ~ minecraft:cyan_concrete in an extra repeating command block, then walk across the white floor to redirect the ants as they collide with your trail.
/kill @e[tag=c9_ant]/fill ~-15 ~-1 ~-15 ~15 ~-1 ~15 minecraft:grass_blockAll 14 loop commands run in the same single server tick. When white concrete turns into cyan concrete in command 4, the c9_done tag prevents command 6 from seeing the new cyan block and rotating the ant a second time during the same step.
You can add one extra rule checking for obsidian that rotates the ant 180 degrees (~180 0) so it bounces cleanly back into the canvas, or keep the default symmetric seed which keeps both ants weaving near the center for hundreds of steps.
▶Four-Dimensional Hypercube Tesseract RotationSimulationsExpert24 cmds
▶Holographic DNA Double-Helix SplicerSimulationsHard24 cmds
▶Magnetic Ferrofluid Audio VisualizerSimulationsHard24 cmds
▶Microscopic Bacteriophage Viral InjectionSimulationsHard24 cmds
▶Monumental Dam Spillway Floodgate ReleaseSimulationsHard24 cmds