Realms Beyond - Dev Update #1: AI for Turn-Based

Silver

Spaceman
Staff Member
Joined
February 13, 2014
Messages
9,314
Location
New Zealand
A new development update for Realms Beyond focuses on the AI that will be employed during the course of turn-based combat.

Development Update #1: AI for Turn-based Combat Systems

Posted by Ceres Games (Creator)


When we started out working on the combat system we had a lot to do to lay the basic foundations. We had to get our character animation system running and implement stuff like combat logic, hexboard generation from level topology, or hexboard queries for paths and floodings at runtime.

That left little time to care about something as high level as AI (Artificial Intelligence). As a consequence our first prototype for AI 'grew' with time. At first, all it could do were melee attacks. Then we added ranged attacks. Then we implemented an enemy spell AI for intelligent placing of area spells (trying to maximize hits on enemies and minimize hits on allies). Finally we included rather specific routines (like fleeing) for characters that suffered from spells like fear. We realized that AI has to be able to deal with script spells that are loaded at runtime (a feature that could be interesting for future modifications). To allow for that we coded routines that simulate spell executions and judge their effects in a more general way.

Thus our prototype grew and grew until we were sure that we covered every capability that could possibly be required. Then we started to build it from scratch to make it more flexible and debugable. And now we feel like we can finally talk about AI.


Combat AI Debug Visualization in Realms Beyond
The paradigm we had in mind for development has always been: What do we expect from a turn based AI?

Well, technically, we expect a lot! A demon wizard that fails to choose his fireball spell over a magic missile, or who fails to place the fireball in a way that maximizes damage on the player party is a no-go. An assassin who simply attacks her closest target instead of trying to stab your wizard in the back is not only little immersive - it also obliterates strategic bottlenecks like doors. And a human NPC ally that is not able to plan his path avoiding enemy attacks of opportunity is an annoyance. So when we talk about expectations from a 'technical' point of view, one can say that we expect 'a lot'. A proper (3.5e based) combat AI has to be able to perform a lot of intelligent choices for enemies that we expect to behave intelligent.

Assuming that we built an AI that is able to live up to those expectations, it is time to consider a different connotation: What do we expect from AI not in terms of quality but in terms of personality?

If every enemy behaved optimally the challenge would be maximized - and immersion would be all but gone. We want goblins to horde around their closest enemy. We want orcs to ignore attacks of opportunity. And an ogre might even be too stupid to leave an area that is affected by a damage-over-time spell. Even beyond 'intelligence' enemies should show personality in every decision that gameplay offers: While most races ignore unconscious or otherwise helpless enemies on the battle field and proceed to face those player characters that can still fight, certain foul creatures like goblins or gnolls should be known for finishing off their helpless foes. It's those little twists that make combats immersive.

We hope that - apart from the challenge of making our AI capable of 'good' decisions - we also do a good job to diversify enemy behaviours enough to allow you to detect patterns and become especially hateful of one enemy or the other.

f9039a0745ab4ec97317b3c415d017d8_original.png

A combat scene from 'Knights of the Chalice'
Once again, allow us to mention Knights of the Chalice here (btw, the developer Pierre Begue will launch a Kickstarter campaign for the sequel very soon) . It is owing to that game that we had a very precise idea about what we had to do when we first started prototyping our CPU-controlled opponents. The AI of KotC (and, of course, its excellent encounter design) made almost all combats interesting. It may be prone to crowd in bottlenecks (a fact can be exploited a lot once you get the stone wall spell) but hey - weaknesses are something you also expect from an AI to have fun, another fact that we are well aware of.


Hopefully, we can soon present you some more combat vids that display various AI behaviours. Until then, feel invited to write us (here in the comments or in our forum) what you think about our ideas and what you consider important for a turn-based AI. And if you have a memorable story to tell about a combat against an especially cunning AI: please share it with us.
More information.
 
Joined
Feb 13, 2014
Messages
9,314
Location
New Zealand
Should those features be implemented, the game will be simply awesome :)
 
