|
|
A102127
|
|
Interval between successive arrivals at the origin of an LQTL CA.
|
|
6
|
|
|
4, 4, 4, 16, 4, 4, 4, 16, 4, 4, 4, 4, 4, 40, 4, 16, 4, 4, 4, 4, 12, 4, 4, 8, 4, 40, 4, 4, 4, 4, 4, 88, 4, 40, 4, 4, 4, 4, 4, 16, 4, 4, 4, 16, 4, 4, 4, 4, 4, 40, 4, 88, 4, 4, 4, 4, 4, 40, 4, 8, 4, 12, 4, 4, 4, 4, 4, 16, 4, 40, 4, 4, 4, 4, 4, 16, 4, 4, 4, 16, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The "LQTL CA" is similar to the Langton's ant but has 4 states. The ant turns right from the cells with states 0, 1 and left from the cells with states 2, 3 and changes the state of the cell according to the rules 0 -> 1 -> 2 -> 3 -> 0. - Andrey Zabolotskiy, Jan 06 2023
|
|
LINKS
|
|
|
PROG
|
(Python)
x = y = direction = 0
cells, a = {}, []
for n in range(1, 1000):
c = cells.get((x, y), 0)
cells[(x, y)] = (c + 1) % 4
direction += [1, 1, -1, -1][c]
(dx, dy) = [(1, 0), (0, 1), (-1, 0), (0, -1)][direction%4]
x += dx; y += dy
if (x, y) == (0, 0):
a.append(n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|