@altnovatrail/widgets 0.1.2 → 0.2.0

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 (110) hide show
  1. package/README.md +1 -1
  2. package/cores/vector.schema.json +82 -3
  3. package/kinds/cells/cells.handles.json +148 -3
  4. package/kinds/cells/cells.schema.json +716 -8
  5. package/kinds/cells/vectors/bishop-grid-56-d1-1.json +105 -4
  6. package/kinds/cells/vectors/counter-cases.json +123 -0
  7. package/kinds/cells/vectors/counter-div-56-d1-3.json +57 -0
  8. package/kinds/cells/vectors/counter-div-56-d2-1.json +773 -0
  9. package/kinds/cells/vectors/counter-div-56-d2-3.json +65 -0
  10. package/kinds/cells/vectors/counter-div-56-d4-1.json +57 -0
  11. package/kinds/cells/vectors/counter-div-56-d4-2.json +106 -0
  12. package/kinds/cells/vectors/cut-cases.json +163 -0
  13. package/kinds/cells/vectors/cut-gaps-56-d2-1.json +142 -0
  14. package/kinds/cells/vectors/cut-grid-56-d2-4.json +45 -0
  15. package/kinds/cells/vectors/cut-grid-56-d4-1.json +154 -0
  16. package/kinds/cells/vectors/cut-grid-56-d4-2.json +136 -0
  17. package/kinds/cells/vectors/cut-invalid.json +48 -0
  18. package/kinds/cells/vectors/domino-grid-56-d3-2.json +238 -0
  19. package/kinds/cells/vectors/domino-limit.json +60 -0
  20. package/kinds/cells/vectors/domino-par-56-d3-2.json +194 -0
  21. package/kinds/cells/vectors/domino-par-56-d4-3.json +127 -0
  22. package/kinds/cells/vectors/figure-apart.json +47 -0
  23. package/kinds/cells/vectors/fold-12x12.json +79 -0
  24. package/kinds/cells/vectors/fold-14x14.json +79 -0
  25. package/kinds/cells/vectors/fold-26x26.json +79 -0
  26. package/kinds/cells/vectors/garden-enum-56-d3-4.json +96 -6
  27. package/kinds/cells/vectors/goat-grid-56-d4-4.json +325 -5
  28. package/kinds/cells/vectors/knight-after-no-parity.json +31 -0
  29. package/kinds/cells/vectors/knight-par-56-d2-2.json +61 -6
  30. package/kinds/cells/vectors/mosaic-grid-56-d2-2.json +84 -0
  31. package/kinds/cells/vectors/nodes-gaps-56-d2-2.json +44 -0
  32. package/kinds/cells/vectors/nodes-gaps-56-d4-2.json +70 -0
  33. package/kinds/cells/vectors/number-div-56-d2-2.json +49 -0
  34. package/kinds/cells/vectors/numbers-div-56-d3-1.json +24 -0
  35. package/kinds/cells/vectors/numbers-invalid.json +56 -0
  36. package/kinds/cells/vectors/paper-26x26.json +743 -0
  37. package/kinds/cells/vectors/paper-cube-12-d2-1.json +43 -19
  38. package/kinds/cells/vectors/paper-cube-12-d5-1.json +47 -4
  39. package/kinds/cells/vectors/paper-cube-56-d4-1.json +56 -5
  40. package/kinds/cells/vectors/paper-drawn-lines.json +184 -0
  41. package/kinds/cells/vectors/paper-grid-56-d1-2.json +46 -5
  42. package/kinds/cells/vectors/paper-turn-invalid.json +4 -4
  43. package/kinds/cells/vectors/path-6x6.json +119 -0
  44. package/kinds/cells/vectors/path-beside.json +108 -0
  45. package/kinds/cells/vectors/path-enum-12-d3-5.json +187 -0
  46. package/kinds/cells/vectors/path-enum-34-d4-3.json +412 -0
  47. package/kinds/cells/vectors/path-enum-56-d3-3.json +411 -0
  48. package/kinds/cells/vectors/path-enum-56-d3-5.json +351 -0
  49. package/kinds/cells/vectors/path-invalid.json +37 -0
  50. package/kinds/cells/vectors/path-limit.json +58 -0
  51. package/kinds/cells/vectors/path-maze.json +297 -0
  52. package/kinds/cells/vectors/path-unreachable.json +76 -0
  53. package/kinds/cells/vectors/perimeter-grid-56-d2-1.json +86 -0
  54. package/kinds/cells/vectors/perimeter-grid-56-d3-1.json +102 -0
  55. package/kinds/cells/vectors/perimeter-grid-56-d3-3.json +112 -0
  56. package/kinds/cells/vectors/perimeter-grid-56-d4-3.json +289 -0
  57. package/kinds/cells/vectors/polyomino-cases.json +191 -0
  58. package/kinds/cells/vectors/polyomino-grid-56-d3-4.json +205 -0
  59. package/kinds/cells/vectors/polyomino-grid-56-d4-1.json +137 -0
  60. package/kinds/cells/vectors/polyomino-grid-56-d5-3.json +157 -0
  61. package/kinds/cells/vectors/polyomino-invalid.json +45 -0
  62. package/kinds/cells/vectors/polyomino-one-pieces.json +28 -0
  63. package/kinds/cells/vectors/route-par-56-d3-3.json +245 -0
  64. package/kinds/cells/vectors/sides-gaps-56-d3-2.json +44 -0
  65. package/kinds/cells/vectors/sieve-div-56-d3-2.json +140 -0
  66. package/kinds/cells/vectors/tear-gaps-56-d3-1.json +84 -0
  67. package/kinds/cells/vectors/tear-limit.json +56 -0
  68. package/lib/cores/enumerate.d.ts +33 -0
  69. package/lib/cores/enumerate.js +77 -0
  70. package/lib/cores/kind.d.ts +70 -5
  71. package/lib/cores/kind.js +2 -2
  72. package/lib/cores/search.d.ts +47 -10
  73. package/lib/cores/search.js +129 -37
  74. package/lib/kinds/cells/bishop.d.ts +1 -1
  75. package/lib/kinds/cells/bishop.js +1 -1
  76. package/lib/kinds/cells/counter.d.ts +26 -0
  77. package/lib/kinds/cells/counter.js +249 -0
  78. package/lib/kinds/cells/cut.d.ts +46 -0
  79. package/lib/kinds/cells/cut.js +400 -0
  80. package/lib/kinds/cells/figure.d.ts +13 -0
  81. package/lib/kinds/cells/figure.js +114 -0
  82. package/lib/kinds/cells/holes.d.ts +6 -0
  83. package/lib/kinds/cells/holes.js +57 -0
  84. package/lib/kinds/cells/index.d.ts +8 -0
  85. package/lib/kinds/cells/index.js +10 -2
  86. package/lib/kinds/cells/kind.d.ts +3 -2
  87. package/lib/kinds/cells/kind.js +23 -8
  88. package/lib/kinds/cells/knight.d.ts +1 -1
  89. package/lib/kinds/cells/number.d.ts +6 -0
  90. package/lib/kinds/cells/number.js +32 -0
  91. package/lib/kinds/cells/operation.d.ts +27 -7
  92. package/lib/kinds/cells/paper.d.ts +10 -2
  93. package/lib/kinds/cells/paper.js +109 -13
  94. package/lib/kinds/cells/path.d.ts +38 -0
  95. package/lib/kinds/cells/path.js +288 -0
  96. package/lib/kinds/cells/piece.d.ts +27 -7
  97. package/lib/kinds/cells/piece.js +202 -37
  98. package/lib/kinds/cells/polyomino.d.ts +45 -0
  99. package/lib/kinds/cells/polyomino.js +461 -0
  100. package/lib/kinds/cells/registry.js +35 -4
  101. package/lib/kinds/cells/schema.js +45 -4
  102. package/lib/kinds/cells/sheet.d.ts +20 -1
  103. package/lib/kinds/cells/sheet.js +84 -6
  104. package/lib/kinds/cells/side.d.ts +33 -0
  105. package/lib/kinds/cells/side.js +86 -0
  106. package/lib/kinds/cells/sieve.d.ts +26 -0
  107. package/lib/kinds/cells/sieve.js +208 -0
  108. package/lib/kinds/cells/step.d.ts +1 -1
  109. package/lib/kinds/cells/step.js +1 -1
  110. package/package.json +5 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "The garden of the course's task enum-56-d3-4: a sheet of 6 by 6 with its walls, a piece that steps from A1. The scene has no goal: the walls close A1 into 6 cells, the task's key, which the state graph holds as its 6 states.",
2
+ "description": "The garden of the course's task enum-56-d3-4: a sheet of 6 by 6 with its walls, a piece that steps from A1. The goal counts every cell the piece reaches, its start too: the walls close A1 into 6 cells, the task's key. A step through a wall is refused.",
3
3
  "scene": {
4
4
  "sheet": {
5
5
  "rows": 6,
@@ -24,6 +24,9 @@
24
24
  "step": {
25
25
  "cell": "A1"
26
26
  }
27
+ },
28
+ "goal": {
29
+ "step_reach": {}
27
30
  }
28
31
  },
29
32
  "seed": "0",
@@ -32,7 +35,7 @@
32
35
  "marks": {},
33
36
  "step_at": "A1"
34
37
  },
35
- "goal": false
38
+ "goal": true
36
39
  },
37
40
  "sequences": [
38
41
  [
@@ -46,7 +49,7 @@
46
49
  "marks": {},
47
50
  "step_at": "A2"
48
51
  },
49
- "goal": false
52
+ "goal": true
50
53
  },
51
54
  {
52
55
  "move": {
@@ -66,7 +69,7 @@
66
69
  "marks": {},
67
70
  "step_at": "B2"
68
71
  },
69
- "goal": false
72
+ "goal": true
70
73
  },
71
74
  {
72
75
  "move": {
@@ -78,7 +81,7 @@
78
81
  "marks": {},
79
82
  "step_at": "C2"
80
83
  },
81
- "goal": false
84
+ "goal": true
82
85
  },
