Joseph Naberhaus


gauthordle

July 2024

Given a commit message, can you guess who wrote it?

Background

My coworkers and I came up with this idea. We often collaboratively play trivia-style games during our lunch break. One day, we realized it would be fun to make a trivia game from our git history. I spent a Sunday afternoon hacking it out, and this is the result.

Implementation

One the most important design constraints I imposed was that the game had to be a daily challenge. This allows me to exploit artificial scarcity to make the game more enjoyable in the long run. Of course, we're all familiar with the phenomena from the Wordle craze, which is why I kept that game's namesake.

The problem with daily challenges is that you need some way to distribute them. Thankfully, I had a realization that this problem was already solved for me. Every potential user already has the entire git history checked out. Therefore, I could just use a deterministic random number generator to create the same game for everyone. The only remaining problem was that everyone's RNG needed to start with the same seed. For that, I just use the unix timestamp of midnight the week before.

Making it fun

It took very little tweaking from my original prototype to make the game reasonably fun. That said, it's still not without flaws. For example, sometimes you will get a bot as the author, which isn't very challenging. Also, in larger repositories it becomes increasingly likely that you won't know the author. Both of these problems can be somewhat alleviated by filters you can provide in the configuration file.

In my opinion, the key feature of gauthordle is the author selection. Every author is not equally likely to appear as the answer. Otherwise, the game might be too difficult. Instead, I bias towards users with high commit counts. For example, in a repo with ten users the probability of each being picked is:

Highest committer 30.8%
2nd highest committer 23.4%
3rd highest committer 17.1%
4th highest committer 12.0%
5th highest committer 7.9%
6th highest committer 4.8%
7th highest committer 2.6%
8th highest committer 1.1%
9th highest committer 0.4%
10th highest committer 0.0%

In this case, it's probably a little too biased, but that's because I optimized it for repos with 50-100 contributors. If that's not what you want, there is a configuration option available for changing the amount of bias (or removing it completely).

How to play

Check out the instructions on the Github README for how to install and play gauthordle.