How to make a sea battle game. How to play Sea Battle: the rules. How to arrange ships to win in Naval Battle

Are you playing sea ​​battle but don't always win? Then you are probably interested in learning how to significantly increase your chances of winning, how to place ships correctly, how to quickly destroy enemy ships and, of course, how to win in the game Sea Battle!

Rules of the game "Sea Battle"

There are many options for naval combat, but we will consider the most common option with the following set of ships:

All of the listed ships must be placed on a 10 by 10 square field, and the ships cannot touch either by their corners or sides. The playing field itself is numbered from top to bottom, and the verticals are marked with Russian letters from "A" to "K" (while the letters "E" and "Y" are omitted).

An enemy field of the same size is drawn next to it. With a successful shot at the enemy's ship, a cross is placed on the corresponding cell of the enemy field and a second shot is fired, with an unsuccessful shot, a dot is placed in the corresponding cell, and the turn goes to the enemy. Optimal strategy

How to win the game Sea Battle

There is always an element of randomness in the sea battle game, but it can be minimized. Before going directly to the search optimal strategy, it is necessary to voice one obvious thing: the probability of hitting an enemy ship is the higher, the fewer unchecked cells are left on his field, similarly, the probability of hitting your ships is the lower, the more unchecked cells are left on your field. Thus, for an effective game, you need to learn two things at once: optimal shooting at the enemy and optimal placement of your ships.

In the following explanation, the following conventions will be used:

How to shoot enemy ships

The first and most obvious rule of optimal shooting is the following rule: do not shoot at the cells directly surrounding the destroyed enemy ship.

In accordance with the designations adopted above, in the figure those cells at which unsuccessful shots have already been fired are marked in yellow, cells at which the shots ended in a hit are marked in red, and cells that were not fired at are marked in green, but it can be guaranteed that the ships they are not (there cannot be ships there, because according to the rules of the game, ships cannot touch).

The second rule immediately follows from the first rule: if you managed to knock out an enemy ship, you must immediately finish it off in order to get a list of guaranteed free cells as soon as possible.

The third rule follows from the first two: it is necessary first of all to try to knock out the largest enemy ships. Perhaps this rule is not obvious to you, but if you think a little, you can easily notice that by destroying an enemy battleship, at best, we will receive information at once about 14 guaranteed free cells, and by destroying a cruiser, only about 12.

Optimal shooting strategy

That. the optimal strategy of shooting can be reduced to a targeted search and destruction of the largest enemy ships. Unfortunately, it is not enough to formulate a strategy; it is necessary to propose a way to implement it.

First, let's look at the site playing field 4 by 4 cells. If there is an enemy battleship in the area under consideration, then it is guaranteed that it can be knocked out in no more than 4 shots. To do this, you need to shoot so that on each horizontal and vertical there is exactly one checked cell. all variants of such shooting are presented below (excluding reflections and turns).

Among all these options, only the first two options are optimal on a 10 by 10 squares field, guaranteeing hitting the battleship in a maximum of 24 shots.

After the enemy battleship is destroyed, you need to start looking for cruisers, and then destroyers. In this case, as you may have guessed, you can use a similar technique. Only now it is necessary to split the field into squares with sides of 3 and 2 cells, respectively.

If you used the second strategy when searching for a battleship, then to search for cruisers and destroyers you need to shoot at the following fields (green fields are marked at which you have already fired when searching for a battleship):

There is no optimal strategy for finding boats, so at the end of the game you have to rely mainly on luck.

Sequence of best moves to start the game

If we turn to mathematical theory, then we can build a map of the probability of placing ships:

Based on this map, subsequence " best moves» with constant misses, it looks like this (see figure):

C1, J8, A8, H1, A4, J4, D10, G10, E1, D2, B3, A2, C9, B10, H9, I10, I7, J6, I5, H6, J2, I3, H4, G5, G2, F3, E4, B7, A6, B5, C6, C3, D4, D5, F6.

How to arrange ships

The optimal ship placement strategy is in a sense the opposite of the optimal firing strategy. When shooting, we tried to find the largest ships in order to reduce the number of cells that need to be checked, at the expense of guaranteed free cells. This means that when placing the ships, they must be placed in such a way that, in the event of their loss, the number of guaranteed free cells is minimized. As you remember, the battleship in the center of the field opens 14 fields for the enemy at once, but the battleship standing in the corner opens only 6 fields for the enemy:

