Skip to content

Penguin Coding 9: Ice Sled Mystery Cache

Hidden : 6/30/2024
Difficulty:
4.5 out of 5
Terrain:
1.5 out of 5

Size: Size:   micro (micro)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:


Penguin Pablo has recently been really honing his programming skills, and is here pushing his new series, the Penguin Coding series. His puzzle inspiration is varied, but he was recently seen struggling through another polar-themed puzzle event, the yearly Advent of Code challenge, though studying those is not at all required.

Unlike the Penguencoding series, there is no D1, but the series should roughly start easier, and progressively get tougher, with some of the early ones as practice for future ones. But fear not! Pablo is a generous sort, and is very free with hints - or at least after the FTF!

No particular language is required! Only the answer is needed. Typically once you've completed the coding the coordinates should be obvious, but perhaps you'll have to do a little lateral thinking to see them.

Given the nature of coding puzzles - where true coders will consider a puzzle "too easy" that is opaque to non-coders - Pablo has decided to provide help in the form of algorithms, pseudocode, or code snippets, but only after 24 hours of release. That way the coders can have their try for FTS, and non-coders can get assistance to start. The updates will be given at the bottom of the text page sometime on or after the second day.



Ah, summer time! With temperatures hovering in the high teens! Pablo, fresh off his exasperation with the creation of the pipeline playground, but basking in the fun that the crew was having, decided to build upon the sliding theme. He starting his own construction of a new sled that could attain high speeds, bounding around the flat ice stretches in the area. He eventually admitted he wasn't much of a mechanical engineer, and reached out to Petunia and Puck, friends that were gifted in manufacturing. They went away and came back and presented their solution, claiming it was complete. Pablo soon found out it had some interesting, um, features. The sled was slick and speedy (hidden jet packs, perhaps?), but the ice brakes were a bit of an issue. Once started, the sled couldn't stop for 5 units. After that, if you didn't turn within 5 more units, it would stick to the ice and never get unstuck. Also, it would bounce off the edges of the "rink". And it could only go in diagonal directions! Pablo didn't know this, however, and set off to give it a try.

He brought the sled to a long skinny icy plain, represented as a field of diamonds with hex numbers on them (your input). He started on the sled in the upper left, going in the SE direction, and, like before, wanted to find the path to the bottom right in the lowest amount of total value, where each diamond's value was given in the input. He started off, immediately wanting to veer back NE or SW when he realized the brake "features". Oh well, it was fun anyway! He set forth, bouncing off the edges, putting the sled in gear, braking madly, sliding, and eventually getting to the optimal solution. It took several tries but he finally found the path with the least value!

A few notes of clarification: the icy plain is a level surface, and the sled can move in any of the four diagonal directions, under the rules of the brakes. A bounce off the edge doesn't restart the "brake timer", but it continues in the logical direction (ie. if traveling SE and it bounced off the far right wall, the next step would be to the SW continuing its slide. You can't run over the same diamond tile twice, so a slide into a corner (other than the SE goal) results in failure. If the sled bounces on its tenth step then effectively it sticks, since that bounce gives it no ability to turn. Pablo must not slide into the SE corner before the 5th step else he slides past his goal and fails! He must "stick the landing" between 5 and 10 units of slide.

An example follows:

4 E 1 1 4 D D 0 0 1 7 8 F C A 8
 D 0 F 4 5 7 E 4 5 9 4 8 8 1 E
3 E 0 F E D 3 D 0 1 0 9 4 F 0 0
 7 F 9 E 1 2 D D F 5 E E D 4 4
8 F 9 6 D 3 F 0 F D D E 1 D E C
 F 1 9 D 4 1 0 1 2 0 6 9 9 1 3
4 4 0 0 8 1 B 4 3 D 2 7 F 8 9 F
 3 0 4 8 D F A 7 0 B 0 F 5 9 4
D 3 8 F 0 9 8 2 2 D F E 1 4 2 F
 E 4 6 9 D 4 7 E E A 2 F F A D
D D C 4 F E 6 F E 8 1 F 1 2 7 1
 1 D 6 B 5 4 1 3 1 1 A F D 6 D
D 2 2 7 1 7 0 E F D 9 1 8 3 F E
 E 7 2 D 8 B 0 0 4 D 6 2 1 F D
9 6 2 5 3 F 1 E 3 0 D 1 9 5 2 F
 6 5 2 1 0 D 7 8 A 2 7 4 3 3 7
1 2 1 0 3 D E 0 E 1 3 0 5 E D 4

In this example, had Petunia and Puck created the ideal sled, Pablo could play his "lower number walk" game with the following path, resulting in a score of 151:

4·E·1·1·4·D·D·0·0·1·7·8·F·C·A·8
·D·0·F·4·5·7·E·4·5·9·4·8·8·1·E·
3·E·0·F·E·D·3·D·0·1·0·9·4·F·0·0
·7·F·9·E·1·2·D·D·F·5·E·E·D·4·4·
F·9·6·D·3·F·0·F·D·D·E·1·D·E·C
·F·1·9·D·4·1·0·1·2·0·6·9·9·1·3·
4·4·0·0·8·1·B·4·3·D·2·7·F·8·9·F
·3·0·4·8·D·F·A·7·0·B·0·F·5·9·4·
D·3·8·F·0·9·8·2·2·D·F·E·1·4·2·F
·E·4·6·9·D·4·7·E·E·A·2·F·F·A·D·
D·D·C·4·F·E·6·F·E·8·1·F·1·2·7·1
·1·D·6·B·5·4·1·3·1·1·A·F·D·6·D·
D·2·2·7·1·7·0·E·F·D·9·1·8·3·F·E
·E·7·2·D·8·B·0·0·4·D·6·2·1·F·D·
9·6·2·5·3·F·1·E·3·0·D·1·9·5·2·F
·6·5·2·1·0·D·7·8·A·2·7·4·3·3·7·
1·2·1·0·3·D·E·0·E·1·3·0·5·E·D·4

