Dan Q found GCARTJK Hencote Lane

This checkin to GCARTJK Hencote Lane reflects a geocaching.com log entry. See more of Dan's cache logs.

Some fellow volunteers and I are staying in the nearby Hencote Farm for a week of work on software that helps charities work more efficiently. As has become a longstanding tradition for me at these events, I woke early for a walk and this morning was treated, as I made my way through the vineyards, to the especially wonderful view across the valley.

A view of Shrewsbury, from a distance, nestled in its valley, as the Spring's morning sun dapples across the verdant grass below.

I’m not sure I was supposed to exit the farm grounds the way I did, but I was eventually able to get out and was pleased to discover this cache was nearby. QEF once I’d chosen the correct host. TFTC.

×

Dan Q found GC79ZK3 Wootton Word Wall

This checkin to GC79ZK3 Wootton Word Wall reflects a geocaching.com log entry. See more of Dan's cache logs.

I’ve never come across the TV series nor this kind of puzzle before, and opted to solve it in an unconventional way. We’re living for a week in an AirBnB nearby – one in a long series of short term lets while we and our insurance company find us sonewhere longer-term, following flood damage to our house last month.

This morning, the younger geokid and I came out for a walk with the geopup. After a little difficulty getting a GPSr fix we eventuality found a good-looking host, and after a few laps we had the well-camouflaged container in our hands. A good sized, well maintained container and an interesting puzzle, even if the way we solved it might be considered by some to have been cheating!

SL (using my own pencil; the one in the cache is blunt and I forgot to bring my sharpener), TFTC.

Did I Cheat?

The Puzzle

The other day I needed to solve a puzzle1. Here’s the essence of it: there was a grid of 16 words. They needed to be organised into four thematic “groups” of four words each; then each group needed to be sorted alphabetically.

Each item in each group had a two-character code associated with it: these were to be concatenated together into a string and added to a pastebin.com/... URL. The correct four URLs would each contain a quarter of the answer to the puzzle.

Grid of four by four words, each with an associated pair of letters.
Apparently this puzzle format is called “Only Connect” and is based on a TV show?2

I’m sure I could have solved the puzzle. But I figured it’d be more satisfying to solve a different puzzle, with the same answer: how to write a program that finds the correct URLs for me.

Here’s what I came up with:

#!/usr/bin/env ruby
require 'set'
require 'net/http'
require 'uri'
FRAGMENTS = [
  'Salsa|mO',
  'Henry|J2',
  'Primate|Q4',
  'Brine|M6',
  'Trinidad|1Z',
  'Pile|8g',
  'Crock|mO',
  'Howitzer|wT',
  'Light|DC',
  'Argo|Lt',
  'Juniper|2I',
  'Hamlet|wN',
  'Warden|xU',
  'Joker|1H',
  'Warner|9s',
  'Bargain|Cq',
]

result = FRAGMENTS.permutation(4).to_a

sorted_results = result.map { |combination| combination.sort }.uniq
shortened_results = sorted_results.map { |combination| combination.map { |fragment| fragment.split('|').last } }
urls = shortened_results.map { |combination| "https://pastebin.com/#{combination.join('')}" }

START_AT = 0

urls[START_AT..].each_with_index do |url, idx|
  uri = URI(url)
  response = Net::HTTP.get_response(uri)
  print '.'
  if response.code != '404'
    puts "\nHIT at index #{idx + START_AT}: #{url}"
  end
  sleep(rand(0..3) * 0.1)
end
I’m confident that this approach was faster.3 Or rather: it would have been if it hadn’t been for the fact that I felt the need to subsequently write a blog post about it.

Here’s how it works:

  1. It creates an array containing the 43,680 possible permutations of 4 from the 16 words.
  2. If sorts the permutations and removes duplicates, reducing the set to just 1,820.
  3. It removes the bit of each that isn’t the two digit code at the end and concatenates them into a URL.
  4. It tries each URL, with short random gaps between them, listing each one that isn’t a 404 “Not found” response.4

