This is simply something that came to mind while I was doing some research. I don't have a lot of experience with AI but I'm trying to learn some stuff about it, so maybe this has been done or is maybe even the standard for Ai, but what I would like to know is how difficult it would be and how well it would work to have a point system that determines the importance level of a series of tasks you give to an AI NPC in a game. So this AI Agent would behave accordingly based on the points given or taken away to certain categories based on the players choices in game. So for instance, if you kill his wife, he will chase you down and actively hunt you. If you steal his food though, he may just challenge you to a fist fight or yell at you when he sees you. You kill his employer, he loses his job and attempts to find another. If he is unable to acquire a job (which would be based on other things going on with other AI's obviously) then he would turn to a life of crime to survive. Survival and the well being of his family would be his top priorities, and as those points become low (in the "danger" zone you could call it), it increases the points in his likeliness to perform acts of desperation. I think this would be a very complex system and maybe not very feasible for many games. But could it be done? Could it work?
AI tasks based on point system
Hi there,
The system you are looking for can be implemented in various ways. I would go with some sort of Finite State Machine(FSM) or Behavior Tree - with some sort of Messaging/Event System. The FSM/Behavior Tree will be responsible for the decisions the NPC takes. The Messaging/Event System will notify the NPC about the event (in your case consider - death of the NPC wife) as well as additional data regarding the event (say location of the death, Event Instigator - Player or another NPC etc).
I would suggest you to take a look at both FSM and Behavior Tree, as well as take a look at Programming Game AI by Example - a great book to learn Game AI.
As for the complexity, it depends upon your needs - the system in not complex in itself but when combined with other systems like Pathfinding, it may lead you to reduce the decision making complexity.
Hope that helps.
Although the behaviour mentioned can be implemented by finite state machines or behavior trees, the 'point system' mentioned sounds much more like a Utility system, where a character performs the action that they think will bring them the highest utility.
This video has more information:
https://gdcvault.com/play/1012410/Improving-AI-Decision-Modeling-Through
+1 for utility. Say, if the NPC loses his wife and his job at the same time, the aggro behavior and the self preservation behavior need compete for the agent's immediate decision. The behaviors' utility score can grow or decay overtime so the NPC isn't locked in to any behavior.
On 5/3/2019 at 5:04 AM, Kylotan said:the 'point system' mentioned sounds much more like a Utility system
Hmm... I've heard of this "utility" stuff...
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"