Conversation
Owner
|
Can you rebase this onto main so the CI pipeline (new in main) is triggered? |
d2437ba to
a234c0b
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR aims to generalise the numeric action application in the state space generator by extending the evaluation functions for numeric expressions (e.g. the Plus operation) and updating how effects are applied to state representations.
- Extended eval_function_term to support addition (Plus)
- Modified state_to_string to build a comma-separated, sorted string of predicates
- Improved handling of numeric effects in apply_effects_to_state by removing direct reliance on the NumericValue attribute
Comments suppressed due to low confidence (3)
genfond/state_space_generator.py:52
- [nitpick] Sorting state string components may change the intended order of predicates. Verify if sorting is deliberate or if the original insertion order should be maintained.
return ",".join(sorted(state_str))
genfond/state_space_generator.py:137
- Clarify the intent of the else branch in the BinaryFunction evaluation. Consider handling this case explicitly or documenting why it is expected to occur.
# DZC: What is this else case?
genfond/state_space_generator.py:141
- Ensure that removing the assertion for NumericValue is safe by confirming that eval_function_term correctly computes a numeric value. Update tests to cover scenarios where numeric effects are processed without explicit NumericValue usage.
# DZC: remove this assert by evaluating change = eval_function_term(...)
morxa
approved these changes
Mar 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend
eval_function_termfor conditions likeand
apply_effects_to_statefor effects like