Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible condition comparisons #6

Open
jswigart opened this issue Dec 16, 2016 · 3 comments
Open

More flexible condition comparisons #6

jswigart opened this issue Dec 16, 2016 · 3 comments

Comments

@jswigart
Copy link

There seems to be a predicate in the code that might be intended for something along these lines, but it doesn't seem to be exposed to the actions at all.

Something like
preconditions.Set("hasLog", 10, predicateGreaterOrEqual);

Perhaps that last parameter takes an IComparer or just a Func like you have the current predicate defined as, and if excluded it is treated as a strict equality comparison.

The overall point is to allow more than equality comparison based action conditions, which are essential for gatherer/builder type planning where many types and quantities of resources might be necessary to complete a task.

@jswigart jswigart changed the title More flexible conditions More flexible condition comparisons Dec 16, 2016
@luxkun
Copy link
Owner

luxkun commented Dec 20, 2016

Would be an awesome feature, can probably be done (basically this would break this library from the Strips/Goap's specifications), but need to understand how to do it.
I guess only ReGoapState need to be changed.

@TMPxyz
Copy link
Contributor

TMPxyz commented Jan 23, 2018

I'm also very interested in this use-case.

Could you give some more descriptions on how should I modify the code?

@mikeful
Copy link

mikeful commented Jan 24, 2018

Would it be possible to work around this by implementing more complex logic via sensors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants