Anonymous user
Langton's ant: Difference between revisions
m
Grammar, spelling, formatting the description
(add Ruby) |
m (Grammar, spelling, formatting the description) |
||
Line 1:
{{draft task|Celluar automaton}}
[[wp:Langton's ant|Langton's ant]] models an ant sitting on a plane of cells,
*If the cell is black it turns left
This rather simple ruleset leads some movement appearing like random (or maybe like some kind of edge detecion being run on random images) and after about 10000 a cyle appears that makes the ant move in a diagonal movements with a corridor about 10 pixels wide, which essentially means that the ant will move out of the screen. The program terminates when the ant moves off screen.▼
*If it is white it turns right
*It then moves forward to the next cell and the color of the cell it was in is switched black/white
*The ant stops when it leaves the plane
▲This rather simple ruleset leads
For this task, start the ant near the center of a 100 by 100 field of cells (coordinates 50, 50 if you use
The problem has
=={{header|C}}==
|