this post was submitted on 01 Dec 2023
18 points (100.0% liked)
NotAwfulTech
398 readers
2 users here now
a community for posting cool tech news you don’t want to sneer at
non-awfulness of tech is not required or else we wouldn’t have any posts
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
21 Step Counter
Starting this thread having only solved a.
A
Pretty straightforward. Could probably be done in a few lines with the right syntactic sugar.B
This is some game of life thing that I've never implemented or seen an implementation of, so I am altogether lost.My current code (https://github.com/Fluxward/aoc2023/blob/main/21.dart) has a memoisation based approach but my current ailments are preventing me from really thinking about this properly so I am bowing out until I have the wherewithal.
Update on B:
still no solve, however
Through glancing at someone else's code, I was inspired to just try simulating the A problem beyond 64 steps and seeing the result.Essentially it reaches a (bi stable?) steady state between two numbers, which makes sense- if you can only make single rook steps, then the reachable squares will alternate every cycle.
Don't know if I'll try solve this again tonight but mentally I have now understood the solution.