Skip to content

Commit

Permalink
Merge pull request #488 from thomas-maeder/484-better-memory-usage-fo…
Browse files Browse the repository at this point in the history
…r-chess-problems-with-4-6-pieces

484 better memory usage for chess problems with 4 6 pieces
  • Loading branch information
thomas-maeder authored Apr 15, 2024
2 parents 1fed694 + a86af19 commit 5ffb472
Show file tree
Hide file tree
Showing 58 changed files with 2,877 additions and 5,857 deletions.
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/4_47_to_4_49.reg
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,10 @@ option start in intelligent mode
1 potential positions in 1+7
1.Kb4-c4 2.Qb2-b4 3.Rg3-b3 4.Bg7-c3 5.d5-d4 6.Rf5-b5 7.c6-c5 8.Bb7-d5 d2-d3 #
15 potential positions in 1+8
add_to_move_generation_stack: 70253
play_move: 70253
is_white_king_square_attacked: 4211
is_black_king_square_attacked: 4721
add_to_move_generation_stack: 70149
play_move: 70149
is_white_king_square_attacked: 4203
is_black_king_square_attacked: 4713

solution finished.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/4_51_to_4_53.reg
Original file line number Diff line number Diff line change
Expand Up @@ -2111,10 +2111,10 @@ and 1.Kc1-b1 2.Kb1-a1 3.Bc2-b1 Bg6-c2 =
1.Kc1-d1 2.Bc2-b1 3.Kd1-c1 Bg6-c2 =
1.Bc2-b1 2.Bb1-f5 3.Bf5-b1 Bg6-c2 =
1.Bc2-b1 2.Bb1-e4 3.Be4-b1 Bg6-c2 =
add_to_move_generation_stack: 11839
play_move: 6607
is_white_king_square_attacked: 2159
is_black_king_square_attacked: 6180
add_to_move_generation_stack: 14825
play_move: 8603
is_white_king_square_attacked: 2787
is_black_king_square_attacked: 8050
Partial solution


Expand Down
4 changes: 2 additions & 2 deletions REGRESSIONTESTS/4_55_to_4_57.reg
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,8 @@ Popeye didn't find a solution since at least 4.37
1.Kg1*h2[+wPg1] 2.Kh2-h3 3.Kh3*h4[+wPh3] 4.Kh4-g3 5.Kg3-h2 6.Kh2*h3[+wPh2] 7.Kh3-g2 8.Kg2*g1[+wPg2] 9.Kg1*h2[+wPg1] 10.Kh2*g2[+wPh2] 11.Kg2-h3 12.Kh3*h2[+wPh3] 13.Kh2*g1[+wPh2] h3-h4
1.Kg1*h2[+wPg1] 2.Kh2-h3 3.Kh3*h4[+wPh3] 4.Kh4-g3 5.Kg3-h2 6.Kh2*h3[+wPh2] 7.Kh3-g2 8.Kg2*h2[+wPg2] 9.Kh2*g1[+wPh2] 10.Kg1*g2[+wPg1] 11.Kg2-h3 12.Kh3*h2[+wPh3] 13.Kh2*g1[+wPh2] h3-h4
1.Kg1*h2[+wPg1] 2.Kh2-h3 3.Kh3*h4[+wPh3] 4.Kh4-g3 5.Kg3*h3[+wPg3] 6.Kh3-g2 7.Kg2*g3[+wPg2] 8.Kg3-h2 9.Kh2*g1[+wPh2] 10.Kg1*g2[+wPg1] 11.Kg2-h3 12.Kh3*h2[+wPh3] 13.Kh2*g1[+wPh2] h3-h4
add_to_move_generation_stack: 55983
play_move: 55983
add_to_move_generation_stack: 55999
play_move: 55999
is_white_king_square_attacked: 20970
is_black_king_square_attacked: 34578

Expand Down
14 changes: 7 additions & 7 deletions REGRESSIONTESTS/4_61_to_4_63.reg
Original file line number Diff line number Diff line change
Expand Up @@ -1263,10 +1263,10 @@ solution finished.
both sides need a king

1.Kh1-g2 2.Kg2-f3 3.Kf3-e4 Sb4*a6 Sa6-c5 +
add_to_move_generation_stack: 316
play_move: 316
add_to_move_generation_stack: 328
play_move: 328
is_white_king_square_attacked: 0
is_black_king_square_attacked: 153
is_black_king_square_attacked: 155

solution finished.

Expand Down Expand Up @@ -1308,10 +1308,10 @@ movenumbers and nested series branches; until 4.61, Popeye produced
1.Kg3-g2 Kd2-e1 2.Kg2-h1 Rc8-c1 3.f3-f2 + Ke1*f2 #
10 (Kg3-g4 )
11 (Kg3-h3 )
add_to_move_generation_stack: 235771
play_move: 250400
is_white_king_square_attacked: 221287
is_black_king_square_attacked: 216339
add_to_move_generation_stack: 235787
play_move: 250422
is_white_king_square_attacked: 221309
is_black_king_square_attacked: 216361

solution finished.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/4_63_to_4_65.reg
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ solution finished.
1.d2-d1=S 2.Sd1-e3 3.Se3-f1 Qf2-g1 #
1.d2-d1=R 2.Rd1-d3 3.Rd3-f3 Qf2-g2 #
1.d2-d1=B 2.Bd1-g4 3.Bg4-h3 Qf2-h2 #
add_to_move_generation_stack: 8042
play_move: 7018
is_white_king_square_attacked: 1203
is_black_king_square_attacked: 7018
add_to_move_generation_stack: 8140
play_move: 7100
is_white_king_square_attacked: 1217
is_black_king_square_attacked: 7100

solution finished.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/4_69_to_4_71.reg
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ Popeye hasn't found the solution since 4.65
KoeKo

1.0-0 2.nRf8-f2 3.nPe3-e2 4.nPe2-e1=nQ 5.nQe1-g1 6.nRf2-h2 7.nQg1-a7 nRh2-h8 #
add_to_move_generation_stack: 558560
play_move: 643203
is_white_king_square_attacked: 22728
is_black_king_square_attacked: 211290
add_to_move_generation_stack: 558670
play_move: 643320
is_white_king_square_attacked: 22732
is_black_king_square_attacked: 211313

solution finished.

Expand Down
24 changes: 12 additions & 12 deletions REGRESSIONTESTS/4_85_to_4_87.reg
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ Popeye 4.85 printed dummies as total invisibles in the solution
47 potential positions in 5+5
1.c2-c1=DU Bg7-h6 2.d4-d3 Kg1-f1 3.d3-d2 Kf1-e2 4.d2-d1=B + Ke2-d2 5.Bd1-b3 Kd2*c1 6.Bb3-a2 Bh6-g7 #
289 potential positions in 6+6
add_to_move_generation_stack: 4715090
play_move: 4790971
is_white_king_square_attacked: 443150
is_black_king_square_attacked: 595213
add_to_move_generation_stack: 4697629
play_move: 4772918
is_white_king_square_attacked: 441359
is_black_king_square_attacked: 593759

solution finished.

Expand Down Expand Up @@ -328,10 +328,10 @@ solution finished.
1.Sb5-d4 1.Sd3-c1 2.Sc1-a2 Sd4*b3 #
1.Sb5-d4 1.Rb3-a3 2.Sd3-b2 3.Ra3-a2 Sd4-b3 #
1.Sb5-d4 1.Sd3-b2 2.Rb3-a3 3.Ra3-a2 Sd4-b3 #
add_to_move_generation_stack: 37466
play_move: 34937
is_white_king_square_attacked: 4372
is_black_king_square_attacked: 34927
add_to_move_generation_stack: 37545
play_move: 34995
is_white_king_square_attacked: 4393
is_black_king_square_attacked: 34985

solution finished.

Expand Down Expand Up @@ -449,10 +449,10 @@ PDB (P0574726): Gerson Berlinger, 32'er 11-12 1989
Duplex

1.a4*b3 ep. Ka3-a4 2.Kc4-d3 Ka4-b5 3.Kd3-c2 Kb5-c4 4.Kc2-b1 Kc4-d3 5.Bc3-a1 Kd3*e2 6.b3-b2 Ke2*d1 =
add_to_move_generation_stack: 12177338
play_move: 12857728
is_white_king_square_attacked: 510274
is_black_king_square_attacked: 3327092
add_to_move_generation_stack: 12172593
play_move: 12852671
is_white_king_square_attacked: 510238
is_black_king_square_attacked: 3326960

1.Ka3*a4 Bc3*b4 =
add_to_move_generation_stack: 69
Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/CASTchess.ref
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ solution finished.

