John Godden

Using Excel to Query Historical Currency Exchange Rates

Excel file screenshot

This took much more time to create than it could ever save me. Fortunately, the point was to test & work on some Excel skills, not to save time.

A few key features of this workbook:

read more

3D Print Missing Jigsaw Puzzle Piece

3D Print Puzzle Piece

One of the least “useful” repairs I have done using CAD and a 3D printer.

The puzzle is really no better than before. The real benefit was to me; in learning how to do it.

read more

3D Squares Puzzle by DaMert

3D Squares Puzzle

This puzzle recently emerged from a back corner of our games cabinet. Abandoned years ago, I’m pretty sure we never solved it.

There are 9 tiles to place on the 3x3 board, with the goal of matching all the half-planes between neighboring tiles.

It looks simple enough; how hard could it be to solve?


Two approaches: Brains vs Brawn.

“Brawn” = Brute Force. Test every possibility.

With 9 tiles and 4 rotation options each, the number of unique plays is surprisingly large.

(9! x 4^9) = 95.1 Billion possibilities.

If someone actually attempted to try every possibility by hand, they would almost certainly die of old age without finding a solution. As one Amazon reviewer pointed out, even if you could try one every second it would require over 3,000 years to check them all.

Even a computer program could take a long time to evaluate that many plays. My old PC from 2010 can evaluate about 20,000 plays per second using python, so it would take almost two months to finish. This could be improved to some extent with a faster computer or a more efficient program, but I’m more interested in finding fundamentally better strategies to solve the puzzle.

“Brains” = Get Smart. Don’t test what can’t work.

Here, we skip the possibilities which we can forsee won’t produce a solution.

Begin the play on the center square of the 3x3 board, and don’t rotate any tiles placed there. Rotating this tile would not find any new solutions, beyond what you would get by simply rotating the whole board.

Then place the 2nd through 9th tiles, but only if they match to the tiles already on the board. This builds a solution branch, to be abandoned if no next match is found.

Keep trying branches (and abandoning any that dead-end) until all possible branches have been tested.

It turns out that this eliminates almost all of the brute-force possibilities, requiring only 445 tile placements onto the board to check for all possible solutions. This a HUGE reduction in effort required. A python program using this method finishes in less than 1/20 of a second on my computer.

I suspect this approach would be reasonable to do by hand. 445 tile placements, at 15 seconds each to allow time for keeping track of the plan, would be about 2 hours.

This is the fastest method I can think of, and I would love to know if there’s a way to solve it even faster.


Solutions

Here are the only solutions I have found. They are very similar, with just two corner tiles swapped between them.

solution 1

solution 2

I wonder why they designed it with two almost identical solutions - is it not possible to have just one?

read more

Prusa Preheat

Using a GCODE file to preheat

Here’s an easy way to set preheat temperatures on a Prusa.

Keep a file on an SD card to set your desired preheat temps, and “print” it from the Prusa menu. For example:

PETG preheat 170 & 75C.gcode

M104 S170 ; set hotend temp to 170C, and continue without waiting
M140 S75 ; set bed temp to 75C, and continue without waiting
M84 ; disable motors to prevent popup showing that file is incomplete
M73 P100 R0 ; set print progress to 100% and time remaining to 0

170 and 75C work well with my i3 MK3. The nozzle won’t drool much, and when the print is launched both bed and nozzle will reach the final temps at about the same time.

read more