Likewise, a cruiser in the corner opens only 6 fields instead of 12 fields. Thus, by placing large ships along the border of the field, you leave more room for boats. Because There is no strategy for finding boats, the enemy will have to shoot at random, and the more free fields you have by the time you catch boats, the harder it will be for the enemy to win.

Below are three ways to place large ships that leave plenty of room for boats (blue).

Battleship is enough simple game, but due to the fact that it is impossible to see the ships of the opponent in it, it is sometimes quite difficult to win a battle. While you will need to fire a few random shots before the first hit, a strategic approach to shooting can increase your chances of winning. Also, the likelihood of victory can be increased due to the thoughtful placement of the ships, which will puzzle your opponent.

Steps

Maximizing hits on enemy ships

    Fire at the center of the playing field. Statistically, the probability of getting the first shot at the ship will be higher if you aim at the center of the playing field.

    • The central section of the playing field, which is four by four squares, is likely to contain a four-deck or three-deck ship.
  1. To increase the chances of hitting the enemy ship, shell the playing field with parallel lines. Imagine a chessboard-like playing field, where half of the squares are dark and half are light. Each large ship, starting from a two-deck one, will occupy at least two cells of the playing field, one of which will be dark. Thus, if you randomly fire at only even or only odd numbers of squares, then you will reduce the number of possible shots before hitting the ship.

    • As soon as your shot hits an enemy ship, you will stop random shelling and start targeting the ship.
    • In order not to get confused with the dark and light squares of the playing field, imagine that the diagonal line going from its upper left to the lower right corner consists of dark squares. And the diagonal from the top right to the bottom left is made up of light squares. This will serve as a guide for you to determine the exact color of the squares you are going to shoot at.
  2. After two misses in one area, proceed to shelling the next area. If you missed twice in one place on the playing field, try your luck elsewhere. In such a situation, the likelihood of missed again will be less if you cover a large area with shelling, and do not continue to fire at the unsuccessful area.

Targeted shelling after the first hit on the ship

    Reduce the area of ​​fire after hitting the ship. After the first hit, you need to reduce the area of ​​fire to the nearest cells horizontally and vertically around a successful shot. If the ship is not single-deck and sunk by the first shot, you will need a few more additional shots to sink it.

    Fire the area around a successful shot. Shoot the nearest square above, below, to the right or to the left of a successful shot to continue firing at the ship. If a new shot from one side is a miss, next time shoot in the opposite direction. Continue shooting until you completely destroy the enemy ship. You will learn about this from the enemy himself, since he will have to announce that his ship has been sunk.

    To sink even more enemy ships, repeat everything from the very beginning. After the first ship sunk, you will have to return to random shelling of the playing field (or its center) in order to find the next ship. Then repeat targeted fire around the successful shot until the next ship sinks. This approach to the game allows you to reduce the number of moves required to sink all enemy ships and win the game.

Correct placement of your own ships to minimize possible damage

    Do not place ships close to each other. If the ships touch, then the enemy can sink two ships at once. To reduce the chances of an opponent to quickly find another ship after the destruction of the first, you need to place the ships at a distance from each other so that they do not touch (this is required classic rules sea ​​battle games). Between all your ships there should be a pass in one or two cells of the playing field, so that it would be more difficult for the enemy to find them.

  1. Try to place the ships close to each other. Despite the fact that the placement of contacting ships is prohibited classic rules the game, in the variable rules it is allowed and can even serve as a kind of strategy. By placing two adjoining ships in one line, you can confuse the enemy so that he does not understand what type of ship he sunk.

    • Remember that the proximity of ships can both work in your favor and be a risky undertaking, because it can lead to accidental detection by the enemy and your other ships.
May 26, 2013 at 08:27 PM

Optimal algorithm sea ​​battle games

  • Algorithms

A couple of days ago, I was surprised to learn that some of my acquaintances do not know how to play sea battle. Those. Of course, they know the rules, but they play somehow haphazardly and in the end they often lose. In this post, I will try to outline the main ideas that will help you to improve the level of your game.

Rules of the game

There are many options for naval combat, but we will consider the most common option with the following set of ships:

All of the listed ships must be placed on a 10 by 10 square field, and the ships cannot touch either by their corners or sides. The playing field itself is numbered from top to bottom, and the verticals are marked with Russian letters from "A" to "K" (while the letters "E" and "Y" are omitted).

An enemy field of the same size is drawn next to it. With a successful shot at the enemy's ship, a cross is placed on the corresponding cell of the enemy field and a second shot is fired, with an unsuccessful shot, a dot is put in the corresponding cell, and the turn goes to the enemy.