Joined
Nov 15, 2013
Messages
3,757
Location
Brasil
Definitively interested in playing, but still bummed out about a few other things. I get it though they only have so much money,and they can't implement certain features.
 
Joined
Oct 1, 2010
Messages
36,350
Location
Spudlandia
Would love this to turn out great but I'm skeptical. Seems like its too much to take on and execute well for a small team... hope they prove me wrong though.
 
Joined
Sep 3, 2016
Messages
1,353
Location
A Misty Island
KOTC 1 latest version has a new feature, added by the developer, that you can buy spells and healing from the dwarf priest on the very level the screenshot shows! (IIRC) Knights of the Chalice combat is amazing! Its the BEST verbosely documented turn-based combat I've ever seen. The superb HELP system is hyperlinked, so you can literally travel in the rulebook forward and back and read everything that interests you, while in combat!!
 
Joined
Mar 21, 2013
Messages
3,456
True, it's the best help system I've ever seen. Big studios are stupid. Big times.
 
Joined
Nov 29, 2006
Messages
179
AI can get complicated in a hurry. For example, AI can make the best use of special items, like potions, scrolls, and item powers. Intelligent team members can work in a combined-arms mode with other allies, and take advantage of favorable terrain as well as area of effect powers like circle of protection spells. Enemies should ignore undetected opponents. &c. &c.

But if you have a half-way decent AI system, it can always be refined later.
 
Last edited:
Joined
Mar 22, 2012
Messages
5,529
Location
Seattle
Should those features be implemented, the game will be simply awesome :)

After some time you will say "should 70 % of those features be implemented, the game will be awesome". After few years you will say… :)

But at least we should get new fantasy soundtrack from Kai Rozenkranz! :juggle:
 
Joined
Feb 23, 2014
Messages
1,526
Location
Ferdok in Aventuria (Europe)
If every enemy behaved optimally the challenge would be maximized - and immersion would be all but gone. We want goblins to horde around their closest enemy. We want orcs to ignore attacks of opportunity. And an ogre might even be too stupid to leave an area that is affected by a damage-over-time spell. Even beyond 'intelligence' enemies should show personality in every decision that gameplay offers: While most races ignore unconscious or otherwise helpless enemies on the battle field and proceed to face those player characters that can still fight, certain foul creatures like goblins or gnolls should be known for finishing off their helpless foes. It's those little twists that make combats immersive.

This bit makes no sense.

The enemy acts optimally everytime does not mean only one optimal way of doing things.

Goblins get one of their optimums when they gang up on a single target. This optimum depends on their capabilities.

Part of the challenge would be to prevent them from ganging up (might be difficult to achieve in UgoIgo structure)

Same remark for the rest: a giant ignores AoE attacks because he can afford sustaining the damage and come up as a winner in a damage trading battle.

All this reads as flavour additions, nothing gameplay wise.

In a game, suspension of disbelief and immersion happen through gameplay. Spraying around behaviours that are not rooted in gameplay considerations is not gameplay compatible.
 
Joined
Mar 29, 2011
Messages
6,265
But at least we should get new fantasy soundtrack from Kai Rozenkranz! :juggle:

True enough, but I do gently wish that Kai refocus his efforts on finally completing his personal "Journey Home" album. Kickstarter backers have been waiting a long time for this. That was actually the first project I backed on that site; it's a bit sad to see it dwindle away for so long unfulfilled. Still, good things come to those who wait I suppose and Kai does have to do his job to survive.

As for the game, I'm sceptical as well regarding feature creep, but in theory it'd definitely be something I'd play.
 
Last edited:
Joined
Jul 12, 2009
Messages
1,975
Location
Australia
Graphics is one of the things that isn't appealing for me... but I still look forward to this game.

At least this team is giving some sort of updates, nothing from Black Geyser!

(I want me party based, isometric, fantasy RPGs!!!) :(:(:(:(:(
 
Back
Top Bottom