Battleboat

Screenshot of the Battleboat app in action

Play Battleboat here.

Voted top 10 on Hacker News on September 21, 2014

Battleboat is an AI that I wrote in JavaScript that plays Battleship. I wanted to make an AI more powerful than humans, and gameplay data from over 7,000 human players shows that the algorithm wins 67% of all games. The AI works by first generating a probability heatmap as it uncovers your ship placements, then targeting cells in decreasing magnitude of probability of where the ship could be.

To challenge myself further, I developed this app without the use of any libraries (no jQuery, no Bootstrap, etc.) as a technical demonstration of my JavaScript knowledge, and to refine my skills in statistical machine learning.

Source code on GitHub.

← Back to all Case Studies