*
Welcome, Guest. Please login or register.
March 29, 2024, 06:06:12 AM

Login with username, password and session length

Donate

We Appreciate Your Support

Members
Stats
  • Total Posts: 1686612
  • Total Topics: 118113
  • Online Today: 757
  • Online Ever: 2235
  • (October 29, 2023, 12:32:45 AM)
Users Online

Recent

Author Topic: AI in wargames  (Read 10315 times)

Offline tp

  • Assistant
  • Posts: 46
AI in wargames
« on: May 19, 2015, 03:48:16 PM »
I've been giving some thought to AI in wargames recently. Both for solo games and more specifically third parties during a two player game. What systems do people use and can anyone suggest some resources?

cheers

Offline Silent Invader

  • Galactic Brain
  • Posts: 9636
Re: AI in wargames
« Reply #1 on: May 19, 2015, 04:12:33 PM »
I've yet to resolve this to my satisfaction and so am interested in what everyone else does.

The elements that I am presently exploring combine:

1) start: random forces
2) start: random terrain
3) start: random objectives
4) in-game: random order of turn
5) in-game: random and limited number of activations per turn

The various start elements are in tables, with a dice roll deciding who, where and what will be played. The in-game elements are built into the rules.

The only 'Intelligence' is that everything is written for the genre, so there's no chance of producing an overtly ridiculous and therefore uninteresting combination of elements for a particular game.  

I still play each side to the best of my ability but then I am interested in exploring cinematic narrative more than competitive play.

I've had a few go's at writing rules for a more formulaic in-game approach (ie, if W then 60% chance of X and 10% chance of Y or 40% chance of Z) but no luck so far, it tending to be that extreme results play havoc with the narrative by creating nonsense.
My LAF Gallery is HERE
Minis (foot & mounted) finished in 2024 = 0
(2023 = 151; 2022 = 204; 2021 = 123; 2020 = ???)

Offline Major_Gilbear

  • Scatterbrained Genius
  • Posts: 3153
  • God-Emperor of Dune
Re: AI in wargames
« Reply #2 on: May 20, 2015, 08:51:15 AM »
I do think it depends on the rules mechanics of the wargame too...


  • In games where there is already some provision for activation out of turn, or where the mechanics are such that simply increasing the quantity of opponents is sufficient, an AI can work surprisingly well.

  • In games where there is important hidden information, you need to resolve this in a way that is sensible but doesn't tip off the player.

  • In games where a combinatorial or co-dependent element between models is required for a force to be effective, it can be very difficult to produce an AI (since a common tactic between players in such games is to disrupt this synergy and deny their opponent the corresponding perk).

I think that random forces can work, but can also present its own issues; including narrative, and also that such "random" spawns need to be somewhat self-sufficient or else they risk producing lopsided results.

A game that I've seen work reasonably well with an AI is Infinity.
Since that game provides all models with reactions by default, you really only need to provide a list of simple "programs" for determining how models use their activation. For everything else, it's reasonably fair for the player to choose two suitable forces and set up a narrative table.
The only things that need some more serious ruling are hidden deployment, airborne deployment, camouflage, disguises (holo projectors and impersonator for example), and who the lieutenant is. As long as a ruling for these applies to both the player and the AI force, and the AI player has a program for them, they still work quite well.
Rules are free to download as well, which helps.
A good example of a custom scenario that uses an AI can be found here - it has a fair few extra rules as it is themed around the Mass Effect 3 computer game.

As for "official" AIs in games, I know that Malifaux has the University of Transmortis, and that Deadzone has an AI deck and even several custom Zombie scenarios that are designed for solo-play. Beyond that, many dungeon-crawlers have AI modes too.

Offline tp

  • Assistant
  • Posts: 46
Re: AI in wargames
« Reply #3 on: May 20, 2015, 09:48:30 AM »
We play Warhammer Quest a fair bit which in it's simplest form randomly generates monsters and events. This is quite fun and adds to the idea that you never know what is around the next corner, however it does sometimes result in odd dungeons. We had one recently where we only met 4 goblins and then completed the dungeon, and various others where by the time we've got into the third room the monsters are queuing down the hallway to be slain.
Also the activation in WQ is quite simplistic, missile troops will shoot at a random target, combat troops will move forwards until they become pinned then hit people.

I've been playing a lot of games from the Song of Blades and Heroes stable recently and am going to be playing a 40k themed game tonight where I will add in an AI driven space minotaur.

I've not given too much thought to random opponents, but this could be quite fun. I may give a solo SoBaH game a go soon where I try this.

The problem I've been trying to get my head around is getting a balance with the AI controlled characters. At the one end of the spectrum is a pre determined list of priorities and actions which should give a relatively realistic out come for what the AI characters do, but then as a player I know what this list is. So I know, for example, if I move into line of sight of x, then x will shoot at me.
The other end of the spectrum is randomly assigned actions, these are good in that they supply unpredictability. However they quite often give ridiculous results, with characters running away from fights they would clearly win etc.

I'm attempting to come up with a middle way. So for tonight's game I drew up a table of priorities for the minotaur as follows:

Enemies within 1 x medium distance of Keys of Thesis - Attack random target
Enemies in base contact with Minotaur - Attack random target
Enemies within 2 x long distance of Keys of Thesis - Attack random target
Enemies in line of sight - Shoot target closest to Keys of Thesis
More than 2 x long distance away from Keys of Thesis - Move towards Keys of Thesis
None of the above - Do nothing

So on the minotuars turn he will work through this list of priorities. If someone is with in medium distance of the Keys of Thesis (the objective for our game) then he will attempt to attack them, if not he will move to the next priority in the list, ie are any enemies in base contact with him, if so he will attack one of them, if not move down to next priority.

I then drew up another five variations on this list, for example:

Enemies in base contact with Minotaur - Attack random target
Enemies with 2 x long distance of Minotaur - Attack random target
Enemies in line of sight - Shoot random target
Enemies within 1 x medium distance of Keys of Thesis - Attack random target
None of the above - Move towards random table edge.

I now have six lists, each of which should give a sensible course of action for the minotaur. Each turn I will randomly pick one of these lists and use it for that activation. This way I know they closer I am to the Keys of Thesis and/or the Minotaur the more likely I am to be attacked, but I can't say for sure what the minotaur will do in his turn.

Anyway, this may well not work, or more likely will need some more tinkering. I'll find out tonight.

   

Offline zemjw

  • Supporting Adventurer
  • Scatterbrained Genius
  • *
  • Posts: 2091
    • My blog
Re: AI in wargames
« Reply #4 on: May 20, 2015, 10:22:48 AM »
I've looked into this quite a bit, but have never come to any useful conclusions  :(

For rpg games the Mythic Game Emulator is used a lot. It boils down to asking yes/no questions and deciding how likely the outcome is. You then roll dice and decide if the outcome really failed, just failed, succeeded or succeeded really well. I've also seen someone using dice with "yes and", "yes but", "no but" and "no and" outcomes on them, which I think would help drive the story.

My hope is to use the same approach for skirmish games (I believe some people do this already), where you'd say "Does the Minotaur attack" and decide how likely it is, then roll for the outcome. This does require that you think of the relevant questions at the appropriate moment, but could be more flexible than fixed tables. I usually put off creating tables so much that the game never happens, so "on the fly" stuff removes that problem for me.

Another technique that I've seen is to choose a random word (Wikipedia, Tarot cards etc) and interpret it with respect to the current situation. This does depend on the word chosen, so if nothing springs to mind within a few seconds, just pick a new one.

Having just read what I wrote, I'm not sure it is AI in the general sense - more of an impartial umpire (Mythic certainly lists itself under that category).

edit to add this link to a series of solo rpg articles. Again, it's more replacement umpire than AI, but well worth a read
« Last Edit: May 20, 2015, 12:43:30 PM by zemjw »

Offline Major_Gilbear

  • Scatterbrained Genius
  • Posts: 3153
  • God-Emperor of Dune
Re: AI in wargames
« Reply #5 on: May 20, 2015, 11:32:33 AM »
but then as a player I know what this list is. So I know, for example, if I move into line of sight of x, then x will shoot at me.
The other end of the spectrum is randomly assigned actions, these are good in that they supply unpredictability. However they quite often give ridiculous results, with characters running away from fights they would clearly win etc.

In some respects though, knowing what they will do is not a bad thing; most often, you can guess what a human opponent will do in those circumstances anyway.

As I mentioned earlier, the real problem is how you deal with information that is supposed to be hidden in order to provide an element of surprise - like a hidden/invisible deployment, or some other tricks that require an element of bluffing to succeed.

Whilst random cards/tables can help a bit here, they more often than not produce either a ridiculous outcome, or a fairly predictable one - and not a lot in between.

Also, dungeon-crawler games are more restricted than other sorts, and so AI creation tends to lend itself better to them.

Take a game like Space Hulk for an example. Any moderately competent Genestealer player will usually do the same things in each mission, and you won't know what's under a blip anyway; therefore to create a simple set of rules that mimic this behaviour is fairly easy, and will provide a pretty "realistic" solo game.

Similarly, WHQ always benefited from a little fine-tuning to generate the dungeon in my experience, but otherwise worked rather well. The "worst" part was handling monster behaviour, which was hard to do in a way that was both realistic and and also fair.

Creating an AI that does more than spawn waves and throw them at you though is more difficult, and in non-dungeon-crawler games this is very obvious.

If you have a particular game that you want to play solo though, that might be a better starting point than trying to generalise across many different sorts of game. People who play that game and understand how it works can offer their suggestions on how an AI might be made to work (or not!). :)

Offline gustav

  • Scientist
  • Posts: 211
Re: AI in wargames
« Reply #6 on: May 20, 2015, 11:43:39 AM »
I too spent some time thinking on this.

Did get as far as writing some python code to auto generate terrain and a rough (very rough) map.  Still working on rivers and roads.
Started research into paths and so forth and got a bit out my depth. :)

The force generation and movement were to be next.  Think random objectives and random force may be possible, given certain starting parameters.
As for random force my thinking was that the problem from a coding perspective is that it cannot be too random.
eg In that you do not want a force of 5 artillery v 4 artillery, or 5 cav vs 6 foot.
So therefore you need a random but relative realistic sensible balance, but then not always the same / predictable.
Getting the random ratios x Foot, X Cav and x Artillery etc. I have not as got around to determine.
Let alone, militia vs line vs elite in each force  :D

the rules Muskets and Shakos, and Grand Manouevre  appear to have some interesting mechanics for solo play for this as well.

Offline tp

  • Assistant
  • Posts: 46
Re: AI in wargames
« Reply #7 on: May 22, 2015, 07:12:22 AM »
Played the game on Wednesday night, but Barry the Minotaur got taken down for his AI could really come into play. I'll have a go at a solo game soon...

Offline Momotaro

  • Mastermind
  • Posts: 1320
Re: AI in wargames
« Reply #8 on: May 27, 2015, 11:22:00 PM »
To follow on from zemjw's post, Gibby and I had a go at using the Mythic GM Emulator as the umpire in a narrative miniatures RPG scenario.  Ran it a couple of summers ago.  There would be NPC interaction as well as combat, and a plot to uncover.

In hindsight, making up an unknown plot as we went along based on dice rolls was about the hardest thing we could do, and following the plot itself kind of petered out after a couple of hours simply because we were exhausted with all the... thinking... we had to do.

Basically, we set up a fantasy game with four 2x2 boards on a table - the town, the fields, the forest and the ruined cathedral/graveyard.  The PCs were in town and were told that villagers had gone missing - would such brave adventurers investigate?  So we scoured the boards looking for clues, which took us to the ghoul-infested ruin.  Cue a big fight, and the discovery that the ghoul king was not responsible - instead we picked up clue that someone in the village was a smuggler and was "disappearing" people.

Combat was fine - the ghouls just mobbed the PCs, who backed into a corner to fight them off.  When the ghoul king went down, that seemed a good time to ask the dice whether the remaining monsters ran off into the night... and they did.  We also ran the combat itself using Mythic, but deciding certain tasks were easier for certain characters - fighting, spellcasting, tracking etc.  It worked fine.

Another highlight was when an old village woman in the know was murdered right as she was about to spill the beans (Mythic has some keyword tables to give you hints on outcomes... and all her rolls were terrible) and we chased the culprit through the fields, losing them in the forest.  Quite exciting for random rolls!

For a straightforward battle scenario, no problems using Mythic as an umpire, and it felt like second nature very quickly.  Often, as Major Gilbear said, the problem is not predicting what the AI will do, but how much it will commit or quickly the plan is set in motion.  Random rolls do that easily.

I think hidden stuff requires more structured preparation.  In the case of hidden movement at the start of a game, using a mix of cards with "Nothing there" and "actual unit" could do.  Reinforcements are easily handled randomly

In the case of an investigation, I'd do it again with a few decks of cards.  First, NPCs with "goodie/baddie" option cards, event cards, rumour cards and plot points (different for each type of investigation, and only play a few of all those available).

Two Hour Wargames make some very good rules for same-side or solo wargames, covering enemy force composition, disposition and tactics.  They also have some good random force tables (a typical force may have a core of certain troop types, then roll randomly for the rest). The reinforcements tables can be brutal, and may change your game plan radically.

Neil Thomas's One-Hour Wargames offers another approach: it gives six options for a force composition and you roll to choose which one you have today.  Good for smaller games.

Off topic, but here are some shots from the game:

Board 1



Board 2



Uh-oh...

« Last Edit: May 27, 2015, 11:27:56 PM by Momotaro »

