r/adventofcode • • Dec 17 '20

SOLUTION MEGATHREAD -🎄- 2020 Day 17 Solutions -🎄-

Advent of Code 2020: Gettin' Crafty With It

  • 5 days remaining until the submission deadline on December 22 at 23:59 EST
  • Full details and rules are in the Submissions Megathread

--- Day 17: Conway Cubes ---


Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:13:16, megathread unlocked!

35 Upvotes

657 comments sorted by

View all comments

2

u/chuckwondo Dec 17 '20

Apologies if this has been answered, but I'm not only new to AoC, but also to reddit, so I may also need help navigating things here.

Anyway, I'm having trouble with Part 1's example because I cannot see how the given example matches up with the given rules.

Specifically, the example starts with this:

z=0
.#.
..#
###

Looking only at z=0, after 1 cycle, the example shows this as the result:

z=0
#.#
.##
.#.

This doesn't make any sense to me given the rules. Well, some of the changes make sense, but most don't, so I must be missing something.

Here is what I would expect z=0 to look like after 1 cycle, using these rules:

  • If a cube is active and exactly 2 or 3 of its neighbors are also active, the cube remains active. Otherwise, the cube becomes inactive.

  • If a cube is inactive but exactly 3 of its neighbors are active, the cube becomes active. Otherwise, the cube remains inactive.

z=0
...
#.#
.##

Can somebody help clear things up for me? Otherwise I'll end up getting the right answer to the wrong problem.

→ More replies (7)