Optimal strategy

There is always an element of randomness in the sea battle game, but it can be minimized. Before proceeding directly to the search for the optimal strategy, it is necessary to voice one obvious thing: the probability of hitting an enemy ship is the higher, the fewer unchecked cells are left on his field, similarly the probability of hitting your ships is the lower, the more unchecked cells are left on your field. That. For an effective game, you need to learn two things at once: optimal shooting at the enemy and optimal placement of your ships.

In the following explanation, the following conventions will be used:

Optimal shooting
The first and most obvious rule of optimal shooting is the following rule: do not shoot at the cells directly surrounding the destroyed enemy ship.

In accordance with the designations adopted above, in the figure those cells at which unsuccessful shots have already been fired are marked in yellow, cells at which the shots ended in a hit are marked in red, and cells that were not fired at are marked in green, but it can be guaranteed that the ships they are not (there cannot be ships there, because according to the rules of the game, ships cannot touch).

The second rule immediately follows from the first rule: if you managed to knock out an enemy ship, you must immediately finish it off in order to get a list of guaranteed free cells as soon as possible.

The third rule follows from the first two: it is necessary first of all to try to knock out the largest enemy ships. Perhaps this rule is not obvious to you, but if you think a little, you can easily notice that by destroying an enemy battleship, at best, we will receive information at once about 14 guaranteed free cells, and by destroying a cruiser, only about 12.

That. the optimal strategy of shooting can be reduced to a targeted search and destruction of the largest enemy ships. Unfortunately, it is not enough to formulate a strategy; it is necessary to propose a way to implement it.

First, let's take a look at a section of the playing field measuring 4 by 4 cells. If there is an enemy battleship in the area under consideration, then it is guaranteed that it can be knocked out in no more than 4 shots. To do this, you need to shoot so that on each horizontal and vertical there is exactly one checked cell. all variants of such shooting are presented below (excluding reflections and turns).

Among all these options, only the first two options are optimal on a 10 by 10 squares field, guaranteeing hitting the battleship in a maximum of 24 shots.

After the enemy battleship is destroyed, you need to start looking for cruisers, and then destroyers. In this case, as you may have guessed, you can use a similar technique. Only now it is necessary to split the field into squares with sides of 3 and 2 cells, respectively.

If you used the second strategy when searching for a battleship, then to search for cruisers and destroyers you need to shoot at the following fields (green fields are marked at which you have already fired when searching for a battleship):

There is no optimal strategy for finding boats, so at the end of the game you have to rely mainly on luck.

Optimal ship placement
The optimal ship placement strategy is in a sense the opposite of the optimal firing strategy. When shooting, we tried to find the largest ships in order to reduce the number of cells that need to be checked, at the expense of guaranteed free cells. This means that when placing the ships, they must be placed in such a way that, in the event of their loss, the number of guaranteed free cells is minimized. As you remember, the battleship in the center of the field opens 14 fields for the enemy at once, but the battleship standing in the corner opens only 6 fields for the enemy:

Likewise, a cruiser in the corner opens only 6 fields instead of 12 fields. Thus, by placing large ships along the border of the field, you leave more room for boats. Because There is no strategy for finding boats, the enemy will have to shoot at random, and the more free fields you have by the time you catch boats, the harder it will be for the enemy to win.

Below are three ways to place large ships that leave plenty of room for boats (blue):

Each of the given arrangements leaves exactly 60 free spaces for the boats, which means that the probability of accidentally hitting the boat is 0.066. For comparison, it is worth giving a random arrangement of ships:

With this arrangement, there are only 21 cells left for the boats, which means that the probability of hitting the boat is already 0.19, i.e. almost 3 times higher.

In conclusion, I want to say that you should not spend too much time playing naval combat. I especially want to warn you against playing in lectures. When I was sitting in Wabi-Sabi and playing naval combat with my girlfriend, a waitress walked by and said that she was playing very well, because practiced a lot in pairs. Who knows who she would have worked if she had attended lectures at one time?

P.S. In the comments it is absolutely true that there were already similar publications on Habré, it would be wrong not to put links to them.

How to play naval battle?

The game "Sea Battle" has been helping people pass the time during lessons, lectures, lunch breaks or just cold winter evenings for over 80 years. During this time, many generations have changed, but the game still remains relevant.

Although it is being supplanted by more modern and dynamic computer games, today it is almost impossible to find a student who does not know how to play sea battle and what it is all about. I will tell you the rules of the game and also describe the winning tactics. Let's consider how to play naval combat.

