Stockfighter - 2 Weeks

Published: 2016-01-16
Tagged: programming

I spent another week on Stockfighter and I can't stop playing it!

Since my last post about Stockfighter, I've built out my Stockfighter API client and focused on beating levels 2 and 3 with as high a score as possible.

My API client now collects data from websockets, serializes it into InfluxDB's "Line Protocol", and sends it over to the database itself. It's extremely easy to visualize this data in near real-time using Grafana, which, in it self, is easy to work with and setup with InfluxDB. Here's how it looks:

The game's API has proven not to be essential in solving levels 1 through 3. However, being able to visualize this data has greatly reduced the time I needed to solve each problem. My approach so far has been to fire up the visualization and let the market run without my interference for about 30 minutes. Then I reset the market and try to interact with it, all the while observing how my actions reflect on the graphs. This usually gives me a good clue on how to get to the fastest, minimal solution, which I then execute. Finally, having the last piece of the puzzle, I spend some time on increasing my score as high as possible within some reasonable time frame.

This approach goes against the instructions that come for each level, but as I mentioned in my earlier post, the explicit rules of the game are different from the real rules of the game - exactly how it is in real life and what make this game more fun.

I haven't looked at level 4 yet, but I have a feeling that it's the level that will force me to code up a solution instead of messing around with the browser interface. Working on the Elixir client gave me the much needed knowledge and confidence boost so I'm sure I will be able to tackle whatever level 4 through 6 throw at me using Elixir.

Elixir and its tooling has proven to be as much joy to work with as Python. This is completely subjective, of course, but it's been a while since I've had this much fun programming.

Stockfighter's creators have posted(one of them - patio11) that they're now focusing on talking with potential employers. This is another reason why the game is so addictive - there are real, tangible "trophies". It's one thing to place high on a leaderboard but it's another thing when someone pings you about a job offer, which, for me, is a strong validation of skills.

Comments

There aren't any comments here.

Add new comment