-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathday11notes.txt
34 lines (22 loc) · 1.09 KB
/
day11notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Part 1
An hybrid of Life and the fish thing?
Day 9 sounds like a good template, with its input matrix.
By the way, the input is very small (10x10), which is worrying somehow
for part 2. Possibly this is expecting a hashlife implementation?
Do we need to add a border as we did on day 9? It may be useful to
avoid range checks at the edges of the matrix, but we'll need to make
sure not to flash those cells. On the other hand, since we won't be
processing them we can initialize them at 0 and be sure they'll never
flash.
Hmm, we may actually update the border cells during the flash phase.
But a border cell starting at 0 can never go above 5 during a single
flash phase, I think. So if we reset them to 0 in the reset phase,
we should be good.
# Part 2
Let's just keep it running to see if it synchronizes soon enough.
I immediately get the right answer for the sample (195).
But my input synchronizer after only 104 steps! Unsurprisingly,
my answer is too low. Weird.
Aah, but my step counter wraps around because I used DEC instead
of DEC2 🤦
And 360 is the right answer! That was surprisingly easy.