GOAP: A Basic AI Tutorial

Game development specific discussions.
Posts: 1795
Joined: Feb 28, 2009 20:58

Re: GOAP: A Basic AI Tutorial

Postby leopardpm » Jan 11, 2019 1:30

BasicCoder2 wrote:Really I think a simple code example of GOAP in action would have more tutorial value if it isn't clogged up with fancy graphics and the need for a dll to be included so that the code concentrates more on the mechanics behind the simulation.

you are absolutely correct, i was getting carried away with distractions and definitely not being helpful as a 'tutorial'

It can still have a simple graphics display as was done in this simple example for which maybe a FreeBASIC translation could be written?
https://medium.com/@vedantchaudhari/goa ... 035ed40d0b
I don't know about needing an FB translation, I think what I have in the first post has all the GOAP elements needed... only require the Execution part...

When I get time to get back to the project I will use this simple display. The characters can be animated later in the meantime drawing a still image of them holding logs or an axe doing a chopping motions and so on shouldn't be hard rather than a descriptive text. As you know adding a more complex display can be done without changing the mechanics of the code.
even though I have been distracted from hooking up GOAP to the display, there is some practicality in what I have been playing with regarding animations and sounds - I needed to understand where these things would be accomplished because they are 'multi' loop procedures (like the agent moving from one cell to an adjacent one) which requires the agent to 'be in' an Action over a period of several game loops - and I needed to understand how this would work nicely...

also, if I am to have any sort of submission into the game competition, I need to be able to use sound, etc...

I like your simple map and graphics though - keeps me from being 'distracted' from the goal here (perhaps my own mind needs a GOAP planner to keep me on track....)
Posts: 283
Joined: Aug 06, 2012 8:26

Re: GOAP: A Basic AI Tutorial

Postby sean_vn » Jan 14, 2019 1:31

Posts: 1795
Joined: Feb 28, 2009 20:58

Re: GOAP: A Basic AI Tutorial

Postby leopardpm » Jan 14, 2019 1:49

sean_vn wrote:Behavior trees are often used in more advanced games:

yes, behavior trees, FSMs, and HFSMs, as well as scripting... usually a mix of all of them in some capacity. The problem with Behavior Trees is that they need to be fully fleshed out (coded), whereas using GOAP creates the Tree from a list of actions and worldstates.... basically writes its own scripts (behaviors), if you will.

I don't know what you mean exactly by 'advanced games', there are examples of GOAP used in top rated professional games.

I am attracted to using GOAP because it allows alot of flexibility in the genre that I am interested in, namely RPG/RTS/City-Builder... trying not just for a purely combat oriented game in which GOAP wouldn't necessarily be best suited. In a strictly combat game, like an FPS shooter, behavior trees seem pretty ideal as they don't need too much flexibility (not to say that B-Trees are not flexible, they are).

Return to “Game Dev”

Who is online

Users browsing this forum: Google [Bot] and 4 guests