Switch Theme:

Creating Opposing Monster AI  [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
Infiltrating Prowler





Portland, OR

I would like the AI for the Fiends to be able to play itself based on a set of sub-routines. We've gone through various iterations and through different methods from flipping over 'reaction' cards to a set of instructions for each. It is about time I get some other outside sources as feedback to see if I'm missing something. It isn't explained like a computer language, but I am using it to explain things as a means to show the initial thought-process behind it.

I do not want to bog down the system with a bunch of unnecessary choices or flow because I still want it streamlined but not where it takes the enemy AI a long time to complete the turn. It is important to figure out the flow of decision making to prioritize targets. Players will take turns moving and taking actions on their each of their turns, then the Fiends have their own turn to move/take actions. Although these actions aren't technically happening at the exact same time, I want a bit of realism built into the AI. What I mean by realism is, if you shoot at something and hit it, something should happen or if you miss then something should happen. Although in Zombie games it could be realistic that they don't react, I would like actions to create reactions which changes the decisions that players need to make.

The game board tiles are broken up into zones, each zone has a number of squares within them. When a Fiend moves it moves into a zone, it is placed to the closest edge where it can fit. If there are other Fiends in those squares occupying them, it can not move in that direction. The squares determine how many Fiends or players can be in a zone, they also determine line of sight. There are some hallways that some Fiends would never be able to enter or travel through normally.

-------------------------------------
JORO-GUMO - CATEGORY 2: Priority: Men
Joro-Gumo is a giant spider (her top half is human and her lower torso is that of a spider) who can change their appearance, often taking the form of a woman and seduces men. She will trap men into her webs, poisoning and then devouring them.
MOVE: 1 Zone
HEALTH: 4
ATTACK: 2
RANGE: 1
SIZE: 1 (2x2)
SPECIAL: Joro-Gumo spawns with 2 spider minions (size 1) each with 1 health. Spider minions follow the same sub-routine as Joro-Gumo, they move first then Joro-Gumo moves.

(The basic AI goes through a basic sub-routine, outlined on their card basically going through the actions.)

1: Is an enemy player within Line of Sight? If multiple players within LoS, prioritize closest male as TARGET even if it is further away, otherwise player with highest Presence is TARGET.
2: ATTACK if within range.
3: If not able to attack then MOVE closer towards target.
4: ATTACK if within range.
5: If Joro-Gumo did not attack, spawn another spider minion.

WHEN HIT: If Joro-Gumo is within the same zone as the attacker, she will randomly move away one zone; Each of her spider minions will also scatter, moving the opposite direction she moved. Otherwise she and her minions will move 1 zone towards the attacker.
WHEN MISSED: If Joro-Gumo is within the same zone as the attacker, she and her minions will move one random zone away.

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

HYOSUBE - CATEGORY 1
The Hyosube are short, child-sized river Yokai that live in underwater caves. They venture out onto land at night cause mischief and mayhem. They don’t try to hide but wander where they want, if they are seen they will attack and kill the person who saw them.
MOVE: 1 Zone
HEALTH: 2
ATTACK: 1
RANGE: 0
SPECIAL: During the player's turns, if a player enters Line of Sight with Hyosube then he will move 1 zone towards that player.

1: Is an enemy player within Line of Sight? If multiple players within LoS, player with highest Presence is TARGET.
2: ATTACK if within range.
3: If not able to attack then MOVE closer towards target.
4: ATTACK if within range.
5: If other Hyosube are within Line of Sight of active Hyosube or TARGET, they will move 1 zone closer to target.

WHEN HIT: Hyosube will move 1 zone closer to the attacker. If he is within range, he will ATTACK.
WHEN MISSED: All other Hyosube in Line of Sight will move 1 Zone towards the attacker. If he is not in the same zone, he will move one zone closer towards the attacker. If he is within range, he will ATTACK.
-------------------------------------

Fiends have other specials or actions they can do like lay traps that snare(slow) or poison players, create temporary summon portal or create a blockade/obstacle. As players try to collect enough Ki to stabilize a portal to get out, some campaigns may have them searching for artifacts and other things. In the process players search rooms which can be equipment, event card that can spawn new fiends at different locations but can also spawn 'innocents' that need to be rescued. Innocents are treated as secondary characters that can't attack but become the target priority when in line of sight.

In terms of the AI routine, first this, then this and how it reacts to players actions in terms of attacks... Do you think something like this is too much or is it adequate? Are there other ideas to enhance the AI, to reduce a predictable AI and add randomness with a purpose to the game?
   
Made in gr
Thermo-Optical Spekter





Greece

Interesting, I am planning on working on automated "AI" enemies, but I have not studied much for it yet.

KDM has a nice AI system it seems.
   
Made in us
Battlefield Tourist




MN (Currently in WY)

I think AIs need Aggressive and Passive modes, and certain actions by players will trigger them to change from one mode to the other.

Passive may involve more moving around, getting into cover, taking attacks of opportunity. However, once players attack, or get a certain distance on the board, or seize an objective; then the AI may switch to Aggressive mode where the models move towards the enemy, attack more, and are less likely to skulk about in cover.

Support Blood and Spectacles Publishing:
https://www.patreon.com/Bloodandspectaclespublishing 
   
Made in us
Infiltrating Prowler





Portland, OR

 PsychoticStorm wrote:
KDM has a nice AI system it seems.
I haven't played KDM but I've seen parts of it played. It is my understanding though the AI system itself is essentially built upon a small field like 6x6 field. During combat part it works well but how does it work outside of the encounter? I always imagine KDM playing like Final Fantasy style game, where you wander then when combat happens the battle zooms into your 6x6 field and you fight. That is just based on what I have seen though, I haven't played it or seen how it transitions to and from events.

 Easy E wrote:
I think AIs need Aggressive and Passive modes, and certain actions by players will trigger them to change from one mode to the other.

Passive may involve more moving around, getting into cover, taking attacks of opportunity. However, once players attack, or get a certain distance on the board, or seize an objective; then the AI may switch to Aggressive mode where the models move towards the enemy, attack more, and are less likely to skulk about in cover.
For a wargame that is probably a good route to start go, when the game has things like cover. It is a good way to create patrols or patterns that they move until someone draws "aggro" from certain actions. This is a board game so there isn't things like cover or taking an attack of opportunity, other than some might trigger special abilities when within line of sight.

Passive mode consists of them moving towards "Presence". If you have played Zombicide, it is similar to noise. This takes place in the spirit world so the players don't belong, actions, things they do can create a strain on the environment creating a "Presence". Passive mode initially is those Fiends moving towards those areas of Presence to investigate. There are a couple though that don't move based on that mechanic, they have special abilities that instead move based on an existing Fiend having Line of Sight or they might move towards the Objective as the priority instead. Some Fiends open doors, while others go around.

Active mode consists after line of sight is established. We haven't created a distance limit for line of sight yet, currently it is just based on the tile, having clear line, although buildings do interrupt LoS. Someone could close a door, move into a hallway and not be in direct line of sight. Fiends priorities change based on their 'target' preference. It isn't simply who has the most presence, some seek a certain type of character (male, female, innocent, teenager) or emotional state associated with characters (angry, depressed, loner). Their targets determine who they might be looking to attack or target, which isn't always prioritized by the closest. Some with range will try to stay at optimal range, but not within close range. If a player moves towards them closer, they would be moving away but still with range to attack.

We are currently messing around with line of sight. Something like Line of sight being forward arc facing, so if players are behind a Fiend, they can attack like a surprise attack and not trigger any abilities or specials. Once attacked the Fiend that was attacked will turn to face them, if it was still alive and then trigger anything that triggers. Others might not turn around unless there is more Presence behind them, causing them to turn and making line of sight. The same can happen to players, a Fiend behind a player could trigger something where there are Fiends behind them. The fiends could have line of sight and have a surprise attack but players wouldn't be in LoS of them.
   
Made in jp
[MOD]
Anti-piracy Officer






Somewhere in south-central England.

There is a very interesting game on PS1 called Carnage Heart, in which you build robots that fight each other using preprogrammed combat moves (decisions) that are slotted into a flow chart representing their on-board computer. This is represented as a square grid, with the decisions filled into the squares.

https://en.wikipedia.org/wiki/Carnage_Heart

It seems to me that if you break down the Monster decisions into blocks, you could experiment with a similar layout and see how it works in practice. This would also let you make one monster more cautious, another one more agressive, etc, juts by changing the layout of the programming.

I'm writing a load of fiction. My latest story starts here... This is the index of all the stories...

We're not very big on official rules. Rules lead to people looking for loopholes. What's here is about it. 
   
Made in us
Decrepit Dakkanaut






SoCal, USA!

 Dark Severance wrote:
 PsychoticStorm wrote:
KDM has a nice AI system it seems.
I haven't played KDM but I've seen parts of it played. It is my understanding though the AI system itself is essentially built upon a small field like 6x6 field. During combat part it works well but how does it work outside of the encounter?

I always imagine KDM playing like Final Fantasy style game, where you wander then when combat happens the battle zooms into your 6x6 field and you fight. That is just based on what I have seen though, I haven't played it or seen how it transitions to and from events.


KD:M is a 3-step simulation of Hunting, Fighting and Settlement. The AI only applies during the Fighting, where the AI cards are the hit points. As the monster's HPs whittle down, the monster gets more predictable. Yes, this can result in infinite loops, for a guaranteed party wipe...

Conceptually, it's a bit more Monster Hunter than FF.


Automatically Appended Next Post:
 Kilkrazy wrote:
There is a very interesting game on PS1 called Carnage Heart, in which you build robots that fight each other using preprogrammed combat moves (decisions)


I had that game and it was great. But then, I was an experienced computer programmer by the time I got it, so it's a natural fit for me.

If you were not a programmer, the programming wouldn't be as much fun.

Compare with the old Rogue Trader Robots. Or Roborally. Or Robot Turtles.

This message was edited 1 time. Last update was at 2016/04/06 21:28:30


   
Made in us
Infiltrating Prowler





Portland, OR

While I was driving home on my long commute, I started to think about an AI that would provide multiple random attacks and didn't rely on the cooperative players on making decisions (to prevent gaming the system). My wife wanted an RPG dungeon crawl that was a bit more robust but not overly complicated. I started to think about how to apply deck building style of gameplay, not the actual act of deck building, but the concept behind it fused into prebuilt Monster decks.

The basic idea is fantasy based centered around the basic classes: Warrior, Rogue, Ranger, Mage, Cleric, Paladin. For the most part the classes have different attacks and abilities but utilize basic weapons. Similar to how in a MMO a weapon is available to X, Y classes but not usable by Z. The concept for attacks is similar, a sword slash is something that Warrior, Rogue, Ranger and Paladin could use. A ranged attack could be something that a Rogue, Ranger, Mage and Cleric could do.

Players pick their prebuilt characters, then they choose an adventure or quest. The quest outlines how to create the Dungeon deck, that identifies what creatures could spawn. They are multiple creatures based on the adventure. There are also no spawn and treasure cards that are in it. Those are shuffled together. The adventure also outlines what cards to include in the Enemy Ability deck. That attacks have class icons which represent what creature can use them, so one attack would have multiple icons. That is shuffled up.

Players move through the dungeon uncovering the map as they go. The dungeon tiles are shuffled. Some tiles have symbols that represent something happening like an Event, which is drawn from the Event deck (could be traps or treasure). Otherwise as tiles are uncovered you flip over a monster card which tells what enemies are spawned there. Some aggro but most encounters won't aggro until you enter those tiles, so you can see up ahead what to expect most of the time.

When attacks happen you draw 7 cards from the ability deck. Choosing 5 attacks that match the class icon of that monster. Whatever isn't chosen is discarded into the discard. If you didn't get 5, you draw up to 7 and repeat until you have 5 attacks. Shuffle and then the top card is the first attack. Resolve based on the card. If there are dice that it has to roll, the player to left rolls them for the monster. If there are multiple attacks, you'd draw the next card. If there are no more attacks, those cards are put into the discard. If the ability deck runs out, reshuffle the graveyard and continue.

It takes only a few seconds to resolve attacks as there isn't a lot of choices to make. Someone could draw 7 cards that had viable attacks, so they could game it by picking the 5 weakest. That is fine. This could also be mitigated by saying pick the highest level attacks. It provides multiple attacks, with different damages, so it isn't always the same static attack or ability used. Some attacks could trigger, drawing another attack card.

Overall combat should be fluid and fairly quick. I'm still outlining possible attacks and types to create a mock-up to play through the motions to test it further.
   
Made in us
Decrepit Dakkanaut






SoCal, USA!

Did you not just describe CMoN's upcoming Massive Darkness game? Except you are using cards instead of rolling up to 3d6.

   
Made in us
Infiltrating Prowler





Portland, OR

 JohnHwangDD wrote:
Did you not just describe CMoN's upcoming Massive Darkness game? Except you are using cards instead of rolling up to 3d6.
No idea. The only information I've seen released was that it was not a reskin of Zombicide but was based on parts of it. I assumed they'd have a pre-laid out dungeon or map.

I was thinking tiles more along the lines of Betrayal at House on the Hill or the AD&D Adventure. However instead of simply flipping the tile as you travel, tiles are flipped over in advance depending on players abilities and actions. They can scout ahead uncovering parts. Instead of having the fog be one tile at a time, it spreads out by 1-2 tiles. So if you crossed into a room with 3 directions to choose from, all three of those are flipped over and creatures are spawned. Then you can choose where to go or if have other abilities scout further, uncovering additional tiles.

The only issue with a dice mechanic for determining attacks, the attacks are still a base static amount. Even in SDE attacks are essentially 1-4 different attacks because you are limited to what you fit on a card. Those attacks are always the same, same damage, just requiring different things to trigger them.

With a card based mechanic you can have different types of "Sword Slash" with each one doing different things. There could be a Level 1 Slash which does a lower amount of damage. There could be a Level 3 Slash which does more damage. There could be one that applies a poison dot. Or even one that starts a combo attack, requiring to reveal another attack. You might end up with the same creatures, but the creatures give the illusion of being different strengths, attacks, that aren't as predictable as a static card. I also might be biased because of deck building games, drawing, choose, shuffling and drawing goes faster for me.
   
Made in us
Decrepit Dakkanaut






SoCal, USA!

We'll find out more, later, but we know MD is a dungeon crawler that adds classes (with skill trees) to Z:BP (which added armor to S3:RM), so that's your core concept right there.

As for the dungeon, you should presume tiles like Zombicide, with scenarios defining specific dungeons / maps, and a spawn deck coupled with Monster AI.

Dice are fine, and SDE attacks get pretty big or fancy with bonus dice and special rules.

Cards can level up, which is what SDE and KD:M do to some extent. Nothing that you describe seems like something like what we have in other games.

Cards are fine, but my sense is that some games are overly dependent upon cards, simply because they are cheap to print in bulk.

   
Made in us
Infiltrating Prowler





Portland, OR

 JohnHwangDD wrote:
We'll find out more, later, but we know MD is a dungeon crawler that adds classes (with skill trees) to Z:BP (which added armor to S3:RM), so that's your core concept right there.
Classes was an example of how to similar characters share same attacks. It was the easiest way to explain it since it is a RPG staple. Not to mention dungeon crawlers with classes have been around for awhile, D&D Miniatures Adventure Game (Temple of Elemental Evil, Legend of Drizzt, etc), Descent has classes.

 JohnHwangDD wrote:
Cards can level up, which is what SDE and KD:M do to some extent. Nothing that you describe seems like something like what we have in other games.

Cards are fine, but my sense is that some games are overly dependent upon cards, simply because they are cheap to print in bulk.
Did you mean to say that what I described wasn't unique? I don't disagree, I didn't say it was unique but it was a different way to handle action/attacks for an AI.
   
Made in us
Decrepit Dakkanaut






SoCal, USA!

I think I muddled what I was trying to say, sorry.

Uniqueness is overrated. Give me a well-polished game using well-used mechanics, and I'll be happier than playing a rough game with "innovative" mechanics.

   
 
Forum Index » Game Design
Go to: