Artificial Intelligence

Discuss your creative projects: game development, writing, film making or any thing else, fantasy related or otherwise! Talk about art you like, display your own artwork or stories, or offer help and insight.
Forum rules
Please read the Forum rules and policies before posting.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Artificial Intelligence

Post by Chaos-Shaman »

I've had this question in my head for a little while and I'd like to hear what everyone else thinks.

What would everyone want the most in an AI? What is considered as AI? and if the question has been asked before, please forward to the forum.
It would help to understand what people like the most with interactions with npcs, monsters, and other characters.
keep your gor coin handy
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Artificial Intelligence

Post by beowuuf »

Differing behaviours with regards the part - so there is a difference in being stalked by a creature, running away from a creature, or attacking a creature.
User avatar
oh_brother
Son of Heaven
Posts: 1897
Joined: Wed Aug 12, 2009 11:13 am
Location: The Screamer Room

Re: Artificial Intelligence

Post by oh_brother »

Tactical combat, where they try to carry out the square dance on you. Or they can move away and heal themselves when in trouble.
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Artificial Intelligence

Post by terkio »

"Heal themselves when moving away".
This is a very good point, this would be a dramatic change in combat.
An interesting change for a more real virtual world, heros heal with time and potions, how come, monsters don' t heal at all.
This change would make combats more challenging, the tactic to wear off a monster by multiple hits and hides or hits and saves would not work anymore.
Last edited by terkio on Sun Oct 20, 2013 2:41 pm, edited 1 time in total.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

beowuuf, can you give examples of different stalking methods you'd like to see.
can you explain the different ways you'd like to see when running from a creature?
i think i understand the attacking part, not sure if there can be much that can be done with it though that has already been done.
i am interested in any kind of an AI suggestion.
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

oh_brother wrote:Tactical combat, where they try to carry out the square dance on you. Or they can move away and heal themselves when in trouble.
hmmm, that sounds like it's been done with RTCs, teleport if in danger, but i can see what you mean. so you want to teleport away like chaos and then slowly step heal the monster. to side step the monsters, do you mean you'd like to freeze or slow the monster so the player can hit them. i never found a problem 4x4ing and killing monsters, but i see a few other kind of ways to perform this action that can be rigged up being activated by objects carried or other monsters... what other intelligence would you like to see?
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

terkio wrote:"Heal themselves when moving away".
This is a very good point, this would be a dramatic change in combat.
An interesting change for a more real virtual world, heros heal with time and potions, how come, monsters don' t heal at all.
This change would make combats more challenging, the tactic to wear off a monster by multiple hits and hides or hits and saves would not work anymore.
monsters can heal in different ways, so this can definitely be done with time and stats, i think it's a matter of checking the health value of monster or counter, if the value is surpassed the monster can be healed ( swapped out to same monster with higher health ) or health potion.
any more ideas??
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

i was thinking on making it so when a spell is cast or an item thrown that it'll activate if monster is at certain health to a clone with different attributes and move out of the way via using monster attractors, teleportation or stats. i was dreaming of it last night on how to give monsters enough smarts to get out of the way of an incoming spell or object when health is to low, not just run away like we already have. we want them to run away, heal a bit then attack once more. this can be done, so say like a beholder casts a spell then changes tactics and runs away, then comes back and casts another.

how about a monster that can merge with other monsters into some kind of super beast sharing abilities? this can be done.

how about a monster that travels about cleaning up the dungeon :)

any ideas, please feed me.
keep your gor coin handy
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Artificial Intelligence

Post by beowuuf »

The coming after you / stalking probably comes down to monster awareness.

So if you disengage, differences in whether the monster cares about you. IN DM due to some awareness codes, it seems like Scorpions can easily lose interest in you, and worms sometimes never come after you.

So perhaps there is a chance that if monster loses sight of you, something gets wiped so they disengage and don't follow the party.

Then a difference in behaviour if they are following you. So somehting like a knight might just come after you quickly and never lose awareness of you. Whereas perhaps a rat knows where you are, but is far slower in coming after you, as if slowly tracking your trail. And perhaps does not attack again unless another creature is close.


Being able to trick how a creature is aware of the party may make it feel different between an intelligent creature that wishes you dead no matter what, and intelligent creature just defending an area with a chance of tracking you, a normal creature just defending its territory, or a hostile creature that sees you as food and starts stalking you.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

oh, just lovely beowuuf, i can do every one of those things with an exception, i can't figure out how to keep track of the monsters stats. this is something one of you lovely programmers can do.

