top of page

Battle Salvo

Battle Salvo.jpg
BattleSalvo Example1.png
BattleSalvo Example2.png
BattleSalvo.gif

Description:

Battle Salvo is a terminal java programmed game of Battleship in which the user plays battleship against an AI. This assignment was to come up with the best possible AI to compete against others within the class.

​

Contributions
I implemented the idea that if we detect a hit, we check our surroundings to see identify which direction the ship is in and fire shots along that axis until we find the missing ends on both sides (indicating we have sunk the ship). Afterwards, if we were looking for a ship we would use a heat map to identify possible locations that a ship could be at and randomly pick the highest value targets to start again.

 

Made in JetBrains via Java code

​​

Challenges:

Trying to come up with an optimal AI strategy was the main focus of the challenge in which we used a heatmap to calculate likely hits and then fired shots in a line to try and completely sink ship when possible

Extra:
My partner and I ended up placing 4th place in the entire class out of 48 groups within the class

bottom of page