swarm-0.4: data/scenarios/Testing/1171-chirp-command.yaml
version: 1
name: Chirp test
creative: true
description: Locate a tree using chirp
objectives:
- goal:
- grab a tree.
condition: |
as base {has "tree"}
solution: |
def takeStep = \item.
direction <- chirp item;
if (direction == down) {
grab;
} {
turn direction;
move;
takeStep item;
}
end;
takeStep "tree";
robots:
- name: base
dir: [0,-1]
display:
char: Ω
attr: robot
devices:
- logger
- string
- grabber
- treads
known: []
world:
palette:
'Ω': [grass, null, base]
'.': [grass]
'T': [grass, tree]
upperleft: [0, 0]
map: |
.........
......T..
.........
.........
.Ω.......
.........