Stockfighter - First Impressions

Published: 2016-01-09
Tagged: programming

Stockfighter is an online capture-the-flag type of game where players try to solve problems of increasing complexity. The reward, apart from having tons of fun solving neat challenges, is to have people in charge of hiring contact you based on your performance. This is quite an exciting idea because pretty much everyone ever agrees that hiring tech employees is completely broken.

At this time, Stockfighter offers two types of games to play: a stock market simulation, and a hardware reverse engineering simulation. The authors assure us that there's more to come. I have yet to even try the reverse engineering game, but I've spent some time on the stock market simulation so I'll focus on that.

I tried to participate in the game just when it launched, around December 12th I believe, but due to the surge of new players, the game experience technical problems - it would lose state or levels would fail to start completely. At that point I left it for a few weeks to let the dust settle.

I came back to it in early January and saw that the technical problems have been resolved so I happily started hacking away at the problems. The game aims to simulate a simplified (in some aspects) stock exchange. It's a more fully featured simulation when compared to other stock market simulation games you can find online since the game includes bots to play against whereas other games of this type, in my experience, are scripted. This means that bots observe the same constraints that you do and their simple, at least in the beginning, bot brains react to your game play. More interesting than the browser interface is the exposed API, which allows you to write up your own bots to give you a helping hand or replace you altogether. On top of that, the API allows you to process the stock exchange data programatically - generate graphs, compare archived runs to your current run, and much more.

I've been able to clear the first 2 levels so far and I've focused the majority of my time to increase my score on level 2 before continuing to level 3, and, at the same time, I've been building out an Elixir project to interact with the game through the API. Being able to hit the stock exchange order book with orders at 100ms intervals is simply something you can't really do by hand.

I admit that the game has sucked me in - I've read and reread patio11's blog articles - I've started reading Flash Boys to get a better picture of what's happening inside of the exchange. I've spent upwards of 5 hours of hammering level 2 with different experiments to figure out how the bot(s?) there work and how to exploit them. This is the fun kind of frustration we all know and love.

One reason why I think this kind of game is important is that it forces the player to exert himself as he would in a real world scenario. The problem of this isn't just building an API client - an easy, clean, abstract task - a perfect fit for a 20 minute tutorial.

The problem is that the game is a black box. The API throws information at you and you can't trust it - the information can be late and no longer accurate. You can throw information at the API and you can't trust that it'll reach the server in the exact same sequence or time that you sent it. Additionally, your only way of getting more points is figuring out what's going on inside the black box via this unreliable API. You're only way of interacting with other the participants (bots) is through the unreliable API. The docs that are provided with the game can't be fully trusted as well - this message is actually part of the official docs.

Just like the real world, isn't it?

Hi, I'm Matt.

This blog is an unordered set of thoughts extracted from the mind of a software developer.

About Me PGP key

Archives  Feed  The Photolog!  t: pr0tagon1st