Devblog #40. Enemy AI – Part 2: Enemies in Action
United States
Breaking News:
Washington DC
Saturday, Nov 28, 2026

Hello everyone.
In the previous devblog, I explained why I decided to move away from independent enemy AI scripts and how the new group AI system works. Today, I’ll demonstrate how this system behaves in combat, and then explain some of its additional capabilities and limitations.
Let’s imagine that three enemies are still alive: a damage dealer, a tank, and a healer. Based on their positioning priorities, the tank will take the central position on the battlefield. The healer will try to occupy a slot behind the tank, while the damage dealer will take one of the remaining slots in the front row.
Typically, the damage dealer will occupy slot 1, the tank slot 2, and the healer slot 5, directly behind slot 2. Now imagine that the tank is low on health and has several damage-over-time effects that will kill it when its turn begins.
How would the individual AI scripts handle this situation?
Since enemies previously acted in slot order, the damage dealer would go first and perform a powerful attack against the player. Next, the tank would get its turn and attempt to apply Vulnerability to the player, but would die from the damage-over-time effects before it could act. Finally, the healer would take its turn.
The healer’s individual script would certainly have chosen to heal the tank or apply Fortify, which prevents damage-over-time effects from dealing damage. However, the healer simply wouldn’t get the chance to do so in time.

How does the group AI handle the same situation?
Turns are no longer tied to battlefield slots. Instead, the group AI continuously decides which enemy should act next and what action it should perform.
First, the group AI requests information from each enemy. The damage dealer reports that it has a powerful attack available and that the ability is not on cooldown. The tank reports that it has an attack capable of applying a debuff, but also that it is in danger due to its low health. The healer reports that both healing and Fortify abilities are available.
The group AI compares the weights of these actions and determines that healing the tank is currently the most valuable option. It then gives the healer the next turn and instructs it which ability to use and on which target.
The healer restores the tank’s health.
The group AI then reassesses the situation. Now the group has both a powerful attack and an opportunity to apply a debuff. It gives the tank the next turn and instructs it to apply the debuff to the player. After that, the damage dealer performs its powerful attack against the weakened target. However, if the tank’s attack misses, the group AI may choose a different action for the damage dealer, such as applying an attack buff instead.
That’s roughly how the group’s shared brain works.

It’s worth making a small clarification here. By AI, I mean traditional game artificial intelligence based on algorithms and scripts, not a neural network or a language model. The system doesn’t learn independently or discover solutions that I haven’t programmed. It evaluates available actions according to predefined rules and selects the most beneficial option. It also doesn’t calculate combat outcomes many rounds into the future. Its main purpose is to eliminate conflicts between allied actions in the current situation while remaining responsive to the player’s decisions.
It’s also worth mentioning that I could make this system an almost perfect opponent. After all, the game has access to all information about the player’s character: dodge probability, defense values, abilities that aren’t on cooldown, genes, stats, implants, Gene Map chains, and much more. But such a system would be unfair to the player.
That’s why I deliberately limited the information available to the enemy AI to what a player could reasonably learn about an opponent through a quick inspection.
For example, an enemy knows that its attack could deal X points of raw damage. However, it doesn’t know the player’s exact dodge chance or how much physical damage resistance the player has developed. This prevents the AI from always following theoretically optimal strategies.
However, I also built in the ability for the group AI to adapt to the player’s actions during the current battle. For example, a Bulwark won’t maintain its protective energy field if its only surviving ally is standing behind it. This would be pointless: the field doesn’t protect the Bulwark itself, and the ally is already protected from attacks by standing in the back row.
But if the player uses an area-of-effect attack that passes through the front row, the AI remembers this. From that point on, the Bulwark may start using its protective field to reduce the damage its ally receives.

Different Group Specializations
Coordination alone isn’t enough if every enemy group uses the same strategy. That’s why I also introduced enemy group specializations. These are selected when a group is generated and influence the abilities and attack forms available to its members. Some groups focus on direct damage. They first create favorable conditions for powerful attacks and then execute them. For example, one enemy may apply Vulnerability, allowing another to follow up with a stronger attack against the weakened target.
Other groups specialize in damage-over-time effects, such as Bleed or Poison. Their goal isn’t to deal maximum damage in a single attack, but to gradually stack more and more effects on the player. Tanks and healers can help these groups survive long enough for the accumulated effects to become a serious threat.
I’ve also added groups that focus on critical hits and lightning abilities, as well as groups specializing in psionic attacks.
Specialization doesn’t replace traditional combat roles. A healer is still a healer, and a tank is still a tank. However, two groups with similar compositions may behave very differently because they use different combinations of abilities.
Knowing enemy types alone is no longer enough. You also need to pay attention to the abilities, effects, and combinations which enemies use. Even a familiar group may require a different approach depending on its specialization.
What Changes for the Player?
I don’t want to increase IRSEN’s difficulty simply with increasing enemy health or damage. Player’s decisions should be more important. Which enemy should you attack first? When you will use crowd control? Is it worth spending a powerful ability on current turn? Should you unlock a skill form that helps resist Stun, or equip an implant capable of absorbing it?
I hope that the greatest threat to the player won’t necessarily be the enemy with the strongest attack, but the one who can strengthen the entire group or use crowd control to give its allies time to coordinate their actions. Eliminating a support enemy, removing a defensive effect, or interrupting a combination may be more valuable than dealing immediate damage. And throughout all of this, the hero still fights alone, trying to adapt to different kinds of threats.
The system will still need further balancing and testing in real battles. Coordination should make encounters more interesting without turning every round into the same perfectly optimized sequence of actions.
This is another step of my vision for IRSEN: a single character fighting against groups of RPG-style enemies. Which behaves as a coordinated team, instead of independent opponents.