⚜ SteamCozy

Home / News / Dread Admiral

Devlog #6 - Know thy Enemy (Combat Phase)

Dread Admiral · Community Announcements · October 17, 2026

Read the original on Steam ↗

As promised in the Long Ago times of DevLog #2 (found below) I wanted to go over some of the interesting specifics of how the Ai was built for Dread Admiral.

https://steamcommunity.com/app/4492990/eventcomments/586181370788765462/

As a rough reminder, there are four 'layers' of Ai, each hand programmed to coordinate with eachother.

Today we'll be focusing on the Combat Layer, as going bottom up is also how I designed the AI piece by piece in the first place. By designing bottom up, I had an accurate idea of what the layer needed and/or was going to do, and could see that bit of gameplay before working to the next phase. E.g. Combat I can just spawn some ships and see if they do the right thing. For Move I need to spawn them away from eachother. For fleet comp I then got Quick Battle working and had it counter-pick me, and for Command - well now it has to do a full battle and manage cities!

-- Combat at 10000 feet --

Combat has some top level objectives it needs to meet to be convincing:

To handle this, I built 'ActionSummary' objects that perform all of the evaluations of a given attack - the target, the attacker, whether they're 'at risk', the flak incurred (if applicable), and various other evaluation metrics to tweak it. These summaries are then cached for future use to reduce repeat calculations.

Then the actions are reduced to a single evaluation metric and ordered by that number. Each one of these actions is taken *entirely* in isolation of the future activations of the Ai, which means that it must act intelligently enough to seem like that is not the case. Every once in a while though, you'll see it spread damage out in an unintuitive way - and this is largely why. It's not a cohesive brain, but a series of small moves taken in isolation, but attempted to be ordered in such a way as to be close to optimal.

-- At Risk Units --

Units are 'At Risk' if they can be destroyed in a single activation. Indeed, much of what makes the combat deep is noticing and weighing whether you can kill that CVL before it attacks, attempting a high-roll to cut off an activation or going for a Hull Breach to cut off an activation.

The AI just focuses on the original version - no variance, no veterancy, no crits. "Can you kill me in the next activation?" These get priority over all other actions as it is the 'most intelligent' move in many cases. This can result in oddities of course, largely when Supercarriers threaten that many units are at risk, or when it sees a CVL is at risk at the same time as a Cruiser who is at 3 HP, activating a relatively safe CVL over the Cruiser because the risk of losing that high end activation is too high.

There are some bugs with this, the most obvious being the SBB, as the Cruise Missiles/Broadside having different ranges, among other things, meant I took a lazy approach. This is obvious when the Ai skips an activation with a Carrier at 11+ HP, not realizing that it's basically already dead. Same can be said for Crits.

-- Optimal Targets --

There are many things that define what optimal should be, the first and most important (that works far better than it should) is simply Cost Per Hp * Damage. In general, this is what we're optimizing for as well. It's not a perfect metric, and many of the other pieces of logic are dampening this high weighted metric; but this naive implementation does reasonably well.

Various other things that contribute:

I'm sure I'm forgetting some as well. The point in the above is that a great many factors are crammed in to help get small optimizations out of the Ai's attacks to minimize the amount a player will see it do something 'dumb' and hopefully provide adequate challenge.

-- The value of 'Fun' --

This could be cope, but I'm too deep huffing copium to notice.

An example of a suboptimal move that has been exaggerated purely for entertainment value is Interceptors. I think a great many cases where the Ai intercepts it would be better off bombing (in fact, I'm reasonably sure about it given that I used to calculate what its 'actual value' was.) Intercept 'value' is often going to be close to zero since both sides lose several planes. By weighing it higher, the player gets more points of interaction with their patrols and has to think about them.

Things like multi-action units occasionally having their values misunderstood, an AI killstealing itself, or spreading its damage - as long as it doesn't occur too frequently, gives the player little edges to exploit and feel smart about taking advantage of. Certainly it's been rare for me to hear that the Ai is poor in combat and that the game is too easy haha. What's more - each improvement or bugfix I do in this area technically increases the difficulty which has been unnecessary for some time.

With that, I think this first deep dive on the Ai can be concluded. Each layer has a great many of these hand tweaks, considerations, and overrides in place to try and make it play a mix of 'optimal' and 'interesting'. A future improvement could be having some Ai's do more focus fire, some play more cagey, or similar; but the original goal was simply to make it engaging and threatening.

If you haven't - consider dropping into Steam Discussions or in the Discord to chat strategy or keep up to date on all things Dread Admiral, Cheers!

Dread Admiral MORE ON STEAMCOZYDread Admiral Price tracking · player charts · similar games →