1.c2-c1=R 2.Rc1-g1 3.Rg1-g2 4.Rg2*f2 5.Rf2-a2 6.Ra2-a7 Qh2-a2 #
1.c2-c1=B 2.Bc1-f4 3.Bf4-g3 4.Bg3*f2 5.Bf2-d4 6.Bd4-h8 Qh2-b2 #
add_to_move_generation_stack: 538448
play_move: 147096
is_white_king_square_attacked: 26735
is_black_king_square_attacked: 147096
add_to_move_generation_stack: 539336
play_move: 147245
is_white_king_square_attacked: 26746
is_black_king_square_attacked: 147245

solution finished.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/annan.out
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ Loesung beendet.
Annanschach

1.Ka8-b7 2.Kb7-d5 3.Lb8-e5 4.Le5-d4 5.Ld4-e4 6.Kd5-e5 7.Ke5-f4 8.Le4*f3 9.Lf3-g3 10.Kf4-e4 11.Lg3-e5 12.Ke4-a8 13.Le5-b8 Lg4-f3 #
add_to_move_generation_stack: 870337
play_move: 844164
is_white_king_square_attacked: 455306
is_black_king_square_attacked: 844164
add_to_move_generation_stack: 870357
play_move: 844182
is_white_king_square_attacked: 455308
is_black_king_square_attacked: 844182

Loesung beendet.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/annan.ref
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ solution finished.
AnnanChess

1.Ka8-b7 2.Kb7-d5 3.Bb8-e5 4.Be5-d4 5.Bd4-e4 6.Kd5-e5 7.Ke5-f4 8.Be4*f3 9.Bf3-g3 10.Kf4-e4 11.Bg3-e5 12.Ke4-a8 13.Be5-b8 Bg4-f3 #
add_to_move_generation_stack: 870337
play_move: 844164
is_white_king_square_attacked: 455306
is_black_king_square_attacked: 844164
add_to_move_generation_stack: 870357
play_move: 844182
is_white_king_square_attacked: 455308
is_black_king_square_attacked: 844182

solution finished.

Expand Down
6 changes: 3 additions & 3 deletions REGRESSIONTESTS/bgl.out
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ Loesung beendet.
BGL -/29

1.nBb2-b1=nT (-/28) 2.nTb1-h1 (-/22) 3.nTh1-a1 (-/15) 4.nTa1-a8 (-/8) 5.nTa8-h8 (-/1) nTh8*h6 #
add_to_move_generation_stack: 1275665
play_move: 1161090
add_to_move_generation_stack: 1275863
play_move: 1161288
is_white_king_square_attacked: 94088
is_black_king_square_attacked: 1161090
is_black_king_square_attacked: 1161288

Loesung beendet.

Expand Down
6 changes: 3 additions & 3 deletions REGRESSIONTESTS/bgl.ref
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ solution finished.
BGL -/29

1.nPb2-b1=nR (-/28) 2.nRb1-h1 (-/22) 3.nRh1-a1 (-/15) 4.nRa1-a8 (-/8) 5.nRa8-h8 (-/1) nRh8*h6 #
add_to_move_generation_stack: 1275665
play_move: 1161090
add_to_move_generation_stack: 1275863
play_move: 1161288
is_white_king_square_attacked: 94088
is_black_king_square_attacked: 1161090
is_black_king_square_attacked: 1161288

solution finished.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/brunner.out
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ Loesung beendet.
BrunnerSchach

1.Kd1-e2 2.Ke2-f3 3.Kf3-g4 4.Kg4-h5 5.Kh5-h6 6.Kh6-h7 7.Kh7-g8 8.Kg8-f8 Kf6-f7 #
add_to_move_generation_stack: 1954
play_move: 2114
is_white_king_square_attacked: 1275
is_black_king_square_attacked: 1973
add_to_move_generation_stack: 1967
play_move: 2130
is_white_king_square_attacked: 1279
is_black_king_square_attacked: 1985

Loesung beendet.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/castling.out
Original file line number Diff line number Diff line change
Expand Up @@ -3671,10 +3671,10 @@ RochadenGegenseitigAusschliessend h1h8

1.e7-e5 0-0 2.Ke8-e7 Tf1-d1 3.Ke7-d6 Ld2-b4 #
1.0-0 Th1-f1 2.Kg8-h7 Tf1-f4 3.Kh7-h6 Tf4*h4 #
add_to_move_generation_stack: 16069071
play_move: 16063007
is_white_king_square_attacked: 1227530
is_black_king_square_attacked: 1414094
add_to_move_generation_stack: 16064305
play_move: 16058241
is_white_king_square_attacked: 1227250
is_black_king_square_attacked: 1413770

