From e50e4fb0f4173b015a96483704d8303f75fb8b15 Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Sun, 13 Oct 2024 13:29:17 -0700 Subject: [PATCH] wip --- data/scenarios/Challenges/_dna/solution.sw | 13 ++++--- data/scenarios/Challenges/_dna/topchecker.sw | 22 ++++++++++- data/scenarios/Challenges/dna.yaml | 40 ++++++++++---------- 3 files changed, 48 insertions(+), 27 deletions(-) diff --git a/data/scenarios/Challenges/_dna/solution.sw b/data/scenarios/Challenges/_dna/solution.sw index e5d1c4db4..d45c0cecb 100644 --- a/data/scenarios/Challenges/_dna/solution.sw +++ b/data/scenarios/Challenges/_dna/solution.sw @@ -148,24 +148,24 @@ Position self at entrance */ def pickFlowerAndWater = doN 6 move; - f <- grab; + dahlia <- grab; turn left; doN 8 move; turn right; doN 31 move; - c <- grab; + clover <- grab; turn back; doN 35 move; d <- grab; - doN 6 move; + doN 10 move; turn left; doN 18 move; use "siphon" forward; turn left; - doN 3 ( + doN 7 ( move; use "siphon" right; ); @@ -179,9 +179,10 @@ def pickFlowerAndWater = doN 23 move; turn right; - // return f; + return dahlia; + // return mushroom; - return d; + // return d; end; diff --git a/data/scenarios/Challenges/_dna/topchecker.sw b/data/scenarios/Challenges/_dna/topchecker.sw index 370219333..abb4b63da 100644 --- a/data/scenarios/Challenges/_dna/topchecker.sw +++ b/data/scenarios/Challenges/_dna/topchecker.sw @@ -82,8 +82,26 @@ def waitUntilHere = \remainingCount. }; end; -def go = +def waitUntilEmpty = + watch down; + wait 1000; + emptyHere <- isempty; + if emptyHere {} { + waitUntilEmpty; + } + end; + +def waitForReset = + backup; + waitUntilEmpty; + end; + +def go = \startingLoc. instant $ waitUntilHere 32; + waitForReset; + teleport self startingLoc; + go startingLoc; end; -go; +loc <- whereami; +go loc; diff --git a/data/scenarios/Challenges/dna.yaml b/data/scenarios/Challenges/dna.yaml index eda40006a..f887ae085 100644 --- a/data/scenarios/Challenges/dna.yaml +++ b/data/scenarios/Challenges/dna.yaml @@ -31,16 +31,16 @@ objectives: teaser: Place subject goal: - | - You arrive at a neatly landscaped laboratory building, though - the decorative `pond`{=structure} exudes a concerning aroma. - There may be a device you can `use` to sample its - mystery liquid. + The laboratory building ahead is neatly landscaped, though + its decorative `pond`{=structure} exudes a peculiar aroma. + There may be a device you can `use` to sample its contents. The DNA lab has two large apparatus inside. The first is a `DNA sequencer`{=structure} that - determines the arrangement of ATCG pairs within an organism's genome. + determines the arrangement of ATCG pairs within an `organism`{=tag}'s genome. - The device in the lab's south wing can reconstitute an organism from its genome. + The `DNA decoder`{=structure} in the lab's south wing can reconstitute + an `organism`{=tag} from its genome. To get started, borrow a `dahlia`{=entity} from the flowerbed at the lab entrance and place it in the receptacle directly to your east. @@ -58,12 +58,13 @@ objectives: The subject will be dematerialized once one side of the "double helix" has been decoded. - You must then complete the double helix with complementary base pairs. + You must then complete the double helix (fill in the second row within the device) + with complementary base pairs. Use your `soup strainer`{=entity} to obtain ingredients. Consult your *Compendium* for appropriate pairings. Note that `scan`ning has a cost, and you have a limited supply of - `slide`{=entity}s with which to `scan` DNA bases using your `microscope`{=entity}. + `specimen slide`{=entity}s with which to `scan` DNA bases using your `microscope`{=entity}. condition: | r <- robotnamed "topchecker"; as r { @@ -75,11 +76,12 @@ objectives: goal: - | Now let's make a clone! Recreate the top half of the - DNA strand in the apparatus below (you remember the sequence, right?). + DNA strand in the south wing's `DNA decoder`{=structure} + (you remember the sequence, right?). - Each segment you `place` will be automatically complemented. + Each element you `place` will be automatically complemented. - When all segments are placed, `drill` the switch to the left to + When all segments are placed, `drill` the switch on the western wall to commence rematerialization. `grab` the clone as a souvenir! condition: | k <- robotnamed "keeper"; @@ -87,11 +89,11 @@ objectives: has "dahlia"; } - prerequisite: create_clone - teaser: More clones + teaser: Clone factory goal: - | - Find three more different organisms to clone. - There are plentiful options growing nearby the lab. + Find three more different `organism`{=tag}s to clone. + Explore outside around the lab for nearby candidates. condition: | k <- robotnamed "keeper"; as k { @@ -128,7 +130,7 @@ robots: - welder - workbench inventory: - - [32, slide] + - [32, specimen slide] - name: verifier system: true dir: east @@ -161,7 +163,7 @@ robots: system: true dir: east display: - invisible: true + invisible: false attr: 'robot' program: | run "data/scenarios/Challenges/_dna/topchecker.sw" @@ -374,13 +376,13 @@ entities: display: char: 'm' description: - - Scan for the cost of 1 `slide`{=entity} + - Scan for the cost of 1 `specimen slide`{=entity} properties: [known, pickable] capabilities: - capability: scan cost: - - [1, "slide"] - - name: slide + - [1, "specimen slide"] + - name: specimen slide display: char: 'i' attr: device