83
86
  {
84
87
  "move": {
@@ -91,6 +94,93 @@
91
94
  ]
92
95
  ],
93
96
  "proof": {
94
- "undecided": "no-goal"
97
+ "key": 6,
98
+ "asks": "count",
99
+ "witness": {
100
+ "paths": [
101
+ [],
102
+ [
103
+ {
104
+ "step": {
105
+ "to": "A2"
106
+ }
107
+ }
108
+ ],
109
+ [
110
+ {
111
+ "step": {
112
+ "to": "B1"
113
+ }
114
+ }
115
+ ],
116
+ [
117
+ {
118
+ "step": {
119
+ "to": "A2"
120
+ }
121
+ },
122
+ {
123
+ "step": {
124
+ "to": "B2"
125
+ }
126
+ }
127
+ ],
128
+ [
129
+ {
130
+ "step": {
131
+ "to": "B1"
132
+ }
133
+ },
134
+ {
135
+ "step": {
136
+ "to": "C1"
137
+ }
138
+ }
139
+ ],
140
+ [
141
+ {
142
+ "step": {
143
+ "to": "A2"
144
+ }
145
+ },
146
+ {
147
+ "step": {
148
+ "to": "B2"
149
+ }
150
+ },
151
+ {
152
+ "step": {
153
+ "to": "C2"
154
+ }
155
+ }
156
+ ]
157
+ ]
158
+ },
159
+ "ends": [
160
+ {
161
+ "marks": {},
162
+ "step_at": "A1"
163
+ },
164
+ {
165
+ "marks": {},
166
+ "step_at": "A2"
167
+ },
168
+ {
169
+ "marks": {},
170
+ "step_at": "B1"
171
+ },
172
+ {
173
+ "marks": {},
174
+ "step_at": "B2"
175
+ },
176
+ {
177
+ "marks": {},
178
+ "step_at": "C1"
179
+ },
180
+ {
181
+ "marks": {},
182
+ "step_at": "C2"
183
+ }
184
+ ]
95
185
  }
