Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Oct 13, 2024
1 parent ea01ee1 commit e50e4fb
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 27 deletions.
13 changes: 7 additions & 6 deletions data/scenarios/Challenges/_dna/solution.sw
Original file line number Diff line number Diff line change
Expand Up @@ -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;
);
Expand All @@ -179,9 +179,10 @@ def pickFlowerAndWater =
doN 23 move;

turn right;
// return f;
return dahlia;

// return mushroom;
return d;
// return d;
end;


Expand Down
22 changes: 20 additions & 2 deletions data/scenarios/Challenges/_dna/topchecker.sw
Original file line number Diff line number Diff line change
Expand Up @@ -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;
40 changes: 21 additions & 19 deletions data/scenarios/Challenges/dna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand All @@ -75,23 +76,24 @@ 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";
as k {
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 {
Expand Down Expand Up @@ -128,7 +130,7 @@ robots:
- welder
- workbench
inventory:
- [32, slide]
- [32, specimen slide]
- name: verifier
system: true
dir: east
Expand Down Expand Up @@ -161,7 +163,7 @@ robots:
system: true
dir: east
display:
invisible: true
invisible: false
attr: 'robot'
program: |
run "data/scenarios/Challenges/_dna/topchecker.sw"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e50e4fb

Please sign in to comment.