playMaker

Author Topic: GOAP with Playmaker?  (Read 3292 times)

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
GOAP with Playmaker?
« 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

More GOAP info 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
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: GOAP with Playmaker?
« Reply #1 on: October 16, 2015, 05:28:53 AM »
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?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: GOAP with Playmaker?
« Reply #2 on: October 16, 2015, 10:23:42 AM »
Thanks for the reply- I'll be giving it a try- I'll post my results if I have some success  :)
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: GOAP with Playmaker?
« Reply #3 on: October 16, 2015, 11:33:47 AM »
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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: GOAP with Playmaker?
« Reply #4 on: October 16, 2015, 07:58:55 PM »
Good to know- thanks Lane  :) I'm going to give it a try
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: GOAP with Playmaker?
« Reply #5 on: October 24, 2015, 07:27:16 PM »
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


The World states, Actions, PreConditions and Effects are stored in Hash Tables


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

« Last Edit: October 24, 2015, 07:28:50 PM by mdotstrange »
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!