Table of Contents
Many open source projects in Salsita were designed to tackle problems, solve issues, or to simply make the company run more smoothly. This is NOT one of those projects. Quite the opposite, in fact. This is a story about a training project we started and how it has continued to gain popularity.
The Salsita foosball squad has been steadily growing and some of us are becoming good players. Competitive as we are, we always wanted to determine who the best player is. If only we could construct a leaderboard of sorts...
As an avid chess player, I’m familiar with the concept of Elo rating, a method for calculating the skill levels of players in zero-sum games such as chess. You can read more about it here. In simple terms, if the Elo rating difference between you and the other player is 400, the stronger player is 10x more likely to win. Since a log scale is used, if the difference amounts to 800, the probability rises to 100:1.
Knowing this, it's relatively straightforward to create a formula for 1v1 games. The trickier part is the Elo rating calculation of 2v2 games. We have had some long discussions about this, but for now we're sticking with averaging the Elo rating for each team and pretending that it's a 1v1 game. Any suggestions to improve this are welcome!
With this in mind, I created a simple wireframe to calculate the Elo rating.
Soon after it was brought to life and the Slack channel messages started looking like this:
The minimum viable product was no longer practical because it was easier to use the app instead of calculating rankings manually. Now we needed a real application, something with an attractive graphical user interface (GUI) and maintainable codebase.
After the first version was released, there were soon requests for new features. One of my favorite additions is the slackbot, or the ability to play 1v1 and 1v2 matches. The source code is open and all pull requests are welcome.
In the future we plan to deploy it for other sport-related activities, such as table tennis.
This is our pet project and we treat it very fondly. The pull requests are reviewed meticulously and no mercy is given. We're strict, but the reviews are conducted in a lighthearted fashion.