96
186
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "The goat of the course's task grid-56-d4-4: a field of 4 rows of 5, the shed B2 to B4 cut out, a piece that steps from the peg on A2. The scene has no goal: the cells within 5 steps are the first six layers of the state graph, 1 + 2 + 2 + 2 + 3 + 3 = 13, the task's key. A step into the shed is refused.",
2
+ "description": "The goat of the course's task grid-56-d4-4: a field of 4 rows of 5, the shed B2 to B4 cut out, a piece that steps from the peg on A2. The goal counts the cells within 5 steps, the peg's own too, 1 + 2 + 2 + 2 + 3 + 3 = 13, the task's key: C3, round the shed's left end, is 5 steps away and counted, C4 is 6 and is not. A step into the shed is refused.",
3
3
  "scene": {
4
4
  "sheet": {
5
5
  "rows": 4,
@@ -10,6 +10,11 @@
10
10
  "step": {
11
11
  "cell": "A2"
12
12
  }
13
+ },
14
+ "goal": {
15
+ "step_reach": {
16
+ "most": 5
17
+ }
13
18
  }
14
19
  },
15
20
  "seed": "0",
@@ -18,7 +23,7 @@
18
23
  "marks": {},
19
24
  "step_at": "A2"
20
25
  },
21
- "goal": false
26
+ "goal": true
22
27
  },
23
28
  "sequences": [
24
29
  [
@@ -40,7 +45,7 @@
40
45
  "marks": {},
41
46
  "step_at": "A1"
42
47
  },
43
- "goal": false
48
+ "goal": true
44
49
  },
45
50
  {
46
51
  "move": {
@@ -52,7 +57,7 @@
52
57
  "marks": {},
53
58
  "step_at": "B1"
54
59
  },
55
- "goal": false
60
+ "goal": true
56
61
  },
57
62
  {
58
63
  "move": {
@@ -64,11 +69,326 @@
64
69
  "marks": {},
65
70
  "step_at": "C1"
66
71
  },
72
+ "goal": true
73
+ },
74
+ {
75
+ "move": {
76
+ "step": {
77
+ "to": "C2"
78
+ }
79
+ },
80
+ "state": {
81
+ "marks": {},
82
+ "step_at": "C2"
83
+ },
84
+ "goal": true
85
+ },
86
+ {
87
+ "move": {
88
+ "step": {
89
+ "to": "C3"
90
+ }
91
+ },
92
+ "state": {
93
+ "marks": {},
94
+ "step_at": "C3"
95
+ },
96
+ "goal": true
97
+ },
98
+ {
99
+ "move": {
100
+ "step": {
101
+ "to": "C4"
102
+ }
103
+ },
104
+ "state": {
105
+ "marks": {},
106
+ "step_at": "C4"
107
+ },
67
108
  "goal": false
68
109
  }
69
110
  ]
70
111
  ],
71
112
  "proof": {
72
- "undecided": "no-goal"
113
+ "key": 13,
114
+ "asks": "count",
115
+ "witness": {
116
+ "paths": [
117
+ [],
118
+ [
119
+ {
120
+ "step": {
121
+ "to": "A1"
122
+ }
123
+ }
124
+ ],
125
+ [
126
+ {
127
+ "step": {
128
+ "to": "A3"
129
+ }
130
+ }
131
+ ],
132
+ [
133
+ {
134
+ "step": {
135
+ "to": "A1"
136
+ }
137
+ },
138
+ {
139
+ "step": {
140
+ "to": "B1"
141
+ }
142
+ }
143
+ ],
144
+ [
145
+ {
146
+ "step": {
147
+ "to": "A3"
148
+ }
149
+ },
150
+ {
151
+ "step": {
152
+ "to": "A4"
153
+ }
154
+ }
155
+ ],
156
+ [
157
+ {
158
+ "step": {
159
+ "to": "A1"
160
+ }
161
+ },
162
+ {
163
+ "step": {
164
+ "to": "B1"
165
+ }
166
+ },
167
+ {
168
+ "step": {
169
+ "to": "C1"
170
+ }
171
+ }
172
+ ],
173
+ [
174
+ {
175
+ "step": {
176
+ "to": "A3"
177
+ }
178
+ },
179
+ {
180
+ "step": {
181
+ "to": "A4"
182
+ }
183
+ },
184
+ {
185
+ "step": {
186
+ "to": "A5"
187
+ }
188
+ }
189
+ ],
190
+ [
191
+ {
192
+ "step": {
193
+ "to": "A1"
194
+ }
195
+ },
196
+ {
197
+ "step": {
198
+ "to": "B1"
199
+ }
200
+ },
201
+ {
202
+ "step": {
203
+ "to": "C1"
204
+ }
205
+ },
206
+ {
207
+ "step": {
208
+ "to": "C2"
209
+ }
210
+ }
211
+ ],
212
+ [
213
+ {
214
+ "step": {
215
+ "to": "A1"
216
+ }
217
+ },
218
+ {
219
+ "step": {
220
+ "to": "B1"
221
+ }
222
+ },
223
+ {
224
+ "step": {
225
+ "to": "C1"
226
+ }
227
+ },
228
+ {
229
+ "step": {
230
+ "to": "D1"
231
+ }
232
+ }
233
+ ],
234
+ [
235
+ {
236
+ "step": {
237
+ "to": "A3"
238
+ }
239
+ },
240
+ {
241
+ "step": {
242
+ "to": "A4"
243
+ }
244
+ },
245
+ {
246
+ "step": {
247
+ "to": "A5"
248
+ }
249
+ },
250
+ {
251
+ "step": {
252
+ "to": "B5"
253
+ }
254
+ }
255
+ ],
256
+ [
257
+ {
258
+ "step": {
259
+ "to": "A1"
260
+ }
261
+ },
262
+ {
263
+ "step": {
264
+ "to": "B1"
265
+ }
266
+ },
267
+ {
268
+ "step": {
269
+ "to": "C1"
270
+ }
271
+ },
272
+ {
273
+ "step": {
274
+ "to": "C2"
275
+ }
276
+ },
277
+ {
278
+ "step": {
279
+ "to": "C3"
280
+ }
281
+ }
282
+ ],
283
+ [
284
+ {
285
+ "step": {
286
+ "to": "A1"
287
+ }
288
+ },
289
+ {
290
+ "step": {
291
+ "to": "B1"
292
+ }
293
+ },
294
+ {
295
+ "step": {
296
+ "to": "C1"
297
+ }
298
+ },
299
+ {
300
+ "step": {
301
+ "to": "C2"
302
+ }
303
+ },
304
+ {
305
+ "step": {
306
+ "to": "D2"
307
+ }
308
+ }
309
+ ],
310
+ [
311
+ {
312
+ "step": {
313
+ "to": "A3"
314
+ }
315
+ },
316
+ {
317
+ "step": {
318
+ "to": "A4"
319
+ }
320
+ },
321
+ {
322
+ "step": {
323
+ "to": "A5"
324
+ }
325
+ },
326
+ {
327
+ "step": {
328
+ "to": "B5"
329
+ }
330
+ },
331
+ {
332
+ "step": {
333
+ "to": "C5"
334
+ }
335
+ }
336
+ ]
337
+ ]
338
+ },
339
+ "ends": [
340
+ {
341
+ "marks": {},
342
+ "step_at": "A2"
343
+ },
344
+ {
345
+ "marks": {},
346
+ "step_at": "A1"
347
+ },
348
+ {
349
+ "marks": {},
350
+ "step_at": "A3"
351
+ },
352
+ {
353
+ "marks": {},
354
+ "step_at": "B1"
355
+ },
356
+ {
357
+ "marks": {},
358
+ "step_at": "A4"
359
+ },
360
+ {
361
+ "marks": {},
362
+ "step_at": "C1"
363
+ },
364
+ {
365
+ "marks": {},
366
+ "step_at": "A5"
367
+ },
368
+ {
369
+ "marks": {},
370
+ "step_at": "C2"
371
+ },
372
+ {
373
+ "marks": {},
374
+ "step_at": "D1"
375
+ },
376
+ {
377
+ "marks": {},
378
+ "step_at": "B5"
379
+ },
380
+ {
381
+ "marks": {},
382
+ "step_at": "C3"
383
+ },
384
+ {
385
+ "marks": {},
386
+ "step_at": "D2"
387
+ },
388
+ {
389
+ "marks": {},
390
+ "step_at": "C5"
391
+ }
392
+ ]
73
393
  }
74
394
  }
