Improved AI with LifeAI

Feedback on past, current, and future development.
Post Reply
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Improved AI with LifeAI

Post by ElderTroll »

Emailed the maker of LifeAI http://www.lifeai.com/ to see if he wanted to get involved. Here's what he said
Hi! Thank you for the interest in LifeAI. Sorry if my replies are sporatic – my wife just gave birth today! (seriously!)



OpenMW looks like an interesting project. I remember playing Morrowind. I felt it had a more exotic setting and atmosphere than Oblivion/Skyrim. But one limitation is that it did lack the dynamic AI of those games, as you mentioned. The NPCs are very static and it can get drab. I would blaim part of that on failing to create more interesting characters and subplots too. Certainly, LifeAI could be used to help spruce up a game world with interesting intelligent behavior. LifeAI has not been used in a project as major as yours before, would be cool to see it. It is important to understand the scope of LifeAI. It covers a very specific area of AI – decision-making. It does not include other AI-related features such as pathfinding. One of the benefits of LifeAI, is that it is a C++ library and cross-platform, which sounds like it should be compatible with your code and aspirations.



Interestingly, one inspiration for LifeAI was the “RadiantAI” system used in Oblivion. I am currently committed to another game project (a solo effort), so I wouldn’t be able to volunteer for your team. However, I would be more than happy to assist with technical questions and provide suggestions to the best of my ability as it relates to LifeAI, if you choose to implement it in your engine.



- Jeremiah
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Improved AI with LifeAI

Post by Zini »

That would be a post-1.0 feature. Probably with strong emphasis on the post part.
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Improved AI with LifeAI

Post by ElderTroll »

Oh definitely.

I thought it would be good to have it documented somewhere though. Someone down the road might *bump this thread.

I like spreading the word to other people doing interesting projects, because there might be great outcomes.
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Improved AI with LifeAI

Post by ElderTroll »

Here is more of the conversation. What I said,
Here is an idea for increasing the realism of the game which I think would have to use something similar to your program.

I would love to change the default "constant aggression" of npc's when you travel along the roads and in the wilderness. Something like LifeAI could make it so NPC's would add up the total of your equipped gear (defense + offense) against their own. People playing the game would hopefully feel like in real life characters are dynamically deciding, "what's my likelihood of taking this person in a fight?" A bandit sees me walking by with a rusty iron sword and some cheap clothes, he assume I am weak and now he's attacking, or extorting me for money. Other modifiers could be added like "number of bandits" "current health of bandit (sick, hungry, tired)"

If I am wearing beautiful armor and wielding a high level enchanted sword or the nicest mages robes and a powerful staff and I pass by a lone bandit sitting in a makeshift encampment with low level gear- they are most likely going to decide to let me pass while maybe still throwing an insulting comment. Maybe if asked they say something like, "Most people dressed the way you are have done a lot of things much worse then me, most likely to people like me. I don't want any trouble." Maybe each unique NPC could become permanently set as passive after such an interaction.

Gear differences could translate to percentages for attack behavior, so it's still randomized. There could still be a low level bandit who is hot headed and wants to prove himself like a young gunslinger in the western genre. I would like if players made inferences about what motivations behind the rare instance when a high level bandit does not to attack your low level character. Players who are interested could ask the NPC and be presented with a dialogue tree. Example, "You are the spitting image of a friend who has died", "or that it is a holy day for my religion", or "I've got dysentery. Come back next week; I'll rob you then... unless you've got medicine for dysentery. Then I'll rob you now. You don't have any medicine for dysentery that I could rob from you? No, well okay, then we're done here." That last part was a joke.


It would be fun to be a powerful mage, but travel dressed in rags decimating the bandit population and protecting travelers of Morrowind. Rumors could spread from town to town about such a hero. etc
Yes, LifeAI could be applied in the manner you suggest. Here’s an example of an “Attack” action created for the game demo, specified in a text file:



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



/Attack/



*ROLE*

attacker

defender



*attacker*

VAL_ENT(defender) < 0

dist_to(defender) < engage_dist

energy > 1, - 1

power % *defender* health



*defender*

health - 5

energy - 1

defense !% health



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



In this example, the attacker role must meet a few requirements before considering attacking – they must have a negative value of the defender, within an engage distance, and must have a certain level of energy. When the attacker performs the action, it results in decreased energy for both the attacker and defender. It also causes the health of the defender to reduce. The Attacker’s power and defender’s defense stats influence the amount of health that is decreased for the defender. Keep in mind that LifeAI is not capable of elaborate calculations for damage such as the system in Morrowind that actually causes damage to characters. But it should be enough to help NPCs make decent judgements.



LifeAI has a useful feature for a game world in the scale of Morrowind. It has a file save and load system that is designed to make it easy to partition the entities in different areas so they aren’t all loaded into memory at once.



- Jeremiah
Post Reply