This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget lambdaman.txt
50 lines (41 loc) · 2.14 KB
/
get lambdaman.txt
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
Welcome to the Lambda-Man course.
It was the year 2014, and many members of our community worked hard to control Lambda-Man. Now, ten years later, this wonderful event is still memorized by holding a small Lambda-Man competition.
This course will teach you how to optimally control Lambda-Man to eat all pills. There is no fruit involved (neither low-hanging nor high-hanging), and even better: no ghosts! The input to each problem is a simple rectangular grid such as the following:
```
###.#...
...L..##
.#######
```
The grid contains exactly one `L` character, which is the starting position of Lambda-Man. There will be one or more `.` characters indicating the locations of pills to be eaten, and `#` characters are walls. The outside boundary of the grid is considered to consist of walls as well.
A solution should be a string of `U`, `R`, `D` and `L` characters (up, right, down, left, respectively) indicating the path to take. For example, a possible solution to the above example grid is the following path:
```
LLLDURRRUDRRURR
```
When Lambda-Man is instructed to move into a square containing a wall, nothing happens and the instruction is skipped. Your solution may consist of at most `1,000,000` characters.
The following levels are available:
* [lambdaman1] Best score: 33.
* [lambdaman2] Best score: 44.
* [lambdaman3] Best score: 58.
* [lambdaman4] Best score: 176.
* [lambdaman5] Best score: 159.
* [lambdaman6] Best score: 75.
* [lambdaman7] Best score: 181.
* [lambdaman8] Best score: 143.
* [lambdaman9] Best score: 1657.
* [lambdaman10] Best score: 1520.
* [lambdaman11] Best score: 3183.
* [lambdaman12] Best score: 3183.
* [lambdaman13] Best score: 3183.
* [lambdaman14] Best score: 3183.
* [lambdaman15] Best score: 3183.
* [lambdaman16] Best score: 5131.
* [lambdaman17] Best score: 1247.
* [lambdaman18] Best score: 6200.
* [lambdaman19] Best score: 5159.
* [lambdaman20] Best score: 9065.
* [lambdaman21] Best score: 519465.
To submit a solution, send an ICFP expression that evaluates to:
```
solve lambdamanX path
```
Your score is number of bytes that the ICFP expressions consists of (i.e. the size of the POST body), so a lower score is better.