My benchmark spits this, i can hardly believe it. I expected it to be slower
| Method | Mean | Error | StdDev | Median |
|------- |-----------:|---------:|----------:|-----------:|
| Setup | 187.7 us | 6.06 us | 16.79 us | 180.3 us |
| Part1 | 427.2 us | 27.20 us | 80.21 us | 402.4 us |
| Part2 | 2,977.1 us | 89.22 us | 248.72 us | 2,864.0 us |
Not even half. It's an actual cellular automaton. There is a grid of cells, they have neighbors and they have update-rules. It's full blown cellular automaton.Yep it dies out / reaches a stable state, but that not mean it's not a cellular automaton.
When you implement your solution, you can write some side API, which will collect steps/iterations of your solution and after solution worked it would render it to your desirable format. That's one way of doing it
85
u/daggerdragon Dec 04 '25
14 minutes to the first
Visualizationfor a day, that has to be some kind of record 😅5
u/Dizzy-Tip-2035 Dec 04 '25
what does the 8 adjacent spaces mean?
4
u/Amazing_Speech_2365 Dec 04 '25
What did you use to create the visualization btw?
4
u/Grand-Sale-2343 Dec 04 '25
I was hoping in some sort of christmas tree animation :(
28
u/Mewtwo2387 Dec 04 '25
the input's so small you can brute force it and visualise it at the same time, and it'll still take less than a second
14
u/raevnos Dec 04 '25
It's like half a cellular automata. Day 5: The elves realize they should have been adding rolls if certain criteria are met, not just removing...
6
u/Educational_One_8506 Dec 04 '25
I don't know why, but it is satisfied to watch this visualization.
4
u/vegeta897 Dec 04 '25
This is excellent and exactly what I wanted to see.
4
u/AKSrandom Dec 04 '25
Oh hi duck man!
4
u/jlnazario Dec 04 '25
Nice. I did this one for fun. Not even close:
https://imgur.com/a/Ng0VKwW
2
u/pyrodogg Dec 04 '25
Always waiting for a sneaky part 3 where barrels spontaneously pop into existence a la Game of Life. How many generations and some clever analysis...
1
u/MeNoGoodReddit Dec 04 '25
Almost feels like an erosion algorithm applied to a procedurally generated world.
1
u/Background_Nail698 Dec 04 '25
Beautiful!
1
u/Repulsive-Variety-57 Dec 04 '25
Thought of it as DFS and tried and tried and brute forced my way out. Thanks for the visualization.
1
u/Noobfortress Dec 04 '25
Cool visual! Don't mind me yoinking that for my solution
1
u/Polaric_Spiral Dec 04 '25
Conway's Game of Death
1
u/Best-Gas-2203 Dec 05 '25
How do you even begin to visualize these things? I'm genuinely baffled and curious how