Goap
GitHub | Online Documentation | Discord | Forum | v3
Important: version 3 introduced many new improvements over v2 allowing for greater control, performance and insights!
What is GOAP?
GOAP stands for Goal Oriented Action Planner. It is an AI architecture that simplifies the process of building complex Finite State Machines (FSMs) by allowing you to define goals and actions, and automatically figuring out which actions to take to achieve those goals. Most famous of powering the AI used in F.E.A.R.
How can it help you?
GOAP can help you building complex AI by defining simple actions which GOAP connects together. It also resolves the best action to take based on the game state. This should make managing a complex decision graph much easier!
Core features
- The resolver is multithreaded (using jobs).
- GOAP visualizer window.
- Setup using two methods: ScriptableObject configuration in the editor, or by using code.
- Two example scenes using both setup methods.
- Support for data injection using your favorite IoC.
- The core is unit tested.
- Well documented.
Release Notes
Version 2.1.19
Bug Fixes
- Fix: Editor breaking when package is moved around
Version 2.1.18
Bug Fixes
- Fixed node viewer breaking in 2021
Version 2.1.17
Changes
- Update AgentBehaviour.md (by shashank42)
Bug Fixes
- Fix: Impossible to scroll agent list in node viewer
Docs
- Docs: Added tutorial references
Version 2.1.16
Bug Fixes
- DebugGraph conflict fix (by Mitsh)
Version 2.1.15!
- Feature: Improved editor readability (especially in light mode)
- Fix: Goal completion not clearing goal
- Improved readme and package.json text
- docs: Update GettingStarted.md with missing using (by marius)
Version 2.1.14
Features
- feat: added samples to the git package! They can now be imported using the package manager in Unity!
Version 2.1.13
Features
- feat: added update-package workflow
Docs
- Added docs about world state
Maintenance
- Create release-drafter.yml config
- chore: Added release-drafter
Version 2.1.12
Version 2.1.11
Version 2.1.10
- Various docs improvements
- Added GetComponentInParent to references
- Fixed resolver traversing action with unresolvable condition
- Allow to re-queue action
Version 2.1.9
- Added possibility to add an IGoapSetConfig to the GoapRunnerBehaviour
- Added effect type (Increase/Decrease) instead of increase bool
- Added warning in the editor when no stylesheets could be loaded (project files have been moved to another location)
- Fixed: Node viewer not being draggable in 2021.x
Version 2.1.8
- Added namespaces to docs
- Added check to start of AgentBehaviour to check if there's a GoapSet
- Fixed: Removed race condition where GoapSets weren't initialized before being accessed
Version 2.1.7
- Added OpenUPM and Asset Store to installation guides
- Fixed: editor flickering in 2021.3
- Fixed: Jobs leaking when quitting play
Version 2.1.6
- Feature: Demo project now adheres to requirements of the Asset Store
- Feature: Added issue templates
- Feature: Changed workflow to allow forks to run, after approval
- Feature: custom distance and range check
- Feature: Added IAgentDebugger
- Feature: Added distance multiplier on agent, which is used during resolver
Version 2.1.5
- Removed empty readme files that were generating warnings/errors by @Jimmy-P
- updated variable name by @Jimmy-P
- Fixed planned planning action for satisfied condition by @crashkonijn
- Fix/various warnings by @crashkonijn
- Fix: NodeViewer breaking by @crashkonijn
Version 2.1.4
- Added GetGoals() to the IGoapSet.
Thanks @Layla-P for the contribution!
Version 2.1.3
- Major name refactor to change all derivatives of 'Set' to 'GoapSet'. This should communicate it's purpose more clearly. Thanks @SiliconOrchid!
Version 2.1.2
- IDataReferenceInjector.GetComponent becomes GetCachedComponent to better communicate purpose. For backward compatibility, previous versions retained but marked as obsolete.
Special thanks to @SiliconOrchid for providing the improvements!
Version 2.1.1
- Fixed: Issue where agent would deadlock in the complex example.
Version 2.1.0
- Added Unity 2021 support (tested with 2021.3)
- Added GoapRunnerEditor
- Improved performance of NodeViewer
- Added states to AgentEditor
⚠️ Breaking changes ⚠️
Upgrade docs can be found here: https://goap.crashkonijn.com/introduction/upgrading
Version 2.0.10
- Fixed collections > 2.1 breaking this package due to NativeMultiHashMap being renamed to NativeParallelMultiHashMap
Version 2.0.9
- Added OnGoalCompleted event
Version 2.0.8
- Added GetComponentInChildren to Agent references
Version 2.0.7
- Fixed: IGoapSet containing implementation reference instead of interface
Version 2.0.6
- Added Zenject example
- Added GetInRange method to action interface
- Fixed bug with agent being destroyed but still processed by the resolver
Version 2.0.5
- Fixed bug in multiple validators
- Added tests for these bugs
- Feature: Actions can now handle not having a target, it will use the transform of the agent as the target.
Version 2.0.4
- Added FAQ page in docs
- Added lifecycle page to docs
- Added agent move mode (Agents can now also perform actions while moving)
- Various minor adjustments
Version 2.0.3
- Added visuals of what an agent is doing to complex example, similar to the simple demo.
Version 2.0.2
Changed the following:
- Fixed bug where cost wasn't included in the resolver
- Fixed sensor validators not showing meaningful name in the error
- Goap Set Validator errors now include the name of the set
- Added tests for GoapSetJobRunner
- Added notes about this project using Unity 2022.2
- Added simple tests that load both demo scenes and validates that they run
Version 2.0.1
Added GOAP set config validators. These will notify you of the most common configuration errors and warning! ✨
Release of version 2.0.0!
A complete overhaul of the package!
- Proper docs!
- Multithreading using the new job system
- Automated tests
- Simple configuration through ScriptableObjects
- Advanced configuration through code
- Two examples using both configuration methods