skip to content
Hexagonal Langton's Ant

Hexagonal Langton's Ant

A tiny ant following tiny rules.

Cellular Automata JavaScript

Langton’s Ant is a cellular automaton with a basic premise: look at the tile you’re standing on, turn based on its color, flip the color, step forward. Everything below comes from these simple rules. Turing machines can really be incredible things! Mine runs on a hexagonal grid, so each rule is one of six turns instead of four. Try editing the rule string, or hit the dice for a random one. Some rules build highways, some build patterns, and others will just create a mess.

Personal favorites:

  • L1,L1,R2,R2 almost cardioid
  • L1,R2,L1 maze generator
  • R1,R2,N,U,R2,R1,L2 stars
  • N,L,R,N screen filler
  • N,U,L,L spider web
  • N,N,L1,R2,N,N diamonds
  • R2,L2,L2 staircase builder
  • R1,U,L1,R2,N,L2 triangle
A hexagonal grid where an ant turns and changes tile colors according to the rules below.

Langton's Ant simulation

18