-
Notifications
You must be signed in to change notification settings - Fork 0
/
levels.v
111 lines (83 loc) · 1.67 KB
/
levels.v
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Require Import String def.
Open Scope string_scope.
(* Between HERE and THERE - A word game in Rocq *)
Goal ("here" <-- 1 --> "there").
There.
Qed.
(*
Carve a path of English words
from the beginning to the end
under a cost budget
*)
Goal ("start" <-- 6 --> "goal").
Next "star" 1.
Next "soar" 1.
Next "goal" 4.
There.
Qed.
(* Basic move: pay the cost of
(# different letters) ^ 2
to cast a word into another
*)
Goal ("devil" <-- 16 --> "angel").
Next "angel" 16.
There.
Qed.
Goal ("and" <-- 42 --> "orange").
Next "orange" 36.
There.
Qed.
(* Prefix / Suffix : pay
# added or removed letters
to add/remove a prefix/suffix
*)
Goal ("impossible" <-- 2 --> "possible").
Next "possible" 2.
There.
Qed.
Goal ("undergraduate" <-- 5 --> "graduate").
There.
Qed.
Goal ("here" <-- 1 --> "where").
There.
Qed.
(* Anagram : Pay 1
to reshuffle the letters
*)
Goal ("listen" <-- 1 --> "silent").
There.
Qed.
Goal ("save" <-- 1 --> "vase").
There.
Qed.
(* Using non-words will fail
Dictionary size: 20k
*)
Goal ("human" <-- 13 --> "robot").
Fail (Next "hubot" 9).
Fail (Next "humat" 1).
Next "roman" 4.
Next "robot" 9.
There.
Qed.
(* Now, your journey begins! *)
Goal ("north" <-- 4 --> "south").
Admitted.
Goal ("lead" <-- 8 --> "gold").
Admitted.
Goal ("war" <-- 8 --> "peace").
Admitted.
Goal ("idea" <-- 10 --> "paper").
Admitted.
Goal ("fire" <-- 10 --> "water").
Admitted.
Goal ("black" <-- 10 --> "white").
Admitted.
Goal ("dream" <-- 20 --> "reality").
Admitted.
Goal ("puzzle" <-- 20 --> "solution").
Admitted.
Goal ("reject" <-- 20 --> "accept").
Admitted.
Goal ("sword" <-- 20 --> "ploughshare").
Admitted.