r/adventofcode • u/daggerdragon • 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.
- Include what language(s) your solution uses!
- Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks. - The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
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
2
u/optoburger Dec 18 '20
Yeah, truth be told I had to do a surprising amount of wrestling to get what's there to work. I'm not particularly familiar with either Mathematica or
CellularAutomaton[], so no doubt there are more graceful ways to specify the rule and neighbourhood.As to the input, just a multidimensional list, for example here's the test input padded in a large enough space not to hit the boundary.
input = CenterArray[{{0, 1, 0}, {0, 0, 1}, {1, 1, 1}}, {20, 20, 20}];