Jump to content
  • Advertisement
ethancodes

AI tasks based on point system

Recommended Posts

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? 

Share this post


Link to post
Share on other sites
Advertisement

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. 

Share this post


Link to post
Share on other sites

+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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!