An AI that tries to lose

I’ve been working on a little project for a couple months now and it’s about time I write something about it.

So here it is. Give it a play.

“Wow, your AI is really bad,” I hear you say. “No matter what I do it always makes terrible moves.”

And I would respond, “Depends on your definition of ‘terrible’.”

I was thinking one day about how, if there’s an algorithm to never lose tic tac toe, is there an algorithm that never wins? Or, even further, always loses?

Although I have not definitively answered either of those questions, the code I linked to above is more of the start of an attempt to do so. It will lose in many of the games you play, but there are known sets of moves that will either force a draw or even a player 2 (AI) victory.

As it exists, it uses an algorithm that I put together based on a bunch of pen-and-paper games with friends and colleagues. (Perhaps I’ll write about it later, if I can make it fully work). I found a couple ways that break my system, so it’s time for a new approach.

At this point, I’m confident that player 2 can always force a draw, and am pretty sure player 2 can force a player 1 win. I just haven’t proven it yet.


(pretty picture because pictures are better than just words)

Read More

Moving on up


I’m not very good at Hearthstone. I have probably spent 90% of my play time at rank 20 (and 9% in ranks 21-25). But I think it’s time to change that.

I treat HS deck building kind of like cooking: a recipe/netdeck is inspiration first and guidance second, but never a set of rules. Often I’ll have to improvise due to missing an ingredient or messing something up, so I like to use my own judgement and experience to stay flexible rather than follow the recipe to the letter. This probably is why I’m not very good at HS and why I can’t seem to get Indian food right.

So today I installed Innkeeper and hit up Hearthpwn to check out the best deck I could make with the cards I had. I found this one that was well reviewed and only required 40 dust on top of my collection. But it wasn’t in standard, so I hit the improvisational stage.

I decided to focus the deck around big dudes + windfury + rockbiter weapon as a finisher. Everything else is used to control the board and keep myself and the big dudes alive for the combo. Biggest problem so far: aggro. It has no sweepers.

Rank 19 today, legend tomorrow?


Kansas apparently means People of the Wind (thanks Kansan Lyft driver!)

Read More