Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: mdotstrange on October 16, 2015, 02:30:11 AM
-
I've been looking at planning systems for AI and understand the concepts- here's a tutorial that uses C# code to make a GOAP system http://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793 (http://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793)
More GOAP info http://alumni.media.mit.edu/~jorkin/goap.html (http://alumni.media.mit.edu/~jorkin/goap.html)
I'm unsure at how to implement it in Playmaker without coding if that is even possible? Would it be possible to duplicate a system like this in Playmaker?
Would it be implemented as a "planning" action? Would you feed it an array/hash of actions and "costs" using a key/value pair?
I'm going to try to build it myself for fun- just looking for some advice/direction from the Playmaker experts here :) Thanks
-
The author of the article suggests that FSMs are not well suited for the purposes of GOAP creation. That might just be some programmer prejudice however. I don't know why having "too many" if/then statements in a State is any different from having "too many" if/then statements in code... GOAP should be doable in Playmaker?
-
Thanks for the reply- I'll be giving it a try- I'll post my results if I have some success :)
-
I think you can do something like that with FSMs.
You can make FSMs behave like other types of logic systems if you wanted to, its just a matter of controlling the conditions for state transitions. Thats really all there is to it, the rest is the structure and flow of the machine so I can't really think of any serious/hard/direct limitations that could be placed on designing something like this just because you are using FSMs.
-
Good to know- thanks Lane :) I'm going to give it a try
-
Adding an update- I've got the GOAP setup working with single PreConditions now
Here's what the FSM for the planner looks like- the red states are loops
(http://i.imgur.com/Dnq0sgP.png)
The World states, Actions, PreConditions and Effects are stored in Hash Tables
(http://i.imgur.com/dRiADIY.png)
It will get all possible working plans with this setup then compare their costs and give you the cheapest plan as an array that holds the actions in proper order-
Now I need to figure out how to get it to use multiple PreConditions