Skip to content
/ GOAPy Public

Pure-Python implementation of Goal-Oriented Action Planning.

Notifications You must be signed in to change notification settings

flags/GOAPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GOAPy

Written by flags, 2014, 2019 (https://github.com/flags)

About

This is a Python implementation of GOAP (Goal-Oriented Action Planning), a generic architecture for autonomous AI.

GOAPy was written in 2014 and updated in 2019 to work with Python 3. It predates other libraries of the same name and is not to be confused with GOApy.

GOAPy is simple in design and can be set up with only a few lines of code. It supports weighted actions and has debug text for tracking planner outcomes.

About GOAP

Created by Jeff Orkin, GOAP is employed by a variety of AAA game titles, known for its high level of flexibility and ease-of-use. Those interested in learning more should check out Jeff's website.

Warning

This library is currently in development.

Example

See example.py.

By taking the current state of the AI (e.g.: Hungry? Tired?) and their desired state (e.g.: Not tired) a "plan" is generated to take the AI from their current state to their goal state by considering a list of actions. By attaching weights to these actions, GOAP is capable of producing highly dynamic results. In this case, the AI will discover that in order to sleep, they must first find and consume food, potentially leading to a complex course of action that involves going shopping, cooking, ordering pizza, taking a shower, etc.

License

The MIT License (MIT)

Copyright (c) 2014 Luke Martin (flags)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Pure-Python implementation of Goal-Oriented Action Planning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages