Switch Theme:

Wargame AI-Seeking Help  [RSS] Share on facebook Share on Twitter Submit to Reddit
»
Author Message
Advert


Forum adverts like this one are shown to any user who is not logged in. Join us by filling out a tiny 3 field form and you will get your own, free, dakka user account which gives a good range of benefits to you:
  • No adverts like this in the forums anymore.
  • Times and dates in your local timezone.
  • Full tracking of what you have read so you can skip to your first unread post, easily see what has changed since you last logged in, and easily see what is new at a glance.
  • Email notifications for threads you want to watch closely.
  • Being a part of the oldest wargaming community on the net.
If you are already a member then feel free to login now.




Made in us
Humming Great Unclean One of Nurgle





In My Lab

Idle musings on a Doom-esque wargame. I'd want a reasonably robust AI for the Demonic side, so that way you can play it without a GM. (Not that a GM would be a bad thing, but I'd like it usable without on.)

Does anyone know of any existing games that utilize an AI for one or more sides well? Or have any examples from your own work? Or just have good ideas pertaining to it?

Thank you in advance.

Clocks for the clockmaker! Cogs for the cog throne! 
   
Made in gb
Witch Hunter in the Shadows





When you say wargame AI - do you mean actual AI, or a set of tabletop rules?

More broadly speaking each unit type would have one or more situational behaviours, or 'states' with conditions.

Behaviours are the simple checklist approach - 'do this unless', 'pick target in this order', etc.

States are behaviours with escape clauses. Something the unit will keep doing until it switches out.

-----------

Both approaches can be unique per unit or generic.

One example of the state system would be to have a half dozen basic states (charge, approach, flee, lurk, shoot, unique action) and then a few stats on the unit which determine the dice roll/modifier to switch action.

The switches themselves are contained on each action card.

i.e. - the Flee action:
-behaviour - move unit directly away from nearest player
-state swap (aggression): shoot(9+), lurk(6+)

At the start of the units action they roll D6 plus their indicated stat (aggression) and switch stats to the highest qualified state if appropriate.

-----------------------------------

The exact implementation depends on the game (i.e. if units being at the right distance is important, or if objectives are most important, etc).

DooM tends to be a fairly aggressive game with most unit differentiation being whether they barge in and hit you or stand back and shoot you.
With that in mind a range-based checklist might be more appropriate.

----------------------

Where it gets more tricky is positioning and target selection, though for a DooM game a mix of range and 'aggro' should work (aka shoot what is shooting you, mob target vs hit unengaged targets).

Oldschool DooM movement would just chase your forever. Newer DooM is based on the principle of the slayer(s) being far faster so the demons do try to cut off/surround to some degree which isn't going to be so easy to do with a tabletop system - the only system that comes to mind for 'flanking' is for units to target a point on the opposite side of the slayer to another.

