Quoridor Bot

bot
c
https://github.com/gsmcwhirter/quoridor

In my first couple weeks at ZipRecruiter, they were holding a competition to see who could program the best bot to play the board game Quoridor. Of course I had to try my hand at it.

The Rules

The competition was fairly open-ended in terms of rules. There were no mandated technology stacks or UX requirements besides being able to input moves and understand your own bot’s output. The only real limitations were that the bot could take up to 30 seconds per turn to calculate its next move, and that the bot had to run on a company-issued laptop without internet access (i.e., no cloud computing clusters running in the background).

The Technology

Given the generally communicated knowledge that the branching factor of the game was managable but not small, computational speed was of the utmost importance. The winner was likely to be the bot that could look ahead the furthest during its allotted time. Since the only low-level language I was fairly familiar with at the time was C, I decided to write the bot using that.

I implemented a standard brute-force approach at first and later attempted (poorly) to implement an AB-pruning strategy to select the best possible move. Unfortunately, there were some substantial bugs that I was not able to iron out before the competition.