Rules of the game

The playing field of each player is a 10x10 square on which the ships are placed. The field must contain numeric and alphabetic coordinates (vertically numbers 1-10, and horizontally letters from a to k). For classic game four single-cell ships (submarines), three two-cell ships (destroyers), two three-cell ships (cruisers) and one four-cell ship (battleship) are used. They are drawn inside a square. According to the rules, the ships should not touch. It is best to play on a piece of paper in a box, because the drawing of ships is a circle of cells. One deck - one cell. You can place ships both horizontally and vertically. Next to his square, the player draws a second, on which he marks the "shots" at the enemy. When an opponent hits the ship, a cross is placed on a foreign field. The hit player fires another shot.

Violations

  • The number of ships does not comply with the rules
  • Ships are located close to each other
  • Changed the size of the field
  • Invalid coordinates specified

The process of the game

  • Players decide who goes first
  • The player making the move names the coordinate on which, in his opinion, the opponent's ship is located. For example, square A1.
  • In case of a miss, the opponent must say "Past!"
  • The game continues until all ships of one of the players are sunk.

How to win a naval battle

This strategy is one of the many options for building a battle. Its essence lies in the fact that all large ships (from two to four cells) are located in one corner of the field and as compact as possible. But single-celled ships are scattered over the rest of the field. As a result, your opponent will quickly find the grouping zone of large ships rather quickly and will begin to mercilessly destroy them. At this moment he will feel like a real genius, but we know what the catch is. During the time that your opponent spends looking for small ships, you will most likely have time to understand his tactics and destroy most of the ships, thereby making him nervous. The rest is already a matter of technology. This article told about the rules, the process of the game and provides examples winning tactics how to win naval battle. With the right approach, all of the above can serve as a good knowledge base for getting the most out of the game.

Even more interesting

STRATEGY AND AGAIN STRATEGY.

And now I will prove it to you. Let's start with how to shoot! Actually, it was necessary to start with the rasstavlenie, but we will leave it for later. once you understand how to shoot, it will be easier for you to understand the basics of placement. Lesson one: never shoot at one point, this is the most hopeless thing I've ever seen! Lesson two: if in one place you shot down several ships, but you still have holes (not a fired cell around which all the cells are fired at!), Then never rush to plug them up if the enemy has at least one ship more than a kopeck piece (including a kopeck piece)!

Moving on to the firing strategies! Personally, I single out two LINCOR and OPERATION THREE! (Maybe they have other names, it's just that I’ve got my mind to everything that I’m writing to you now! And therefore I think I have the right to give them my own names!) Let's dwell on the first one!

It consists in finding and destroying the most hulking battleship ship as quickly as possible! Thus, significantly reducing the enemy's field! You can hit him 100% with 24 shots! This is how they should be positioned! * designated shots, about cells which I would advise to leave for later! And with numbers 1 (of which there are eight by the way) shots that must be fired FIRST! In this case, from the first 8 shots you will suck
34% battleship
50% three rubles
45% kopeck piece
32% odnushku
Table number times:
|————|
| __a b c d e f g h and k |
| 1) o o o 1 o o o * o o |
| 2) o o * o o o * o o o |
| 3) o * o o o * o o o * |
| 4) 1 o o o 1 o o o * o |
| 5) o o o 1 o o o * o o |
| 6) o o * o o o o 1 o o o |
| 7) o * o o o 1 o o o 1 |
| 8) * o o o * o o o * o |
| 9) o o o * o o o * o o |
| 0) o o * o o o o 1 o o o |
I ———— |
Actually, it could have been more! But hardened opponents BIG ships usually stand at the sides!
Then methodically start shooting other stars! It goes without saying that after knocking down a ship, kill it! After you fire them all
proceed to table number two!
The table intends two:

Her task is to kill all the remaining three rubles and kopeck pieces! * I marked the fields where you should have already visited, about the fields where you do not need to shoot, and z exactly those cells where you need to shoot! There are 24 of them in total, but you have already taken out half of the fleet! And so you only have about 15 shots left! Well, after that it's just a matter of luck in the fight against odnushki! But this is at the very end! In addition, if the enemy
If you have not placed your fleet very skillfully, then odnushki will not pose any particular problems for you.
It goes without saying that you can shoot not only as I showed! But the main thing is that this principle is preserved!
I ———— I
I__a b c d e f g h i j i
I 1) o z o * o z o * o z I
I 2) z o * o z o * o z o I
I 3) o * o z o * o z o * I
I 4) * o z o * o z o * o I
I 5) о z о * о z о * о z I
I 6) z o * o z o * o z o I
I 7) o * o z o * o z o * I
I 8) * o z o * o z o * o I
I 9) о z о * о z о * о z I
I 0) z o * o z o * o z o I
I ———— I

OPERATION THREE!
As you now guessed it consists in finding three rubles of the enemy! (and at the same time the battleship!)
Here are your shots (36 in total)! Having made all the shots, you will subdue the battleship, both three rubles, almost certainly one kopeck piece (maybe two) and one odnushka! Well, good enough in 36 shots! But what to do then? Just shoot with luck. So, it's better to choose LINCOR! Although you have 0.25% that by shooting these fields you will destroy all the ships! Of course, these two tactics work not only on those cells that I showed in the tables! Each table has up to 8 mirrors! That is, if, for example, you rotate the table by 90 degrees, and mentally transfer the letters and numbers, you will get a new table value with the same strategy! But she shot through completely different cells! Therefore, the arrangement with which this strategy (and at the same time all others) would work very badly (for example, not knocking down more than one kopeck piece and not one odnushka!) DOES NOT EXIST! Although there is an arrangement specifically against THIS type of this strategy, but with a different type of strategy you will get a 100% hit!
|————|
| __a b c d e f g h and k |
| 1) o o * o o * o o * o |
| 2) o * o o * o o * o o |
| 3) * o o * o o * o o * |
| 4) o o * o o * o o * o |
| 5) o * o o * o o * o o |
| 6) * o o * o o * o o * |
| 7) o o * o o * o o * o |
| 8) o * o o * o o * o o |
| 9) * o o * o o * o o * |
| 0) o o * o o * o o * o |
|————|
... INSTALLATION.
Based on the fact that the ships cannot touch each other! Therefore, if, for example, you put a battleship in the middle, and the enemy subdues it, then you will lose 18 cells (4 cells of the battleship and 16 cells around it!)! Therefore, the battleship must be placed against the wall! And even if the enemy quickly subdues him, you will not lose a lot of cells! Below I will give an example of two constellations!
o-empty field
1-odnushki
2-kopeck piece
3-three
4-battleship
* -cells next to the ships (around them)! That is, the cells on which the ships cannot stand.

1) |————| 2)|————|
| __a b c d e f g h and k | | __a b c d e f g h and k |
| 1) * * * * * * * * * o | | 1) o o o o o * 4 4 4 4 |
| 2) * 4 4 4 4 * * 2 * * | | 2) o o o o o * * * * * |
| 3) * * * * * * * 2 * 1 | | 3) o o o o o o o * 3 3 3 |
| 4) * * * * * * * * * * | | 4) o o o o o o o * * * * |
| 5) * 3 * * 3 * * * * * | | 5) o o o o o o o * 3 3 3 |
| 6) * 3 * * 3 * * 2 * 1 | | 6) o o o o o * * * * * |
| 7) * 3 * * 3 * * 2 * * | | 7) o o o o o * 1 * 2 2 |
| 8) * * * * * * * * * * | | 8) o o o o o * * * * * |
| 9)* 2 2 * * 1 * * 1 * | | 9)* * * * * * * 2 * 2 |
| 0)* * * * * * * * * * | | 0)1 * 1 * * 1 * 2 * 2 |
|————| |————|

As you can see, there is only one zero left in arrangement 1! While in the arrangement there are 2 of them 43.
Why is it bad that there is only one zero left, you ask? And imagine that you were shot down by a battleship and three rubles!
If you placed your ships according to the first strategy, then you will lose 48 cells (10 cells from the ships and 38 cells adjacent to them!)! And after placing your ships according to strategy two, you will lose only 26 cells! Almost half the size! And now imagine that all your ships are shot down and there is only one odnushka left (which, by the way, VERY often happens.). When placing 1, you will have a MAXIMUM of 6 cells! That is, with 6 shots, the enemy will kill you 100%! But when you play 2 with one another, you still have a lot of free, unoccupied cells. And the enemy will spend more than one move to win. Of course, by itself, not everything is perfect, and the opponent will immediately figure out your strategy with such an arrangement! Therefore, we are looking for a middle ground, but with a bias towards the second placement! Yes, here it is the golden mean! Rather, her sample.

As you can see, the gorabs are in one corner here! Thus, leaving the second half completely empty! Now we take and move some two ships (better than odnushki) to an empty corner! Even if the enemy kills all your ships, he will look for your last odnushki for a very long time! And you will have time to kill him five times.