(i.e. once the slayer has X 'chase' type units following them any additional 'chase' units that select them don't move towards the slayer, but instead move to a point as far away from the slayer as the closest chasing demon, but on the opposite side, and continues to do that until they are the closest demon themselves).
   
Made in us
Battlefield Tourist




MN (Currently in WY)

Here are some general thoughts I put together that may help you get started on the design work.

http://bloodandspectacles.blogspot.com/2020/04/wargame-design-solo-gaming-opponent.html

Hope it helps get the creative process going for you!

Support Blood and Spectacles Publishing:
https://www.patreon.com/Bloodandspectaclespublishing 
   
Made in pl
Longtime Dakkanaut




There are plenty of board games based on conflict that are fully cooperative and so require an AI system. For a specific one I'd suggest taking a look at the one Gloomhaven uses (decks for specific enemy categories randomly triggering their actions - a deck for warriors will have different cards than one for archers. A nice touch is "special" trigger which is different for every specific enemy type in that category and adds to their uniqueness) or Machina Arcana (monsters spend their stamina on actions in specific priority -for example they use it on attacks, but if no one is in range they use it to move).

Rules for board games are generally free to get online (bgg?) so that you can check them for free.
   
Made in us
Storm Trooper with Maglight



Cadia

Heroes of the Aturi Cluster (co-op X-Wing variant) did this really well. Each enemy unit type has a table of possible actions for each combination of range and direction to the closest enemy ship and you RNG to decide which one it executes. So if the enemy is straight ahead at long range it moves fast to close the distance, if the nearest enemy is to the left it makes a sharp turn, etc. Or a bomber might instead have a higher chance of taking a slow maneuver and locking on with a missile if the enemy is straight ahead. It's simple, intuitive, and it plays out pretty well on the table with a minimum of "WTF did that ship just do" moments.

https://github.com/Hinny/HotAC-2nd-edition

This message was edited 1 time. Last update was at 2022/06/16 06:14:48


THE PLANET BROKE BEFORE THE GUARD! 
   
Made in gb
Lone Wolf Sentinel Pilot





Nottinghamshire, UK

Currently got a couple of co-op vs A.I. projects on the go myself. Generally speaking I want to avoid almost anything random outside of dice rolling in combat and that means I want to eschew decks and similar for A.I. behaviour. What I want is a situation where the human participants can quickly work out what an A.I. model should be doing at any given time, or if they have to look it up be able to do so in very little time.

The way I do this is primarily with a list of conditions and what the model should do in each condition/state - for example if the model is standing and can see a player character will it shoot, charge, etc, if a model is prone or on fire what should it do, if it can't see any players how will it search for them and so on. This is done as a table with possible circumstances in one column and the model's required action in the other.

However I do also add some general guidelines based upon which enemy faction you're facing, which are designed to smooth over situations where it's ambiguous what each model should be doing (though I've tried to avoid this)...

So, for example, for the faction that is meant to be the "tactical" guys some of these general guidelines would be to remember that they will always end their move in the best cover they can reach, if in charge range they will use grenades and if they start their activation in melee range of a character their "script" would be melee-withdraw-shoot. On the other hand the ragtag fanatics faction will only gravitate towards cover if they can see a target to shoot at and will just run in via the shortest route if no target is visible which potentially allows you to ambush them while they're racing about out of cover.

This message was edited 3 times. Last update was at 2022/06/22 17:30:13


Driven away from WH40K by rules bloat and the expense of keeping up, now interested in smaller model count games and anything with nifty mechanics. 
   
Made in us
Dakka Veteran




Seattle, WA USA

I'm working on a solo/co-op game as well, and decided against dice/cards for "random" behavior of Bad Guys. I did write out a few bullet-list type points of what actions an enemy would take given a certain behavior characteristic (I have a few different types for my game; yours may not need that) and situation. Kind of a flow-chart dealio. I think this makes more sense than pure randomness, since it isn't often that an enemy might be in the middle of a firefight then decide to move off randomly in some other direction, for example--something that can happen if you use only random generators.

I don't think it needs to be ultra complicated, though. Depending on your game it might be as simple as something like what's done in Frostgrave with a very small list of "If/then" clauses in order.

I think an important question to ask yourself is what you want the players' challenges to be. Are they just murder-hoboing every enemy that comes into sight, with the enemies likewise being mostly mindless aggressive monsters (which sounds kinda Doom like, honestly)? Are they trying to stop the Bad Guys from activating some death-o-matic device? Somewhere in between? Knowing what kinds of things you want players to overcome will help in figuring out what kinds of things you want your Bad Guys to do.
   
Made in us
Storm Trooper with Maglight



Cadia

 Fezman wrote:
Generally speaking I want to avoid almost anything random outside of dice rolling in combat and that means I want to eschew decks and similar for A.I. behaviour.


IMO you have to have some kind of RNG element to make AI players work. If you have a purely deterministic element you either have to leave things vague and put the players in a position of having to help the AI win by making decisions that go against their own best interests or lay out a very specific set of instructions that reduce the game to solving the puzzle of how the AI will react. In that second case it becomes less about simulating the actions of a real player and more about planning out exactly how to best exploit the AI's mandatory actions next turn and force the AI to do inefficient things. A well designed RNG element prevents this by only allowing the players to know the AI's potential actions in very general terms that map closely to what a real player would do. It's the difference between knowing that, because you're to the left of the AI ship, it will probably do something involving turning to the left to engage you vs. knowing that the enemy ship will do a speed-3 left turn and moving one of the player ships into that exact spot to block it while the rest of the squadron shoots it in the back.

THE PLANET BROKE BEFORE THE GUARD! 
   
Made in gb
Lone Wolf Sentinel Pilot





Nottinghamshire, UK

CadianSgtBob wrote:
 Fezman wrote:
Generally speaking I want to avoid almost anything random outside of dice rolling in combat and that means I want to eschew decks and similar for A.I. behaviour.


IMO you have to have some kind of RNG element to make AI players work. If you have a purely deterministic element you either have to leave things vague and put the players in a position of having to help the AI win by making decisions that go against their own best interests or lay out a very specific set of instructions that reduce the game to solving the puzzle of how the AI will react. In that second case it becomes less about simulating the actions of a real player and more about planning out exactly how to best exploit the AI's mandatory actions next turn and force the AI to do inefficient things. A well designed RNG element prevents this by only allowing the players to know the AI's potential actions in very general terms that map closely to what a real player would do. It's the difference between knowing that, because you're to the left of the AI ship, it will probably do something involving turning to the left to engage you vs. knowing that the enemy ship will do a speed-3 left turn and moving one of the player ships into that exact spot to block it while the rest of the squadron shoots it in the back.


Indeed this is something to consider. It certainly seems that some element of randomisation is common in published solo rules - speaking purely for myself in terms of my own ruleset WIP the aim is to minimise bookkeeping during AI activations. But that said I'm certainly not ruling out adding more randomisation - for example. when the A.I. is in an unaware or searching state.

Driven away from WH40K by rules bloat and the expense of keeping up, now interested in smaller model count games and anything with nifty mechanics. 
   
Made in us
Storm Trooper with Maglight



Cadia

 Fezman wrote:
Indeed this is something to consider. It certainly seems that some element of randomisation is common in published solo rules - speaking purely for myself in terms of my own ruleset WIP the aim is to minimise bookkeeping during AI activations. But that said I'm certainly not ruling out adding more randomisation - for example. when the A.I. is in an unaware or searching state.


Look at the X-Wing rules I posted earlier. It's a very low bookkeeping system, for each AI ship you identify the facing of the closest enemy and then roll a single die on that facing's table to determine what it does. It's only the single die roll and nothing is ever tracked between turns. But because you RNG between multiple different but reasonable choices the players can't play the game of trying to exploit the predictability of the AI.

This message was edited 1 time. Last update was at 2022/06/23 21:05:22


THE PLANET BROKE BEFORE THE GUARD! 
   
Made in gb
Troubled By Non-Compliant Worlds






Yep - without any 'random/fuzzy factor' what you are actually doing is generating a 'solvable' puzzle. The players will know how the AI will respond, and the game becomes calculating the optimum solution to win.
   
Made in us
Ork Boy Hangin' off a Trukk





The Gears of War boardgame from FFG had a simple AI activation for the enemy Locust via a deck of cards. There were general activation cards and enemy specific cards. Each card had a few if/then statements to follow. In my experience, it handled differing enemy types pretty well.

This message was edited 1 time. Last update was at 2022/07/08 15:14:28


 
   
Made in gb
Longtime Dakkanaut






This is a bit of a spitball idea but you could use action cards as a mechanic for building the AI.

The first mechanic to loot would be that of the enemy cards in the Arkham Horror game, where you deal cards from the bottom of the deck as the cards are double sided.

Then, have the AI's deck build based on the actions the player is taking - the players action cards are printed on one side, and the AI deck is printed on the other. If they are using aggressive actions, then the AI will pull more defensive cards, and if they are more defensive, then the AI will pull more offensive cards, meaning that the "AI" will respond to the way the players are acting.

You can have decks of generic actions, EG "Push Forward" (move and end closer to enemy), "Fall Back" (end move away from the enemy), "Attack", and so on, on the table, but with different AI programs on the undersides. Each time they take an action they add their action card to the AI deck (which will have a starting deck of cards which shows how the enemies act at the start of the game). When the enemy activate, they draw cards from the bottom of the deck (so it's unpredictable) and then act as described.

This sort of thing could also be used for any sort of AI combat thing, where certain enemies may respond differently to different tactics or approaches - For example, sneak actions may make one enemy stand idle whilst it makes another start patrolling, so perhaps each time you take an action it will place an AI card in the deck of any enemies within range (defined by the enemy, so each enemy has an awareness/activation range where it is triggered when you get too close) fro mthe action you chose, and then those action cats have symbols which are compared to the enemy's card. EG, you decide to sneak, and then three enemies who are nearby have the "sneak" action card added to their deck. One of them stands still when this card is drawn, and the other two start to patrol in a random direction. Attacks are triggered when they see you. Another enemy might move towards you because they smell you. So when the action card is drawn from the AI section, it may have one of a couple of symbols which match with behaviours on the enemy card - EG, "Attack" has a skull symbol on the back, so when drawn you match the skull symbol on the AI card to the behaviour on the enemy card and see "fall back", meaning the enemy moves away from you (following some rules in the book), whilst on a different enemy that symbol makes them attack, and others still it makes them teleport away.

For added random but predictably so, you can have a smaller deck of behaviours for each enemy which has a few variations on how they respond to each of the AI card symbols, EG a weak enemy might respond to attack by either teleporting or falling back, whilst a strong one might advance (and attack if they get there) or charge their attack, all depending on which AI card is pulled for the turn. Then the AI action card is pulled, and this is skewed by how you play, and this is compared to the Behaviour card to see what they do.

So you can predict that the strong enemy will be aggressive if you attack more, and the weak one will run away if you attack more, but you have no way of knowing if the strong enemy will attack or charge up for their next attack, or if the weak enemy will run away or if they will teleport behind you, or hide. You also don't know if the next AI card will be the result of your attackign or that one time you were sneaking near them. You can sort of predict them, but not completely!

Hopefully that makes some sense!

12,300 points of Orks
9th W/D/L with Orks, 4/0/2
I am Thoruk, the Barbarian, Slayer of Ducks, and This is my blog!

I'm Selling Infinity, 40k, dystopian wars, UK based!

I also make designs for t-shirts and mugs and such on Redbubble! 
   
 
Forum Index » Game Design
Go to: