@altnovatrail/widgets 0.2.0 → 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 (62) hide show
  1. package/README.md +1 -1
  2. package/kinds/line/line.handles.json +195 -0
  3. package/kinds/line/line.schema.json +321 -0
  4. package/kinds/line/vectors/cases.json +213 -0
  5. package/kinds/line/vectors/gaps-12-d1-1.json +140 -0
  6. package/kinds/line/vectors/gaps-12-d1-2.json +95 -0
  7. package/kinds/line/vectors/gaps-12-d1-3.json +122 -0
  8. package/kinds/line/vectors/gaps-12-d1-4.json +121 -0
  9. package/kinds/line/vectors/gaps-12-d1-5.json +87 -0
  10. package/kinds/line/vectors/gaps-12-d2-1.json +173 -0
  11. package/kinds/line/vectors/gaps-12-d2-6.json +87 -0
  12. package/kinds/line/vectors/gaps-12-d3-2.json +173 -0
  13. package/kinds/line/vectors/gaps-12-d4-4.json +168 -0
  14. package/kinds/line/vectors/gaps-12-d5-3.json +99 -0
  15. package/kinds/line/vectors/gaps-12-d5-4.json +215 -0
  16. package/kinds/line/vectors/gaps-34-d1-1.json +37 -0
  17. package/kinds/line/vectors/gaps-34-d1-2.json +130 -0
  18. package/kinds/line/vectors/gaps-34-d1-4.json +155 -0
  19. package/kinds/line/vectors/gaps-34-d1-5.json +43 -0
  20. package/kinds/line/vectors/gaps-34-d3-2.json +38 -0
  21. package/kinds/line/vectors/gaps-34-d3-5.json +177 -0
  22. package/kinds/line/vectors/gaps-34-d5-3.json +39 -0
  23. package/kinds/line/vectors/invalid-line.json +34 -0
  24. package/kinds/line/vectors/invalid-ring.json +34 -0
  25. package/kinds/line/vectors/invalid.json +43 -0
  26. package/kinds/line/vectors/jump-unreachable.json +104 -0
  27. package/kinds/line/vectors/limit.json +40 -0
  28. package/kinds/line/vectors/op-not-in-scene.json +47 -0
  29. package/kinds/line/vectors/ring-cut.json +104 -0
  30. package/kinds/line/vectors/ring-every.json +107 -0
  31. package/kinds/line/vectors/ring-jump.json +135 -0
  32. package/lib/cores/arith.d.ts +62 -0
  33. package/lib/cores/arith.js +197 -0
  34. package/lib/cores/kind.d.ts +10 -0
  35. package/lib/cores/registry.d.ts +43 -0
  36. package/lib/cores/registry.js +87 -0
  37. package/lib/cores/search.js +36 -8
  38. package/lib/kinds/cells/kind.js +11 -64
  39. package/lib/kinds/cells/operation.d.ts +6 -0
  40. package/lib/kinds/cells/polyomino.d.ts +14 -0
  41. package/lib/kinds/cells/polyomino.js +100 -24
  42. package/lib/kinds/line/cut.d.ts +2 -0
  43. package/lib/kinds/line/cut.js +63 -0
  44. package/lib/kinds/line/goals.d.ts +22 -0
  45. package/lib/kinds/line/goals.js +137 -0
  46. package/lib/kinds/line/index.d.ts +13 -0
  47. package/lib/kinds/line/index.js +17 -0
  48. package/lib/kinds/line/jump.d.ts +10 -0
  49. package/lib/kinds/line/jump.js +95 -0
  50. package/lib/kinds/line/kind.d.ts +25 -0
  51. package/lib/kinds/line/kind.js +125 -0
  52. package/lib/kinds/line/line.d.ts +63 -0
  53. package/lib/kinds/line/line.js +157 -0
  54. package/lib/kinds/line/operation.d.ts +69 -0
  55. package/lib/kinds/line/operation.js +1 -0
  56. package/lib/kinds/line/posts.d.ts +11 -0
  57. package/lib/kinds/line/posts.js +85 -0
  58. package/lib/kinds/line/registry.d.ts +2 -0
  59. package/lib/kinds/line/registry.js +11 -0
  60. package/lib/kinds/line/schema.d.ts +4 -0
  61. package/lib/kinds/line/schema.js +157 -0
  62. package/package.json +9 -2
@@ -0,0 +1,213 @@
1
+ {
2
+ "description": "Posts, cuts and a jumper on one line, with no goal, and the rules' every refusal: a post on a place that has one, a move that names no place of the line, a cut at an end of the line or where the line is cut, a jump back where the scene allows none, a jump that is neither forward nor back, an operation the scene does not allow or the kind does not have, and a move of no operation. A post and a cut on one place are each its own and stop neither the other nor the jumper.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 5,
6
+ "first": 1,
7
+ "posts": [5]
8
+ },
9
+ "operations": {
10
+ "post": {},
11
+ "cut": {},
12
+ "jump": {
13
+ "from": 1,
14
+ "step": 2
15
+ }
16
+ }
17
+ },
18
+ "seed": "0",
19
+ "start": {
20
+ "state": {
21
+ "posts": [5],
22
+ "cuts": [],
23
+ "at": 1
24
+ },
25
+ "goal": false
26
+ },
27
+ "sequences": [
28
+ [
29
+ {
30
+ "move": {
31
+ "post": {
32
+ "at": 3
33
+ }
34
+ },
35
+ "state": {
36
+ "posts": [3, 5],
37
+ "cuts": [],
38
+ "at": 1
39
+ },
40
+ "goal": false
41
+ },
42
+ {
43
+ "move": {
44
+ "post": {
45
+ "at": 3
46
+ }
47
+ },
48
+ "refused": "taken"
49
+ },
50
+ {
51
+ "move": {
52
+ "post": {
53
+ "at": 5
54
+ }
55
+ },
56
+ "refused": "taken"
57
+ },
58
+ {
59
+ "move": {
60
+ "post": {
61
+ "at": 6
62
+ }
63
+ },
64
+ "refused": "no-place"
65
+ },
66
+ {
67
+ "move": {
68
+ "post": {
69
+ "at": 0
70
+ }
71
+ },
72
+ "refused": "no-place"
73
+ },
74
+ {
75
+ "move": {
76
+ "post": 3
77
+ },
78
+ "refused": "no-place"
79
+ },
80
+ {
81
+ "move": {
82
+ "post": {
83
+ "at": 2,
84
+ "side": "left"
85
+ }
86
+ },
87
+ "refused": "no-place"
88
+ }
89
+ ],
90
+ [
91
+ {
92
+ "move": {
93
+ "cut": {
94
+ "at": 1
95
+ }
96
+ },
97
+ "refused": "end"
98
+ },
99
+ {
100
+ "move": {
101
+ "cut": {
102
+ "at": 5
103
+ }
104
+ },
105
+ "refused": "end"
106
+ },
107
+ {
108
+ "move": {
109
+ "cut": {
110
+ "at": 3
111
+ }
112
+ },
113
+ "state": {
114
+ "posts": [5],
115
+ "cuts": [3],
116
+ "at": 1
117
+ },
118
+ "goal": false
119
+ },
120
+ {
121
+ "move": {
122
+ "cut": {
123
+ "at": 3
124
+ }
125
+ },
126
+ "refused": "cut"
127
+ },
128
+ {
129
+ "move": {
130
+ "cut": {
131
+ "at": 2
132
+ }
133
+ },
134
+ "state": {
135
+ "posts": [5],
136
+ "cuts": [2, 3],
137
+ "at": 1
138
+ },
139
+ "goal": false
140
+ }
141
+ ],
142
+ [
143
+ {
144
+ "move": {
145
+ "jump": "back"
146
+ },
147
+ "refused": "no-back"
148
+ },
149
+ {
150
+ "move": {
151
+ "jump": "up"
152
+ },
153
+ "refused": "not-a-jump"
154
+ },
155
+ {
156
+ "move": {
157
+ "jump": "forward"
158
+ },
159
+ "state": {
160
+ "posts": [5],
161
+ "cuts": [],
162
+ "at": 3
163
+ },
164
+ "goal": false
165
+ },
166
+ {
167
+ "move": {
168
+ "jump": "forward"
169
+ },
170
+ "state": {
171
+ "posts": [5],
172
+ "cuts": [],
173
+ "at": 5
174
+ },
175
+ "goal": false
176
+ },
177
+ {
178
+ "move": {
179
+ "jump": "forward"
180
+ },
181
+ "refused": "off-line"
182
+ }
183
+ ],
184
+ [
185
+ {
186
+ "move": {
187
+ "saw": {
188
+ "at": 2
189
+ }
190
+ },
191
+ "refused": "unknown-op"
192
+ },
193
+ {
194
+ "move": {},
195
+ "refused": "not-a-move"
196
+ },
197
+ {
198
+ "move": {
199
+ "post": {
200
+ "at": 2
201
+ },
202
+ "cut": {
203
+ "at": 2
204
+ }
205
+ },
206
+ "refused": "not-a-move"
207
+ }
208
+ ]
209
+ ],
210
+ "proof": {
211
+ "undecided": "no-goal"
212
+ }
213
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "description": "The task gaps-12-d1-1: six trees grow in a row; how many gaps are there between them? The learner plants a tree on each of six places, and the key is the gaps of a row of six trees, 5: the greatest, as every row of six has as many.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 6,
6
+ "first": 1
7
+ },
8
+ "operations": {
9
+ "post": {}
10
+ },
11
+ "goal": {
12
+ "counters": {
13
+ "is": {
14
+ "posts": 6
15
+ },
16
+ "max": "gaps"
17
+ }
18
+ }
19
+ },
20
+ "seed": "0",
21
+ "start": {
22
+ "state": {
23
+ "posts": []
24
+ },
25
+ "goal": false
26
+ },
27
+ "sequences": [
28
+ [
29
+ {
30
+ "move": {
31
+ "post": {
32
+ "at": 1
33
+ }
34
+ },
35
+ "state": {
36
+ "posts": [1]
37
+ },
38
+ "goal": false
39
+ },
40
+ {
41
+ "move": {
42
+ "post": {
43
+ "at": 2
44
+ }
45
+ },
46
+ "state": {
47
+ "posts": [1, 2]
48
+ },
49
+ "goal": false
50
+ },
51
+ {
52
+ "move": {
53
+ "post": {
54
+ "at": 3
55
+ }
56
+ },
57
+ "state": {
58
+ "posts": [1, 2, 3]
59
+ },
60
+ "goal": false
61
+ },
62
+ {
63
+ "move": {
64
+ "post": {
65
+ "at": 4
66
+ }
67
+ },
68
+ "state": {
69
+ "posts": [1, 2, 3, 4]
70
+ },
71
+ "goal": false
72
+ },
73
+ {
74
+ "move": {
75
+ "post": {
76
+ "at": 5
77
+ }
78
+ },
79
+ "state": {
80
+ "posts": [1, 2, 3, 4, 5]
81
+ },
82
+ "goal": false
83
+ },
84
+ {
85
+ "move": {
86
+ "post": {
87
+ "at": 6
88
+ }
89
+ },
90
+ "state": {
91
+ "posts": [1, 2, 3, 4, 5, 6]
92
+ },
93
+ "goal": true
94
+ }
95
+ ]
96
+ ],
97
+ "proof": {
98
+ "key": 5,
99
+ "asks": "max",
100
+ "witness": {
101
+ "path": [
102
+ {
103
+ "post": {
104
+ "at": 1
105
+ }
106
+ },
107
+ {
108
+ "post": {
109
+ "at": 2
110
+ }
111
+ },
112
+ {
113
+ "post": {
114
+ "at": 3
115
+ }
116
+ },
117
+ {
118
+ "post": {
119
+ "at": 4
120
+ }
121
+ },
122
+ {
123
+ "post": {
124
+ "at": 5
125
+ }
126
+ },
127
+ {
128
+ "post": {
129
+ "at": 6
130
+ }
131
+ }
132
+ ]
133
+ },
134
+ "ends": [
135
+ {
136
+ "posts": [1, 2, 3, 4, 5, 6]
137
+ }
138
+ ]
139
+ }
140
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "description": "The task gaps-12-d1-2: Mia cuts a ribbon into 4 pieces; how many cuts does she make? The fewest cuts that leave 4 pieces, 3.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 6,
6
+ "first": 0
7
+ },
8
+ "operations": {
9
+ "cut": {}
10
+ },
11
+ "goal": {
12
+ "counters": {
13
+ "is": {
14
+ "pieces": 4
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "seed": "0",
20
+ "start": {
21
+ "state": {
22
+ "posts": [],
23
+ "cuts": []
24
+ },
25
+ "goal": false
26
+ },
27
+ "sequences": [
28
+ [
29
+ {
30
+ "move": {
31
+ "cut": {
32
+ "at": 1
33
+ }
34
+ },
35
+ "state": {
36
+ "posts": [],
37
+ "cuts": [1]
38
+ },
39
+ "goal": false
40
+ },
41
+ {
42
+ "move": {
43
+ "cut": {
44
+ "at": 2
45
+ }
46
+ },
47
+ "state": {
48
+ "posts": [],
49
+ "cuts": [1, 2]
50
+ },
51
+ "goal": false
52
+ },
53
+ {
54
+ "move": {
55
+ "cut": {
56
+ "at": 3
57
+ }
58
+ },
59
+ "state": {
60
+ "posts": [],
61
+ "cuts": [1, 2, 3]
62
+ },
63
+ "goal": true
64
+ }
65
+ ]
66
+ ],
67
+ "proof": {
68
+ "key": 3,
69
+ "witness": {
70
+ "path": [
71
+ {
72
+ "cut": {
73
+ "at": 1
74
+ }
75
+ },
76
+ {
77
+ "cut": {
78
+ "at": 2
79
+ }
80
+ },
81
+ {
82
+ "cut": {
83
+ "at": 3
84
+ }
85
+ }
86
+ ]
87
+ },
88
+ "ends": [
89
+ {
90
+ "posts": [],
91
+ "cuts": [1, 2, 3]
92
+ }
93
+ ]
94
+ }
95
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "description": "The task gaps-12-d1-3: flowers grow in a row with 4 gaps between them; how many flowers are there? On a bed of seven places, the fewest flowers planted to make 4 gaps, 5.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 7,
6
+ "first": 1
7
+ },
8
+ "operations": {
9
+ "post": {}
10
+ },
11
+ "goal": {
12
+ "counters": {
13
+ "is": {
14
+ "gaps": 4
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "seed": "0",
20
+ "start": {
21
+ "state": {
22
+ "posts": []
23
+ },
24
+ "goal": false
25
+ },
26
+ "sequences": [
27
+ [
28
+ {
29
+ "move": {
30
+ "post": {
31
+ "at": 1
32
+ }
33
+ },
34
+ "state": {
35
+ "posts": [1]
36
+ },
37
+ "goal": false
38
+ },
39
+ {
40
+ "move": {
41
+ "post": {
42
+ "at": 2
43
+ }
44
+ },
45
+ "state": {
46
+ "posts": [1, 2]
47
+ },
48
+ "goal": false
49
+ },
50
+ {
51
+ "move": {
52
+ "post": {
53
+ "at": 3
54
+ }
55
+ },
56
+ "state": {
57
+ "posts": [1, 2, 3]
58
+ },
59
+ "goal": false
60
+ },
61
+ {
62
+ "move": {
63
+ "post": {
64
+ "at": 4
65
+ }
66
+ },
67
+ "state": {
68
+ "posts": [1, 2, 3, 4]
69
+ },
70
+ "goal": false
71
+ },
72
+ {
73
+ "move": {
74
+ "post": {
75
+ "at": 5
76
+ }
77
+ },
78
+ "state": {
79
+ "posts": [1, 2, 3, 4, 5]
80
+ },
81
+ "goal": true
82
+ }
83
+ ]
84
+ ],
85
+ "proof": {
86
+ "key": 5,
87
+ "witness": {
88
+ "path": [
89
+ {
90
+ "post": {
91
+ "at": 1
92
+ }
93
+ },
94
+ {
95
+ "post": {
96
+ "at": 2
97
+ }
98
+ },
99
+ {
100
+ "post": {
101
+ "at": 3
102
+ }
103
+ },
104
+ {
105
+ "post": {
106
+ "at": 4
107
+ }
108
+ },
109
+ {
110
+ "post": {
111
+ "at": 5
112
+ }
113
+ }
114
+ ]
115
+ },
116
+ "ends": [
117
+ {
118
+ "posts": [1, 2, 3, 4, 5]
119
+ }
120
+ ]
121
+ }
122
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "description": "The task gaps-12-d1-4: Tom reads his book from page 3 to page 7, both included; how many pages? A post on a page marks it read, and the fewest marks on every page from 3 to 7 are 5, not the 4 that 7 - 3 gives.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 10,
6
+ "first": 1
7
+ },
8
+ "operations": {
9
+ "post": {}
10
+ },
11
+ "goal": {
12
+ "every": {
13
+ "from": 3,
14
+ "to": 7
15
+ }
16
+ }
17
+ },
18
+ "seed": "0",
19
+ "start": {
20
+ "state": {
21
+ "posts": []
22
+ },
23
+ "goal": false
24
+ },
25
+ "sequences": [
26
+ [
27
+ {
28
+ "move": {
29
+ "post": {
30
+ "at": 3
31
+ }
32
+ },
33
+ "state": {
34
+ "posts": [3]
35
+ },
36
+ "goal": false
37
+ },
38
+ {
39
+ "move": {
40
+ "post": {
41
+ "at": 4
42
+ }
43
+ },
44
+ "state": {
45
+ "posts": [3, 4]
46
+ },
47
+ "goal": false
48
+ },
49
+ {
50
+ "move": {
51
+ "post": {
52
+ "at": 5
53
+ }
54
+ },
55
+ "state": {
56
+ "posts": [3, 4, 5]
57
+ },
58
+ "goal": false
59
+ },
60
+ {
61
+ "move": {
62
+ "post": {
63
+ "at": 6
64
+ }
65
+ },
66
+ "state": {
67
+ "posts": [3, 4, 5, 6]
68
+ },
69
+ "goal": false
70
+ },
71
+ {
72
+ "move": {
73
+ "post": {
74
+ "at": 7
75
+ }
76
+ },
77
+ "state": {
78
+ "posts": [3, 4, 5, 6, 7]
79
+ },
80
+ "goal": true
81
+ }
82
+ ]
83
+ ],
84
+ "proof": {
85
+ "key": 5,
86
+ "witness": {
87
+ "path": [
88
+ {
89
+ "post": {
90
+ "at": 3
91
+ }
92
+ },
93
+ {
94
+ "post": {
95
+ "at": 4
96
+ }
97
+ },
98
+ {
99
+ "post": {
100
+ "at": 5
101
+ }
102
+ },
103
+ {
104
+ "post": {
105
+ "at": 6
106
+ }
107
+ },
108
+ {
109
+ "post": {
110
+ "at": 7
111
+ }
112
+ }
113
+ ]
114
+ },
115
+ "ends": [
116
+ {
117
+ "posts": [3, 4, 5, 6, 7]
118
+ }
119
+ ]
120
+ }
121
+ }