@@ -0,0 +1,31 @@
1
+ {
2
+ "description": "A scene the kind refuses: its goal asks for the knight on a cell after an odd count of moves, but the knight's parameters keep no parity of its moves, so no state could tell an odd count from an even one; an author's slip, never a key that the goal cannot be reached.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 8,
6
+ "cols": 8
7
+ },
8
+ "operations": {
9
+ "knight": {
10
+ "cell": "A1"
11
+ }
12
+ },
13
+ "goal": {
14
+ "knight_on": {
15
+ "cell": "A1",
16
+ "after": "odd"
17
+ }
18
+ }
19
+ },
20
+ "seed": "0",
21
+ "sequences": [],
22
+ "proof": {
23
+ "undecided": "invalid",
24
+ "errors": [
25
+ {
26
+ "path": "/goal/knight_on/after",
27
+ "message": "the operation knight keeps no parity of the piece's moves: give it \"parity\": true"
28
+ }
29
+ ]
30
+ }
31
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "The knight of the course's task par-56-d2-2 on A1 of a chessboard. The scene has no goal: each move changes the colour of its cell, so it is back on A1 after an even number of moves only, after 2 already. A move that is no knight's, and a cell off the board, are refused.",
2
+ "description": "The knight of the course's task par-56-d2-2 on A1 of a chessboard, the state keeping whether it has made an even or an odd count of moves; the goal is the knight back on A1 after an odd count. Each move changes the colour of its cell, so it is back on A1 after an even count only, after 2 already, and the goal cannot be met: the whole graph of 64 states is the witness. A move that is no knight's, and a cell off the board, are refused, the parity as it was.",
3
3
  "scene": {
4
4
  "sheet": {
5
5
  "rows": 8,
@@ -7,7 +7,14 @@
7
7
  },
8
8
  "operations": {
9
9
  "knight": {
10
- "cell": "A1"
10
+ "cell": "A1",
11
+ "parity": true
12
+ }
13
+ },
14
+ "goal": {
15
+ "knight_on": {
16
+ "cell": "A1",
17
+ "after": "odd"
11
18
  }
12
19
  }
13
20
  },
@@ -15,7 +22,8 @@
15
22
  "start": {
16
23
  "state": {
17
24
  "marks": {},
18
- "knight_at": "A1"
25
+ "knight_at": "A1",
26
+ "knight_parity": "even"
19
27
  },
20
28
  "goal": false
21
29
  },
@@ -29,7 +37,8 @@
29
37
  },
30
38
  "state": {
31
39
  "marks": {},
32
- "knight_at": "B3"
40
+ "knight_at": "B3",
41
+ "knight_parity": "odd"
33
42
  },
34
43
  "goal": false
35
44
  },
@@ -41,7 +50,8 @@
41
50
  },
42
51
  "state": {
43
52
  "marks": {},
44
- "knight_at": "A1"
53
+ "knight_at": "A1",
54
+ "knight_parity": "even"
45
55
  },
46
56
  "goal": false
47
57
  },
@@ -61,9 +71,54 @@
61
71
  },
62
72
  "refused": "no-cell"
63
73
  }
74
+ ],
75
+ [
76
+ {
77
+ "move": {
78
+ "knight": {
79
+ "to": "C2"
80
+ }
81
+ },
82
+ "state": {
83
+ "marks": {},
84
+ "knight_at": "C2",
85
+ "knight_parity": "odd"
86
+ },
87
+ "goal": false
88
+ },
89
+ {
90
+ "move": {
91
+ "knight": {
92
+ "to": "A3"
93
+ }
94
+ },
95
+ "state": {
96
+ "marks": {},
97
+ "knight_at": "A3",
98
+ "knight_parity": "even"
99
+ },
100
+ "goal": false
101
+ },
102
+ {
103
+ "move": {
104
+ "knight": {
105
+ "to": "B1"
106
+ }
107
+ },
108
+ "state": {
109
+ "marks": {},
110
+ "knight_at": "B1",
111
+ "knight_parity": "odd"
112
+ },
113
+ "goal": false
114
+ }
64
115
  ]
65
116
  ],
66
117
  "proof": {
67
- "undecided": "no-goal"
118
+ "key": "unreachable",
119
+ "witness": {
120
+ "layers": [1, 2, 9, 20, 21, 10, 1]
121
+ },
122
+ "ends": []
68
123
  }
69
124
  }