Geoscientist, challenge thyself

No costume is required for solving geocomputing kata

No costume is required for solving geocomputing kata

One of the highlights of my year is the Advent of Code, a sort of advent calendar for nerds. Its creator, Eric Wastl (hear his story), releases a new puzzle every day from the 1st of the month up to Christmas day. And the productivity of the global developer community goes down 74%.

Ever since the first one I tried, I’ve been wondering what geological coding challenges might look like. And now, 18 months later… well, I still don’t know, but I’ve made some anyway!

Puzzle number 1 (or 0)

Here’s how the first one starts:

You have a string of lithology codes, reading from the bottom up of a geological section. There is a sample every metre. There are three lithologies:

  • Mudstone
  • Fine sandstone or siltstone
  • Sandstone

The strings look like this:

    ...MFFSSFSSSS...

Your data, when you receive it, will be much longer than this.

We need to get some geological information from this string of codes. Specifically, you need to answer 3 questions:

  1. What is the total thickess in metres of sandstone (S)? Each sample represents one metre.
  2. How many sandstone beds are there? A bed is a contiguous group of one lithology, so MMFFF is 2 beds, one of M and one of F.
  3. How many times does the most common upwards bed transition occur? Do not include transitions from a lithology to itself.

You can download your own personal dataset, which in this case has 20,000 lithology codes. Then you can try to answer the questions, one at a time. You can use any programming language — indeed, any method at all — to solve the problems, you give an answer back to the server, and it will tell you if you are correct or not.

There are, as of right now, five ‘chapters’, covering topics from naming rock samples to combining map layers. You will receive the name of the next chapter when you correctly answer the final question of the three or four in each challenge.

If you’d like to give it a try, there’s a live starter Jupyter notebook here:

https://ageo.co/kata-live

Or, if you prefer, there’s a static notebook at https://ageo.co/kata, or you can dive directly into the web API for the first challenge: https://kata.geosci.ai/challenge/sequence

Do let us know how you get on!