• Register

Turn based tactical game about war at sea between British Royal Navy and Imperial German Navy during World War I.

Post feature Report RSS Dev blog #5. AI tactics of artillery combat

Overview of the principles of AI maneuvering in artillery combat in Naval Hurricane game.

Posted by on

It’s been a while after the last dev blog has been published. Most of this time was spent on different aspects of AI programming and today I can write about some of the results of teaching AI how to fight.


‘Crossing the T’ principle

The vast majority of warships in the late 19th and first half of 20th centuries could concentrate more artillery firepower on port and starboard sides of the ship than ahead and behind. You can see this effect on the illustration below where typical main gun turrets positions with their firing sectors are shown.

Ship artillery sectors

It is obvious that firing all guns to the left or to the right side of the ship while receiving fire only from forward guns of the enemy gives huge benefits. But situation was even worse for the fleet which had enemy which turned sideways in front of it. Because column formation (line astern) was the most commonly used formation in artillery combat only the leading ship could freely use her front guns. Next ships couldn’t fire ahead without chance to hit friendly ships moving in front of them. Enemy also had benefits in aiming because his overflying salvoes could hit ships behind of targeted ship. This tactics was called ‘Crossing the T’ and was primary naval warfare tactics from the late 19th century till the end of World War II.

‘Crossing the T’ in the game

In Naval Hurricane game AI also tries to use ‘Crossing the T’ in pure artillery combat.

To do so it calculates the combat distance at first. Distance calculation method depends on game difficulty level and skill level of AI fleet leader (let’s call it admiral). Skilled AI admiral on higher difficulty levels will try to select distance greater than max artillery firing range of enemy. This will allow eliminating risk of getting hit but not possible if AI ships have smaller firing range than enemy ships. Less skilled AI admiral will try to calculate combat distance based on visible threat of enemy fleet.

Second step is finding positions to start ‘Crossing the T’ maneuver. These positions are relative to enemy fleet leader ship and located at +35° and -35° from her course at distance calculated in previous step.

Crossing T positions

When closest ‘Crossing the T’ maneuver position reached AI finds end ‘Crossing the T’ position similarly to it but using 45° value. Then it creates the path from start to end point keeping distance to enemy calculated in first step and follows this path even if enemy fleet gets closer. This has sense because at shorter gunfire distance enemy will suffer much more than AI. After the

way is passed AI repeats algorithm again. Maneuvering in ideal situation described above you can see in the GIF below.

crossing T gif

Real game environment difficulties

Unlike ideal situation enemy fleet can be split of few groups of ships. Each of these groups can fire to AI controlled fleet and trying to perform ‘Crossing the T’ maneuver against one enemy group can lead to heavy damage from another enemy group. To deal with this and many other situations AI builds virtual ‘threat circles’ around each enemy ship where artillery combat distances which calculation described in previous section are radiuses of these circles. AI tries not to get too deep inside these circles. If it appeared inside it tries to escape to closest point outside threat area. Example you can see below.

escape from threat area gif

If calculated start ‘Crossing the T’ position is inside threat circle AI will try to calculate another one outside of threat circles. Skilled AI admiral on higher difficulty levels will also check this new position for risk of getting surrounded by enemies and will move to the second start ‘Crossing the T’ position on the other side of target enemy fleet if such risk exist. Of course this second position also could be unsafe but ships are always moving and threat circles are moving as well. AI makes new decisions each turn and can select another target group to attack during its way to selected position, for example. Or it can decide to return to first position and repeat algorithm again in worst case.

When the AI performs a “Crossing T” maneuver against a group of enemy ships, it constantly checks whether another enemy group is performing a “Crossing T” maneuver against it. When this situation detected AI cancels its maneuver and tries to escape.

Another reason to cancel ‘Crossing the T’ maneuver is changing course of enemy fleet so that the AI fleet is on the side. AI fleet loses its ‘Crossing the T’ position and continuing of maneuver becomes senseless.

Escaping from heavy artillery fire

Opponents shoot at each other when maneuvering and AI carefully tracks hits at its ships and the moment may come when AI decides that artillery fire is too heavy and something must be done about it. In real world battles fleets were quickly changing distance to the enemy to make him troubles for aiming in such situations. In Naval Hurricane AI can do something like that. It finds the direction of artillery fire and selects the random value for distance change. Ships are turning all together and moving in parallel away from the source of artillery fire until selected distance change value reached. Then ships are turning to column order again and continue battle. The gif below shows example of such maneuver.

escape from artillery fire gif

Like many other AI features it is enabled not for all game difficulty levels and depends on AI commander tactics level.

Countering 'Crossing the T' tactics

AI fleet commander can recognize when ‘Crossing the T’ maneuver used against it. When lower difficulty level selected or AI commander stats are low it wills simply try to change course to bring attacking enemy to port or starboard side of its ships. More skilled AI at higher difficulty levels will do in another way. It will perform simultaneous 180° turn and quickly get out from dangerous zone. This is very effective emergency escape maneuver allowed to save German fleet in Battle of Jutland. Its general scheme is shown in the animation below.

escape from crossing the T gif


In general maneuvering of AI during pure artillery combat mostly intended to perform ‘Crossing the T’ maneuvers against enemy fleet and avoid of being target of enemy ‘Crossing the T’ maneuvers. These actions are much more effective if AI fleet has speed advantage over enemy. That’s all for today.

Good luck.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Naval Hurricane
Platforms
Windows
Developer & Publisher
Efril
Engine
Unity
Contact
Send Message
Release date
Game watch
Follow
Feature
Tags
AI, Dev Diary
Browse
Features
Report
Report
Share
Related Games
Naval Hurricane
Naval Hurricane Turn Based Tactics
Related Engines
Unity
Unity Commercial
Related Groups
Efril
Efril Developer