Part 3! Wherein we learn about rockets, recursion, and ricocheting items (oh my). And make it to … the end?
Here are all of the commits from part 1 up through part 3.
And here are all of the parts in this series so far:
Part 3! Wherein we learn about rockets, recursion, and ricocheting items (oh my). And make it to … the end?
Here are all of the commits from part 1 up through part 3.
And here are all of the parts in this series so far:
And here we have Part 2! It’s not been that long for you, but since the first part took six months for me to actually get around to writing it… well, this is much better!
Things get a bit more complicated this time, with buttons that can open/close doors and even holes in the floor and BOMBS. But what’s really crazy is how we actually get around to solving how to get to new sublevels this time… and how to take penguins back out of them. Things are getting complicated!
Here are all of the commits from part 1 up through part 2.
And here are all of the parts in this series so far:
Months ago now1, I started playing Gentoo Rescue (after seeing the Aliensrock video). At the core, it’s a Sokoban style puzzle game where you have to guide cute little sliding penguins to their color coded nests… but oh man does it start getting more complicated quickly.
On top of that, it has a really interesting nesting level concept–the level select screens are levels themselves. You can go several ’levels’ deep into levels or eventually further back out. And that’s just with how far I’ve gotten so far…
Full solution for today (spoilers!).
Solve the knapsack problem.
…
…
But really, you are given a set of tiles (which all happen to be some subset of a 3x3) and a set of constraints–a MxN grid and how many of each tile to place. Count how many constraints are possible.
Tiles may be rotated and/or flipped.
Full solution for today (spoilers!).
Given a list of numbers, for each find the two digits in the number which if concatenated make the largest. Sum these values.
For example:
811111111111119should be89.
Woodworm is a cute little PICO-8 puzzle game about a cute little worm… that eats wood. You can play it for free right now right here!
The goal is to turn this:

Into this:

There are a few rules to keep in mind:
The block (and the worm) are affected by gravity
The block can be split by into multiple pieces by eating it completely apart

The worm can crawl up the side of blocks, so long as two (consecutive) segments of the worm are touching walls

And that’s really it.
So let’s solve it!
And so it begins.
It’s a cute little puzzle game about making a donut factory.
It’s a lot like Solving Cosmic Express in that it’s a ‘puzzle on rails’, you are basically routing around the grid from source to target. In the way, we have to go to certain tiles in a certain order (in this case, to apply toppings to our donuts).

Let’s do it!
Full solution for today (spoilers!).
Given a comma delimited list of substrings and a list of strings, count how many of the latter strings can be made up of any (repeating) combination of the former.
Full solution for today (spoilers!).
Implement a virtual machine. The machine will have 3 unbounded signed registers, 8 opcodes (see below), a variable parameter scheme (see below that). You will be given the initial values of the 3 registers and a program. Find the final output.
| Opcode | Instruction | Description | Notes |
|---|---|---|---|
| 0 | adv reg/val | A = A >> OP | |
| 1 | bxl val | B = B ^ OP | |
| 2 | bst reg/val | B = OP & 0b111 | |
| 3 | jnz val | If a =/= 0, jump to LIT | |
| 4 | bxc ignore | B = B ^ C | Still takes param, but ignores it |
| 5 | out reg/val | Output b | Only outputs lowest 3 bits |
| 6 | bdv reg/val | B = A >> OP | Same as adv but writes to b |
| 7 | cdv reg/val | C = A >> OP | Same as adv but writes to c |
For instructions that can take reg/val, 0 to 3 (inclusive) are treated as literal values, 4 is register A, 5 is B, 6, is C, and 7 is an error (should never happen).
For instructions that only take val, it’s always a literal value in the range 0 to 7 (inclusive).
Full solution for today (spoilers!).
Given a result and a list of numbers, determine if any combination of addition (
+) and/or multiplication (*) using all the given numbers in order can return the result. Ignore order of operations.