@altnovatrail/widgets 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/kinds/cells/cells.handles.json +3 -3
  3. package/kinds/cells/cells.schema.json +69 -9
  4. package/kinds/cells/vectors/knight-after-no-parity.json +31 -0
  5. package/kinds/cells/vectors/knight-par-56-d2-2.json +61 -6
  6. package/kinds/cells/vectors/paper-drawn-lines.json +36 -1
  7. package/kinds/cells/vectors/polyomino-one-pieces.json +28 -0
  8. package/kinds/line/line.handles.json +195 -0
  9. package/kinds/line/line.schema.json +321 -0
  10. package/kinds/line/vectors/cases.json +213 -0
  11. package/kinds/line/vectors/gaps-12-d1-1.json +140 -0
  12. package/kinds/line/vectors/gaps-12-d1-2.json +95 -0
  13. package/kinds/line/vectors/gaps-12-d1-3.json +122 -0
  14. package/kinds/line/vectors/gaps-12-d1-4.json +121 -0
  15. package/kinds/line/vectors/gaps-12-d1-5.json +87 -0
  16. package/kinds/line/vectors/gaps-12-d2-1.json +173 -0
  17. package/kinds/line/vectors/gaps-12-d2-6.json +87 -0
  18. package/kinds/line/vectors/gaps-12-d3-2.json +173 -0
  19. package/kinds/line/vectors/gaps-12-d4-4.json +168 -0
  20. package/kinds/line/vectors/gaps-12-d5-3.json +99 -0
  21. package/kinds/line/vectors/gaps-12-d5-4.json +215 -0
  22. package/kinds/line/vectors/gaps-34-d1-1.json +37 -0
  23. package/kinds/line/vectors/gaps-34-d1-2.json +130 -0
  24. package/kinds/line/vectors/gaps-34-d1-4.json +155 -0
  25. package/kinds/line/vectors/gaps-34-d1-5.json +43 -0
  26. package/kinds/line/vectors/gaps-34-d3-2.json +38 -0
  27. package/kinds/line/vectors/gaps-34-d3-5.json +177 -0
  28. package/kinds/line/vectors/gaps-34-d5-3.json +39 -0
  29. package/kinds/line/vectors/invalid-line.json +34 -0
  30. package/kinds/line/vectors/invalid-ring.json +34 -0
  31. package/kinds/line/vectors/invalid.json +43 -0
  32. package/kinds/line/vectors/jump-unreachable.json +104 -0
  33. package/kinds/line/vectors/limit.json +40 -0
  34. package/kinds/line/vectors/op-not-in-scene.json +47 -0
  35. package/kinds/line/vectors/ring-cut.json +104 -0
  36. package/kinds/line/vectors/ring-every.json +107 -0
  37. package/kinds/line/vectors/ring-jump.json +135 -0
  38. package/lib/cores/arith.d.ts +62 -0
  39. package/lib/cores/arith.js +197 -0
  40. package/lib/cores/enumerate.js +2 -2
  41. package/lib/cores/kind.d.ts +28 -3
  42. package/lib/cores/kind.js +2 -2
  43. package/lib/cores/registry.d.ts +43 -0
  44. package/lib/cores/registry.js +87 -0
  45. package/lib/cores/search.d.ts +21 -3
  46. package/lib/cores/search.js +80 -17
  47. package/lib/kinds/cells/bishop.d.ts +1 -1
  48. package/lib/kinds/cells/index.d.ts +8 -0
  49. package/lib/kinds/cells/index.js +10 -2
  50. package/lib/kinds/cells/kind.d.ts +3 -2
  51. package/lib/kinds/cells/kind.js +26 -66
  52. package/lib/kinds/cells/knight.d.ts +1 -1
  53. package/lib/kinds/cells/operation.d.ts +21 -1
  54. package/lib/kinds/cells/paper.js +27 -13
  55. package/lib/kinds/cells/piece.d.ts +17 -6
  56. package/lib/kinds/cells/piece.js +119 -38
  57. package/lib/kinds/cells/polyomino.d.ts +14 -0
  58. package/lib/kinds/cells/polyomino.js +122 -35
  59. package/lib/kinds/cells/registry.js +1 -1
  60. package/lib/kinds/cells/schema.js +4 -1
  61. package/lib/kinds/cells/step.d.ts +1 -1
  62. package/lib/kinds/line/cut.d.ts +2 -0
  63. package/lib/kinds/line/cut.js +63 -0
  64. package/lib/kinds/line/goals.d.ts +22 -0
  65. package/lib/kinds/line/goals.js +137 -0
  66. package/lib/kinds/line/index.d.ts +13 -0
  67. package/lib/kinds/line/index.js +17 -0
  68. package/lib/kinds/line/jump.d.ts +10 -0
  69. package/lib/kinds/line/jump.js +95 -0
  70. package/lib/kinds/line/kind.d.ts +25 -0
  71. package/lib/kinds/line/kind.js +125 -0
  72. package/lib/kinds/line/line.d.ts +63 -0
  73. package/lib/kinds/line/line.js +157 -0
  74. package/lib/kinds/line/operation.d.ts +69 -0
  75. package/lib/kinds/line/operation.js +1 -0
  76. package/lib/kinds/line/posts.d.ts +11 -0
  77. package/lib/kinds/line/posts.js +85 -0
  78. package/lib/kinds/line/registry.d.ts +2 -0
  79. package/lib/kinds/line/registry.js +11 -0
  80. package/lib/kinds/line/schema.d.ts +4 -0
  81. package/lib/kinds/line/schema.js +157 -0
  82. package/package.json +9 -2
