-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to seek a strict target with an Agent
A Target in Mahler is by default 'relative', meaning that only property changes and additions should be considered when comparing current and target states for planning. Property deletion need to be done explicitely via the `UNDEFINED` symbol. This allows a cleaner interface for for defining system targets and allows the system state to have additional properties than the target. A 'relative' target is the opposite to a 'strict' (or absolute) target, where what is passed to the planner/agent describes exactly the desired state of the system is. This PR introduces the `StrictTarget` type and the `seekStrict` method on the `Agent` interface. This allows users some additional flexibility to specify an absolute state of the final system. Example: let's say we are modelling the state of two variables `x` and `y`. Given the current state `{x: 0}`, the target state `{y: 1}` means that the planner needs to only to find a task that can create the variable `y` and increase its value to `1`. The final expected state should be `{x: 0, y:1}` (assuming nothing else changes `x`). If the goal was to remove the variable `x` at the same time that variable `y` is introduced, the relative target would need to be `{x: UNDEFINED, y: 1}` The equivalent strict target in this case is just `{y: 1}`. Change-type: minor
- Loading branch information
Showing
5 changed files
with
109 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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