Ai Dreams Forum

Member's Experiments & Projects => AI Programming => Topic started by: infurl on May 07, 2020, 02:42:05 am

Title: Game Oriented Artificial Intelligence
Post by: infurl on May 07, 2020, 02:42:05 am
I just encountered the term GOAP for the first time and looked it up. It stands for Goal Oriented Action Planning and it represents a collection of methods designed to support artificial intelligence for game characters. There are a number of websites on the topic, the main one being

http://alumni.media.mit.edu/~jorkin/goap.html (http://alumni.media.mit.edu/~jorkin/goap.html)

Most of the discussion here over the years has been about chatbots but I was wondering if anyone is doing anything with game characters?
Title: Re: Game Oriented Artificial Intelligence
Post by: 8pla.net on May 07, 2020, 06:28:52 am
Well, Game A.I. uses chase and evade algorithms for game characters.
Title: Re: Game Oriented Artificial Intelligence
Post by: krayvonk on May 07, 2020, 08:48:48 am
GOAP is the best system for programming a.i. for action-rpg games, its actually more than enough, I think that alot of the time you dont even need the full system to run your game with.    If you need enemies that have to pick up items and have xp as well, like the player does, then its a good system to employ.

I bet you could also make a robot with it,  because its quite powerful.
Title: Re: Game Oriented Artificial Intelligence
Post by: LOCKSUIT on May 07, 2020, 03:33:52 pm
Good Paper. So: Decouple goals from actions, can satisfy goals and by different ways, don't hardcode which action can cause each other, allow slumping over dead where are - instead of finishing animation, allow action layering, allow re-planning if a best action fails, chain and loop actions, *periodically search for shortest and top priority plan that can be satisfied, search for best solution to goal, spit up goals or actions by squads. Somehow this fits into AGI. :)
Title: Re: Game Oriented Artificial Intelligence
Post by: Don Patrick on May 08, 2020, 09:23:58 am
I was working on goal-oriented RPG game characters before I moved on to bigger fish. The idea was for every character to play the game autonomously so that the story events would be unpredictable. Characters were given a random amount of resources, and a few ways of obtaining them. Hunter-gathering, manning a store, helping others for rewards, or attacking and stealing. Characters that were allied to the attacked characters would then make it their goal to retaliate, provided they could gather sufficient resources to traverse the world. Proximity to characters with similar goals would team them up. Characters without goal would scuttle about at random until they got into proximity of something interesting.

However, building the entire game on my own was too much work. I only got as far as having characters home in on where they wanted to go, and engage in combat depending on proximity and how much they "liked" or disliked the characters in proximity.

https://www.youtube.com/watch?v=ZOw5MpNl9K8
For example, the path of the female character that goes to fetch the "menu item" in this video isn't predetermined. She homes in on the item wherever it is, targeting doorways as intermediate goal. If the player had walked out, she'd have gone outside to give the item. If the player had taken the item without permission first, she'd "like" the player less, and if the player were also to steal money from her, her "like" variable would drop to the point where she might attack the player. You can see some of the personality variables when the player opens the status menu, every character had them and they were to influence their choice of actions. The story is scripted though.