Lurker News
Hi HN

I've always been drawn to puzzle and strategy games, and for a long time I've wanted to build a game of my own. While building my own version of battleship, I came across this idea of adding a super intelligent in-game AI which uses probability and statistics to reason with the board and fire its next shot.
The goal was to create a set of rules & logic capable of consistently outperforming human players, much like chess engines that have evolved to surpass even the world's strongest human chess players.
Thus I created WraithAI and named the game as Ghostfleet. WraithAI features:
1. Monte Carlo Simulation with Probability heatmaps: Before every turn WraithAI samples 800 possible enemy fleet configurations and aggregates them into a probability heatmap. It identifies the most likely locations of the enemy ships.
2. Bayesian Inference: After every shot it updates its beliefs and uses the information gain to draw a new heatmap. When two cells look equally likely WraithAI picks the one whose result would tell more about the hidden enemy fleet for its next turn.
3. Adaptive Strategy & defense: It adjusts its aggression based on the state of the game and has a mechanism which resists common search strategies.
I would genuinely like to know how people can find patterns in its behavior. Can you outsmart & beat WraithAI?
Ghostfleet also has multiplayer mode so you can play with your friends. There is a matchmaking component called TownSquare at the bottom through which you can share room codes with other players.
You can play directly in your browser:
1. Play against WraithAI: https://ghostfleet.in/play?mode=wraithAI
2. Ghostfleet: https://ghostfleet.in/
3. WraithAI Technical breakdown: https://ghostfleet.in/wraith-ai

Comments (3) 2 threads

bradknowles1 reply#
It did surprisingly well! I just barely won! I would love to see games where the machine is playing itself and learning techniques and strategies, so that it can play better against humans.
anirbanhere1 reply#
Congrats on the win & thanks for checking it out. WraithAI was battle tested against its own hard variety of AI (which is in the single player section). Data collected from 125,000+ games was analyzed to come up with various strategies which evolved the versions of WraithAI.

Hard AI vs WraithAI was ~85% win rate overall. Well it never had the chance to play so many games against humans, I thought of claiming 95% winrate against humans. Next leap would be to collect data & do player profiling which I think can increase the chances to ~97%. I am still yet to understand if there will always be the last 3% gap as the game has considerable luck factor.

bradknowles#
For me, the interesting thing is finding out what strategies work well, and how they were discovered.

But this game has enough polish to help encourage me to create a computer version of a game that we’ve been playing against each other. We will see.

All comments shown.