Closed Arxcis closed 3 years ago
Each cube only ever considers its neighbors: any of the 26 other cubes where any of their coordinates differ by at most 1.
So for t=0, given we start with this at z=0:
.....
..#..
...#.
.###.
.....
Assuming no active for z != 0, then the one at the center of this piece:
..#
...
.##
has 3/28 active neighbours, and turns active.
This one
#..
.#.
##.
Has 3/28 active neighbours, and stays active.
This one
.#.
##.
...
Has only 2/28 active neighbours, but stays active, as it already was active.
The entire grid for z=0 at t=1 then becomes
.....
.....
.#.#.
..##.
..#..
Notice the shift in location, the example in the text doesn't add the padding around that I've done here.
Aha! I was stuck with a 3x3 mindset. The solution for me, which you presented clearly @hypirion - thank you very much, is that I had to think 5x5 from the begnning.
I had a mistake in my initial explanation above, which I have corrected now, which makes it more obvious that the example has shifted it's view one step down. I was not thinking outside the box enough 😅
Corrected:
What I expect z=0 to be after 1 cycle
z=0
...
#.#
.##
Example after 1 cycle
After 1 cycle:
z=0
#.#
.##
.#.
Merry christmas 🎄 🎅
I just don't get this day https://adventofcode.com/2020/day/17
Rules During a cycle, all cubes simultaneously change their state according to the following rules:
Example
My attempt at making sense of it Let's consider z=0 initial state:
And here is me applying the rules for each cell from left to right, top to bottom:
What I expected z=0 to be after 1 cycle
Example after 1 cycle
What Is going on here? I have been completely stuck on this task for several days because I don't get it.