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

Counting inventory does not work for goal criteria #858

Closed
kostmo opened this issue Nov 12, 2022 · 3 comments · Fixed by #940
Closed

Counting inventory does not work for goal criteria #858

kostmo opened this issue Nov 12, 2022 · 3 comments · Fixed by #940
Labels
Bug The observed behaviour is incorrect or unexpected.

Comments

@kostmo
Copy link
Member

kostmo commented Nov 12, 2022

Added test cases in #859 to demonstrate.

@kostmo kostmo added the Bug The observed behaviour is incorrect or unexpected. label Nov 12, 2022
mergify bot pushed a commit that referenced this issue Nov 14, 2022
mergify bot pushed a commit that referenced this issue Dec 19, 2022
The `858-possession-objective.yaml` unit test scenario demonstrates that `has "tree"` works as a goal criteria.
However, `x <- has "tree"; not x` does not work!

Could be related to #858?
@kostmo
Copy link
Member Author

kostmo commented Dec 28, 2022

As demonstrated in #926, the following does not work as condition code:

x <- has "tree"; not x

However, for multi-objective scenarios, #795 provides a workaround by defining a NOT prerequisite.

@xsebek
Copy link
Member

xsebek commented Dec 31, 2022

I wonder if this is a minimal example - i.e. if not false works as a condition.

EDIT: My minimal example so far:

as base {
  x <- scan down; // <----- any BIND will do!
  return true; // <--- anything here including multiple commands
}

@xsebek
Copy link
Member

xsebek commented Jan 1, 2023

The problem is with the kind of value returned from the hypothetical condition check:
image

@mergify mergify bot closed this as completed in #940 Jan 4, 2023
mergify bot pushed a commit that referenced this issue Jan 4, 2023
- handle `VResult` in hypothetical
- log unexpected result values
- closes #858 

When a bind occurred in hypothetical evaluation, then the `Value` was a `VResult` that we silently discarded.
Now it is handled and all other values are logged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The observed behaviour is incorrect or unexpected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants