# Cellular Automata¶

## Brainstorming¶

Let's try it myself!

In [2]:
rule = 54

In [3]:
# format to binary
"{0:08b}".format(rule)

Out[3]:
'00110110'
In [4]:
# get the correct bit in rule
pattern = '101'
int(pattern, 2)

Out[4]:
5
In [5]:
# correct result
def get_result(pattern, rule):
return "{0:08b}".format(rule)[7-int(pattern, 2)]

get_result(pattern, rule)

Out[5]:
'1'
In [6]:
# should look ok!
for ptn in ['111', '110', '101', '100', '011', '010', '001', '000']:
print(get_result(ptn, 54))

0
0
1
1
0
1
1
0


## Does it work?¶

In [7]:
size = 11 # preferably odd number
cells = '0'*(size//2) + '1' + '0'*(size//2)

print(cells)

00000100000

In [8]:
def get_partition(string, idx):
if idx == 0:
return '0' + string[idx:idx+2]
elif idx == len(string) - 1:
return string[idx-1:idx+1] + '0'
return string[idx-1:idx+2]

In [9]:
# looks ok!
get_partition(cells, 6)

Out[9]:
'100'
In [10]:
rule = 54
''.join([get_result(get_partition(cells, i), rule) for i in range(size)])

Out[10]:
'00001110000'
In [11]:
def evolve(cells, rule):
return ''.join([get_result(get_partition(cells, i), rule) for i in range(len(cells))])

In [12]:
# matches wolfram!
print(cells)
for _ in range(20):
cells = evolve(cells, 54)
print(cells)

00000100000
00001110000
00010001000
00111011100
01000100010
11101110111
00010001000
00111011100
01000100010
11101110111
00010001000
00111011100
01000100010
11101110111
00010001000
00111011100
01000100010
11101110111
00010001000
00111011100
01000100010


## Putting it together¶

Here, I'll restate all the code that I just wrote.

In [13]:
def initialize_cells(n):
return '0'*n + '1' + '0'*n

def evolve(cells, rule):
return ''.join([get_result(get_partition(cells, i), rule) for i in range(len(cells))])

def get_partition(string, idx):
if idx == 0:
return '0' + string[idx:idx+2]
elif idx == len(string) - 1:
return string[idx-1:idx+1] + '0'
return string[idx-1:idx+2]

def get_result(pattern, rule):
return "{0:08b}".format(rule)[7-int(pattern, 2)]

def automata(rule, n, gens):
cells = initialize_cells(n)
print(cells)
for _ in range(gens):
cells = evolve(cells, rule)
print(cells)


## Examples¶

In [14]:
automata(220, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001110000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111110000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111110000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111100000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111110000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111100000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111110000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111100000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111110000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111100000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111110000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111100000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111110000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111000000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111100000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111110000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111000000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111100000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111110000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111110000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111100000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111110000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111100000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111110000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111000000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111100000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111110000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111000
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111100
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111110
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111

In [15]:
automata(222, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000
0000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000
0000000000000000000000000000000000000000111111111110000000000000000000000000000000000000000
0000000000000000000000000000000000000001111111111111000000000000000000000000000000000000000
0000000000000000000000000000000000000011111111111111100000000000000000000000000000000000000
0000000000000000000000000000000000000111111111111111110000000000000000000000000000000000000
0000000000000000000000000000000000001111111111111111111000000000000000000000000000000000000
0000000000000000000000000000000000011111111111111111111100000000000000000000000000000000000
0000000000000000000000000000000000111111111111111111111110000000000000000000000000000000000
0000000000000000000000000000000001111111111111111111111111000000000000000000000000000000000
0000000000000000000000000000000011111111111111111111111111100000000000000000000000000000000
0000000000000000000000000000000111111111111111111111111111110000000000000000000000000000000
0000000000000000000000000000001111111111111111111111111111111000000000000000000000000000000
0000000000000000000000000000011111111111111111111111111111111100000000000000000000000000000
0000000000000000000000000000111111111111111111111111111111111110000000000000000000000000000
0000000000000000000000000001111111111111111111111111111111111111000000000000000000000000000
0000000000000000000000000011111111111111111111111111111111111111100000000000000000000000000
0000000000000000000000000111111111111111111111111111111111111111110000000000000000000000000
0000000000000000000000001111111111111111111111111111111111111111111000000000000000000000000
0000000000000000000000011111111111111111111111111111111111111111111100000000000000000000000
0000000000000000000000111111111111111111111111111111111111111111111110000000000000000000000
0000000000000000000001111111111111111111111111111111111111111111111111000000000000000000000
0000000000000000000011111111111111111111111111111111111111111111111111100000000000000000000
0000000000000000000111111111111111111111111111111111111111111111111111110000000000000000000
0000000000000000001111111111111111111111111111111111111111111111111111111000000000000000000
0000000000000000011111111111111111111111111111111111111111111111111111111100000000000000000
0000000000000000111111111111111111111111111111111111111111111111111111111110000000000000000
0000000000000001111111111111111111111111111111111111111111111111111111111111000000000000000
0000000000000011111111111111111111111111111111111111111111111111111111111111100000000000000
0000000000000111111111111111111111111111111111111111111111111111111111111111110000000000000
0000000000001111111111111111111111111111111111111111111111111111111111111111111000000000000
0000000000011111111111111111111111111111111111111111111111111111111111111111111100000000000
0000000000111111111111111111111111111111111111111111111111111111111111111111111110000000000
0000000001111111111111111111111111111111111111111111111111111111111111111111111111000000000
0000000011111111111111111111111111111111111111111111111111111111111111111111111111100000000
0000000111111111111111111111111111111111111111111111111111111111111111111111111111110000000
0000001111111111111111111111111111111111111111111111111111111111111111111111111111111000000
0000011111111111111111111111111111111111111111111111111111111111111111111111111111111100000
0000111111111111111111111111111111111111111111111111111111111111111111111111111111111110000
0001111111111111111111111111111111111111111111111111111111111111111111111111111111111111000
0011111111111111111111111111111111111111111111111111111111111111111111111111111111111111100
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

In [16]:
automata(250, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000001010101000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000
0000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000
0000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000
0000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000
0000000000000000000000000000000000001010101010101010101000000000000000000000000000000000000
0000000000000000000000000000000000010101010101010101010100000000000000000000000000000000000
0000000000000000000000000000000000101010101010101010101010000000000000000000000000000000000
0000000000000000000000000000000001010101010101010101010101000000000000000000000000000000000
0000000000000000000000000000000010101010101010101010101010100000000000000000000000000000000
0000000000000000000000000000000101010101010101010101010101010000000000000000000000000000000
0000000000000000000000000000001010101010101010101010101010101000000000000000000000000000000
0000000000000000000000000000010101010101010101010101010101010100000000000000000000000000000
0000000000000000000000000000101010101010101010101010101010101010000000000000000000000000000
0000000000000000000000000001010101010101010101010101010101010101000000000000000000000000000
0000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000
0000000000000000000000000101010101010101010101010101010101010101010000000000000000000000000
0000000000000000000000001010101010101010101010101010101010101010101000000000000000000000000
0000000000000000000000010101010101010101010101010101010101010101010100000000000000000000000
0000000000000000000000101010101010101010101010101010101010101010101010000000000000000000000
0000000000000000000001010101010101010101010101010101010101010101010101000000000000000000000
0000000000000000000010101010101010101010101010101010101010101010101010100000000000000000000
0000000000000000000101010101010101010101010101010101010101010101010101010000000000000000000
0000000000000000001010101010101010101010101010101010101010101010101010101000000000000000000
0000000000000000010101010101010101010101010101010101010101010101010101010100000000000000000
0000000000000000101010101010101010101010101010101010101010101010101010101010000000000000000
0000000000000001010101010101010101010101010101010101010101010101010101010101000000000000000
0000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000
0000000000000101010101010101010101010101010101010101010101010101010101010101010000000000000
0000000000001010101010101010101010101010101010101010101010101010101010101010101000000000000
0000000000010101010101010101010101010101010101010101010101010101010101010101010100000000000
0000000000101010101010101010101010101010101010101010101010101010101010101010101010000000000
0000000001010101010101010101010101010101010101010101010101010101010101010101010101000000000
0000000010101010101010101010101010101010101010101010101010101010101010101010101010100000000
0000000101010101010101010101010101010101010101010101010101010101010101010101010101010000000
0000001010101010101010101010101010101010101010101010101010101010101010101010101010101000000
0000010101010101010101010101010101010101010101010101010101010101010101010101010101010100000
0000101010101010101010101010101010101010101010101010101010101010101010101010101010101010000
0001010101010101010101010101010101010101010101010101010101010101010101010101010101010101000
0010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010

In [17]:
automata(182, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010111110100000000000000000000000000000000000000000
0000000000000000000000000000000000000000111011101110000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000
0000000000000000000000000000000000000011111111111111100000000000000000000000000000000000000
0000000000000000000000000000000000000101111111111111010000000000000000000000000000000000000
0000000000000000000000000000000000001110111111111110111000000000000000000000000000000000000
0000000000000000000000000000000000010101011111111101010100000000000000000000000000000000000
0000000000000000000000000000000000111111101111111011111110000000000000000000000000000000000
0000000000000000000000000000000001011111010111110101111101000000000000000000000000000000000
0000000000000000000000000000000011101110111011101110111011100000000000000000000000000000000
0000000000000000000000000000000101010101010101010101010101010000000000000000000000000000000
0000000000000000000000000000001111111111111111111111111111111000000000000000000000000000000
0000000000000000000000000000010111111111111111111111111111110100000000000000000000000000000
0000000000000000000000000000111011111111111111111111111111101110000000000000000000000000000
0000000000000000000000000001010101111111111111111111111111010101000000000000000000000000000
0000000000000000000000000011111110111111111111111111111110111111100000000000000000000000000
0000000000000000000000000101111101011111111111111111111101011111010000000000000000000000000
0000000000000000000000001110111011101111111111111111111011101110111000000000000000000000000
0000000000000000000000010101010101010111111111111111110101010101010100000000000000000000000
0000000000000000000000111111111111111011111111111111101111111111111110000000000000000000000
0000000000000000000001011111111111110101111111111111010111111111111101000000000000000000000
0000000000000000000011101111111111101110111111111110111011111111111011100000000000000000000
0000000000000000000101010111111111010101011111111101010101111111110101010000000000000000000
0000000000000000001111111011111110111111101111111011111110111111101111111000000000000000000
0000000000000000010111110101111101011111010111110101111101011111010111110100000000000000000
0000000000000000111011101110111011101110111011101110111011101110111011101110000000000000000
0000000000000001010101010101010101010101010101010101010101010101010101010101000000000000000
0000000000000011111111111111111111111111111111111111111111111111111111111111100000000000000
0000000000000101111111111111111111111111111111111111111111111111111111111111010000000000000
0000000000001110111111111111111111111111111111111111111111111111111111111110111000000000000
0000000000010101011111111111111111111111111111111111111111111111111111111101010100000000000
0000000000111111101111111111111111111111111111111111111111111111111111111011111110000000000
0000000001011111010111111111111111111111111111111111111111111111111111110101111101000000000
0000000011101110111011111111111111111111111111111111111111111111111111101110111011100000000
0000000101010101010101111111111111111111111111111111111111111111111111010101010101010000000
0000001111111111111110111111111111111111111111111111111111111111111110111111111111111000000
0000010111111111111101011111111111111111111111111111111111111111111101011111111111110100000
0000111011111111111011101111111111111111111111111111111111111111111011101111111111101110000
0001010101111111110101010111111111111111111111111111111111111111110101010111111111010101000
0011111110111111101111111011111111111111111111111111111111111111101111111011111110111111100
0101111101011111010111110101111111111111111111111111111111111111010111110101111101011111010
1110111011101110111011101110111111111111111111111111111111111110111011101110111011101110111
0101010101010101010101010101011111111111111111111111111111111101010101010101010101010101010
1111111111111111111111111111101111111111111111111111111111111011111111111111111111111111111
0111111111111111111111111111010111111111111111111111111111110101111111111111111111111111110
1011111111111111111111111110111011111111111111111111111111101110111111111111111111111111101
1101111111111111111111111101010101111111111111111111111111010101011111111111111111111111011
0010111111111111111111111011111110111111111111111111111110111111101111111111111111111110100
0111011111111111111111110101111101011111111111111111111101011111010111111111111111111101110
1010101111111111111111101110111011101111111111111111111011101110111011111111111111111010101
1111110111111111111111010101010101010111111111111111110101010101010101111111111111110111111
0111101011111111111110111111111111111011111111111111101111111111111110111111111111101011110
1011011101111111111101011111111111110101111111111111010111111111111101011111111111011101101
1100101010111111111011101111111111101110111111111110111011111111111011101111111110101010011
0011111111011111110101010111111111010101011111111101010101111111110101010111111101111111100
0101111110101111101111111011111110111111101111111011111110111111101111111011111010111111010
1110111101110111010111110101111101011111010111110101111101011111010111110101110111011110111
0101011010101010111011101110111011101110111011101110111011101110111011101110101010101101010
1111100111111111010101010101010101010101010101010101010101010101010101010101111111110011111
0111011011111110111111111111111111111111111111111111111111111111111111111110111111101101110
1010100101111101011111111111111111111111111111111111111111111111111111111101011111010010101
1111111110111011101111111111111111111111111111111111111111111111111111111011101110111111111
0111111101010101010111111111111111111111111111111111111111111111111111110101010101011111110
1011111011111111111011111111111111111111111111111111111111111111111111101111111111101111101
1101110101111111110101111111111111111111111111111111111111111111111111010111111111010111011
0010101110111111101110111111111111111111111111111111111111111111111110111011111110111010100
0111110101011111010101011111111111111111111111111111111111111111111101010101111101010111110
1011101111101110111111101111111111111111111111111111111111111111111011111110111011111011101
1101010111010101011111010111111111111111111111111111111111111111110101111101010101110101011
0011111010111111101110111011111111111111111111111111111111111111101110111011111110101111100
0101110111011111010101010101111111111111111111111111111111111111010101010101111101110111010
1110101010101110111111111110111111111111111111111111111111111110111111111110111010101010111
0101111111110101011111111101011111111111111111111111111111111101011111111101010111111111010
1110111111101111101111111011101111111111111111111111111111111011101111111011111011111110111
0101011111010111010111110101010111111111111111111111111111110101010111110101110101111101010
1111101110111010111011101111111011111111111111111111111111101111111011101110101110111011111
0111010101010111010101010111110101111111111111111111111111010111110101010101110101010101110

In [18]:
automata(188, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001110100000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001101110000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001011101000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111011100000000000000000000000000000000000000
0000000000000000000000000000000000000000000001110111010000000000000000000000000000000000000
0000000000000000000000000000000000000000000001101110111000000000000000000000000000000000000
0000000000000000000000000000000000000000000001011101110100000000000000000000000000000000000
0000000000000000000000000000000000000000000001111011101110000000000000000000000000000000000
0000000000000000000000000000000000000000000001110111011101000000000000000000000000000000000
0000000000000000000000000000000000000000000001101110111011100000000000000000000000000000000
0000000000000000000000000000000000000000000001011101110111010000000000000000000000000000000
0000000000000000000000000000000000000000000001111011101110111000000000000000000000000000000
0000000000000000000000000000000000000000000001110111011101110100000000000000000000000000000
0000000000000000000000000000000000000000000001101110111011101110000000000000000000000000000
0000000000000000000000000000000000000000000001011101110111011101000000000000000000000000000
0000000000000000000000000000000000000000000001111011101110111011100000000000000000000000000
0000000000000000000000000000000000000000000001110111011101110111010000000000000000000000000
0000000000000000000000000000000000000000000001101110111011101110111000000000000000000000000
0000000000000000000000000000000000000000000001011101110111011101110100000000000000000000000
0000000000000000000000000000000000000000000001111011101110111011101110000000000000000000000
0000000000000000000000000000000000000000000001110111011101110111011101000000000000000000000
0000000000000000000000000000000000000000000001101110111011101110111011100000000000000000000
0000000000000000000000000000000000000000000001011101110111011101110111010000000000000000000
0000000000000000000000000000000000000000000001111011101110111011101110111000000000000000000
0000000000000000000000000000000000000000000001110111011101110111011101110100000000000000000
0000000000000000000000000000000000000000000001101110111011101110111011101110000000000000000
0000000000000000000000000000000000000000000001011101110111011101110111011101000000000000000
0000000000000000000000000000000000000000000001111011101110111011101110111011100000000000000
0000000000000000000000000000000000000000000001110111011101110111011101110111010000000000000
0000000000000000000000000000000000000000000001101110111011101110111011101110111000000000000
0000000000000000000000000000000000000000000001011101110111011101110111011101110100000000000
0000000000000000000000000000000000000000000001111011101110111011101110111011101110000000000
0000000000000000000000000000000000000000000001110111011101110111011101110111011101000000000
0000000000000000000000000000000000000000000001101110111011101110111011101110111011100000000
0000000000000000000000000000000000000000000001011101110111011101110111011101110111010000000
0000000000000000000000000000000000000000000001111011101110111011101110111011101110111000000
0000000000000000000000000000000000000000000001110111011101110111011101110111011101110100000
0000000000000000000000000000000000000000000001101110111011101110111011101110111011101110000
0000000000000000000000000000000000000000000001011101110111011101110111011101110111011101000
0000000000000000000000000000000000000000000001111011101110111011101110111011101110111011100
0000000000000000000000000000000000000000000001110111011101110111011101110111011101110111010
0000000000000000000000000000000000000000000001101110111011101110111011101110111011101110111
0000000000000000000000000000000000000000000001011101110111011101110111011101110111011101110
0000000000000000000000000000000000000000000001111011101110111011101110111011101110111011101
0000000000000000000000000000000000000000000001110111011101110111011101110111011101110111011
0000000000000000000000000000000000000000000001101110111011101110111011101110111011101110110
0000000000000000000000000000000000000000000001011101110111011101110111011101110111011101101
0000000000000000000000000000000000000000000001111011101110111011101110111011101110111011011
0000000000000000000000000000000000000000000001110111011101110111011101110111011101110110110
0000000000000000000000000000000000000000000001101110111011101110111011101110111011101101101
0000000000000000000000000000000000000000000001011101110111011101110111011101110111011011011
0000000000000000000000000000000000000000000001111011101110111011101110111011101110110110110
0000000000000000000000000000000000000000000001110111011101110111011101110111011101101101101
0000000000000000000000000000000000000000000001101110111011101110111011101110111011011011011
0000000000000000000000000000000000000000000001011101110111011101110111011101110110110110110
0000000000000000000000000000000000000000000001111011101110111011101110111011101101101101101
0000000000000000000000000000000000000000000001110111011101110111011101110111011011011011011
0000000000000000000000000000000000000000000001101110111011101110111011101110110110110110110
0000000000000000000000000000000000000000000001011101110111011101110111011101101101101101101
0000000000000000000000000000000000000000000001111011101110111011101110111011011011011011011
0000000000000000000000000000000000000000000001110111011101110111011101110110110110110110110
0000000000000000000000000000000000000000000001101110111011101110111011101101101101101101101
0000000000000000000000000000000000000000000001011101110111011101110111011011011011011011011
0000000000000000000000000000000000000000000001111011101110111011101110110110110110110110110
0000000000000000000000000000000000000000000001110111011101110111011101101101101101101101101
0000000000000000000000000000000000000000000001101110111011101110111011011011011011011011011
0000000000000000000000000000000000000000000001011101110111011101110110110110110110110110110
0000000000000000000000000000000000000000000001111011101110111011101101101101101101101101101
0000000000000000000000000000000000000000000001110111011101110111011011011011011011011011011
0000000000000000000000000000000000000000000001101110111011101110110110110110110110110110110
0000000000000000000000000000000000000000000001011101110111011101101101101101101101101101101
0000000000000000000000000000000000000000000001111011101110111011011011011011011011011011011
0000000000000000000000000000000000000000000001110111011101110110110110110110110110110110110
0000000000000000000000000000000000000000000001101110111011101101101101101101101101101101101
0000000000000000000000000000000000000000000001011101110111011011011011011011011011011011011
0000000000000000000000000000000000000000000001111011101110110110110110110110110110110110110
0000000000000000000000000000000000000000000001110111011101101101101101101101101101101101101

In [19]:
automata(161, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111001001111111111111111111111111111111111111111110
0011111111111111111111111111111111111111110000000111111111111111111111111111111111111111100
1001111111111111111111111111111111111111100111110011111111111111111111111111111111111111001
0000111111111111111111111111111111111111000011100001111111111111111111111111111111111110000
1110011111111111111111111111111111111110011001001100111111111111111111111111111111111100111
0100001111111111111111111111111111111100000000000000011111111111111111111111111111111000010
0001100111111111111111111111111111111001111111111111001111111111111111111111111111110011000
1100000011111111111111111111111111110000111111111110000111111111111111111111111111100000011
0001111001111111111111111111111111100110011111111100110011111111111111111111111111001111000
1100110000111111111111111111111111000000001111111000000001111111111111111111111110000110011
0000000110011111111111111111111110011111100111110011111100111111111111111111111100110000000
1111110000001111111111111111111100001111000011100001111000011111111111111111111000000111111
0111100111100111111111111111111001100110011001001100110011001111111111111111110011110011110
0011000011000011111111111111110000000000000000000000000000000111111111111111100001100001100
1000011000011001111111111111100111111111111111111111111111110011111111111111001100001100001
0011000011000000111111111111000011111111111111111111111111100001111111111110000001100001100
1000011000011110011111111110011001111111111111111111111111001100111111111100111100001100001
0011000011001100001111111100000000111111111111111111111110000000011111111000011001100001100
1000011000000001100111111001111110011111111111111111111100111111001111110011000000001100001
0011000011111100000011110000111100001111111111111111111000011110000111100000011111100001100
1000011001111001111001100110011001100111111111111111110011001100110011001111001111001100001
0011000000110000110000000000000000000011111111111111100000000000000000000110000110000001100
1000011110000110000111111111111111111001111111111111001111111111111111110000110000111100001
0011001100110000110011111111111111110000111111111110000111111111111111100110000110011001100
1000000000000110000001111111111111100110011111111100110011111111111111000000110000000000001
0011111111110000111100111111111111000000001111111000000001111111111110011110000111111111100
1001111111100110011000011111111110011111100111110011111100111111111100001100110011111111001
0000111111000000000011001111111100001111000011100001111000011111111001100000000001111110000
1110011110011111111000000111111001100110011001001100110011001111110000001111111100111100111
0100001100001111110011110011110000000000000000000000000000000111100111100111111000011000010
0001100001100111100001100001100111111111111111111111111111110011000011000011110011000011000
1100001100000011001100001100000011111111111111111111111111100000011000011001100000011000011
0001100001111000000001100001111001111111111111111111111111001111000011000000001111000011000
1100001100110011111100001100110000111111111111111111111110000110011000011111100110011000011
0001100000000001111001100000000110011111111111111111111100110000000011001111000000000011000
1100001111111100110000001111110000001111111111111111111000000111111000000110011111111000011
0001100111111000000111100111100111100111111111111111110011110011110011110000001111110011000
1100000011110011110011000011000011000011111111111111100001100001100001100111100111100000011
0001111001100001100000011000011000011001111111111111001100001100001100000011000011001111000
1100110000001100001111000011000011000000111111111110000001100001100001111000011000000110011
0000000111100001100110011000011000011110011111111100111100001100001100110011000011110000000
1111110011001100000000000011000011001100001111111000011001100001100000000000011001100111111
0111100000000001111111111000011000000001100111110011000000001100001111111111000000000011110
0011001111111100111111110011000011111100000011100000011111100001100111111110011111111001100
1000000111111000011111100000011001111001111001001111001111001100000011111100001111110000001
0011110011110011001111001111000000110000110000000110000110000001111001111001100111100111100
1001100001100000000110000110011110000110000111110000110000111100110000110000000011000011001
0000001100001111110000110000001100110000110011100110000110011000000110000111111000011000000
1111100001100111100110000111100000000110000001000000110000000011110000110011110011000011111
0111001100000011000000110011001111110000111100011110000111111001100110000001100000011001110
0010000001111000011110000000000111100110011001001100110011110000000000111100001111000000100
1000111100110011001100111111110011000000000000000000000001100111111110011001100110011110001
0010011000000000000000011111100000011111111111111111111100000011111100000000000000001100100
1000000011111111111111001111001111001111111111111111111001111001111001111111111111100000001
0011111001111111111110000110000110000111111111111111110000110000110000111111111111001111100
1001110000111111111100110000110000110011111111111111100110000110000110011111111110000111001
0000100110011111111000000110000110000001111111111111000000110000110000001111111100110010000
1110000000001111110011110000110000111100111111111110011110000110000111100111111000000000111
0100111111100111100001100110000110011000011111111100001100110000110011000011110011111110010
0000011111000011001100000000110000000011001111111001100000000110000000011001100001111100000
1111001110011000000001111110000111111000000111110000001111110000111111000000001100111001111
0110000100000011111100111100110011110011110011100111100111100110011110011111100000010000110
0000110001111001111000011000000001100001100001000011000011000000001100001111001111000110000
1110000100110000110011000011111100001100001100011000011000011111100001100110000110010000111
0100110000000110000000011001111001100001100001000011000011001111001100000000110000000110010
0000000111110000111111000000110000001100001100011000011000000110000001111110000111110000000
1111110011100110011110011110000111100001100001000011000011110000111100111100110011100111111
0111100001000000001100001100110011001100001100011000011001100110011000011000000001000011110
0011001100011111100001100000000000000001100001000011000000000000000011000011111100011001100
1000000001001111001100001111111111111100001100011000011111111111111000011001111001000000001
0011111100000110000001100111111111111001100001000011001111111111110011000000110000011111100
1001111001110000111100000011111111110000001100011000000111111111100000011110000111001111001
0000110000100110011001111001111111100111100001000011110011111111001111001100110010000110000
1110000110000000000000110000111111000011001100011001100001111110000110000000000000110000111
0100110000111111111110000110011110011000000001000000001100111100110000111111111110000110010
0000000110011111111100110000001100000011111100011111100000011000000110011111111100110000000
1111110000001111111000000111100001111001111001001111001111000011110000001111111000000111111
0111100111100111110011110011001100110000110000000110000110011001100111100111110011110011110
0011000011000011100001100000000000000110000111110000110000000000000011000011100001100001100

In [20]:
automata(225, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111101001111111111111111111111111111111111111111111
0011111111111111111111111111111111111111111110000111111111111111111111111111111111111111111
1001111111111111111111111111111111111111111110110011111111111111111111111111111111111111111
0000111111111111111111111111111111111111111111010001111111111111111111111111111111111111111
1110011111111111111111111111111111111111111111100100111111111111111111111111111111111111111
0110001111111111111111111111111111111111111111100000011111111111111111111111111111111111111
0010100111111111111111111111111111111111111111101111001111111111111111111111111111111111111
1001000011111111111111111111111111111111111111110111000111111111111111111111111111111111111
0000011001111111111111111111111111111111111111111011010011111111111111111111111111111111111
1111001000111111111111111111111111111111111111111101100001111111111111111111111111111111111
0111000010011111111111111111111111111111111111111110101100111111111111111111111111111111111
0011011000001111111111111111111111111111111111111111010100011111111111111111111111111111111
1001101011100111111111111111111111111111111111111111101001001111111111111111111111111111111
0000110101100011111111111111111111111111111111111111110000000111111111111111111111111111111
1110011010101001111111111111111111111111111111111111110111110011111111111111111111111111111
0110001101010000111111111111111111111111111111111111111011110001111111111111111111111111111
0010100110100110011111111111111111111111111111111111111101110100111111111111111111111111111
1001000011000010001111111111111111111111111111111111111110111000011111111111111111111111111
0000011001011000100111111111111111111111111111111111111111011011001111111111111111111111111
1111001000101010000011111111111111111111111111111111111111101101000111111111111111111111111
0111000010010100111001111111111111111111111111111111111111110110010011111111111111111111111
0011011000001000011000111111111111111111111111111111111111111010000001111111111111111111111
1001101011100011001010011111111111111111111111111111111111111100111100111111111111111111111
0000110101101001000100001111111111111111111111111111111111111100011100011111111111111111111
1110011010110000010001100111111111111111111111111111111111111101001101001111111111111111111
0110001101010111000100100011111111111111111111111111111111111110000110000111111111111111111
0010100110101011010000001001111111111111111111111111111111111110110010110011111111111111111
1001000011010101100111100000111111111111111111111111111111111111010001010001111111111111111
0000011001101010100011101110011111111111111111111111111111111111100100100100111111111111111
1111001000110101001001110110001111111111111111111111111111111111100000000000011111111111111
0111000010011010000000111010100111111111111111111111111111111111101111111111001111111111111
0011011000001100111110011101000011111111111111111111111111111111110111111111000111111111111
1001101011100100011110001110011001111111111111111111111111111111111011111111010011111111111
0000110101100001001110100110001000111111111111111111111111111111111101111111100001111111111
1110011010101100000111000010100010011111111111111111111111111111111110111111101100111111111
0110001101010101110011011001001000001111111111111111111111111111111111011111110100011111111
0010100110101010110001101000000011100111111111111111111111111111111111101111111001001111111
1001000011010101010100110011111001100011111111111111111111111111111111110111111000000111111
0000011001101010101000010001111000101001111111111111111111111111111111111011111011110011111
1111001000110101010011000100111010010000111111111111111111111111111111111101111101110001111
0111000010011010100001010000011100000110011111111111111111111111111111111110111110110100111
0011011000001101001100100111001101110010001111111111111111111111111111111111011111011000011
1001101011100110000100000011000110110000100111111111111111111111111111111111101111101011001
0000110101100010110001111001010011010110000011111111111111111111111111111111110111110101000
1110011010101001010100111000100001101010111001111111111111111111111111111111111011111010011
0110001101010000101000011010001100110101011000111111111111111111111111111111111101111100001
0010100110100110010011001100100100011010101010011111111111111111111111111111111110111101100
1001000011000010000001000100000001001101010100001111111111111111111111111111111111011110101
0000011001011000111100010001111100000110101001100111111111111111111111111111111111101111010
1111001000101010011101000100111101110011010000100011111111111111111111111111111111110111100
0111000010010100001110010000011110110001100110001001111111111111111111111111111111111011101
0011011000001001100110000111001111010100100010100000111111111111111111111111111111111101110
1001101011100000100010110011000111101000001001001110011111111111111111111111111111111110110
0000110101101110001001010001010011110011100000000110001111111111111111111111111111111111010
1110011010110110100000100100100001110001101111110010100111111111111111111111111111111111100
0110001101011011001110000000001100110100110111110001000011111111111111111111111111111111101
0010100110101101000110111111100100011000011011110100011001111111111111111111111111111111110
1001000011010110010011011111100001001011001101111001001000111111111111111111111111111111110
0000011001101010000001101111101100000101000110111000000010011111111111111111111111111111110
1111001000110100111100110111110101110010010011011011111000001111111111111111111111111111110
0111000010011000011100011011111010110000000001101101111011100111111111111111111111111111110
0011011000001011001101001101111101010111111100110110111101100011111111111111111111111111110
1001101011100101000110000110111110101011111100011011011110101001111111111111111111111111110
0000110101100010010010110011011111010101111101001101101111010000111111111111111111111111110
1110011010101000000001010001101111101010111110000110110111100110011111111111111111111111110
0110001101010011111100100100110111110101011110110011011011100010001111111111111111111111110
0010100110100001111100000000011011111010101111010001101101101000100111111111111111111111110
1001000011001100111101111111001101111101010111100100110110110010000011111111111111111111110
0000011001000100011110111111000110111110101011100000011011010000111001111111111111111111110
1111001000010001001111011111010011011111010101101111001101100110011000111111111111111111110
0111000011000100000111101111100001101111101010110111000110100010001010011111111111111111110
0011011001010001110011110111101100110111110101011011010011001000100100001111111111111111110
1001101000100100110001111011110100011011111010101101100001000010000001100111111111111111110
0000110010000000010100111101111001001101111101010110101100011000111100100011111111111111110
1110010000111111001000011110111000000110111110101011010101001010011100001001111111111111110
0110000110011111000011001111011011110011011111010101101010000100001101100000111111111111110
0010110010001111011001000111101101110001101111101010110100110001100110101110011111111111110
1001010000100111101000010011110110110100110111110101011000010100100011010110001111111111110
0000100110000011110011000001111011011000011011111010101011001000001001101010100111111111110

In [21]:
automata(60, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100110000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010101000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000000010000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000011000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010000010100000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000011110000000000000000000000000000000000
0000000000000000000000000000000000000000000001000100010001000000000000000000000000000000000
0000000000000000000000000000000000000000000001100110011001100000000000000000000000000000000
0000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111000000000000000000000000000000
0000000000000000000000000000000000000000000001000000000000000100000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000110000000000000000000000000000
0000000000000000000000000000000000000000000001010000000000000101000000000000000000000000000
0000000000000000000000000000000000000000000001111000000000000111100000000000000000000000000
0000000000000000000000000000000000000000000001000100000000000100010000000000000000000000000
0000000000000000000000000000000000000000000001100110000000000110011000000000000000000000000
0000000000000000000000000000000000000000000001010101000000000101010100000000000000000000000
0000000000000000000000000000000000000000000001111111100000000111111110000000000000000000000
0000000000000000000000000000000000000000000001000000010000000100000001000000000000000000000
0000000000000000000000000000000000000000000001100000011000000110000001100000000000000000000
0000000000000000000000000000000000000000000001010000010100000101000001010000000000000000000
0000000000000000000000000000000000000000000001111000011110000111100001111000000000000000000
0000000000000000000000000000000000000000000001000100010001000100010001000100000000000000000
0000000000000000000000000000000000000000000001100110011001100110011001100110000000000000000
0000000000000000000000000000000000000000000001010101010101010101010101010101000000000000000
0000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000
0000000000000000000000000000000000000000000001000000000000000000000000000000010000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000011000000000000
0000000000000000000000000000000000000000000001010000000000000000000000000000010100000000000
0000000000000000000000000000000000000000000001111000000000000000000000000000011110000000000
0000000000000000000000000000000000000000000001000100000000000000000000000000010001000000000
0000000000000000000000000000000000000000000001100110000000000000000000000000011001100000000
0000000000000000000000000000000000000000000001010101000000000000000000000000010101010000000
0000000000000000000000000000000000000000000001111111100000000000000000000000011111111000000
0000000000000000000000000000000000000000000001000000010000000000000000000000010000000100000
0000000000000000000000000000000000000000000001100000011000000000000000000000011000000110000
0000000000000000000000000000000000000000000001010000010100000000000000000000010100000101000
0000000000000000000000000000000000000000000001111000011110000000000000000000011110000111100
0000000000000000000000000000000000000000000001000100010001000000000000000000010001000100010
0000000000000000000000000000000000000000000001100110011001100000000000000000011001100110011
0000000000000000000000000000000000000000000001010101010101010000000000000000010101010101010
0000000000000000000000000000000000000000000001111111111111111000000000000000011111111111111
0000000000000000000000000000000000000000000001000000000000000100000000000000010000000000000
0000000000000000000000000000000000000000000001100000000000000110000000000000011000000000000
0000000000000000000000000000000000000000000001010000000000000101000000000000010100000000000
0000000000000000000000000000000000000000000001111000000000000111100000000000011110000000000
0000000000000000000000000000000000000000000001000100000000000100010000000000010001000000000
0000000000000000000000000000000000000000000001100110000000000110011000000000011001100000000
0000000000000000000000000000000000000000000001010101000000000101010100000000010101010000000
0000000000000000000000000000000000000000000001111111100000000111111110000000011111111000000
0000000000000000000000000000000000000000000001000000010000000100000001000000010000000100000
0000000000000000000000000000000000000000000001100000011000000110000001100000011000000110000
0000000000000000000000000000000000000000000001010000010100000101000001010000010100000101000
0000000000000000000000000000000000000000000001111000011110000111100001111000011110000111100
0000000000000000000000000000000000000000000001000100010001000100010001000100010001000100010
0000000000000000000000000000000000000000000001100110011001100110011001100110011001100110011
0000000000000000000000000000000000000000000001010101010101010101010101010101010101010101010
0000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100110000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010101000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000000010000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000011000000000000000000000000000000000000
0000000000000000000000000000000000000000000001010000010100000000000000000000000000000000000
0000000000000000000000000000000000000000000001111000011110000000000000000000000000000000000
0000000000000000000000000000000000000000000001000100010001000000000000000000000000000000000
0000000000000000000000000000000000000000000001100110011001100000000000000000000000000000000
0000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000
0000000000000000000000000000000000000000000001111111111111111000000000000000000000000000000
0000000000000000000000000000000000000000000001000000000000000100000000000000000000000000000

In [22]:
automata(150, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000001101011000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010001000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000111011101110000000000000000000000000000000000000000
0000000000000000000000000000000000000001010001000101000000000000000000000000000000000000000
0000000000000000000000000000000000000011011011101101100000000000000000000000000000000000000
0000000000000000000000000000000000000100000001000000010000000000000000000000000000000000000
0000000000000000000000000000000000001110000011100000111000000000000000000000000000000000000
0000000000000000000000000000000000010101000101010001010100000000000000000000000000000000000
0000000000000000000000000000000000110101101101011011010110000000000000000000000000000000000
0000000000000000000000000000000001000100000001000000010001000000000000000000000000000000000
0000000000000000000000000000000011101110000011100000111011100000000000000000000000000000000
0000000000000000000000000000000101000101000101010001010001010000000000000000000000000000000
0000000000000000000000000000001101101101101101011011011011011000000000000000000000000000000
0000000000000000000000000000010000000000000001000000000000000100000000000000000000000000000
0000000000000000000000000000111000000000000011100000000000001110000000000000000000000000000
0000000000000000000000000001010100000000000101010000000000010101000000000000000000000000000
0000000000000000000000000011010110000000001101011000000000110101100000000000000000000000000
0000000000000000000000000100010001000000010001000100000001000100010000000000000000000000000
0000000000000000000000001110111011100000111011101110000011101110111000000000000000000000000
0000000000000000000000010100010001010001010001000101000101000100010100000000000000000000000
0000000000000000000000110110111011011011011011101101101101101110110110000000000000000000000
0000000000000000000001000000010000000000000001000000000000000100000001000000000000000000000
0000000000000000000011100000111000000000000011100000000000001110000011100000000000000000000
0000000000000000000101010001010100000000000101010000000000010101000101010000000000000000000
0000000000000000001101011011010110000000001101011000000000110101101101011000000000000000000
0000000000000000010001000000010001000000010001000100000001000100000001000100000000000000000
0000000000000000111011100000111011100000111011101110000011101110000011101110000000000000000
0000000000000001010001010001010001010001010001000101000101000101000101000101000000000000000
0000000000000011011011011011011011011011011011101101101101101101101101101101100000000000000
0000000000000100000000000000000000000000000001000000000000000000000000000000010000000000000
0000000000001110000000000000000000000000000011100000000000000000000000000000111000000000000
0000000000010101000000000000000000000000000101010000000000000000000000000001010100000000000
0000000000110101100000000000000000000000001101011000000000000000000000000011010110000000000
0000000001000100010000000000000000000000010001000100000000000000000000000100010001000000000
0000000011101110111000000000000000000000111011101110000000000000000000001110111011100000000
0000000101000100010100000000000000000001010001000101000000000000000000010100010001010000000
0000001101101110110110000000000000000011011011101101100000000000000000110110111011011000000
0000010000000100000001000000000000000100000001000000010000000000000001000000010000000100000
0000111000001110000011100000000000001110000011100000111000000000000011100000111000001110000
0001010100010101000101010000000000010101000101010001010100000000000101010001010100010101000
0011010110110101101101011000000000110101101101011011010110000000001101011011010110110101100
0100010000000100000001000100000001000100000001000000010001000000010001000000010000000100010
1110111000001110000011101110000011101110000011100000111011100000111011100000111000001110111
0100010100010101000101000101000101000101000101010001010001010001010001010001010100010100010
1110110110110101101101101101101101101101101101011011011011011011011011011011010110110110111
0100000000000100000000000000000000000000000001000000000000000000000000000000010000000000010
1110000000001110000000000000000000000000000011100000000000000000000000000000111000000000111
0101000000010101000000000000000000000000000101010000000000000000000000000001010100000001010
1101100000110101100000000000000000000000001101011000000000000000000000000011010110000011011
0000010001000100010000000000000000000000010001000100000000000000000000000100010001000100000
0000111011101110111000000000000000000000111011101110000000000000000000001110111011101110000
0001010001000100010100000000000000000001010001000101000000000000000000010100010001000101000
0011011011101110110110000000000000000011011011101101100000000000000000110110111011101101100
0100000001000100000001000000000000000100000001000000010000000000000001000000010001000000010
1110000011101110000011100000000000001110000011100000111000000000000011100000111011100000111
0101000101000101000101010000000000010101000101010001010100000000000101010001010001010001010
1101101101101101101101011000000000110101101101011011010110000000001101011011011011011011011
0000000000000000000001000100000001000100000001000000010001000000010001000000000000000000000
0000000000000000000011101110000011101110000011100000111011100000111011100000000000000000000
0000000000000000000101000101000101000101000101010001010001010001010001010000000000000000000
0000000000000000001101101101101101101101101101011011011011011011011011011000000000000000000
0000000000000000010000000000000000000000000001000000000000000000000000000100000000000000000
0000000000000000111000000000000000000000000011100000000000000000000000001110000000000000000
0000000000000001010100000000000000000000000101010000000000000000000000010101000000000000000
0000000000000011010110000000000000000000001101011000000000000000000000110101100000000000000
0000000000000100010001000000000000000000010001000100000000000000000001000100010000000000000
0000000000001110111011100000000000000000111011101110000000000000000011101110111000000000000
0000000000010100010001010000000000000001010001000101000000000000000101000100010100000000000
0000000000110110111011011000000000000011011011101101100000000000001101101110110110000000000
0000000001000000010000000100000000000100000001000000010000000000010000000100000001000000000
0000000011100000111000001110000000001110000011100000111000000000111000001110000011100000000
0000000101010001010100010101000000010101000101010001010100000001010100010101000101010000000
0000001101011011010110110101100000110101101101011011010110000011010110110101101101011000000
0000010001000000010000000100010001000100000001000000010001000100010000000100000001000100000
0000111011100000111000001110111011101110000011100000111011101110111000001110000011101110000
0001010001010001010100010100010001000101000101010001010001000100010100010101000101000101000
0011011011011011010110110110111011101101101101011011011011101110110110110101101101101101100
0100000000000000010000000000010001000000000001000000000001000100000000000100000000000000010

In [23]:
automata(89, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100111111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000110100000000000000000000000000000000000000000001
0111111111111111111111111111111111111111110110011111111111111111111111111111111111111111100
0100000000000000000000000000000000000000010111010000000000000000000000000000000000000000111
0011111111111111111111111111111111111111000101001111111111111111111111111111111111111110101
1010000000000000000000000000000000000001110000101000000000000000000000000000000000000010000
0001111111111111111111111111111111111101011110000111111111111111111111111111111111111001111
1101000000000000000000000000000000000100010011110100000000000000000000000000000000001101001
1100111111111111111111111111111111110011001010010011111111111111111111111111111111101100100
1110100000000000000000000000000000011011100001001010000000000000000000000000000000101110011
1010011111111111111111111111111111011010111100100001111111111111111111111111111110001011011
0001010000000000000000000000000001011000100110011101000000000000000000000000000011100011011
1100001111111111111111111111111100011110010111010100111111111111111111111111111010111011011
1111101000000000000000000000000111010011000101000010100000000000000000000000001000101011011
1000100111111111111111111111110101001011110000111000011111111111111111111111100110000011011
0110010100000000000000000000010000100010011110101111010000000000000000000000110111111011011
0111000011111111111111111111001110011001010010001001001111111111111111111110110100001011011
0101111010000000000000000001101011011100001001100100101000000000000000000010110011100011011
0001001001111111111111111101100011010111100101110010000111111111111111111000111010111011011
1100100101000000000000000101111011000100110001011001110100000000000000001110101000101011011
1110010000111111111111110001001011110010111100011101010011111111111111101010000110000011011
1011001110100000000000011100100010011000100111010100001010000000000000100001110111111011011
0011101010011111111111010110011001011110010101000011100001111111111110011101010100001011011
1010100001010000000001000111011100010011000000111010111101000000000011010100000011100011011
0000011100001111111100110101010111001011111110101000100100111111111011000011111010111011011
1111010111101000000110110000000101100010000010000110010010100000001011111010001000101011011
1001000100100111110110111111110001111001111001110111001000011111100010001001100110000011011
0100110010010100010110100000011101001101001101010101100111010000111001100101110111111011011
0010111001000011000110011111010100101100101100000001110101001110101101110001010100001011011
1000101100111011110111010001000010001110001111111101010000101010001101011100000011100011011
0110001110101010010101001100111001101011101000000100001110000001101100010111111010111011011
0111101010000001000000101110101101100010100111110011101011111101101111000100001000101011011
0100100001111100111110001010001101111000010100011010100010000101101001110011100110000011011
0010011101000110100011100001101101001111000011011000011001110001100101011010110111111011011
1001010100110110011010111101101100101001111011011111011101011101110000011000110100001011011
0100000010110111011000100101101110000101001011010001010100010101011111011110110011100011011
0011111000110101011110010001101011110000100011001100000011000000010001010010111010111011011
1010001110110000010011001101100010011110011011101111111011111111001100001000101000101011011
0001101010111111001011101101111001010011011010101000001010000001101111100110000110000011011
1101100000100001100010101101001100001011011000000111100001111101101000110111110111111011011
1101111110011101111000001100101111100011011111110100111101000101100110110100010100001011011
1101000011010101001111101110001000111011010000010010100100110001110110110011000011100011011
1100111011000000101000101011100110101011001111001000010010111101010110111011111010111011011
1110101011111110000110000010110110000011101001100111001000100100000110101010001000101011011
1010000010000011110111111000110111111010100101110101100110010011110110000001100110000011011
0001111001111010010100001110110100001000010001010001110111001010010111111101110111111011011
1101001101001001000011101010110011100111001100001101010101100001000100000101010100001011011
1100101100100100111010100000111010110101101111101100000001111100110011110000000011100011011
1110001110010010101000011110101000110001101000101111111101000110111010011111111010111011011
1011101011001000000111010010000110111101100110001000000100110110101001010000001000101011011
0010100011100111110101001001110110100101110111100111110010110110000100001111100110000011011
1000011010110100010000100101010110010001010100110100011000110111110011101000110111111011011
0111011000110011001110010000000111001100000010110011011110110100011010100110110100001011011
0101011110111011101011001111110101101111111000111011010010110011011000010110110011100011011
0000010010101010100011101000010001101000001110101011001000111011011111000110111010111011011
1111001000000000011010100111001101100111101010000011100110101011010001110110101000101011011
1001100111111111011000010101101101110100100001111010110110000011001101010110000110000011011
0101110100000001011111000001101101010010011101001000110111111011101100000111110111111011011
0001010011111100010001111101101100001001010100100110110100001010101111110100010100001011011
1100001010000111001101000101101111100100000010010110110011100000001000010011000011100011011
1111100001110101101100110001101000110011111001000110111010111111100111001011111010111011011
1000111101010001101110111101100110111010001100110110101000100000110101100010001000101011011
0110100100001101101010100101110110101001101110110110000110011110110001111001100110000011011
0110010011101101100000010001010110000101101010110111110111010010111101001101110111111011011
0111001010101101111111001100000111110001100000110100010101001000100100101101010100001011011
0101100000001101000001101111110100011101111110110011000000100110010010001100000011100011011
0001111111101100111101101000010011010101000010111011111110010111001001101111111010111011011
1101000000101110100101100111001011000000111000101010000011000101100101101000001000101011011
1100111110001010010001110101100011111110101110000001111011110001110001100111100110000011011
1110100011100001001101010001111010000010001011111101001010011101011101110100110111111011011
1010011010111100101100001101001001111001100010000100100001010100010101010010110100001011011
0001011000100110001111101100100101001101111001110010011100000011000000001000110011100011011
1100011110010111101000101110010000101101001101011001010111111011111111100110111010111011011
1111010011000100100110001011001110001100101100011100000100001010000000110110101000101011011
1001001011110010010111100011101011101110001111010111110011100001111110110110000110000011011
0100100010011001000100111010100010101011101001000100011010111101000010110111110111111011011
0010011001011100110010101000011000000010100100110011011000100100111000110100010100001011011
1001011100010110111000000111011111111000010010111011011110010010101110110011000011100011011
0100010111000110101111110101010000001111001000101011010011001000001010111011111010111011011
0011000101110110001000010000001111101001100110000011001011100111100000101010001000101011011

In [24]:
automata(112, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

In [25]:
automata(105, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000101010000000000000000000000000000000000000000001
0011111111111111111111111111111111111111110010100111111111111111111111111111111111111111100
1010000000000000000000000000000000000000010001000100000000000000000000000000000000000000101
0100111111111111111111111111111111111111000100010001111111111111111111111111111111111110010
0000100000000000000000000000000000000001010001000101000000000000000000000000000000000010000
1110001111111111111111111111111111111100100100010010011111111111111111111111111111111000111
1010101000000000000000000000000000000100000001000000010000000000000000000000000000001010101
0101010011111111111111111111111111110001111100011111000111111111111111111111111111100101010
0010100010000000000000000000000000010101000101010001010100000000000000000000000000100010100
1001001000111111111111111111111111001010010010100100101001111111111111111111111110001001001
0000000010100000000000000000000001000100000001000000010001000000000000000000000010100000000
1111111001001111111111111111111100010001111100011111000100011111111111111111111001001111111
1000001000001000000000000000000101000101000101010001010001010000000000000000001000001000001
0011100011100011111111111111110010010010010010100100100100100111111111111111100011100011100
1010101010101010000000000000010000000000000001000000000000000100000000000000101010101010101
0101010101010100111111111111000111111111111100011111111111110001111111111110010101010101010
0010101010101000100000000001010100000000000101010000000000010101000000000010001010101010100
1001010101010010001111111100101001111111110010100111111111001010011111111000100101010101001
0000101010100000101000000100010001000000010001000100000001000100010000001010000010101010000
1110010101001110010011110001000100011111000100010001111100010001000111100100111001010100111
1010001010001010000010010100010001010001010001000101000101000100010100100000101000101000101
0100100100100100111000001001000100100100100100010010010010010001001000001110010010010010010
0000000000000000101011100000010000000000000001000000000000000100000011101010000000000000000
1111111111111110010110101111000111111111111100011111111111110001111010110100111111111111111
1000000000000010001111011001010100000000000101010000000000010101001101111000100000000000001
0011111111111000101001111000101001111111110010100111111111001010001111001010001111111111100
1010000000001010010001001010010001000000010001000100000001000100101001000100101000000000101
0100111111100100000100000100000100011111000100010001111100010000010000010000010011111110010
0000100000100001110001110001110001010001010001000101000101000111000111000111000010000010000
1110001110001101010101010101010100100100100100010010010010010101010101010101011000111000111
1010101010101110101010101010101000000000000001000000000000001010101010101010111010101010101
0101010101011011010101010101010011111111111100011111111111100101010101010101101101010101010
0010101010111111101010101010100010000000000101010000000000100010101010101011111110101010100
1001010101100000110101010101001000111111110010100111111110001001010101010110000011010101001
0000101011101110111010101010000010100000010001000100000010100000101010101110111011101010000
1110010110111011101101010100111001001111000100010001111001001110010101011011101110110100111
1010001111101110111110101000101000001001010001000101001000001010001010111110111011111000101
0100101000111011100011010010010011100000100100010010000011100100100101100011101110001010010
0000010010101110101011100000000010101110000001000000111010100000000011101010111010100100000
1111000001011011010110101111111001011010111100011110101101001111111010110101101101000001111
1001011100111111101111011000001000111101100101010011011110001000001101111011111110011101001
0000110100100000111001111011100010100111100010100011110010100011101111001110000010010110000
1110111000001110101001001110101001000100101001001010010001001010111001001010111000001110111
1011101011101011010000001011010000010000010000000100000100000101101000000101101011101011101
0110110110110111100111100111100111000111000111110001110001110011110011110011110110110110110
0111111111111100100100100100100101010101010100010101010101010010010010010010011111111111110
0100000000000100000000000000000010101010101001001010101010100000000000000000010000000000010
0001111111110001111111111111111001010101010000000101010101001111111111111111000111111111000
1101000000010101000000000000001000101010100111110010101010001000000000000001010100000001011
1110011111001010011111111111100010010101000100010001010100100011111111111100101001111100111
1010010001000100010000000000101000001010010001000100101000001010000000000100010001000100101
0100000100010001000111111110010011100100000100010000010011100100111111110001000100010000010
0001110001000100010100000010000010100001110001000111000010100000100000010100010001000111000
1101010100010001001001111000111001001101010100010101011001001110001111001001000100010101011
1110101001000100000001001010101000001110101001001010111000001010101001000000010001001010111
1011010000010001111100000101010011101011010000000101101011100101010000011111000100000101101
0111100111000101000101110010100010110111100111110011110110100010100111010001010001110011110
0100100101010010010011010001001001111100100100010010011111001001000101100100100101010010010
0000000010100000000011100100000001000100000001000000010001000000010011100000000010100000000
1111111001001111111010100001111100010001111100011111000100011111000010101111111001001111111
1000001000001000001101001101000101000101000101010001010001010001011001011000001000001000001
0011100011100011101110001110010010010010010010100100100100100100111000111011100011100011100
1010101010101010111010101010000000000000000001000000000000000000101010101110101010101010101
0101010101010101101101010100111111111111111100011111111111111110010101011011010101010101010
0010101010101011111110101000100000000000000101010000000000000010001010111111101010101010100
1001010101010110000011010010001111111111110010100111111111111000100101100000110101010101001
0000101010101110111011100000101000000000010001000100000000001010000011101110111010101010000
1110010101011011101110101110010011111111000100010001111111100100111010111011101101010100111
1010001010111110111011011010000010000001010001000101000000100000101101101110111110101000101
0100100101100011101111111100111000111100100100010010011110001110011111111011100011010010010
0000000011101010111000000100101010100100000001000000010010101010010000001110101011100000000
1111111010110101101011110000010101000001111100011111000001010100000111101011010110101111111
1000001101111011110110010111001010011101000101010001011100101001110100110111101111011000001
0011101111001110011110001101000100010110010010100100110100010001011000111100111001111011100
1010111001001010010010101110010001001110000001000000111001000100111010100100101001001110101
0101101000000100000001011010000100001010111100011110101000010000101101000000010000001011010
0011110011110001111100111100110001100101100101010011010011000110011110011111000111100111100
1010010010010101000100100100110101100011100010100011100011010110010010010001010100100100101
0100000000001010010000000000111011101010101001001010101011101110000000000100101000000000010

In [26]:
automata(1, 45, 80)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000


What if the rule changes each generation?

In [28]:
def automata_ruleplus(rule, n, gens, ruleplus):
cells = initialize_cells(n)
print(cells)
for _ in range(gens):
cells = evolve(cells, rule)
print(cells)
rule += ruleplus

In [29]:
automata_ruleplus(112, 45, 80, 1)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111110011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000001
1111111111111111111111111111111111111111111100111111111111111111111111111111111111111111110
0000000000000000000000000000000000000000000110000000000000000000000000000000000000000000011
1111111111111111111111111111111111111111110011111111111111111111111111111111111111111111001
0000000000000000000000000000000000000000011100000000000000000000000000000000000000000001111
1111111111111111111111111111111111111111100111111111111111111111111111111111111111111110001
1000000000000000000000000000000000000000110100000000000000000000000000000000000000000011000
0111111111111111111111111111111111111110111011111111111111111111111111111111111111111011111
1100000000000000000000000000000000000011101110000000000000000000000000000000000000001110001
1111111111111111111111111111111111111110111011111111111111111111111111111111111111111011110
1000000000000000000000000000000000000011101110000000000000000000000000000000000000001110011
1111111111111111111111111111111111111010111011111111111111111111111111111111111111101011011
1000000000000000000000000000000000001111101110000000000000000000000000000000000000111111111
1111111111111111111111111111111111111000111011111111111111111111111111111111111111100000001
0111111111111111111111111111111111110000010001111111111111111111111111111111111111000000000
0011111111111111111111111111111111100111000100111111111111111111111111111111111110011111111
0101111111111111111111111111111111001010001001011111111111111111111111111111111100101111110
1000111111111111111111111111111110010000110010001111111111111111111111111111111001000111100
1000011111111111111111111111111100010000000010000111111111111111111111111111110001000011000
1011001111111111111111111111111001010111111010110011111111111111111111111111100101011000011
1000010111111111111111111111110011010011110010000101111111111111111111111111001101000000100
1011110011111111111111111111100100010101100110111100111111111111111111111110010001011111101
0011100011111111111111111111000000000001000100111000111111111111111111111100000000011111000
1011001011111111111111111110011111111100010000110010111111111111111111111001111111011110011
0010010011111111111111111100111111111000100001100100111111111111111111110011111110011100110
1100100111111111111111111001111111110011001111001001111111111111111111100111111100111001100
1000100111111111111111110001111111100010001110001001111111111111111111000111111000110001000
1010100111111111111111100101111111001010101100101001111111111111111110010111110010100101011
1010101111111111111111001101111110011010101001101011111111111111111100110111100110101101010
1010101111111111111110011001111100110010101011001011111111111111111001100111001100101001010
0000000111111111111101000100111010001000000000100001111111111111110100010010100010000100001
1111110011111111111000110010010001100111111110011100111111111111100011001000011001110011100
0111101101111111110101001101101010011011111101101011011111111111010100110100100110101101010
1011000000111111100000110000000001100001111000000000001111111110000011000011011000000000001
1000100000011111010000001000000000010000110100000000000111111101000000100000000100000000001
1110111111001110011111101111111111011110000111111111110011111001111110111111110111111111101
0100011110110101101111000111111110001101001011111111101101110110111100011111100011111111001
1111101100000100000110111011111101110001111001111111000000100000011011101111011101111110111
1111001010000010000100110011111001101001110101111110100000010000010011001110011001111100110
1110100001111001110010101011110101000101100001111100011111001111001010101101010101111010101
1100010011110111101100000011100000101001010011111010111110111110110000001000000001110000000
1011101111100111001011111111011111000110001111110000111100111100101111110111111111101111111
1011001111010110101011111110011110100101001111101000111010111010101111100111111111001111110
1010101110010100101011111101011100110101101111001110110010110010101111010111111110101111101
1010101101110111101011111001011011100101001110111100101110101110101110010111111100101111001
1010101001100111001011110111010011011101111100111011101100101100101101110111111011101110111
0101010000000010000101101010100000101010111000010101010000010000010010101011110101010101010
0010100111111000110010010101001110010101010011001010100111000111000001010101101010101010100
0101001011110001000100101010010100101010100100010101001010001010000010101010010101010101000
1010010101100110011001010100101001010101001001101010010100110100111101010100101010101010011
1110011110000000000001111100111001111111001000011110011100001100011011111100111111111110000
0100001100111111111100111000010000111110001011001100001001100001000101111000011111111100111
1100010001011111111001010000110001011100011100010000011010000011001110110000101111111001010
0001110111101111110011110111000111101001101001110111100110111100010101000111110111110011110
0001101111011111100011101110000111010001010001101111000101111000001010000111101111100011100
1101011110111111001011011100110110100100100101011110010011110011100100110111011111001011001
1010111101111110010110111001101101001001001010111100100111100111001001101110111110010110010
0101111011111100101101110011011010010010010101111001001111001110010011011101111100101100100
0111110111111000111011100010110110010010011111110001001110001100010010111011111000111000100
0111101111110010110111001011101100010010011111100101001100101001010011110111110010110010101
1111011111100111101110011111011000110110111111001111011001111011110111101111100111100111111
1110111111001111011100111110110011101101111110011110110011110111101111011111001111001111110
0101011110100110101010011101001001010010111101001101001001101011010110101110100110100111101
0010101101010001010101001010100100101001011010100010100100010100101001010101010001010011010
0101010010101010101010110101011011010110100101010101011010101011010110101010101010101100101
1010101101010101010101001010100100101001011010101010100101010100101001010101010101010011010
1111110011111111111111101111110110111101100111111111110111111110111101111111111111111000111
0111101001111111111111010111101001011010010011111111101011111101011010111111111111110110010
1011011110111111111110111011011111100111111101111111011101111011100111011111111111101001111
1100101101011111111101010100101111011011111010111110101010110101011010101111111111011110110
1010011010111111111010101010011110110111110101111101010101101010110101011111111110111101101
0101010101111111110101010101011101101111101011111010101011010101101010111111111101111011010
1010101011111111101010101010111011011111010111110101010110101011010101111111111011110110101
0101010111111111010101010101110110111110101111101010101101010110101011111111110111101101010
0111111111111110111111111111101101111101111111011111111011111101111111111111101111011011111
0111111111111101111111111111011011111011111110111111110111111011111111111111011110110111110
1111111111111011111111111110110111110111111101111111101111110111111111111110111101101111101
1111111111110111111111111101101111101111111011111111011111101111111111111101111011011111011

In [30]:
automata_ruleplus(10, 45, 80, 2)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000010110000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000110001000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000101000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000001000101010000000000000000000000000000000000000000
0000000000000000000000000000000000000000001100101011000000000000000000000000000000000000000
0000000000000000000000000000000000000000011011101010100000000000000000000000000000000000000
0000000000000000000000000000000000000000000100010101000000000000000000000000000000000000000
0000000000000000000000000000000000000000001000101010000000000000000000000000000000000000000
0000000000000000000000000000000000000000001000111110000000000000000000000000000000000000000
0000000000000000000000000000000000000000011001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000111100000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001000010000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000100001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010010100000000000000000000000000000000000000000000
0000000000000000000000000000000000000001111011110000000000000000000000000000000000000000000
0000000000000000000000000000000000000011000110001000000000000000000000000000000000000000000
0000000000000000000000000000000000000001000010000000000000000000000000000000000000000000000
0000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000
0000000000000000000000000000000000000010000100000000000000000000000000000000000000000000000
0000000000000000000000000000000000000110001100000000000000000000000000000000000000000000000
0000000000000000000000000000000000000110001100000000000000000000000000000000000000000000000
0000000000000000000000000000000000001110011100000000000000000000000000000000000000000000000
0000000000000000000000000000000000001010010100000000000000000000000000000000000000000000000
0000000000000000000000000000000000011010110100000000000000000000000000000000000000000000000
0000000000000000000000000000000000001000010010000000000000000000000000000000000000000000000
0000000000000000000000000000000000010100101101000000000000000000000000000000000000000000000
0000000000000000000000000000000000010110100101100000000000000000000000000000000000000000000
0000000000000000000000000000000000110010111100110000000000000000000000000000000000000000000
0000000000000000000000000000000000111000100110111000000000000000000000000000000000000000000
0000000000000000000000000000000001101101011110101100000000000000000000000000000000000000000
0000000000000000000000000000000001101101010010101110000000000000000000000000000000000000000
0000000000000000000000000000000011101101011110101011000000000000000000000000000000000000000
0000000000000000000000000000000000110110100011010101000000000000000000000000000000000000000
0000000000000000000000000000000001011011000101101010000000000000000000000000000000000000000
0000000000000000000000000000000001101101000110111110000000000000000000000000000000000000000
0000000000000000000000000000000010110111001011000010000000000000000000000000000000000000000
0000000000000000000000000000000001111101000111000000000000000000000000000000000000000000000
0000000000000000000000000000000011000110001101000000000000000000000000000000000000000000000
0000000000000000000000000000000011000110001111000000000000000000000000000000000000000000000
0000000000000000000000000000000111001110011001000000000000000000000000000000000000000000000
0000000000000000000000000000000001100011001100100000000000000000000000000000000000000000000
0000000000000000000000000000000010110101110111010000000000000000000000000000000000000000000
0000000000000000000000000000000011011110011001111000000000000000000000000000000000000000000
0000000000000000000000000000000101100011101110001100000000000000000000000000000000000000000
0000000000000000000000000000000011110010111011001110000000000000000000000000000000000000000
0000000000000000000000000000000110011101101111111011000000000000000000000000000000000000000
0000000000000000000000000000000111010111111000001111100000000000000000000000000000000000000
0000000000000000000000000000001101111100001100011000110000000000000000000000000000000000000
0000000000000000000000000000000000111000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000011010000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000101100000000000000000000000000000000000000000000000000000000
0000000000000000000000000000001100010000000000000000000000000000000000000000000000000000000
0000000000000000000000000000001010001000000000000000000000000000000000000000000000000000000
0000000000000000000000000000010001010100000000000000000000000000000000000000000000000000000
0000000000000000000000000000011001010110000000000000000000000000000000000000000000000000000
0000000000000000000000000000110111010101000000000000000000000000000000000000000000000000000
0000000000000000000000000000001010101010000000000000000000000000000000000000000000000000000
0000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000
0000000000000000000000000000011111111100000000000000000000000000000000000000000000000000000
0000000000000000000000000000101111111000000000000000000000000000000000000000000000000000000
0000000000000000000000000000011111110000000000000000000000000000000000000000000000000000000

In [31]:
automata_ruleplus(48, 45, 80, 5)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111110111111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000001
1111111111111111111111111111111111111111111100011111111111111111111111111111111111111111100
1000000000000000000000000000000000000000000100110000000000000000000000000000000000000000100
0111111111111111111111111111111111111111111011011111111111111111111111111111111111111111011
0100000000000000000000000000000000000000001011010000000000000000000000000000000000000001011
0111111111111111111111111111111111111111101011011111111111111111111111111111111111111101011
1000000000000000000000000000000000000000110101100000000000000000000000000000000000000110101
1011111111111111111111111111111111111111011110101111111111111111111111111111111111111011111
1110000000000000000000000000000000000001110011111000000000000000000000000000000000001110001
0011111111111111111111111111111111111100011000001111111111111111111111111111111111100011100
0100000000000000000000000000000000000110101100010000000000000000000000000000000000110100110
1011111111111111111111111111111111111111011111101111111111111111111111111111111111111011111
0001111111111111111111111111111111111110001111000111111111111111111111111111111111110001110
1100111111111111111111111111111111111100100110010011111111111111111111111111111111100100100
1001111111111111111111111111111111111001001100100111111111111111111111111111111111001001000
1011111111111111111111111111111111110011011001101111111111111111111111111111111110011011011
1001111111111111111111111111111111101000000100000111111111111111111111111111111101000000000
0101111111111111111111111111111111000111110011110111111111111111111111111111111000111111111
1101111111111111111111111111111110101111101111100111111111111111111111111111110101111111110
0010111111111111111111111111111101010111010111001011111111111111111111111111101010111111100
0001111111111111111111111111111010101110101110000111111111111111111111111111010101111111000
1101111111111111111111111111110111111101111100110111111111111111111111111110111111111110011
0010111111111111111111111111101011111010111011001011111111111111111111111101011111111101100
1111011111111111111111111111011101110111010100111101111111111111111111111011101111111010011
1110111111111111111111111110111011101110111110111011111111111111111111110111011111110111010
0110011111111111111111111110011001100110011110011001111111111111111111110011001111110011000
1010101111111111111111111110101010101010101110101010111111111111111111110101010111110101000
0000001111111111111111111110000000000000001110000000111111111111111111110000000111110000011
0000000111111111111111111111000000000000000111000000011111111111111111111000000011111000001
1111110011111111111111111111111111111111110011111111001111111111111111111111111001111111101
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0011111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
1101111111111111111111111111111111111111111111111111111111111111111111111111111111111111100
0000111111111111111111111111111111111111111111111111111111111111111111111111111111111111000
0000111111111111111111111111111111111111111111111111111111111111111111111111111111111110000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111100111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111000110
0111111111111111111111111111111111111111111111111111111111111111111111111111111111110100001
1011111111111111111111111111111111111111111111111111111111111111111111111111111111100010010
1001111111111111111111111111111111111111111111111111111111111111111111111111111111011011011
1110111111111111111111111111111111111111111111111111111111111111111111111111111110000000000
1100111111111111111111111111111111111111111111111111111111111111111111111111111101000000000
1010111111111111111111111111111111111111111111111111111111111111111111111111111001100000000
1010111111111111111111111111111111111111111111111111111111111111111111111111110111011111111
0101011111111111111111111111111111111111111111111111111111111111111111111111101010101111110
0111101111111111111111111111111111111111111111111111111111111111111111111111011111110111100
1011010111111111111111111111111111111111111111111111111111111111111111111110101111101011000
0110101111111111111111111111111111111111111111111111111111111111111111111101011111010110011
1101011111111111111111111111111111111111111111111111111111111111111111111010111110101100110
1011111111111111111111111111111111111111111111111111111111111111111111110111111101111001100
0101111111111111111111111111111111111111111111111111111111111111111111101011111010110100010
1010111111111111111111111111111111111111111111111111111111111111111111010101110101001011101
1111011111111111111111111111111111111111111111111111111111111111111110111110101111101101011
1110111111111111111111111111111111111111111111111111111111111111111101111101011111011010110
1101111111111111111111111111111111111111111111111111111111111111111011111010111110110101101
1011111111111111111111111111111111111111111111111111111111111111110111110111111101101111011
1111111111111111111111111111111111111111111111111111111111111111101111101111111011011110110
0111111111111111111111111111111111111111111111111111111111111111100111100111111001001110010
0011111111111111111111111111111111111111111111111111111111111111100011100011111001000110010
1101111111111111111111111111111111111111111111111111111111111111101101101101111011011010110
1101111111111111111111111111111111111111111111111111111111111111101101101101111011011000110
1101111111111111111111111111111111111111111111111111111111111111101101101101111011011000110
1101111111111111111111111111111111111111111111111111111111111111101101101101111011011001110
0100111111111111111111111111111111111111111111111111111111111111100100100100111001001100111
1011011111111111111111111111111111111111111111111111111111111111111011011011011110110111011
1001001111111111111111111111111111111111111111111111111111111111111001001001001110010011001
0100101111111111111111111111111111111111111111111111111111111111111100100100101111001011100
1011001111111111111111111111111111111111111111111111111111111111111111011011001111110011111
1011101111111111111111111111111111111111111111111111111111111111111111011011101111111011111

In [32]:
import random
def automata_random(n, gens):
cells = initialize_cells(n)
print(cells)
for _ in range(gens):
cells = evolve(cells, random.randint(0, 255))
print(cells)

In [33]:
automata_random(45, 40)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000110010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000101001000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111010010011111111111111111111111111111111111111111
1000000000000000000000000000000000000000000101001010000000000000000000000000000000000000000
1111111111111111111111111111111111111111111101111011111111111111111111111111111111111111111
1111111111111111111111111111111111111111111011110111111111111111111111111111111111111111110
0000000000000000000000000000000000000000001100011000000000000000000000000000000000000000010
0000000000000000000000000000000000000000011000110000000000000000000000000000000000000000110
0000000000000000000000000000000000000000010100101000000000000000000000000000000000000000101
0000000000000000000000000000000000000000001000010000000000000000000000000000000000000000010
1111111111111111111111111111111111111111111011110111111111111111111111111111111111111111110
1111111111111111111111111111111111111111111011110111111111111111111111111111111111111111110
1000000000000000000000000000000000000000001010010100000000000000000000000000000000000000011
1100000000000000000000000000000000000000001011010110000000000000000000000000000000000000010
1011111111111111111111111111111111111111110010000101111111111111111111111111111111111111101
0110000000000000000000000000000000000000001001000011000000000000000000000000000000000000010
1111000000000000000000000000000000000000010110100111100000000000000000000000000000000000101
0001111111111111111111111111111111111111100010011000111111111111111111111111111111111111000
0010000000000000000000000000000000000000110111101101000000000000000000000000000000000001100
1000111111111111111111111111111111111110100100001000011111111111111111111111111111111101001
0110011111111111111111111111111111111110010011100111001111111111111111111111111111111100100
1010101111111111111111111111111111111110100101101011010111111111111111111111111111111101000
1010101000000000000000000000000000000000101101001010010100000000000000000000000000000001011
1010101000000000000000000000000000000001100001011010110100000000000000000000000000000011000
0101010100000000000000000000000000000010010010100101001010000000000000000000000000000100100
1111111101111111111111111111111111111110110111101111011110111111111111111111111111111101101
0111111110111111111111111111111111111111011011110111101111011111111111111111111111111110110
0111111101111111111111111111111111111110110111101111011110111111111111111111111111111101100
0011111110111111111111111111111111111111011011110111101111011111111111111111111111111110111
1011111110111111111111111111111111111111011011110111101111011111111111111111111111111110111
0111111101111111111111111111111111111110110111101111011110111111111111111111111111111101110
1011111110111111111111111111111111111111011011110111101111011111111111111111111111111110110
0010000010100000000000000000000000000001011010010100101001010000000000000000000000000010110
0010000011100000000000000000000000000001111110011100111001110000000000000000000000000011110
0100000100100000000000000000000000000010000010100101001010010000000000000000000000000100010
1101111101101111111111111111111111111110111111101111011110110111111111111111111111111101110
0010111010010111111111111111111111111101011111010110101101001011111111111111111111111010101
1111011110111011111111111111111111111111101111111011110111011101111111111111111111111111111
0110001100010001111111111111111111111111000111110001100010001000111111111111111111111111110

In [34]:
automata_random(45, 40)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111100111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111100011111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000
0111111111111111111111111111111111111111111101011111111111111111111111111111111111111111111
0100000000000000000000000000000000000000000101010000000000000000000000000000000000000000001
1011111111111111111111111111111111111111111000001111111111111111111111111111111111111111110
0101111111111111111111111111111111111111110111100111111111111111111111111111111111111111101
1011111111111111111111111111111111111111101111011111111111111111111111111111111111111111010
1100000000000000000000000000000000000000010000100000000000000000000000000000000000000000111
0100000000000000000000000000000000000000100001000000000000000000000000000000000000000001001
0001111111111111111111111111111111111110001100011111111111111111111111111111111111111100000
0010111111111111111111111111111111111101010010101111111111111111111111111111111111111010000
1000000000000000000000000000000000000100001000000000000000000000000000000000000000001001111
1011111111111111111111111111111111110101101011111111111111111111111111111111111111101001001
0111111111111111111111111111111111111011110111111111111111111111111111111111111111110110110
0100000000000000000000000000000000001010010100000000000000000000000000000000000000010110111
0110000000000000000000000000000000001011010110000000000000000000000000000000000000010000000
1100000000000000000000000000000000011110111100000000000000000000000000000000000000110000000
0101111111111111111111111111111111100011000101111111111111111111111111111111111111010111111
0111111111111111111111111111111111011010110111111111111111111111111111111111111110111111110
0000000000000000000000000000000000100101001000000000000000000000000000000000000001000000001
0000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111101111111111111111111111111111111111111111111111111111
1000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111001111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111110101111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111110111111111111111111111111111111111111111111111111111
0111111111111111111111111111111111111101111111111111111111111111111111111111111111111111110
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
0110000000000000000000000000000000000000000000000000000000000000000000000000000000000000111

In [35]:
automata_random(45, 40)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0001111111111111111111111111111111111111111000001111111111111111111111111111111111111111111
0010111111111111111111111111111111111111111000010111111111111111111111111111111111111111111
0100111111111111111111111111111111111111110000100111111111111111111111111111111111111111110
1001100000000000000000000000000000000000000111001100000000000000000000000000000000000000000
0001001111111111111111111111111111111111110110001001111111111111111111111111111111111111111
1110010000000000000000000000000000000000010010110010000000000000000000000000000000000000001
1000010111111111111111111111111111111111010010100010111111111111111111111111111111111111101
0111101011111111111111111111111111111111101101011101011111111111111111111111111111111111110
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0101111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
0001111111111111111111111111111111111111111111111111111111111111111111111111111111111111101
1101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1010111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0101100000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0011110011111111111111111111111111111111111111111111111111111111111111111111111111111111111
1110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000110100111111111111111111111111111111111111111111111111111111111111111111111111111111111
1000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

In [36]:
automata_random(45, 40)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111110111111111111111111111111111111111111111111111
0111111111111111111111111111111111111111111101011111111111111111111111111111111111111111110
1111111111111111111111111111111111111111111011111111111111111111111111111111111111111111100
0111111111111111111111111111111111111111111001111111111111111111111111111111111111111111101
0111111111111111111111111111111111111111111101111111111111111111111111111111111111111111101
1000000000000000000000000000000000000000000110000000000000000000000000000000000000000000111
0011111111111111111111111111111111111111111000111111111111111111111111111111111111111111000
1111111111111111111111111111111111111111111011111111111111111111111111111111111111111111011
0111111111111111111111111111111111111111111001111111111111111111111111111111111111111111001
0100000000000000000000000000000000000000000101000000000000000000000000000000000000000000101
0100000000000000000000000000000000000000000111000000000000000000000000000000000000000000111
0010000000000000000000000000000000000000000111100000000000000000000000000000000000000000111
0111000000000000000000000000000000000000001100110000000000000000000000000000000000000001101
1011100000000000000000000000000000000000010111011000000000000000000000000000000000000010101
0010010000000000000000000000000000000000100100010100000000000000000000000000000000000100000
0110110000000000000000000000000000000001101100110100000000000000000000000000000000001100000
1101100111111111111111111111111111111111011001101001111111111111111111111111111111111001111
1101101111111111111111111111111111111111011011101011111111111111111111111111111111111011111
0100100111111111111111111111111111111111001001101001111111111111111111111111111111111001111
1111111111111111111111111111111111111110111111011111111111111111111111111111111111110111110
0000000000000000000000000000000000000011000001100000000000000000000000000000000000011000010
0000000000000000000000000000000000000100000010000000000000000000000000000000000000100000100
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1011111111111111111111111111111111111111111111111111111111111111111111111111111111111111101
0101111111111111111111111111111111111111111111111111111111111111111111111111111111111111110
0110000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


## Future ideas¶

1. what about different starting seeds than just the middle of the board?
2. can we make a moving picture, instead of new lines of text? Then you can see the things moving (i.e. conway's game of life)
3. starting seeds, then randomized?
4. list of rules to repeat?
5. 2-d automata?
6. don't use 1s and 0s, use * and - or something?
In [37]:
automata(62, 45, 40)

0000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000011100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000110010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000001101111000000000000000000000000000000000000000000
0000000000000000000000000000000000000000011011000100000000000000000000000000000000000000000
0000000000000000000000000000000000000000110110101110000000000000000000000000000000000000000
0000000000000000000000000000000000000001101101111001000000000000000000000000000000000000000
0000000000000000000000000000000000000011011011000111100000000000000000000000000000000000000
0000000000000000000000000000000000000110110110101100010000000000000000000000000000000000000
0000000000000000000000000000000000001101101101111010111000000000000000000000000000000000000
0000000000000000000000000000000000011011011011000111100100000000000000000000000000000000000
0000000000000000000000000000000000110110110110101100011110000000000000000000000000000000000
0000000000000000000000000000000001101101101101111010110001000000000000000000000000000000000
0000000000000000000000000000000011011011011011000111101011100000000000000000000000000000000
0000000000000000000000000000000110110110110110101100011110010000000000000000000000000000000
0000000000000000000000000000001101101101101101111010110001111000000000000000000000000000000
0000000000000000000000000000011011011011011011000111101011000100000000000000000000000000000
0000000000000000000000000000110110110110110110101100011110101110000000000000000000000000000
0000000000000000000000000001101101101101101101111010110001111001000000000000000000000000000
0000000000000000000000000011011011011011011011000111101011000111100000000000000000000000000
0000000000000000000000000110110110110110110110101100011110101100010000000000000000000000000
0000000000000000000000001101101101101101101101111010110001111010111000000000000000000000000
0000000000000000000000011011011011011011011011000111101011000111100100000000000000000000000
0000000000000000000000110110110110110110110110101100011110101100011110000000000000000000000
0000000000000000000001101101101101101101101101111010110001111010110001000000000000000000000
0000000000000000000011011011011011011011011011000111101011000111101011100000000000000000000
0000000000000000000110110110110110110110110110101100011110101100011110010000000000000000000
0000000000000000001101101101101101101101101101111010110001111010110001111000000000000000000
0000000000000000011011011011011011011011011011000111101011000111101011000100000000000000000
0000000000000000110110110110110110110110110110101100011110101100011110101110000000000000000
0000000000000001101101101101101101101101101101111010110001111010110001111001000000000000000
0000000000000011011011011011011011011011011011000111101011000111101011000111100000000000000
0000000000000110110110110110110110110110110110101100011110101100011110101100010000000000000
0000000000001101101101101101101101101101101101111010110001111010110001111010111000000000000
0000000000011011011011011011011011011011011011000111101011000111101011000111100100000000000
0000000000110110110110110110110110110110110110101100011110101100011110101100011110000000000
0000000001101101101101101101101101101101101101111010110001111010110001111010110001000000000
0000000011011011011011011011011011011011011011000111101011000111101011000111101011100000000
0000000110110110110110110110110110110110110110101100011110101100011110101100011110010000000
0000001101101101101101101101101101101101101101111010110001111010110001111010110001111000000
0000011011011011011011011011011011011011011011000111101011000111101011000111101011000100000

In [ ]: