packages feed

swarm-0.4: data/scenarios/Testing/1379-single-world-portal-reorientation.yaml

version: 1
name: Portal reorientation within a single subworld
description: |
  Turning without turning
attrs:
  - name: portal_in
    fg: "#ff9a00"
    bg: "#ff5d00"
objectives:
  - goal:
    - |
      `place` the "flower" on the white cell.
    condition: |
      j <- robotnamed "judge";
      as j {ishere "flower"}
solution: |
    def doN = \n. \f. if (n > 0) {f; doN (n - 1) f} {}; end;
    doN 23 move;
    f <- grab;
    doN 23 move;
    place f;
entities:
  - name: telepad entrance
    display:
      attr: portal_in
      char: "o"
    description:
    - Portal entrance
    properties: [known]
robots:
  - name: base
    dir: [0, 1]
    devices:
      - branch predictor
      - calculator
      - comparator
      - dictionary
      - grabber
      - lambda
      - logger
      - strange loop
      - treads
  - name: judge
    dir: [1, 0]
    system: true
    display:
      char: 'J'
      invisible: true
known: [flower]
world:
  name: root
  default: [blank]
  palette:
    '.': [grass]
    'f': [grass, flower]
    'g': [ice, null, judge]
    'B': [grass, null, base]
    '0':
      cell: [grass, telepad entrance]
      waypoint:
        name: wp0
    '1':
      cell: [grass, telepad entrance]
      waypoint:
        name: wp1
    '2':
      cell: [grass, telepad entrance]
      waypoint:
        name: wp2
    '3':
      cell: [grass, telepad entrance]
      waypoint:
        name: wp3
  upperleft: [-1, 1]
  portals:
    - entrance: wp0
      exitInfo:
        exit: wp0
      reorient: right
    - entrance: wp1
      exitInfo:
        exit: wp1
      reorient: right
    - entrance: wp2
      exitInfo:
        exit: wp2
      reorient: right
    - entrance: wp3
      exitInfo:
        exit: wp3
      reorient: right
  map: |
    .........
    .1.....2.
    .........
    .B.......
    .f.......
    .g.......
    .........
    .0.....3.
    .........