*ok, i have just created a monster that when a fireball is cast it will quickly move out of the way, IT WORKS, hehe, i couldn't hit the bugger unless it made the wrong move. now the monsters know when a spell is being cast and will dart hopefully out of the way, actually a monster can know anything the party does, this is why i am asking what people think is AI, obviously darting your enemies spells and objects are one.

so when you say stalking, do you mean for a specific party member? do you mean hidding behind objects, or ducking out of view when the party turns their direction? follow the party on a fast\slow pace... because, we could have a monster do that, the direction thing might be hard, the rest is possible.
so that would be a monster that has view of 10, but an attack of 4, so when the monster reaches 4, it can stay or retreat, but will follow from as far as 10 tiles away. i can see this working with a few tweaks to it. off to moms, back later. please give me more AI ideas.
keep your gor coin handy
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Artificial Intelligence

Post by beowuuf »

I was thinking stalking as in the whole party, but of course it might be interesting if you pick a certain party member, some NPC is looking for him (bounty hunter) or some monster tracks him (likes the taste of bika flesh, for instance!)
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Artificial Intelligence

Post by Ameena »

On the subject of monstres healing themselves, this occurred in Stonekeep, if anyone remembers that game (basically like a later version of DM, came out in about '95 or something I think). There were these creatures called Shargas (who were basically green, goblinoid guys) who would heal themselves if they had access to such things - some carried Heal Roots on them (basically edible healing items) and if you hurt them enough they'd retreat a bit and attempt to eat one - if you killed them before they had a chance to do so, they'd therefore drop any roots they had left when they died. There was another point I remember where a particular Sharga would, at low health, attempt to retreat around the corner in a small room, open a secret brick in the wall, and eat the hidden Super Heal Root (the best kind of Heal Root available) which was stashed there. If you ran into the room and dashed past him before actually starting to fight him, he wouldn't be able to get past you in order to do that, so you could loot it yourself once he was dead :). Other monsters in Stonekeep had various tactics they used, but that's the first that sprang to mind on reading some of the posts here :).
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Artificial Intelligence

Post by terkio »

Sure, I remember Stonekeep, a great game I enjoyed long ago, that was the time my PC was a 486 DX.
I forgot the Shargas and their healing roots. Here, they are : http://www.youtube.com/watch?v=aX0hbPajB1c
The Sharga mines http://www.youtube.com/watch?v=rwfF3xDMo5s
Indeed Shargas AI, explained by Ameena :) , is a worthwhile exemple of healing monsters.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

beowuuf wrote:I was thinking stalking as in the whole party, but of course it might be interesting if you pick a certain party member, some NPC is looking for him (bounty hunter) or some monster tracks him (likes the taste of bika flesh, for instance!)
oh, i sure do think that an attack can check the party and items, i have made a situation some years ago where the monster checks party for a certain key, if it is found the monster does a hurting attack and spews out messages that it knows you have the key, so yes, this can be done beowuuf.
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

i played Stonekeep Ameena, i wasn't pleased with the movements, if i remember correctly it needed to be patched and really was a poor job of a DM improvement. it was too clunky for me, i didn't like it very much. i can't remember a whole lot about its AI though. i am very confident that a monster can be made healable in the way you are thinking. and it wasn't a slow computer, i bought the first pentium 60 when it came out, the one with the floatingpoint error, at the time it cost 5000, yeah, damn expensive computers! well, tell me more about stonekeep.
keep your gor coin handy
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Artificial Intelligence

Post by Ameena »

Well, what did you want to know? There's quite a lot I could say about it ;).
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

thanks terkio, it brought back all the memories :) khum dude, i remember how cool he sounded, that is one thing in the game that did exceed DM, it was the cave sound effects, especially his voice. the walls flipped like DM, i wasn't impressed with the graphics too much when it came to the walls, sure the lamps looked nice, but it just didn't feel like DM to me. still i'd rather play a game like that than any of the sports games they had at the time. thanks.
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

please Ameena, FIPPY :), tell me the AI of it, it is best to decribe it, makes it easier to build on it, something like what Clodius does, he draws by example,i can create AI from example. one thing i did like about the attacks were the characters weapons showing up for a slash, hack, swipe, that was cool, but i believe that is what slowed the games engine down though.
keep your gor coin handy
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Re: Artificial Intelligence

Post by Ameena »

Melée attack types in Stonekeep were Cut, Crush, and Pierce (and then you had spells like Fire Bolt providing various types of magical damage), and all creatures (including party members) had varying resistances to these. For example, a skeleton had high Pierce resistance but much lower Crush resistance (try stabbing one between the ribs as opposed to bashing it on the skull with a hammer ;)). You also attacked with your weapon at whichever point on the screen you clicked, so stabbing a Sharga or a Throgg (the Shargas' larger, meaner, cousin-species) in the face was more effective than stabbing one in the chest.
Some creatures (like Shargas, generally not noted for their immense levels of bravery ;)) would run away at low health and try to heal or hide behind a corner.
Throgg Shamans would try to keep their distance where they could attack you more effectively with their spells as opposed to getting in close and bashing you in the face with their staves.
Ants came in two types, Workers and Warriors - the former would only attack you if you attacked them first, while the latter was always hostile (and as far as I can remember, there was no physical difference between the two so you wouldn't know which was which until you got close enough to see if they'd attack you...not that they were much of a threat).
Faeries had two forms - a short, humanoid one (apart from the queen, who was human-sized...but she only ever appears for dialogue scenes so you couldn't ever attempt to attack her) and a sparkly, wisp-like one. If you ever attacked a Faerie (they were all non-hostile NPCs), he'd change to his wisp-form and fly away, reappearing later if you returned to the spot. There were actual Wisps as well, which would dart around rapidly and thus be difficult to hit.
Giant Wasps lived in nests in the ceiling, and there'd always be a non-hostile drone buzzing around beneath a nest. This drone wouldn't attack you unless you attacked it...at which point wasps would start spawning from the nest, which contained a total of about fifty of the things, and would buzz around very fast and be hard to hit. However, at no point was it ever necessary to pick a fight with a wasp nest, so you could just ignore them.
Faerie Wasps, on the other hand, were always hostile (as well as being a vivid shade of purple), but there were only about three of them in the game and they weren't particularly difficult to kill. They'd attack by throwing sparkly magical bolts at you.
Towards the end of the game, you'd encounter a small area which was the lair of the Dark Dwarves. There were about thirteen of them and they'd all attack you the moment you entered their lair. However, if you ignored them, ran around the corner, and broke the top off the big black stone thingy there, its power would be destroyed and the Dwarves (who'd been under the control of the stone thingy's magic, put there by the Big Bad) would turn friendly and thank you for saving them.
There was also a whole level called the Dwarven Fortress, where Dwarves unrelated to the Dark Dwarves lived. There were merchants there as well as guards and a few important NPCs. One of the merchants was a blacksmith and if you attempted to enter the back room of his forge he'd ask you not to go there (it's his private quarters). If you ignored him, he'd attack and his brother would appear from the back room and join in. There was also a dwarf merchant from whom you could buy potions and other useful items. If you picked up the stuff you wanted to buy and then approached him, he'd tell you how much gold it would cost, and hold out his hand for the payment (if you tried to leave without paying, he'd ask that you put the stuff back or pay for it - continuing to walk out of the shop would result in every dwarf in the fortress turning hostile). If you instead gave him some feathers looted from defeated Throgg Shamans, he'd tell you how a Shaman once killed his family (or a member of his family, I forget specifically) and it might be that that Shaman was one of the ones you killed. As a result, he tells you you can take whatever you like from his shop, no charge :).
Another interesting piece of AI was that of Vermatrix Goldenhide, the dragon chained up on one of the levels roughly in the middle of the game. She had a thing called the DAL (Dragon Anger Level), a hidden count of how angry she was. The DAL started out at zero, meaning she was asleep. If you go up to her she'll wake up, raising the DAL to one (awake but calm). If you didn't go away quickly enough after speaking to her, or tried to attack her, the DAL would rise. Her tone in conversation would reflect the DAL (ie she'd be a lot more annoyed if her DAL was higher, and more polite if it was lower). The maximum was five, I think (homicidal). Fiery burny death awaits soon afterwards ;). I never pissed her off this much, though - never let the DAL get above one. The only reason I even know about it is because of the strategy guide (incidentally, in my opinion the best laid-out strategy guide book out of all those I've read...not that I've had a guide in book form for a very long time now ;)).
There's probably a bunch more stuff I can't remember right now, too.
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

lots to read there :)

here is example of monster ai
http://www.sendspace.com/pro/dl/dluvz0
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

Melée attack types in Stonekeep were Cut, Crush, and Pierce (and then you had spells like Fire Bolt providing various types of magical damage), and all creatures (including party members) had varying resistances to these. For example, a skeleton had high Pierce resistance but much lower Crush resistance (try stabbing one between the ribs as opposed to bashing it on the skull with a hammer ). You also attacked with your weapon at whichever point on the screen you clicked, so stabbing a Sharga or a Throgg (the Shargas' larger, meaner, cousin-species) in the face was more effective than stabbing one in the chest.
Some creatures (like Shargas, generally not noted for their immense levels of bravery ) would run away at low health and try to heal or hide behind a corner.
well i don't think that would be easy to do Ameena, but it would be nice. the last part of healing and hiding behind a corner bit can be done.
Ants came in two types, Workers and Warriors - the former would only attack you if you attacked them first, while the latter was always hostile (and as far as I can remember, there was no physical difference between the two so you wouldn't know which was which until you got close enough to see if they'd attack you...not that they were much of a threat).
this can be done
Giant Wasps lived in nests in the ceiling, and there'd always be a non-hostile drone buzzing around beneath a nest. This drone wouldn't attack you unless you attacked it...at which point wasps would start spawning from the nest, which contained a total of about fifty of the things, and would buzz around very fast and be hard to hit. However, at no point was it ever necessary to pick a fight with a wasp nest, so you could just ignore them.
this can be done
he'd tell you how much gold it would cost, and hold out his hand for the payment (if you tried to leave without paying, he'd ask that you put the stuff back or pay for it - continuing to walk out of the shop would result in every dwarf in the fortress turning hostile).
this would be nice
similar to the shop in RTC, i bet most engines can do this
Another interesting piece of AI was that of Vermatrix Goldenhide, the dragon chained up on one of the levels roughly in the middle of the game. She had a thing called the DAL (Dragon Anger Level), a hidden count of how angry she was. The DAL started out at zero, meaning she was asleep. If you go up to her she'll wake up, raising the DAL to one (awake but calm). If you didn't go away quickly enough after speaking to her, or tried to attack her, the DAL would rise. Her tone in conversation would reflect the DAL (ie she'd be a lot more annoyed if her DAL was higher, and more polite if it was lower). The maximum was five, I think (homicidal). Fiery burny death awaits soon afterwards . I never pissed her off this much, though - never let the DAL get above one. The only reason I even know about it is because of the strategy guide (incidentally, in my opinion the best laid-out strategy guide book out of all those I've read...not that I've had a guide in book form for a very long time now ).
There's probably a bunch more stuff I can't remember right now, too.
wouldn't that be nice. i see no reason why a counter wouldn't work there with a timed event, that must be doable.

thanks, i enjoyed the memory lane, i didn't have the book of strategy, i never used them.
i played Linflas dungeon, didn't know about the spell book runes until the end, i hacked my way through it :) using torches sparingly.
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

beowuuf wrote:I was thinking stalking as in the whole party, but of course it might be interesting if you pick a certain party member, some NPC is looking for him (bounty hunter) or some monster tracks him (likes the taste of bika flesh, for instance!)
it's done :) works pretty good, doesn't work perfect, but when it comes to behaviour, nothing is perfect. we now have a deth knight spy stalker. he will once in a while bump into the party, but mostly stays 3 tiles away, moves toward party when party moves away, moves away from party most of the time when getting too close. we can now target the party with other items and characters to anyones wish.
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

here is an update to the ai, added the deth spy stalker as requested by beowuuf.

http://www.sendspace.com/pro/dl/ztrpqu
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

i have many questions still about ai, what is it people would like to see the most, fire away, i need ideas :)
keep your gor coin handy
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

beowuuf, any suggestions on the deth spy stalker? is that what you were thinking? is there a behaviour you'd like to see added?

i am a little surprised there have been no comments, makes one wonder....

no more ideas?
keep your gor coin handy
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Artificial Intelligence

Post by beowuuf »

It was merely a suggestion based on your question! I've still one dungeon to play around with, so don't expect an in-depth comment on a second demo any time soon I'm afraid :(
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

oh, no worries mate. there is not much to it... i await your suggestions.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Artificial Intelligence

Post by Seriously Unserious »

Hey C-S, I finally found this thead, I've been looking for it all week. I remembered you mentioning somelthing about it in one of your emails to me but couldn't find the thread right away, I was looking around in the RTC forums, so that's probably why I couldn't find it...

Anyhow, I already have the most recent version of your AI test dungeon and I'll take a look at it soon to see what you have so far. As far as healing monsters goes, there is an action available that heals monsters. I'll be using this in my Lynchgate game so the party can heal friendly monsters, such as the guards. Once I have played around with the demo and seen what you're already doing, I can come back with any suggestions of other things that would be useful.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Artificial Intelligence

Post by Chaos-Shaman »

oh great, i placed it here because i was looking for everyones suggestions on ai. the examples here i think are different, have a look.

tell me what you think.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Artificial Intelligence

Post by Seriously Unserious »

I'll take a look at that this week. I'm pretty busy with Xmas preparations right now and getting some work done on my own custom dungeon but I definitely will want to take a look at what you've been doing with the monster AI. I'll need a much improved monster AI system for my forthcoming projects.
Post Reply