GOAP vs. MCTS

Started by
9 comments, last by comfy chair 9 years, 6 months ago

I am about to start working on the planning layer of my simulation game. Originally I thought I was going to use a GOAP design. I believe I understand this approach fairly well. But now that MCTS is becoming more popular, I am wondering if I should look into it more...

Here is my original thread that describes my thoughts on using GOAP to design this part of my game:

http://www.gamedev.net/topic/652272-goap-and-modeling-world-state/

Do you think MCTS is a valid design choice? The game also has a complex crafting/production layer that I did not mention in the post.

I wonder which would require the least work? Both right now and after the game gets expanded with more and more features...

Advertisement
I think Alvaro's reply to your original thread already answers this question nicely.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Ok. But perhaps we can get into a bit more detail about how the methods differ.

It seems to me that both methods demand a simplified representation of the game space, with actions and estimated state changes from actions.
In the orginal thread I describe how I would represent the game for GOAP. Perhaps this work would be the same for MCTS also?

Also, GOAP requires an end state to search towards, as well as a heuristic function to guide the search.
MCTS does not require an end state, but it does need an evaluator function... how similar would these functions be?

GOAP will only do a single search to formulate a plan. MCTS will do many simulated playthroughs.
If there are no random factors in the simplified representation (for instance if the result of a battle is represented as deterministic), then MCTS and GOAP would look very similar...


GOAP will only do a single search to formulate a plan. MCTS will do many simulated playthroughs.
If there are no random factors in the simplified representation (for instance if the result of a battle is represented as deterministic), then MCTS and GOAP would look very similar...

No, MCTS and GOAP wouldn't look similar at all. MCTS can simultaneously optimize your decisions and the decisions of other agents, so if some plan is easy to stop by an opponent, it will pick a different course of action. For instance, you can use MCTS to play a board game like tic-tac-toe (or go, it doesn't have to be a trivial game), but I don't think GOAP is a reasonable way to go about it. GOAP assumes the agent does things that change the state of the world, but it's not very good at modelling ways in which the world might react to the actions of the agent.

MCTS = What should my goal be?

GOAP = How do I get to my selected goal?

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

No, MCTS and GOAP wouldn't look similar at all. MCTS can simultaneously optimize your decisions and the decisions of other agents, so if some plan is easy to stop by an opponent, it will pick a different course of action. For instance, you can use MCTS to play a board game like tic-tac-toe (or go, it doesn't have to be a trivial game), but I don't think GOAP is a reasonable way to go about it. GOAP assumes the agent does things that change the state of the world, but it's not very good at modelling ways in which the world might react to the actions of the agent.

So GOAP is perhaps more suited for games without an antagonistic opponent. Like a simulated world where many agents are trying to make a living in the environment but not really interfering with each other. Then MCTS would be better for traditional RTS or war games...

No, MCTS and GOAP wouldn't look similar at all. MCTS can simultaneously optimize your decisions and the decisions of other agents, so if some plan is easy to stop by an opponent, it will pick a different course of action. For instance, you can use MCTS to play a board game like tic-tac-toe (or go, it doesn't have to be a trivial game), but I don't think GOAP is a reasonable way to go about it. GOAP assumes the agent does things that change the state of the world, but it's not very good at modelling ways in which the world might react to the actions of the agent.

So GOAP is perhaps more suited for games without an antagonistic opponent. Like a simulated world where many agents are trying to make a living in the environment but not really interfering with each other. Then MCTS would be better for traditional RTS or war games...

for opponent based problems In either system you would have to evaluate the potential actions of opponents (the preconditions for sub goals doing situation analysis).

In a game with rich/complex mechanics with limited viable solution sets, I wonder about a Monte Carlo mechanism that semi-randomly jumps into a candidate solution (and then does some SWARM sampling around it to incrementally optimize the choice). Too much chance of missing a corner logic containing the far-better solution option. If that aspect is to be handled at a higher level then THAT is the fundamental methodology and the MCTS becomes just a tool to optimize applicable sub goal evaluations (ie- sampling spots on an influence map where much of the complexity has been generalized out of the data)

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

Besides handling randomness more easily than just about any other method, MCTS can also [not so easily] handle uncertainty in the current state of the world. So if your agent is chasing the player and he disappears behind a corner, you can use something like a particle filter to represent your guess for where the player is, and use the particles as starting configurations for your Monte Carlo simulations. If done right, I think this can create very interesting searching behaviors that would be fun to try to defeat.

Comy chair,

I would like to hear more of your game, a thorough description - it sounds pretty interesting and seems to be something similiar to what I am also interested in. If you are not comfortable in public, feel free to email/message me.

Michael

One of those 'things usually left out' is how much the games complexity requires the situational information to be processed and boiled down into the symbolic form to have these methods applied - to be cached (and constantly patched in a dynamic situation) or regenerated on-demand(where early pruninig helps).

The more complex and interrelated the game state is (possibly with temporal issues where a trend pattern is an indicator) and with uncertainty ontop of that (imperfect info, as well as independantly acting entities) the more work (processing resource) that evaluation becomes.

Which of GOAP/MCTS can do the most EARLY exclusion to narrow down the situational space being considered and evaluated would indicate its utility. Boiling down all the factors to be easily compared (in prioritizing and picking candidate solutions) can be the very hard part. Spatial positionality on a map itself might seem an easy shortcutted data set, but consider evaluating the patterns in GO - the analysis for even such a simple 'terrain' and entity mechanics explodes in the processing required to evaluate the actual situations.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement