packages feed

swarm-0.7.0.0: data/scenarios/Tutorials/scan.yaml

version: 1
name: Scan
description: |
  Learn how to send robots to safely scan your surroundings.
objectives:
  - goal:
      - |
        When you land on an alien planet, all the entities in the world will be unfamiliar to you,
        but you can learn what they are using the `scan` command, enabled by a `scanner`{=entity} device.
      - |
        Send one or more robots to move next to some unknown entity (marked as "?"),
        scan it (with something like `scan forward` or `scan north`), and then return to the base
        and execute `upload base`.
      - |
        For more information about the `scan` and `upload` commands, read the description
        of the `scanner`{=entity} in your inventory. Hit Enter to open the description in a larger window.
    condition: |
      try {
        bm <- as base {knows "mountain"};
        bt <- as base {knows "tree"};
        bw <- as base {knows "wavy water"};
        pure (bm || bt || bw)
      } { pure false }
solution: |
  build {
    turn east; move; move; move;
    turn left; move;
    scan left; scan forward; scan east;
    turn back; move;
    turn west; move; move; move;
    upload base;
  }
robots:
  - name: base
    dir: north
    heavy: true
    display:
      char: Ω
      attr: robot
    devices:
      - logger
      - 3D printer
    inventory:
      - [10, logger]
      - [10, compass]
      - [10, scanner]
      - [10, treads]
      - [10, solar panel]
world:
  palette:
    'Ω': [grass, null, base]
    '.': [grass]
    '~': [ice, wavy water]
    'T': [grass, tree]
    'A': [stone, mountain]
    '+': [stone, wall]
  upperleft: [-1, 3]
  map: |
    +++++++
    +AAAT~+
    +..A.~+
    +Ω...A+
    +++++++