I kicked off the program and got on with some work. Meanwhile, in the background, it permuted the puzzle for me. Within a few minutes, I had four working pastebin URLs, which collectively gave me the geocache’s coordinates. Tada!

Was this cheating?

I still solved a puzzle. It probably took me, as a strong programmer, about as long as it would have taken me to solve the puzzle the conventional way were I a strong… “only connect”-er5. But I adapted the puzzle into a programming puzzle and solved it a completely different way, . Here’s the arguments, as I see them:

  • Yes, this was cheating. This wasn’t the way the puzzle author intended it to be solved. Inelegantly brute-forcing a problem isn’t “solving” it, it’s sidestepping it. If everybody did this, there’d be no point in the author putting the time into the puzzle in the first place.
  • No, this wasn’t cheating. This solution still required solving a puzzle, just a different one. A bad human player making a lucky guess would be fine. It’s a single-player game; play any way that satisfies you. Implementing software to assist is no worse than asking a friend for help, as others have done.

Click on a 😡 or a 🧠 to let me know whether you think I cheated or not, or drop me a comment if you’ve got a more-nuanced opinion.

Footnotes

1 Okay, okay, it was for a geocache.

2 Don’t try to solve this one; it’s randomly generated.

3 This version of the program is adapted to the fake gameboard I showed earlier. You won’t get any meaningful results by running this program in its current state. But you could quickly adapt it to a puzzle of this format, I suppose.

4 It occurred to me that it could have been more-efficient to eliminate from the list any possibilities that are ruled-out by any existing finds… but efficiency is a balancing act. For a program that you’ll only run once – and in the background, while you do other things, to boot – there’s a tipping point at which it’s better to just get it running than it is to improve its performance.

5 There’s a clear parallel here to the various ways in which I’ve solved jigsaw-puzzle-based geocaches, because I’m far more interested in (a) programming and (b) getting out into the world and finding geocaches in interesting places than I am in doing a virtual jigsaw puzzle!

×

Dan Q wrote note for GCADCWF Treasure island

This checkin to GCADCWF Treasure island reflects a geocaching.com log entry. See more of Dan's cache logs.

I first found this cache last summer while cycling a circuitous route from Witney to Stanton Harcourt. I happened to be walking the dog nearby, this morning, and so I figured I’d check up on it. The outer container continues to deteriorate and could do with some TLC, but otherwise this cache looks to be okay.

Dan Q found GC4MJR8 R’n’R #2 Skinny & Boney

This checkin to R’n’R #2 Skinny & Boney reflects a geocaching.com log entry. See more of Dan's cache logs.

Coming across from Finstock via R’n’R #9 (we’re absolutely doing this series in the wrong order!), the geokid, geopup and I made a poor choice by hugging the tree line rather than cutting out of the field and coming up the road: it was super muddy in the field at the points at which the footpath runs nearest to this cache, and we struggled to get through a particularly large puddle.

We initially made an effort to get “behind” the bush but eventually discovered we didn’t need to: the cache (whose nature we’d eventually managed to guess from the name) was accessible – with a bit of a stretch – from near the roadside.

And, in accordance with the theme, we’ve got a verse for you:

🎶 I used to wonder what caching could be,
🎶 Until you all shared this series with me.
🎶 Big adventure, tons of fun.
🎶 A beautiful cache; now it’s signed and done!

Dan Q found GC4MJY0 R’n’R #9 – Thumper

This checkin to GC4MJY0 R’n’R #9 – Thumper reflects a geocaching.com log entry. See more of Dan's cache logs.

The younger geokid and I had a plan, this morning, to drive out from our temporary (post-flood) accommodation in New Yatt, park at St. Peter’s in Wilcote, and then walk the dog around the area between Wilcote and Ramsden while we collect a few more caches from this excellent series.

