-
Notifications
You must be signed in to change notification settings - Fork 0
/
year10-fast.7bh
59 lines (51 loc) · 1.09 KB
/
year10-fast.7bh
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
-- 7 Billion Humans (2215) --
-- 10: Emergency Escapades --
-- INSTRUCTIONS: "Find your way to the emergency exit! First, make your
way towards any data cube. Then... If the cube you are on says: 1: step
up 2: step right 3: step down 4: step left"
-- AVAILABLE COMMANDS: step, if, jump, comment
-- SIZE: 33 commands (challenge 9, shortest known 7)
-- BEST AVERAGE RUNTIME: 13 seconds (challenge 25, fastest known 13)
-- One worker "spawns" closer to the data cubes than the other workers
-- do. Quickly maneuver the other workers to that proximal position by
-- running to the walls and back out.
if n == worker:
-- Send most workers into the southeast corner.
step e
step e
step e
step s
step s
step s
step w
step nw
step nw
else:
-- Improve flow by keeping the northernmost workers out of the
-- logjam in the southeast corner.
if n == hole:
step e
step e
step w
step w
step sw
endif
endif
-- Walk directly to the target hole.
step w
step w
step w
step w
step sw
step s
step sw
step w
step w
step w
step nw
step n
step n
step n
step n
step nw
-- vim: set autoindent noexpandtab