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
 

Rules: no spoilers.

The other rules are made up as we go along.

Share code by link to a forge, home page, pastebin (Eric Wastl has one here) or code section in a comment.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (5 children)

21 Step Counter

Starting this thread having only solved a.

APretty straightforward. Could probably be done in a few lines with the right syntactic sugar.

BThis 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.

[–] [email protected] 2 points 1 year ago

Update on B:

still no solve, howeverThrough 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.

load more comments (4 replies)