Source: Day 10: Hoof It
Full solution for today (spoilers!).
Part 1
Given a heightmap (
0
to9
), for each0
count how many9
you can reach on paths that only ever increase height by exactly 1 at a time. Sum these values.
Full solution for today (spoilers!).
Given a heightmap (
0
to9
), for each0
count how many9
you can reach on paths that only ever increase height by exactly 1 at a time. Sum these values.
You’ve probably seen Neil.fun’s Infinite Craft game somewhere on the internet. If not, in a nutshell:
Earth
, Fire
, Water
, and Wind
.Earth + Water = Plant
Plant + Fire = Smoke
Smoke + Smoke = Cloud
That’s… pretty much it, from a gameplay perspective. There’s not really any goal, other than what you set yourself (try to make Cthulhu!). Although if you manage to find something no one has ever made before, you get a neat little note for it!
So wait, what do I mean by ‘something no one has ever seen before’?
Well, if two elements have ever been combined by anyone before, you get a cached response. Barring resets of the game (no idea if / how often this has happened, but I assume it has), if A + B = C
for you, A + B = C
for everyone.
And here’s the fun part: if you find a combination no one has ever found before: Neil.fun
will send the combination out to an LLM to generate the new answer. The specific prompt isn’t public (so far as I know), but essentially what that means is that you have a basically infinite crafting tree1!
So of course seeing something like this I want to automate it. 😄
Given a graph of nodes, some of which have a
pressure
(per tick output value) and an agent that can move through the graph and activate specific nodes (so that they output their per tick value every future tick), what is the maximum total output possible in 30 steps?
Part 1: A network of nodes is defined by a list of lines formatted as such:
2 <-> 0, 3, 4
If you were paying attention when I posted part 2 to GitHub (pegs.rkt), you might have noticed a function I hadn’t talked about: play
Hey, remember that post a few days ago about the Cracker Barrel peg game? Right at the end, I mentioned that there would be a part two, all about how to bend the puzzle at least a bit to your advantage. Basically, rather than finding the first solution to the peg game, we’re going to find all of them. From there, we can determine which moves are easier to win from, which are harder, and which are downright impossible. Let’s do it!
Ever been to Cracker Barrel? Remember that peg game? It seems that rather a few people are interested in how to solve it: Google. Let’s do that.
Here’s another one from /r/dailyprogrammer:
… Your goal is to color a map of these regions with two requirements: 1) make sure that each adjacent department do not share a color, so you can clearly distinguish each department, and 2) minimize these numbers of colors.
Essentially, graph coloring.
Here’s a quick problem from the DailyProgrammer subreddit. Basically, we want to calculate the radius of a graph:
radius(g) = \min\limits_{n_0 \in g} \max\limits_{n_1 \in g} d_g(n_0, n_1)
Another quick one, this time from /r/dailyprogrammer:
Your goal is to write a program that takes in a list of edge-node relationships, and print a directed adjacency matrix for it. Our convention will follow that rows point to columns. Follow the examples for clarification of this convention.