battleship-ai
Version:
This repository contains a Battleship AI implementation built in TypeScript. The AI focuses on grid-based probability calculations, strategic ship placement, and targeted attack mechanisms to effectively play the game. This README explains the AI’s logic,
20 lines (11 loc) • 528 B
Markdown
# battleship-ai
## 0.0.2
### Patch Changes
- 6a32e79: apply opening magic moves to only bound tiles in virtual grid
## 0.0.1
### Patch Changes
- 3295208: ## Battleship AI
Initial Release with following functions
- `getRandomShipPlacements`: Returns random ship placements for the given board size and ship sizes
- `getHighestProbabilityTarget`: Returns the next move with the highest probability of hitting a ship
- `getHeatmap`: Returns the heatmap for the probabilities for the given board and previous moves.