User Tools

Site Tools


needsbasedrpgcharacterai

Maslow-based NPC AI engine

Summary

An artificial intelligence engine loosely based on Maslow's Hierarchy of Needs, for use by non-player characters in role-playing games.

Characters have different needs and desires, at different levels of importance. Needs to sustain life, like Food, come at the highest priority.

Background

Some RPGs have a day/night schedule where NPCs appear in different locations depending on whether it is “day” or “night”. For increased complexity, the game can keep track of the time of day, NPCs can be given a schedule of places to appear at certain times of the day, and NPCs can be made to be seen traveling between these places.

For even more complexity, this document suggests that NPCs can be given needs and desires from which an algorithm will automatically derive their schedules. The goal is for NPCs to live out complex lives that the player can observe and interrupt.

Concepts for Needs

Multiple Needs

A character can come under pressure to fulfill multiple needs simultaneously. They may have one at the highest priority, but they may fulfill a lesser need if the opportunity presents itself first.

Recurring Needs

Certain needs arise over time more often than others. The need for Food recurs every game-day, while the need for Clothing may recur once a year (or more often as clothing is worn by work and battle, but that's beside the point).

Foresight and Memory

Characters can expect to have a need arise in the future, and can plan several days ahead to be prepared to meet the need.

Characters may keep a log of how often they have had to meet a need in the past and the costs of meeting that need. The AI can make predictions based on that.

Connected Needs

A character may see Money as a means of acquiring Shelter as a means of acquiring Survival.

A character may want Pasture to obtain Sheep to obtain Wool to create Clothing to generate Money by selling it to people who need Clothing. If the same character gains a secure means of buying Wool for less than the cost of maintaining the Pasture, they may sell the pasture to another character.

Quality Standards

Wealthy characters expect a better life style than poor characters and will pass over low-quality food until they begin to starve, at which point any food begins to look good.

Quality may be a single number to begin with, or a list of attributes and standards in a later implementation.

Abstraction

The engine should allow for the definition of custom goods and opportunities.

Concepts for Opportunities

Predictive Ability

Characters must be able to predict that certain actions will lead to certain outcomes that will increase or decrease the character's security in their ability to meet their needs.

Going to jail will result in a minimum standard of Food and Shelter. Poor characters may meekly accept it while wealthy characters may fight to the death to avoid such a reduction in their standard of living.

Variable Perceptions

Different characters have different attributes that will lead them to believe that the same opportuntity has different outcomes, and to desire certain outcomes more than others. For example, a character with low concern for friendship and obedience to the law may become an outlaw.

Perceptions should be trainable.

Opportunity Foresight

Given the paradox: do you want $10 now or $100 later? An intelligent character should be able to judge the likelihood of receiving the better opportunity later, and make the decision to decline the earlier opportunity in favor of the later one.

Other concepts

Balance

If the society is left to itself over time with no player interaction, it should settle into a self-sustaining economy that can survive a few key people dying here and there.

If the game setting is a medieval RPG, the society should settle into feudal enclaves. The cost of deploying armies should be high enough to discourage any one of them from conquering the world.

Metadata

{“TOPICINFO”:{“author”:“DeltaTango”,”date”:“1327035477”,”format”:“1.1”,”version”:“1.1”},”TOPICPARENT”:{“name”:“WebHome”},”GameAboutFormTemplate”:{“GameGenre”:“Unspecified”,”Inspirations”:false,”GamePerspective”:“Unspecified”,”ProjectLegality”:“Unspecified”,”ProjectDifficulty”:“Unspecified”,”TargetPlatform”:“Unspecified”,”TargetERSB”:”???”,”YearOfIdea”:false,”DesignVersion”:false,”DesignCompletion”:“Minimal Ideas”,”CodeVersion”:false,”CodeCompletion”:“No code”}}

needsbasedrpgcharacterai.txt · Last modified: 2013/11/27 01:47 (external edit)