Alas, it wasn't ideal, but Pablo, once expert, kind of enjoyed the downright zaniness of the endeavor, bouncing around the edges until he reached his goal. In the same example, here is the optimal path, resulting in a score of 224. Not as good of course, but he doubted anyone else could improve upon it with this ice craft.

4·E·1·1·4·D·D·0·0·1·7·8·F·C·A·8
·D·0·F·4·5·7·E·4·5·9·4·8·8·1·E·
E·0·F·E·D·3·D·0·1·0·9·4·F·0·0
·7·F·9·E·1·2·D·D·F·5·E·E·D·4·4·
8·F·9·6·D·3·F·0·F·D·D·E·1·D·E·C
·F·1·9·D·4·1·0·1·2·0·6·9·9·1·3·
4·4·0·0·8·1·B·4·3·D·2·7·F·8·9·F
·3·0·4·8·D·F·A·7·0·B·0·F·5·9·4·
D·3·8·F·0·9·8·2·2·D·F·E·1·4·2·F
·E·4·6·9·D·4·7·E·E·A·2·F·F·A·D·
D·D·C·4·F·E·6·F·E·8·1·F·1·2·7·1
·1·D·6·B·5·4·1·3·1·1·A·F·D·6·D·
D·2·2·7·1·7·0·E·F·D·9·1·8·3·F·E
·E·7·2·D·8·B·0·0·4·D·6·2·1·F·D·
9·6·2·5·3·F·1·E·3·0·D·1·9·5·2·F
·6·5·2·1·0·D·7·8·A·2·7·4·3·3·7·
1·2·1·0·3·D·E·0·E·1·3·0·5·E·D·4
      ^       ^     ^
      \_______|_____/
              |
           bounce

Below are a few examples of good (in green) and bad (in red) turning and bouncing maneuvers. In each instance the colored number is the current slide counter, starting at zero in the upper left. It is legal to turn at 5 or at 10, or any point in between, but not otherwise. It is also not legal to bounce at 10.

0·E·1·1·4·D·D·0·0·5·7·8·F·C·A·8
·1·0·F·4·5·7·E·4·4·6·4·8·8·1·5·
2·0·F·E·D·3·D·3·1·7·9·4·F·4·1
·7·3·9·E·1·2·D·2·F·5·8·E·D·3·4·
8·F·4·6·D·3·F·1·F·D·D·9·1·2·E·C
·F·1·5·D·4·1·5·1·2·0·6·A·1·1·3·
4·4·0·6·8·1·B·4·3·D·2·7·B·8·9·F
·3·0·1·8·D·F·A·3·0·B·0·F·5·9·4·
D·3·2·F·0·9·8·2·2·D·F·E·1·4·2·F
·E·3·6·9·D·4·7·E·1·A·2·F·F·A·D·
4·C·4·F·E·6·F·E·A·1·F·1·2·7·1
·5·D·6·B·5·4·1·3·9·1·A·F·D·6·D·
6·2·2·7·4·7·0·E·8·D·9·1·8·3·F·E
·7·7·2·3·1·B·0·7·4·D·6·2·1·F·D·
8·2·2·3·2·1·6·3·0·D·1·9·5·2·F
·6·9·1·1·0·3·5·8·A·2·7·4·3·3·7·
1·2·A·0·3·D·4·0·E·1·3·0·5·E·D·4


OK, here is the puzzle: given the following field of diamond-patterned numbers, and the parameters of the sled described above, what path gets Pablo from the NW corner to the SE corner with the lowest total value? Pablo's best run was 509, can it be beat?

E 9 A E B D 3 F 4 4 1 2 E E 4 5 7 4 E 7 9 1 0 0 D D 9 F 0 F
 F A 4 E 9 7 7 9 A B D 8 E E 0 F 3 7 D 1 7 D E 1 3 1 2 D 9
D A 2 5 4 D D F F F 8 B 2 8 1 9 D F B 8 3 8 2 3 0 9 A E D F
 7 3 0 2 1 F D 0 1 7 2 D A 5 2 0 1 A 3 1 B E 5 2 1 E 2 0 F
2 2 D 8 8 2 3 6 1 9 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9 4 9 3 9 D 4 D 7 E 7 3 3 1 2 0 D 4 2 2 E D A 8 2 E A E F E


You can validate your puzzle solution with certitude.


Congratulations to First Finder gw0143 and First Solver pfalstad!


Post 24h hint update: the algorithm is similar to PC7, though the "Dutch Penguin" (Dijkstra) isn't quite smart enough. First off your walking constraints are tighter, you can't walk (or "slide") SW for instance if you've only walked SE for one or two steps, so you need to constrain the otherwise-four available options for the next step. Secondly, the "next if visited" needs to now account for the fact that you might have visited some (x,y) on an sub-optimal slide at first, and so now next if visited(x,y) needs to be more like next if visited(x,y,d,l) where d is your current slide direction, and l is your current slide length. Good luck!


Update 07/06/2024: see Write Note from Pablo, the previous boast of a sub 500 score was not a legal path, but the solution remains the same. His best path is 509 under the constraints of the sled.

Additional Hints (Decrypt)

[hide] pbirerq, frr pregvghqr

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)