by zeteo · 15y ago · 0 comments
My personal experience working with Battleship AI is to play the highest probability. As a human your best option is to place ships closer to the middle and not on edges because of how a person reacts when hitting a ship.
Once a person "hits" the ship they know only that they've made a hit, not what they hit or whether they landed on the middle/side etc. By placing ships along the borders you're essentially reducing the problem space for them to guess. When you ship is in the middle-ish areas the player has a 25-50% chance of hitting the next square of the ship depending on what location they hit at. When your ship is in the corner or side there is only 2 or 3 options before they begin their guessing... (I hope that makes sense)
The AI that the author has presented is ideal for reducing the problem space that exists on the board by segmenting the possible locations that the ship will fit in. Once the problem space is small enough it makes it easy to pick out where ships are hiding.
This is where this falls down. Since I know it's optimal for you to choose one of those three middle squares, I do not want any boat configuration that covers two of them, so I will always pick either the far left patrol boat or the far right patrol boat.
Except if I always pick the far left or right, why would you ever pick middle to start? You wouldn't. Finding an equilibrium to these games is hard, but I'd guess a 50/50 mixed strategy of placing a boat either on the extreme right or extreme left and a 50/50 guessing strategy of B1 or D1 would be a Nash Equilibrium of this game. And the boat arrangement would look nothing like what you'd expect from a random arrangement, in fact there'd be a giant black probability square right in the middle of the board.
I worry people don't believe this, so let me use a silly outlandish example to prove my point.
Here's a game: Suppose we have a countably infinite number of boxes, all numbered. You pick one to hide under, and I have to find you by looking under boxes which I choose, one at a time. I get to look at as many boxes as I like until I find you or get tired and go home.
Under box 1 is famed astronomer Neil deGrasse Tyson, who was spying on you with his (perhaps magical) telescope all morning. He will gladly tell me where you hid.
I now announce my strategy for this game, namely, to pick Box 1 and ask Tyson how to win.
Will you now respond with the original, "From the point of view of game theory, this is not an optimal strategy since it merely invites the opponent to avoid box 1. ..."?
The point of this silly example game is that randomized strategies aren't necessarily helpful for certain classes of games where one strategy gives you disproportionate information about the state of the game.
Guess my number games and battleship games risk being very similar to my extreme illustrative example, but I'll admit I don't know how much.
Bottom line: I just resent the insistence that good game theorists dogmatically REQUIRE randomness in all competitive situations. This is not necessarily the case.
http://en.wikipedia.org/wiki/Pure_strategy#Pure_and_mixed_st... http://en.wikipedia.org/wiki/Strategic_dominance
It is obvious that if there is a dominant pure strategy, then that is the strategy to play, and there is no need for a mixed strategy.
Anyone with elementary game theory knows this, and, really, no 'good game theorist' is going to 'dogmatically' assert otherwise.
I tend to place the large ships as close together as rules allow, in order to leave as much freedom to place the smaller ships. Something like (if ships can lie along a border; periods are squares where no ship can lie):
#####.####
..........
###.###..
........