Skip to content

Commit e12ea79

Browse files
committed
first shot at dister conditions
1 parent 687b6ca commit e12ea79

File tree

18 files changed

+1895
-913
lines changed

18 files changed

+1895
-913
lines changed

EXAMPLES/dister.inp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
begin
2+
3+
protocol dister.ref
4+
5+
title AT1
6+
pieces white ka1 se5 black kb3 rb8
7+
stipulation s#3
8+
condition blackmindister e5b8
9+
option vari nothreat
10+
11+
next
12+
13+
title AT2
14+
pieces white kd4 pa7 black ke7 pb4
15+
stipulation s#6
16+
condition blackmindister d4e7
17+
option vari nothreat
18+
19+
next
20+
21+
title AT3 - not supported
22+
pieces white ke5 qe4 pe6 black ke8 ra8h8
23+
stipulation r=3
24+
condition blackmaxdister e5e8
25+
option vari nothreat
26+
27+
next
28+
29+
title AT4
30+
pieces white ka1 qb2 pe7 black ke6
31+
stipulation #3
32+
option postkeyplay nothreat
33+
condition blackmaxdister a1e6
34+
twin condition blackmindister a1e6
35+
36+
next
37+
38+
title AT5 - not supported
39+
pieces white kh1 qe2 pa7 black kg3 rd7 sc7 pg4
40+
stipulation s#3
41+
condition circe blackmindister a7g3
42+
option vari nothreat
43+
44+
end
45+

REGRESSIONTESTS/dister.ref

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
2+
AT1
3+
4+
+---a---b---c---d---e---f---g---h---+
5+
| |
6+
8 . -R . . . . . . 8
7+
| |
8+
7 . . . . . . . . 7
9+
| |
10+
6 . . . . . . . . 6
11+
| |
12+
5 . . . . S . . . 5
13+
| |
14+
4 . . . . . . . . 4
15+
| |
16+
3 . -K . . . . . . 3
17+
| |
18+
2 . . . . . . . . 2
19+
| |
20+
1 K . . . . . . . 1
21+
| |
22+
+---a---b---c---d---e---f---g---h---+
23+
s#3 2 + 2
24+
BlackMinDister e5 b8
25+
26+
1.Se5-c4 !
27+
1...Rb8-b4
28+
2.Sc4-e3
29+
2...Rb4-e4
30+
3.Se3-f1
31+
3...Re4-e1 #
32+
33+
1.Se5-d3 !
34+
1...Rb8-b4
35+
2.Ka1-b1
36+
2...Rb4-d4
37+
3.Sd3-e1
38+
3...Rd4-d1 #
39+
2.Sd3-f2
40+
2...Rb4-f4
41+
3.Sf2-h1
42+
3...Rf4-f1 #
43+
44+
1.Se5-f3 !
45+
1...Rb8-b4
46+
2.Ka1-b1
47+
2...Rb4-f4
48+
3.Sf3-g1
49+
3...Rf4-f1 #
50+
51+
add_to_move_generation_stack: 15581
52+
play_move: 4684
53+
is_white_king_square_attacked: 2103
54+
is_black_king_square_attacked: 3618
55+
56+
solution finished.
57+
58+
59+
60+
AT2
61+
62+
+---a---b---c---d---e---f---g---h---+
63+
| |
64+
8 . . . . . . . . 8
65+
| |
66+
7 P . . . -K . . . 7
67+
| |
68+
6 . . . . . . . . 6
69+
| |
70+
5 . . . . . . . . 5
71+
| |
72+
4 . -P . K . . . . 4
73+
| |
74+
3 . . . . . . . . 3
75+
| |
76+
2 . . . . . . . . 2
77+
| |
78+
1 . . . . . . . . 1
79+
| |
80+
+---a---b---c---d---e---f---g---h---+
81+
s#6 2 + 2
82+
BlackMinDister d4 e7
83+
84+
1.a7-a8=B !
85+
1...Ke7-d6
86+
2.Ba8-e4
87+
2...b4-b3
88+
3.Kd4-c3
89+
3...Kd6-c5
90+
4.Kc3-b2
91+
4...Kc5-b4
92+
5.Kb2-a1
93+
5...Kb4-a3
94+
6.Be4-b1
95+
6...b3-b2 #
96+
97+
add_to_move_generation_stack: 8426571
98+
play_move: 5038269
99+
is_white_king_square_attacked: 1605271
100+
is_black_king_square_attacked: 4211552
101+
102+
solution finished.
103+
104+
105+
106+
AT3 - not supported
107+
108+
+---a---b---c---d---e---f---g---h---+
109+
| |
110+
8 -R . . . -K . . -R 8
111+
| |
112+
7 . . . . . . . . 7
113+
| |
114+
6 . . . . P . . . 6
115+
| |
116+
5 . . . . K . . . 5
117+
| |
118+
4 . . . . Q . . . 4
119+
| |
120+
3 . . . . . . . . 3
121+
| |
122+
2 . . . . . . . . 2
123+
| |
124+
1 . . . . . . . . 1
125+
| |
126+
+---a---b---c---d---e---f---g---h---+
127+
r=3 3 + 3
128+
BlackMaxDister e5 e8
129+
130+
add_to_move_generation_stack: 398460
131+
play_move: 137666
132+
is_white_king_square_attacked: 93379
133+
is_black_king_square_attacked: 89470
134+
135+
solution finished.
136+
137+
138+
139+
AT4
140+
141+
+---a---b---c---d---e---f---g---h---+
142+
| |
143+
8 . . . . . . . . 8
144+
| |
145+
7 . . . . P . . . 7
146+
| |
147+
6 . . . . -K . . . 6
148+
| |
149+
5 . . . . . . . . 5
150+
| |
151+
4 . . . . . . . . 4
152+
| |
153+
3 . . . . . . . . 3
154+
| |
155+
2 . Q . . . . . . 2
156+
| |
157+
1 K . . . . . . . 1
158+
| |
159+
+---a---b---c---d---e---f---g---h---+
160+
#3 3 + 1
161+
BlackMaxDister a1 e6
162+
163+
a)
164+
165+
1...Ke6-f7
166+
2.Qb2-b7
167+
2...Kf7-g8
168+
3.e7-e8=Q #
169+
3.e7-e8=R #
170+
2.e7-e8=S
171+
2...Kf7-g8
172+
3.Qb2-g7 #
173+
add_to_move_generation_stack: 2159
174+
play_move: 1340
175+
is_white_king_square_attacked: 237
176+
is_black_king_square_attacked: 1315
177+
178+
b) BlackMinDister a1 e6
179+
180+
1...Ke6-d5
181+
2.e7-e8=Q
182+
2...Kd5-c4
183+
3.Qe8-b5 #
184+
add_to_move_generation_stack: 3234
185+
play_move: 1587
186+
is_white_king_square_attacked: 303
187+
is_black_king_square_attacked: 1561
188+
189+
solution finished.
190+
191+
192+
193+
AT5 - not supported
194+
195+
+---a---b---c---d---e---f---g---h---+
196+
| |
197+
8 . . . . . . . . 8
198+
| |
199+
7 P . -S -R . . . . 7
200+
| |
201+
6 . . . . . . . . 6
202+
| |
203+
5 . . . . . . . . 5
204+
| |
205+
4 . . . . . . -P . 4
206+
| |
207+
3 . . . . . . -K . 3
208+
| |
209+
2 . . . . Q . . . 2
210+
| |
211+
1 . . . . . . . K 1
212+
| |
213+
+---a---b---c---d---e---f---g---h---+
214+
s#3 3 + 4
215+
Circe
216+
BlackMinDister a7 g3
217+
218+
add_to_move_generation_stack: 375078
219+
play_move: 144382
220+
is_white_king_square_attacked: 32141
221+
is_black_king_square_attacked: 129474
222+
223+
solution finished.
224+
225+

conditions/conditions.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ typedef enum
233233
bolero_inverse, /* 212 */
234234
influencer, /* 213 */
235235
role_exchange, /* 214 */
236+
blmaxdister, /* 215 */
237+
blmindister, /* 216 */
238+
whmaxdister, /* 217 */
239+
whmindister, /* 218 */
236240

237-
CondCount /* 215 */
241+
CondCount /* 219 */
238242
} Cond;
239243

240244
/* for intelligent specification of one-sided conditions */

0 commit comments

Comments
 (0)