Hide and Sink
About the game
The object of Hide and Sink is to sink all of the other player's ships before they sink yours. All of the other player's ships are somewhere on their board. You try to hit them by calling out the coordinates of one of the squares on that board, and they do the same to you. Neither player can see the other's board, so you have to work out where the ships are from what you hit and what you miss.
Hide and Sink is known worldwide as a pencil and paper game which dates from World War I. It was published by various companies as a pad-and-pencil game in the 1930s, and was released as a plastic board game in 1967. The game has spawned electronic versions, video games, smart device apps and a film.
What your script does
Each turn your script is handed its own view of the enemy board — a 10×10 grid where every square is EMPTY, HIT, MISS or SUNK — and picks a row and column to fire at. It never sees where the ships actually are; working that out from the hits and misses so far is the whole problem.
Write one
You start from a script that plays random legal moves, so it works from the first run — it just isn't clever yet. Available in Java.