Unfortunately our plans were scuppered early on when we discovered that a Scouts troop had completely occupied all possible parking spaces in Wilcote, and a platoon of children, supervised by some tired-looking adults, were beginning a walk around what looked likely to be the exact same routes we were planning.

So we came at it from the other angle. Driving around to Finstock, we parked near The Plough and came across the network of footpaths from the other end.

A boy and a dog run through a grassy fallow field.

By the time we were at the corner of this field the kid and dog were enjoying running around in the Spring sunshine, and once we got to the GZ the cache itself was a quick and easy find… although the kid did take the time to stop and make a crude joke about the rabbit’s bum being corked!

×

Dan Q found GC4MJRJ R’n’R #3 – Not Quite A Well?

This checkin to GC4MJRJ R’n’R #3 – Not Quite A Well? reflects a geocaching.com log entry. See more of Dan's cache logs.

Another quick find for the sharp-eyed geokid, once we found the right host. Three for three and that’s time for us to turn about and go have our brunch. TFTC!

Dan and a boy each throw a thumbs-up to the camera from a forest footpath.
Mission accomplished. Time for bacon! (Wait… where’s the dog gone?)
×

Dan Q found GC4MJRT R’n’R #4 – Changing Colours

This checkin to GC4MJRT R’n’R #4 – Changing Colours reflects a geocaching.com log entry. See more of Dan's cache logs.

The woods made it hard to get a good fix, but eventually we were in the vicinity of this excellent cache. It took a few different tree hosts before eventually we were looking in the right place. The younger geokid insists that I log that he caught sight of it before me!

A boy reaches into an ivy-covered tree.
Reaching for the cache.
×

Dan Q found GC4MJX6 R’n’R #6 – what YOU looking at?

This checkin to GC4MJX6 R’n’R #6 – what YOU looking at? reflects a geocaching.com log entry. See more of Dan's cache logs.

Came out for a dog walk from New Yatt this morning. The GZ is deep within thick brambles, but the younger geokid was up to the challenge and soon the unusual cache container was in hand. TFTC!

A boy looks over his shoulder as be begins to walk into a bramble bush.
“I have to go in there‽”
×

Dan Q found GCAABPG North Leigh Loop #7

This checkin to GCAABPG North Leigh Loop #7 reflects a geocaching.com log entry. See more of Dan's cache logs.

Completing our loop (minus a couple of DNFs, but plus a couple of nearby caches), this damp geopup and I were really happy to finish with this good-sized cache!

Dan crouches by his French Bulldog on a rural footpath.

TFTC, and for the series, if which this was our favourite and so earns the FP.

Now we’d better go get cleaned and dry!

×

Dan Q found GCAABNW North Leigh Loop #6

This checkin to GCAABNW North Leigh Loop #6 reflects a geocaching.com log entry. See more of Dan's cache logs.

Tougher than we expected to find – not only is this a stealthy container but it’s hidden unusually-thoroughly too! TFTC

I’m increasingly regretting my choice this morning to wear comfortable but not waterproof shoes rather than my not-fully-broken-in walking boots. Between the muddy puddles and the long wet grass, my feet are soaked!

Dan Q found GC1QY29 Can Rabbits Climb Trees??

This checkin to GC1QY29 Can Rabbits Climb Trees?? reflects a geocaching.com log entry. See more of Dan's cache logs.

Coming up from Evergreen/Loop #4 the geohound and I made a poor guess about which side the the hedgerow we ought to be on, and – to avoid having to backtrack – opted to cut through red thicket just East of this cache. The little pupper got stuck and had to be carried, which was when I discovered that her belly was completely caked in thick mud. Eww!

We got here in the end and were delighted to find such a nice cache. TNLN, SL, and took advantage of the concealment provided by a nearby tree to relieve our bladders before continuing North. (Well I appreciated the concealment; the doggo is happy to widdle anywhere!)