Loesung beendet.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/circe.out
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,10 @@ letzte 6 Halbz\"uge - Test f\"urs Hashing
34 (Kh4-h3 )
35 (Kh4-g4 )
36 (Kh4-h5 + )
add_to_move_generation_stack: 44735971
play_move: 23799106
is_white_king_square_attacked: 9855693
is_black_king_square_attacked: 20042797
add_to_move_generation_stack: 44736206
play_move: 23799218
is_white_king_square_attacked: 9855727
is_black_king_square_attacked: 20042899

Loesung beendet.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/cirpiece.out
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ Loesung beendet.
1.f2-f1=T 2.Tf1*c1[+wTa1] 3.Tc1-c6 4.Tc6-h6 Sg1-f3 #
1.f2-f1=T 2.Tf1*c1[+wTa1] 3.Tc1-c5 4.Tc5-h5 Sg1-f3 #
1.f2-f1=T 2.Tf1*c1[+wTa1] 3.Tc1-c4 4.Tc4-h4 Sg1-f3 #
add_to_move_generation_stack: 20164
play_move: 14181
is_white_king_square_attacked: 3145
is_black_king_square_attacked: 14181
add_to_move_generation_stack: 20554
play_move: 14376
is_white_king_square_attacked: 3190
is_black_king_square_attacked: 14376

Loesung beendet.

Expand Down
8 changes: 4 additions & 4 deletions REGRESSIONTESTS/cirsquar.out
Original file line number Diff line number Diff line change
Expand Up @@ -1140,10 +1140,10 @@ erste 5 Züge einer Beweispartie in 7

13 (e2-e4 )
1.e2-e4 d7-d5 2.e4*d5 c7-c5 3.d5*c6 ep.[+sBd5] d5-d4 4.c2-c4 d4*c3 ep.[+sBc5] 5.c6*b7[+wBc4] Sb8-c6 dia
add_to_move_generation_stack: 79112992
play_move: 79115062
is_white_king_square_attacked: 3402503
is_black_king_square_attacked: 2911445
add_to_move_generation_stack: 78724570
play_move: 78726640
is_white_king_square_attacked: 3389500
is_black_king_square_attacked: 2904749

Loesung beendet.

Expand Down
16 changes: 8 additions & 8 deletions REGRESSIONTESTS/degrad.out
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ Loesung beendet.
Duplex

1.a2*b1=L 2.Lb1-e4 3.Le4-b7=B c7-c8=S #
add_to_move_generation_stack: 29211
play_move: 30851
is_white_king_square_attacked: 3686
is_black_king_square_attacked: 30851
add_to_move_generation_stack: 29226
play_move: 30869
is_white_king_square_attacked: 3689
is_black_king_square_attacked: 30869

1.c7*b8=T 2.Tb8*b4 3.Tb4-b2=B a2*b1=D #
add_to_move_generation_stack: 23348
play_move: 20891
is_white_king_square_attacked: 20891
is_black_king_square_attacked: 2393
add_to_move_generation_stack: 23406
play_move: 20953
is_white_king_square_attacked: 20953
is_black_king_square_attacked: 2397

Loesung beendet.

Expand Down
16 changes: 8 additions & 8 deletions REGRESSIONTESTS/duplex.out
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ Loesung beendet.
Duplex

1.nDb1-h1 2.nBg2*h1=nD[+nDd8] 3.nDh1-h5 nBe7-e8=nS #
add_to_move_generation_stack: 240695
play_move: 155165
is_white_king_square_attacked: 23901
is_black_king_square_attacked: 155078
add_to_move_generation_stack: 241127
play_move: 155372
is_white_king_square_attacked: 23952
is_black_king_square_attacked: 155285

1.nBe7-e8=nT 2.nTe8-e1 3.nTe1-f1 + nBg2*f1=nL[+nTa8] #
add_to_move_generation_stack: 155694
play_move: 124610
is_white_king_square_attacked: 124135
is_black_king_square_attacked: 16456
add_to_move_generation_stack: 155999
play_move: 124860
is_white_king_square_attacked: 124385
is_black_king_square_attacked: 16491

Loesung beendet.

Expand Down
Loading

0 comments on commit 5ffb472

Please sign in to comment.