-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boolean expressions of objective prerequisites
towards #795
- Loading branch information
Showing
9 changed files
with
204 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
684-swap.yaml | ||
699-movement-fail | ||
858-inventory | ||
795-prerequisite | ||
710-multi-robot.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
795-prerequisite-or.yaml |
46 changes: 46 additions & 0 deletions
46
data/scenarios/Testing/795-prerequisite/795-prerequisite-or.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
version: 1 | ||
name: | | ||
Prerequisite bjectives: OR | ||
description: | | ||
Complete an objective with a prerequisite of either of two other objectives. | ||
objectives: | ||
- goal: | ||
- Achieve one of two other objectives | ||
condition: | | ||
return true; | ||
prerequisite: | ||
or: | ||
- id: have_furnace | ||
- id: have_gear | ||
- goal: | ||
- Make a "furnace". | ||
condition: | | ||
as base {has "furnace"}; | ||
id: have_furnace | ||
optional: true | ||
- goal: | ||
- Make a "wooden gear". | ||
condition: | | ||
as base {has "wooden gear"}; | ||
id: have_gear | ||
optional: true | ||
solution: | | ||
make "furnace" | ||
robots: | ||
- name: base | ||
display: | ||
char: 'Ω' | ||
attr: robot | ||
dir: [0, 1] | ||
devices: | ||
- workbench | ||
inventory: | ||
- [2, board] | ||
- [5, rock] | ||
world: | ||
default: [blank] | ||
palette: | ||
'x': [grass, null, base] | ||
upperleft: [0, 0] | ||
map: | | ||
x |
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
Oops, something went wrong.