Herp Wizard

An Overview

Since the Covid pandemic (roughly summer of 2020) I have been a casual, self-proclaimed amateur herpetology enthusiast. While certainly not something I actively pursue all the time (nor something I engage with as impressively as my brother), I have spent quite a few hours roaming around deserts and cruising through the Florida Everglades in search of slimy serpents. Such “expeditions” have lead to some incredible and memorable trips with my brother as we’ve ventured to places like:

At this point, I’ve seen 58 snake species.

Like the true amateur I am, thus far in my journey the most effective strategy for locating snakes has been road cruising; snakes are cold blooded and thus as the air temperature drops at the end of the day, diurnal and nocturnal species will venture out on to the road to warm up.

A typical night of cruising will start around the golden hour on a paved, less busy stretch of road (identified based on some combination of terrain/geography/iNaturalist/etc.) and last until temperature drops too low, the target has been spotted, or we just give up. This approach is incredibly brute force. Since we’re in a car we can cover maximal distance and since we’re road cruising we aren’t flipping rocks, climbing through washes, etc… more or less I’ve made the bare minimum amount of decisions to give myself a slight edge over someone who randomly is driving around at night staring at the road. Folks with more success will place cover, consult local experts, and generally dedicate time to learning more about habitat, behavior, etc..

While I have purchased books and spent some time attempting to be more intentional about improving my odds of success, I’ve always wondered if I could leverage machine learning to aid this process. Can we select road cruising routes based on estimated temperature differences between the air and road? Can we use computers to scan satellite imagery for us to identify more probably spots? Ultimately, can we leverage all the objective and subjective information on the internet to develop a model to significantly improve our herping success?

I believe we can.


The Plan

To test our hypothesis we’re going to homebrew an LLM model on our own hardware to calculate routes for us in pursuit of finding all 13 species of rattlesnakes in Arizona (which is actually 1/3 of all rattlesnakes in the world).

It takes about 21.5 hours to circumnavigate Arizona.

So since the range of rattlesnakes covers most of the state and since we might need certain weather windows, we’ll give ourselves six days, which is ~2 snake species per day (my brother and I have already seen a Western Diamondback employing our brute force tactics so feel pretty good about that one…).

With the help of How to Build an LLM from Scratch by Sebastian Raschka we’ll scrape a ton of herping related data and then develop an LLM specific to finding snakes.

Hardware

For the training and self-hosting we’ll repurpose existing hardware.

Motherboard: ASRock B650 LiveMixer AM5 ATX Motherboard

Power Supply: CORSAIR RM750e

RAM:

Storage:

CPU:

Will probably get a GPU once performance clearly becomes an issue and thus the extra cost is warranted. To get started, don’t believe this will be necessary since the LLM from Scratch book’s Github README states:

The code in the main chapters of this book is designed to run on conventional laptops within a reasonable timeframe and does not require specialized hardware. This approach ensures that a wide audience can engage with the material. Additionally, the code automatically utilizes GPUs if they are available. (Please see the setup doc for additional recommendations.)

While we could do this in the cloud and leverage existing models, this is equal parts “let’s go do a thing” and “let’s go learn a thing”.

Software

This is just a first, high-level overview.

Summary of Objective

[Goal]: photograph all 13 species of rattlesnakes in Arizona
[Time Limit]: 6 days
[Limitations]:


Credits

Thanks to my brother for joining me in this journey (and bringing the optimism to all our trips regardless of our success). Thanks to my wife for embracing this weird hobby (and even photography a terciopelo for me in Costa Rica).

And finally thanks to Will Robertson for introducing me to herping second hand through my brother. If you’re interested in what herping looks like from someone who is passionate, successful, and generally just a great guy, check out Will’s Youtube channel Will Robertson Wildlife.