@@ -0,0 +1,173 @@
1
+ {
2
+ "description": "The task gaps-12-d3-2: 8 rose bushes grow round a round flowerbed; how many gaps are there between neighbouring bushes? On a ring of eight places the learner plants a bush on each, and the key is the gaps of a ring of eight bushes, 8: as many as the bushes, the last next to the first.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 8,
6
+ "first": 1,
7
+ "closed": true
8
+ },
9
+ "operations": {
10
+ "post": {}
11
+ },
12
+ "goal": {
13
+ "counters": {
14
+ "is": {
15
+ "posts": 8
16
+ },
17
+ "max": "gaps"
18
+ }
19
+ }
20
+ },
21
+ "seed": "0",
22
+ "start": {
23
+ "state": {
24
+ "posts": []
25
+ },
26
+ "goal": false
27
+ },
28
+ "sequences": [
29
+ [
30
+ {
31
+ "move": {
32
+ "post": {
33
+ "at": 1
34
+ }
35
+ },
36
+ "state": {
37
+ "posts": [1]
38
+ },
39
+ "goal": false
40
+ },
41
+ {
42
+ "move": {
43
+ "post": {
44
+ "at": 2
45
+ }
46
+ },
47
+ "state": {
48
+ "posts": [1, 2]
49
+ },
50
+ "goal": false
51
+ },
52
+ {
53
+ "move": {
54
+ "post": {
55
+ "at": 3
56
+ }
57
+ },
58
+ "state": {
59
+ "posts": [1, 2, 3]
60
+ },
61
+ "goal": false
62
+ },
63
+ {
64
+ "move": {
65
+ "post": {
66
+ "at": 4
67
+ }
68
+ },
69
+ "state": {
70
+ "posts": [1, 2, 3, 4]
71
+ },
72
+ "goal": false
73
+ },
74
+ {
75
+ "move": {
76
+ "post": {
77
+ "at": 5
78
+ }
79
+ },
80
+ "state": {
81
+ "posts": [1, 2, 3, 4, 5]
82
+ },
83
+ "goal": false
84
+ },
85
+ {
86
+ "move": {
87
+ "post": {
88
+ "at": 6
89
+ }
90
+ },
91
+ "state": {
92
+ "posts": [1, 2, 3, 4, 5, 6]
93
+ },
94
+ "goal": false
95
+ },
96
+ {
97
+ "move": {
98
+ "post": {
99
+ "at": 7
100
+ }
101
+ },
102
+ "state": {
103
+ "posts": [1, 2, 3, 4, 5, 6, 7]
104
+ },
105
+ "goal": false
106
+ },
107
+ {
108
+ "move": {
109
+ "post": {
110
+ "at": 8
111
+ }
112
+ },
113
+ "state": {
114
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
115
+ },
116
+ "goal": true
117
+ }
118
+ ]
119
+ ],
120
+ "proof": {
121
+ "key": 8,
122
+ "asks": "max",
123
+ "witness": {
124
+ "path": [
125
+ {
126
+ "post": {
127
+ "at": 1
128
+ }
129
+ },
130
+ {
131
+ "post": {
132
+ "at": 2
133
+ }
134
+ },
135
+ {
136
+ "post": {
137
+ "at": 3
138
+ }
139
+ },
140
+ {
141
+ "post": {
142
+ "at": 4
143
+ }
144
+ },
145
+ {
146
+ "post": {
147
+ "at": 5
148
+ }
149
+ },
150
+ {
151
+ "post": {
152
+ "at": 6
153
+ }
154
+ },
155
+ {
156
+ "post": {
157
+ "at": 7
158
+ }
159
+ },
160
+ {
161
+ "post": {
162
+ "at": 8
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ "ends": [
168
+ {
169
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
170
+ }
171
+ ]
172
+ }
173
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "description": "The task gaps-12-d4-4: bushes along the sides of a square flowerbed, a bush in every corner and three on each side, the corners counted; how many bushes? A square ring of four sides of two gaps each, eight places, and the fewest bushes that fill every place, 8.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 8,
6
+ "first": 1,
7
+ "closed": true,
8
+ "sides": [2, 2, 2, 2]
9
+ },
10
+ "operations": {
11
+ "post": {}
12
+ },
13
+ "goal": {
14
+ "every": {}
15
+ }
16
+ },
17
+ "seed": "0",
18
+ "start": {
19
+ "state": {
20
+ "posts": []
21
+ },
22
+ "goal": false
23
+ },
24
+ "sequences": [
25
+ [
26
+ {
27
+ "move": {
28
+ "post": {
29
+ "at": 1
30
+ }
31
+ },
32
+ "state": {
33
+ "posts": [1]
34
+ },
35
+ "goal": false
36
+ },
37
+ {
38
+ "move": {
39
+ "post": {
40
+ "at": 3
41
+ }
42
+ },
43
+ "state": {
44
+ "posts": [1, 3]
45
+ },
46
+ "goal": false
47
+ },
48
+ {
49
+ "move": {
50
+ "post": {
51
+ "at": 5
52
+ }
53
+ },
54
+ "state": {
55
+ "posts": [1, 3, 5]
56
+ },
57
+ "goal": false
58
+ },
59
+ {
60
+ "move": {
61
+ "post": {
62
+ "at": 7
63
+ }
64
+ },
65
+ "state": {
66
+ "posts": [1, 3, 5, 7]
67
+ },
68
+ "goal": false
69
+ },
70
+ {
71
+ "move": {
72
+ "post": {
73
+ "at": 2
74
+ }
75
+ },
76
+ "state": {
77
+ "posts": [1, 2, 3, 5, 7]
78
+ },
79
+ "goal": false
80
+ },
81
+ {
82
+ "move": {
83
+ "post": {
84
+ "at": 4
85
+ }
86
+ },
87
+ "state": {
88
+ "posts": [1, 2, 3, 4, 5, 7]
89
+ },
90
+ "goal": false
91
+ },
92
+ {
93
+ "move": {
94
+ "post": {
95
+ "at": 6
96
+ }
97
+ },
98
+ "state": {
99
+ "posts": [1, 2, 3, 4, 5, 6, 7]
100
+ },
101
+ "goal": false
102
+ },
103
+ {
104
+ "move": {
105
+ "post": {
106
+ "at": 8
107
+ }
108
+ },
109
+ "state": {
110
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
111
+ },
112
+ "goal": true
113
+ }
114
+ ]
115
+ ],
116
+ "proof": {
117
+ "key": 8,
118
+ "witness": {
119
+ "path": [
120
+ {
121
+ "post": {
122
+ "at": 1
123
+ }
124
+ },
125
+ {
126
+ "post": {
127
+ "at": 2
128
+ }
129
+ },
130
+ {
131
+ "post": {
132
+ "at": 3
133
+ }
134
+ },
135
+ {
136
+ "post": {
137
+ "at": 4
138
+ }
139
+ },
140
+ {
141
+ "post": {
142
+ "at": 5
143
+ }
144
+ },
145
+ {
146
+ "post": {
147
+ "at": 6
148
+ }
149
+ },
150
+ {
151
+ "post": {
152
+ "at": 7
153
+ }
154
+ },
155
+ {
156
+ "post": {
157
+ "at": 8
158
+ }
159
+ }
160
+ ]
161
+ },
162
+ "ends": [
163
+ {
164
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
165
+ }
166
+ ]
167
+ }
168
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "description": "The task gaps-12-d5-3: a frog on the first of 9 stones in a row skips one stone with each jump; how many jumps to the last stone? The fewest jumps of two places, 4.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 9,
6
+ "first": 1
7
+ },
8
+ "operations": {
9
+ "jump": {
10
+ "from": 1,
11
+ "step": 2
12
+ }
13
+ },
14
+ "goal": {
15
+ "counters": {
16
+ "is": {
17
+ "at": 9
18
+ }
19
+ }
20
+ }
21
+ },
22
+ "seed": "0",
23
+ "start": {
24
+ "state": {
25
+ "posts": [],
26
+ "at": 1
27
+ },
28
+ "goal": false
29
+ },
30
+ "sequences": [
31
+ [
32
+ {
33
+ "move": {
34
+ "jump": "forward"
35
+ },
36
+ "state": {
37
+ "posts": [],
38
+ "at": 3
39
+ },
40
+ "goal": false
41
+ },
42
+ {
43
+ "move": {
44
+ "jump": "forward"
45
+ },
46
+ "state": {
47
+ "posts": [],
48
+ "at": 5
49
+ },
50
+ "goal": false
51
+ },
52
+ {
53
+ "move": {
54
+ "jump": "forward"
55
+ },
56
+ "state": {
57
+ "posts": [],
58
+ "at": 7
59
+ },
60
+ "goal": false
61
+ },
62
+ {
63
+ "move": {
64
+ "jump": "forward"
65
+ },
66
+ "state": {
67
+ "posts": [],
68
+ "at": 9
69
+ },
70
+ "goal": true
71
+ }
72
+ ]
73
+ ],
74
+ "proof": {
75
+ "key": 4,
76
+ "witness": {
77
+ "path": [
78
+ {
79
+ "jump": "forward"
80
+ },
81
+ {
82
+ "jump": "forward"
83
+ },
84
+ {
85
+ "jump": "forward"
86
+ },
87
+ {
88
+ "jump": "forward"
89
+ }
90
+ ]
91
+ },
92
+ "ends": [
93
+ {
94
+ "posts": [],
95
+ "at": 9
96
+ }
97
+ ]
98
+ }
99
+ }
@@ -0,0 +1,215 @@
1
+ {
2
+ "description": "The task gaps-12-d5-4: a straight fence is 20 metres long, with a post every 2 metres and at both ends; how many posts? Its places are 2 metres apart, numbered from 0, and the fewest posts that stand on every place are 11, one more than the 10 gaps. Its 2,048 states are the course's largest scene of posts.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 11,
6
+ "first": 0,
7
+ "spacing": 2
8
+ },
9
+ "operations": {
10
+ "post": {}
11
+ },
12
+ "goal": {
13
+ "every": {}
14
+ }
15
+ },
16
+ "seed": "0",
17
+ "start": {
18
+ "state": {
19
+ "posts": []
20
+ },
21
+ "goal": false
22
+ },
23
+ "sequences": [
24
+ [
25
+ {
26
+ "move": {
27
+ "post": {
28
+ "at": 0
29
+ }
30
+ },
31
+ "state": {
32
+ "posts": [0]
33
+ },
34
+ "goal": false
35
+ },
36
+ {
37
+ "move": {
38
+ "post": {
39
+ "at": 1
40
+ }
41
+ },
42
+ "state": {
43
+ "posts": [0, 1]
44
+ },
45
+ "goal": false
46
+ },
47
+ {
48
+ "move": {
49
+ "post": {
50
+ "at": 2
51
+ }
52
+ },
53
+ "state": {
54
+ "posts": [0, 1, 2]
55
+ },
56
+ "goal": false
57
+ },
58
+ {
59
+ "move": {
60
+ "post": {
61
+ "at": 3
62
+ }
63
+ },
64
+ "state": {
65
+ "posts": [0, 1, 2, 3]
66
+ },
67
+ "goal": false
68
+ },
69
+ {
70
+ "move": {
71
+ "post": {
72
+ "at": 4
73
+ }
74
+ },
75
+ "state": {
76
+ "posts": [0, 1, 2, 3, 4]
77
+ },
78
+ "goal": false
79
+ },
80
+ {
81
+ "move": {
82
+ "post": {
83
+ "at": 5
84
+ }
85
+ },
86
+ "state": {
87
+ "posts": [0, 1, 2, 3, 4, 5]
88
+ },
89
+ "goal": false
90
+ },
91
+ {
92
+ "move": {
93
+ "post": {
94
+ "at": 6
95
+ }
96
+ },
97
+ "state": {
98
+ "posts": [0, 1, 2, 3, 4, 5, 6]
99
+ },
100
+ "goal": false
101
+ },
102
+ {
103
+ "move": {
104
+ "post": {
105
+ "at": 7
106
+ }
107
+ },
108
+ "state": {
109
+ "posts": [0, 1, 2, 3, 4, 5, 6, 7]
110
+ },
111
+ "goal": false
112
+ },
113
+ {
114
+ "move": {
115
+ "post": {
116
+ "at": 8
117
+ }
118
+ },
119
+ "state": {
120
+ "posts": [0, 1, 2, 3, 4, 5, 6, 7, 8]
121
+ },
122
+ "goal": false
123
+ },
124
+ {
125
+ "move": {
126
+ "post": {
127
+ "at": 9
128
+ }
129
+ },
130
+ "state": {
131
+ "posts": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
132
+ },
133
+ "goal": false
134
+ },
135
+ {
136
+ "move": {
137
+ "post": {
138
+ "at": 10
139
+ }
140
+ },
141
+ "state": {
142
+ "posts": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
143
+ },
144
+ "goal": true
145
+ }
146
+ ]
147
+ ],
148
+ "proof": {
149
+ "key": 11,
150
+ "witness": {
151
+ "path": [
152
+ {
153
+ "post": {
154
+ "at": 0
155
+ }
156
+ },
157
+ {
158
+ "post": {
159
+ "at": 1
160
+ }
161
+ },
162
+ {
163
+ "post": {
164
+ "at": 2
165
+ }
166
+ },
167
+ {
168
+ "post": {
169
+ "at": 3
170
+ }
171
+ },
172
+ {
173
+ "post": {
174
+ "at": 4
175
+ }
176
+ },
177
+ {
178
+ "post": {
179
+ "at": 5
180
+ }
181
+ },
182
+ {
183
+ "post": {
184
+ "at": 6
185
+ }
186
+ },
187
+ {
188
+ "post": {
189
+ "at": 7
190
+ }
191
+ },
192
+ {
193
+ "post": {
194
+ "at": 8
195
+ }
196
+ },
197
+ {
198
+ "post": {
199
+ "at": 9
200
+ }
201
+ },
202
+ {
203
+ "post": {
204
+ "at": 10
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ "ends": [
210
+ {
211
+ "posts": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
212
+ }
213
+ ]
214
+ }
215
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "description": "The task gaps-34-d1-1, a line only to look at: 21 trees stand 5 metres apart; how many metres from the first to the last? The scene's one state gives the key, its length, 100.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 21,
6
+ "first": 1,
7
+ "spacing": 5,
8
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
9
+ },
10
+ "operations": {},
11
+ "goal": {
12
+ "counters": {
13
+ "max": "length"
14
+ }
15
+ }
16
+ },
17
+ "seed": "0",
18
+ "start": {
19
+ "state": {
20
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
21
+ },
22
+ "goal": true
23
+ },
24
+ "sequences": [[]],
25
+ "proof": {
26
+ "key": 100,
27
+ "asks": "max",
28
+ "witness": {
29
+ "path": []
30
+ },
31
+ "ends": [
32
+ {
33
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
34
+ }
35
+ ]
36
+ }
37
+ }