Offline MartinR

  • Scientist
  • Posts: 224
    • The games we play
Re: AI in wargames
« Reply #9 on: May 28, 2015, 07:57:09 AM »
I have come across a few 'AI' type mechanisms (generally variants of 60% chance of unit X advancing type things) but they have never been very satisfactory.

A simple approach for attack/defence type games is to simply assign defending unit types to playing cards  (infantry company, tank destroyer platoon etc) plus suitable numbers of dummies and then lay them out inverted on the terrain. Gives a pretty random deployment you can attack, and works quite well, particular for more static type stuations (set piece assaults on entrenched positons in WW2, pretty well anything in WW1).

Doing it for defence is harder, but if you are in a situation of 'wave' type attacks (again, WW1, set peice WW2) you can just randomly assign attacking units to particular sectors and keep shoving them forward, possibly with some sort dice/card mechanism for each sector to determine rate of advance, level of fire support etc. I did a participation game modelling a BEF battalion in 1914 using that sort of approach and it worked quite well, seen similar things for Vietnam firebase defence with card generated VC attackers.

Cheers
Martin


"Mistakes in the initial deployment cannot be rectified" Helmuth von Moltke

Offline tp

  • Assistant
  • Posts: 46
Re: AI in wargames
« Reply #10 on: May 28, 2015, 01:30:40 PM »
Lovely looking game, and very fun sounding. I'll have to have a look in it.

Offline Momotaro

  • Mastermind
  • Posts: 1320
Re: AI in wargames
« Reply #11 on: May 28, 2015, 01:53:17 PM »
Lovely looking game, and very fun sounding. I'll have to have a look in it.

Mythic is no more than a resolution mechanic, giving a yes/no answer to the players asking "Does X happen?".  If you decide that it is more likely the chance goes up; if it is less likely, the chance goes down.  You get  some refinements too - complications and a keyword table to stimulate your imagination.

There will be a lot of discussion between players as to how things proceed - it's very like a matrix game.  Sometimes you struggle to explain the dice roll - just choose an outcome.  Other times, it flows really well.

As it's only the umpire mechanism, you can use it with any game system.

As I said, we tried it with a LOT of information hidden from the ourselves - probably the hardest thing we could have done.  Doing it again I would have more random events, plot points and complications to move the story along, and define the NPCs beforehand (as well as randomising who is good, bad or neutral).

Offline Momotaro

  • Mastermind
  • Posts: 1320
Re: AI in wargames
« Reply #12 on: May 28, 2015, 01:54:21 PM »
Don't the D&D games (Castle Ravenloft, Wrath of Ashardalon) have a simple AI system on each of the monsters' cards?

Offline Major_Gilbear

  • Scatterbrained Genius
  • Posts: 3153
  • God-Emperor of Dune
Re: AI in wargames
« Reply #13 on: May 29, 2015, 08:45:14 AM »
Actually Momotaro, you've just reminded me of a great AI example; Arkham Horror.

It is a board game, but in many ways it has a skirmish feel to it, and it complicated enough to hold up to a small wargame for comparison.

Arkham works well as a game, and the AI that governs the monsters has some helpful tweaks that keep it challenging. The first is that monsters are all allocated a behaviour type (which also conditions how they move and who they attack), and the second is that as the game progresses a tracker ensures that more and more monsters are spawned (which increases the game difficulty from manageable at the start to very tough at the end).

However, that's not to say that the AI is great; rather, it merely does what it needs to, and uses quantity of monsters as the tuning-dial (rather than level, type, etc., as many other systems use). The "tuning dial" is in turn adjusted by how many turns have elapsed, and how well the players are doing with the game.

Since the rules for most of their games are free via the Fantasy Flight Games website, it might be worth a look if you are not familiar with the game.


Offline harleyface

  • Scientist
  • Posts: 456
Re: AI in wargames
« Reply #14 on: May 29, 2015, 09:31:33 AM »
AI in Boardgames
Personally i had the best experience with Gears of war.
 :)



Cultist#83

 

Related Topics

  Subject / Started by Replies Last post
23 Replies
7297 Views
Last post December 17, 2009, 03:03:35 PM
by Puuka
3 Replies
2231 Views
Last post February 12, 2010, 10:55:19 PM
by YPU
7 Replies
1583 Views
Last post November 23, 2016, 12:55:38 AM
by LeadAsbestos
23 Replies
2514 Views
Last post June 05, 2020, 02:55:04 PM
by Aerendar Valandil
37 Replies
4223 Views
Last post April 14, 2021, 08:23:09 PM
by Hobgoblin