Unable to load image

rDrama Advent of Code Day 14: Hump Day Edition

Summary for those just joining us:

Advent of Code is an annual Christmas themed coding challenge that runs from December 1st until christmas. Each day the coding problems get progressively harder. We have a leaderboard and pretty good turnout, so feel free to hop in at any time and show your stuff!

Whether you have a single line monstrosity or a beautiful phone book sized stack of OOP code, you can export it in a nice little image for sharing at https://carbon.vercel.app

What did you think about today's problem?

https://adventofcode.com/2023

Our Code is 2416137-393b284c (No need to share your profile, you have the option to join anonymously if you don't want us to see your github)

18
Jump in the discussion.

No email address required.

Figured that the grid would repeat it's position every n cycles, but no, it just stays constant eventually :marseyshrug:

Jump in the discussion.

No email address required.

Mine had a cycle length of 26.

edit: the example grid has a cycle with 7 steps.

Jump in the discussion.

No email address required.

Lucky bastard mine took 180 cycles before it stabilized with a period of 14

Jump in the discussion.

No email address required.

Watching it go was kinda nerve-racking, especially when it stopped doing print(c, len(hashes)) and went on to run the cycle for the last time after two minutes or so.

edit: especially especially because the last part of the code was this

    cycle_len = c - hashes[h]
    print(cycle_len)
    target_cycles -= c + 1
    target_cycles %= cycle_len
    for c in range(target_cycles):
        cycle()

... and I was, like, where's the complementary "- 1", it should be there for symmetry, aaaaaaahh ok let's run and submit whatever it outputs.

I guess we should've implemented a faster fall down routine, like get all stones sorted by northerness and place each down immediately.

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.