-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathfriend.yaml
94 lines (93 loc) · 1.93 KB
/
friend.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: 1
name: Make a Friend
author: Brent Yorgey
description: |
Win the trust of a furry companion.
creative: false
robots:
- name: base
display:
char: 'Ω'
attr: robot
heavy: true
dir: [0, 1]
devices:
- 3D printer
- ADT calculator
- antenna
- branch predictor
- clock
- comparator
- counter
- dictionary
- grabber
- hearing aid
- lambda
- logger
- mirror
- net
- scanner
- strange loop
- string
- toolkit
- workbench
inventory:
- [10, ADT calculator]
- [10, antenna]
- [10, treads]
- [10, branch predictor]
- [10, fish]
- [10, solar panel]
- [10, grabber]
- [10, lambda]
- [10, strange loop]
- [10, logger]
- [10, clock]
- [10, comparator]
- [10, calculator]
- name: cat
system: true
dir: [-1, 0]
display:
invisible: false
char: 'c'
attr: sand
devices:
- logger
program: |
run "scenarios/Challenges/_friend/cat.sw"
objectives:
- goal:
- There's a cat wandering around in the field. Bring it back to
your base. If you give it something it likes, perhaps you can
get it to follow you.
condition: |
c <- robotNamed "cat";
catLoc <- as c {whereami};
baseLoc <- as base {whereami};
return (catLoc == baseLoc)
solution: |
run "scenarios/Challenges/_friend/friend-solution.sw"
entities:
- name: fish
display:
char: 'f'
description:
- A smelly fish. Rather unappetizing to a robot.
properties: [known, portable]
known: [fish]
seed: 0
world:
offset: true
palette:
'Ω': [grass, null, base]
'.': [stone]
',': [grass]
'c': [grass, null, cat]
'*': [grass, flower]
'@': [stone, boulder]
upperleft: [-20, 2]
map: |-
c,..,,,,,,..,,,,...,.
,..,,,,,,,...........
*,.,@,,,,,,,.....,..Ω