I went through the Finite State Machines post and found tidbits about making human A.I. I'm going to add these in with this complex case. I was toying with a game idea that would push GML's A.I. limits called Make The Kill. In this game you get points based on how you kill the enemies (no s**t right?). By kill I don't mean HEADSHOT +10, I mean psychological warfare, meaning f**king with their minds until they kill themselves or are easier to kill. This would mean making an A.I. with relations (variable), personality (variable), emotions (variable), knowledge/memories (queues?), and actions (states) performed and effected by these stats.
Here's a scenario for the AI (Gunner):
Gunner is a hardened soldier (personality) patrolling his route. He notices that his friend Dan, whose route goes through, his hasn't shown up (knowledge/memory). On his route he finds a bag. Upon opening it he finds the head of Dan. He becomes angered (emotion) at the sight and reports it to his superior (knowledge/memory). He now knows there is an enemy on the base (knowledge/memory) and becomes more driven (emotion) while searching (state) and will be more aggressive (emotion) when facing said enemy to avenge his friend. All this causes him to be more anxious (stress value goes up).
When looking at the personality variable (persona) for different personalities you can put something like:
persona = 1 //1 = hardened //2 = generous //3 = cowardice //etc
You can do the same for emotion (emote), and actions (state):
emote = 2 //1 = neutral //2 = angered //3 = saddened //4 = happy //etc state = 1 //1 = search //etc
The complications will start when relations (relate) are added. First Gunner will have to see if Dan is dead (Dan.state) and check his relationship with Dan (relate) and perform an action (state) based on his personality (persona) and emotions (emote). To top it off, these events will be added to his memory/knowledge and. Although complicated, this is basic since I'm not accounting for how other soldiers can change his emotions or how the enemy can keep knowledge from him (never letting him find the head) and how his stress level can build and change his emotions and cause him to do things he normally wouldn't.
The thing I want to ask is, how you would put this in the most basic, workable form in GML? And if this was managed how can the other variables be slowly added?











