In ReGoapNode.cs, there seems to be a bug on line 149 in the Expand method.
The line:
!goal.HasAnyConflict(precond) seems to be an error.
Any action that has a precondition that's different than the goal will always be rejected. Consider the case where the goal GoSwimming requires { isAtPosition: 0} and a JumpIntoWater action with effect {isAtPosition: 0} and a precondition {isAtPosition: 1}.
The action precondition will always be in conflict (as it should be) with the goal and therefore never be chosen for the expandList.
In ReGoapNode.cs, there seems to be a bug on line 149 in the Expand method. The line:
!goal.HasAnyConflict(precond)
seems to be an error.Any action that has a precondition that's different than the goal will always be rejected. Consider the case where the goal GoSwimming requires { isAtPosition: 0} and a JumpIntoWater action with effect {isAtPosition: 0} and a precondition {isAtPosition: 1}. The action precondition will always be in conflict (as it should be) with the goal and therefore never be chosen for the expandList.
Bug? Or am I misunderstanding something?
----- Ed