Watch Langton's Ant come alive in Minecraft as a glowing magenta prism darts over white concrete, flipping tiles through cyan and purple in a growing mosaic.
SimulationsTechnologyMysticWhiteCyanPurpleLearningDecorationBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Rotation math13-20 commands
A glowing magenta prism with a spinning cyan core glides across a bright white concrete arena, cycling every floor tile it visits from white to cyan, then purple, and back to white. At each step it turns ninety degrees left or right based on the color beneath it, weaving an intricate mosaic out of simple rules.
Even though the walker only reads one block at a time, its three-color rule set quickly builds overlapping spirals and geometric pathways across the floor.
/fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:sea_lantern/fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 minecraft:white_concrete/fill ~-5 ~6 ~-5 ~5 ~6 ~5 minecraft:light[level=15]/scoreboard objectives add c9_col dummy/execute align xz run summon minecraft:block_display ~0.5 ~ ~0.5 {Tags:["c9_ant"],Glowing:1b,glow_color_override:16711935,teleport_duration:1,block_state:{Name:"minecraft:magenta_glazed_terracotta"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,1.2f,0.9f],translation:[-0.45f,0.05f,-0.45f]}}/execute align xz run summon minecraft:block_display ~0.5 ~ ~0.5 {Tags:["c9_ant_core"],Glowing:1b,glow_color_override:65535,teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.5f,0.5f,0.5f],translation:[-0.25f,1.4f,-0.25f]}}/execute as @e[tag=c9_ant] run scoreboard players set @s c9_col 0/execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:white_concrete run scoreboard players set @s c9_col 1/execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:cyan_concrete run scoreboard players set @s c9_col 2/execute as @e[tag=c9_ant] at @s if block ~ ~-1 ~ minecraft:purple_concrete run scoreboard players set @s c9_col 3/execute as @e[tag=c9_ant,scores={c9_col=1}] at @s run setblock ~ ~-1 ~ minecraft:cyan_concrete/execute as @e[tag=c9_ant,scores={c9_col=1}] at @s run tp @s ~ ~ ~ ~90 ~/execute as @e[tag=c9_ant,scores={c9_col=2}] at @s run setblock ~ ~-1 ~ minecraft:purple_concrete/execute as @e[tag=c9_ant,scores={c9_col=2}] at @s run tp @s ~ ~ ~ ~-90 ~/execute as @e[tag=c9_ant,scores={c9_col=3}] at @s run setblock ~ ~-1 ~ minecraft:white_concrete/execute as @e[tag=c9_ant,scores={c9_col=3}] at @s run tp @s ~ ~ ~ ~90 ~/execute as @e[tag=c9_ant] at @s unless block ^ ^-1 ^1 minecraft:sea_lantern run tp @s ^ ^ ^1/execute as @e[tag=c9_ant] at @s run tp @e[tag=c9_ant_core] ~ ~ ~/execute as @e[tag=c9_ant_core] at @s run tp @s ~ ~ ~ ~20 ~/execute as @e[tag=c9_ant] at @s run particle minecraft:dust{color:[1.0,0.2,0.9],scale:1.6} ~ ~0.7 ~ 0.25 0.35 0.25 0 8setup #5 Spawns the glowing magenta <code>block_display</code> walker at the exact center of the middle block using <code>execute align xz</code> so its tile checks stay aligned.loop #2 Reads the floor block beneath the walker and stores its color in the <code>c9_col</code> scoreboard (1 for white, 2 for cyan, 3 for purple) before changing any blocks.loop #5 Flips white tiles to cyan, cyan to purple, and purple back to white while rotating the walker 90 degrees right on white/purple and left on cyan.loop #11 Moves the walker one block forward in its facing direction unless the tile ahead is the <code>sea_lantern</code> border, keeping it safely inside the arena.


Recorded on our own test server: 59 frames at about 9.7 fps. Our image check saw: A glowing magenta prism with a cyan top moves across a large white floor, leaving behind a growing mosaic pattern of cyan and purple tiles with pink particle trails.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
/kill @e[tag=c9_ant]/kill @e[tag=c9_ant_core]/scoreboard objectives remove c9_col/fill ~-13 ~-1 ~-13 ~13 ~-1 ~13 minecraft:grass_block/fill ~-5 ~6 ~-5 ~5 ~6 ~5 minecraft:airIf a tile changed from white to cyan and then another command immediately checked for cyan in the same tick, the walker would double-flip the tile. Storing <code>c9_col</code> first guarantees only one transition runs per tick.
Yes. Swap <code>~90</code> and <code>~-90</code> in the rotation commands for white, cyan, or purple to try different three-color Langton's Ant rule sets such as RLL or RRL.
▶Four-Dimensional Hypercube Tesseract RotationSimulationsExpert24 cmds
▶Harmonic Pendulum Wave ArraySimulationsMedium24 cmds
▶Alchemical Homunculus Vitro GenesisSimulationsHard25 cmds
▶Recursive Clone MeltdownSimulationsEasy17 cmds
▶Evolving Cellular Grid SimulationSimulationsMedium24 cmds
▶Self-Evolving Block GridSimulationsMedium24 cmds