Comments (4)
changed the example above to a simpler implementation.
from goap.
After digging in for a bit, the issue seems to be the heapop() in the PriorityQueue class. heappop() removes the first("smallest") element. Replacing the heappop() with the List pop() seemed to fix the issue. Needs more testing though.
from goap.
Thanks for raising the issue. The bug here I believe lies in the planning algorithm itself. We're performing a regressive plan, which you can see visualised on p. 33 of this PDF. Note that there is a mistake in the future for step 9 - targetIsDead
should remain True
.
What is happening is that the planner finds that Action1
solves one of the preconditions, and so the working plan becomes
graph LR
Action1 --> GOAL
Then we update our working current and goal states, so that the working state has {"FIRST": True}
. This means that, as far as the planner is concerned, the final solution
graph LR
Action2 --> Action1 --> GOAL
is valid. At one point, I did as FEAR did, and validated the plan in the forwards direction: https://github.com/xfw5/Fear-SDK-1.08/blob/2fc3557b0037d5fe01ac607b907d4b8511b9e4b2/Game/ObjectDLL/AIAStarPlanner.cpp#L246
I note that other implementations do not do this, but I think that's a mistake on their part rather than a sign that they're doing something different.
I think we need to make two changes here:
- validate plan rather than just relying on state equality in
is_finished
- revisit how we handle neighbours
- right now, a unique neighbour is created for each action, whereas I think we only really want to do this for service actions.
from goap.
Fixed in main.
from goap.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goap.