XGOAP, aka Beyond GOAP is a new planning AI for C#7 and Unity (MIT license).
Compared to other GOAP libraries XGOAP is:
More flexible in how you define your planning models.
More concise. Other libraries are a little verbose in how you define preconditions and effects so I leaned the boiler plate.
Modern - C#7, package manager integration.
This follows my Behavior tree (BT) framework, Active Logic, in developing code-first solutions for concise, maintainable Game AIs.
GOAP is a planning system thatās been used in a few AAA titles; some resources and info here. Advice youāll read over and over - donāt GOAP everything. Offload details to BT or something else, including hard code.
Right now, working on a tutorial (check the Sentinel example); when this is done Iāll look into performance and GC neutrality.
The library is quite usable but nothing like one (or if possible, a few) decent, non trivial sample(s) to oust gremlins early in the dev process, so, no official release until Iām done with this.
Work on Beyond GOAP has been progressing smoothly. Here is the current state of the demo:
Working on this example has been helpful. Ironed out a couple of bugs, consolidated the API, improved performance. In the above example two bots are trying to shoot each other down. Shooting range is 3, available actions include moving, shooting, and pulling props (no pushing, too easy).
Checkout demo project here, run in Unity 2019 (maybe 2018, untested; also, you need Blender installed)
Heading towards an official Github āreleaseā meaning full documentation and relatively stable APIs.
Beyond GOAP is now in its first āofficialā release, by which I mean a Unity package, in case UPM wasnāt enough.
Took a first shot at documentation; feedback would be very helpful here.
Writing a demo did help weed out gremlins; writing doc is a good time to fix APIs so this is starting to look good.
Dev will continue towards a pencilled asset store release (possibly before 2020) but still no plan to sell this (please, just have it - for now Iād rather see interesting stuff done using this library than put it behind a paywall)
For summary, GOAP is a planning AI. Iāve been trying to relax some of the constraints around the original GOAP (the one in F.E.A.R) and things are shaping up. In the coming weeks Iāll be working on the following:
Priority list for goal selection
Give control over re-planning frequency
Active Logic integration
Performance; seems the library could run 3x, 4x faster without multi-threading just yet.
Open to ideas/collabs, or just if somebody wanted to suggest a topic for a new demo.
That certainly sounds very interesting and seems promising! It might be worth looking into DOTS instead of trying to go for a traditional C# multi-threading approach, by the way!
Iām not sure if youāre aware that Unity is also working on a planner AI? They donāt call it GOAP but it does seem quite like one.
@christoph_r yes Iām aware of Unityās plans for planning AIs. Will compare using a couple of non trivial models when I get a chance. rn just building a portfolio of AI solutions which are also unapologetically designed for coders - couldnāt move towards HTN (and beyond) without doing BT and GOAP first (reminder: there is no ābestā AI solution, when shopping for stuff, take a tool-for-the-job approach)
DOTS is a good idea! Fastest GOAP implementations nowadays use CUDA or equiv. but in games⦠GPU gets a little busy at times.
Ah, interesting! And I like that approach, unfortunately a lot of unity projects are very MonoBehaviour-centric and canāt be easily integrated into other design/architecture approaches. A good design workflow for AI is certainly important, but that can always be added on top later on as opposed to remodeling the foundation of a framework.
If you plan to implement HTNs in the future, have you already seen this cool open-source HTN project?
I just stumbled on this little gem of a library. But I saw that the latest updates are a few months back. Is it still under active development?
As Unitys AI planner will probably take a long time to get somewhere usable, and it relies heavily on Monobehaviours, I really like the separation of game ai planning and execution.
Hope it gets more attention and further development!
@Occuros good day to you and nice to see there is interest. Right now Iām focusing on a small but effective Active Logic (my BT library) update and a surprise freebie (yes, it is a surprise!)
Along with Active Logic (which really is the thing I use everyday) GOAP still fits in my plan so, updates in 2020 but no date here.
With that, XGOAP is MIT licensed. If thereās a thing you need help with, opening an issue is the way to go.
State of my thinking:
Need ālife-like behaviorā and āeffective game logicā => BT is enough, fastest to setup and fast to execute
Need āproblem solving abilitiesā => XGOAP not bad if a bit slow to setup (but designer friendly setup possible for some use cases)