Skip to content

Commit c7f6ae4

Browse files
author
Thomas Maeder
committed
Merge branch 'release/4.97'
2 parents ec4399c + e628e24 commit c7f6ae4

File tree

11 files changed

+84
-2171
lines changed

11 files changed

+84
-2171
lines changed

REGRESSIONS/4_95_to_4_97.inp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BeginProblem
2+
3+
protocol 4_95_to_4_97.reg
4+
5+
title Popeye <=4.95 didn't find the solutions 1.Qa4-g4 and 1.Qa4-b4
6+
author Eric Huber
7+
Pieces White Se5 Ke1 Black Qa4
8+
TotalInvisible 2
9+
Stipulation h#2
10+
11+
EndProblem
12+

REGRESSIONTESTS/4_89_to_4_91.reg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ Popeye 4.89 found 1...Bc2-b1 2.Bc3-d4 TI~-~ 3.TI~*b1 [+wRh1]0-0[f2=wR][f1=wR
556556
play_move: 921472
557557
is_white_king_square_attacked: 60410
558558
is_black_king_square_attacked: 65819
559-
TI decisions: 9548924
559+
TI decisions: 10072882
560560

561561
solution finished.
562562

@@ -605,7 +605,7 @@ Popeye 4.89 didn't find this solution
605605
play_move: 517
606606
is_white_king_square_attacked: 30
607607
is_black_king_square_attacked: 170
608-
TI decisions: 15076
608+
TI decisions: 15436
609609

610610
solution finished.
611611

@@ -805,7 +805,7 @@ Popeye 4.89 considered this move sequence a solution
805805
play_move: 91
806806
is_white_king_square_attacked: 2
807807
is_black_king_square_attacked: 5
808-
TI decisions: 819
808+
TI decisions: 835
809809

810810
solution finished.
811811

@@ -918,7 +918,7 @@ so far, Popeye hasn't found this solution
918918
play_move: 25735
919919
is_white_king_square_attacked: 0
920920
is_black_king_square_attacked: 4663
921-
TI decisions: 93346
921+
TI decisions: 94729
922922

923923
solution finished.
924924

REGRESSIONTESTS/4_95_to_4_97.reg

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Eric Huber
3+
Popeye <=4.95 didn't find the solutions 1.Qa4-g4 and 1.Qa4-b4
4+
5+
+---a---b---c---d---e---f---g---h---+
6+
| |
7+
8 . . . . . . . . 8
8+
| |
9+
7 . . . . . . . . 7
10+
| |
11+
6 . . . . . . . . 6
12+
| |
13+
5 . . . . S . . . 5
14+
| |
15+
4 -Q . . . . . . . 4
16+
| |
17+
3 . . . . . . . . 3
18+
| |
19+
2 . . . . . . . . 2
20+
| |
21+
1 . . . . K . . . 1
22+
| |
23+
+---a---b---c---d---e---f---g---h---+
24+
h#2 2 + 1 + 2 TI
25+
26+
1.Qa4-a5 0-0-0 2.Qa5-b4[c3=bK] Rd1-d3 #
27+
1.Qa4-g4 0-0[g3=bK] 2.Qg4-h4 Rf1-f3 #
28+
1.Qa4-c4 0-0-0[c3=bK] 2.Qc4-b4 Rd1-d3 #
29+
add_to_move_generation_stack: 201707
30+
play_move: 200460
31+
is_white_king_square_attacked: 19420
32+
is_black_king_square_attacked: 18620
33+
TI decisions: 425964
34+
35+
solution finished.
36+
37+

REGRESSIONTESTS/all_in_chess.tst

Lines changed: 0 additions & 38 deletions
This file was deleted.

REGRESSIONTESTS/total_invisible.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ Sake tourney 2018, 3rd HM, cooked (and 1 author's solution doesn't deliver mate)
528528
play_move: 8000848
529529
is_white_king_square_attacked: 0
530530
is_black_king_square_attacked: 1738534
531-
TI decisions: 413079009
531+
TI decisions: 415195452
532532

533533
solution finished.
534534

@@ -564,7 +564,7 @@ Sake tourney 2018, 3rd HM, corrected
564564
play_move: 6210502
565565
is_white_king_square_attacked: 0
566566
is_black_king_square_attacked: 1073036
567-
TI decisions: 331782017
567+
TI decisions: 332297127
568568

569569
solution finished.
570570

TESTS/all_in_chess.inp

Lines changed: 0 additions & 13 deletions
This file was deleted.

conditions/all_in_chess.c

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "conditions/all_in_chess.h"
22
#include "position/position.h"
3-
#include "pieces/walks/pawns/en_passant.h"
43
#include "solving/has_solution_type.h"
54
#include "stipulation/stipulation.h"
65
#include "stipulation/pipe.h"
@@ -417,77 +416,6 @@ void all_in_chess_move_generator_solve(slice_index si)
417416
TraceFunctionResultEnd();
418417
}
419418

420-
static ply find_ply_with_potentially_repeated_position(void)
421-
{
422-
ply result;
423-
ply const parent = parent_ply[nbply];
424-
425-
TraceFunctionEntry(__func__);
426-
TraceFunctionParamListEnd();
427-
428-
if (parent==ply_retro_move || trait[parent]==trait[nbply])
429-
result = ply_nil;
430-
else
431-
result = parent_ply[parent];
432-
433-
TraceFunctionExit(__func__);
434-
TraceFunctionResult("%u",result);
435-
TraceFunctionResultEnd();
436-
return result;
437-
}
438-
439-
static boolean en_passant_modified_since_last_move_of_same_side(void)
440-
{
441-
boolean result = false;
442-
443-
TraceFunctionEntry(__func__);
444-
TraceFunctionParamListEnd();
445-
446-
{
447-
ply const ply_position_potentially_repeated = find_ply_with_potentially_repeated_position();
448-
449-
if (ply_position_potentially_repeated!=ply_nil)
450-
{
451-
assert(trait[nbply]==trait[ply_position_potentially_repeated]);
452-
453-
if (en_passant_was_multistep_played(ply_position_potentially_repeated))
454-
{
455-
TraceSquare(en_passant_multistep_over[en_passant_top[ply_position_potentially_repeated]]);TraceEOL();
456-
457-
if (en_passant_was_multistep_played(nbply))
458-
{
459-
/* en passant rights potentially modified */
460-
TraceSquare(en_passant_multistep_over[en_passant_top[nbply]]);TraceEOL();
461-
result = en_passant_multistep_over[en_passant_top[ply_position_potentially_repeated]]!=en_passant_multistep_over[en_passant_top[nbply]];
462-
}
463-
else
464-
{
465-
/* en passant rights lost */
466-
result = true;
467-
}
468-
}
469-
else
470-
{
471-
if (en_passant_was_multistep_played(nbply))
472-
{
473-
/* en passant rights added */
474-
TraceSquare(en_passant_multistep_over[en_passant_top[nbply]]);TraceEOL();
475-
result = true;
476-
}
477-
else
478-
{
479-
/* no en passant activity */
480-
}
481-
}
482-
}
483-
}
484-
485-
TraceFunctionExit(__func__);
486-
TraceFunctionResult("%u",result);
487-
TraceFunctionResultEnd();
488-
return result;
489-
}
490-
491419
/* Try to solve in solve_nr_remaining half-moves.
492420
* @param si slice index
493421
* @note assigns solve_result the length of solution found and written, i.e.:
@@ -527,13 +455,8 @@ void all_in_chess_undo_move_avoider_solve(slice_index si)
527455
if (move_effect_journal[parent_movement].u.piece_movement.from==move_effect_journal[movement].u.piece_movement.to
528456
&& move_effect_journal[parent_movement].u.piece_movement.to==move_effect_journal[movement].u.piece_movement.from
529457
&& move_effect_journal[parent_movement].u.piece_movement.moving==move_effect_journal[movement].u.piece_movement.moving
530-
&& move_effect_journal[parent_movement].u.piece_movement.movingspec==move_effect_journal[movement].u.piece_movement.movingspec
531-
&& !en_passant_modified_since_last_move_of_same_side())
532-
{
533-
TraceValue("%u",nbply);
534-
TraceText("AllInChess deems this move illegal because it undoes the preceding move\n");
458+
&& move_effect_journal[parent_movement].u.piece_movement.movingspec==move_effect_journal[movement].u.piece_movement.movingspec)
535459
solve_result = this_move_is_illegal;
536-
}
537460
else
538461
pipe_solve_delegate(si);
539462
}

conditions/depend

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6899,9 +6899,7 @@ conditions/all_in_chess$(OBJ_SUFFIX): conditions/all_in_chess.c \
68996899
solving/machinery/dispatch.h debugging/trace.h position/position.h \
69006900
position/color.h position/color.enum.h position/color.enum \
69016901
position/pieceid.h debugging/assert.h pieces/walks/vectors.h \
6902-
position/castling_rights.h pieces/walks/pawns/en_passant.h \
6903-
solving/move_effect_journal.h solving/ply.h solving/observation.h \
6904-
solving/temporary_hacks.h solving/fork.h solving/has_solution_type.h \
6902+
position/castling_rights.h solving/has_solution_type.h \
69056903
solving/has_solution_type.enum.h solving/has_solution_type.enum \
69066904
stipulation/pipe.h stipulation/structure_traversal.h stipulation/slice.h \
69076905
stipulation/slice_structural_type.h \
@@ -6914,10 +6912,11 @@ conditions/all_in_chess$(OBJ_SUFFIX): conditions/all_in_chess.c \
69146912
stipulation/slice_contextual_type.enum.h \
69156913
stipulation/slice_contextual_type.enum stipulation/traversal.h \
69166914
stipulation/branch.h stipulation/move.h stipulation/fork.h \
6917-
solving/check.h debugging/measure.h output/plaintext/protocol.h \
6918-
solving/post_move_iteration.h solving/move_generator.h \
6919-
solving/conditional_pipe.h solving/pipe.h \
6920-
solving/machinery/slack_length.h
6915+
solving/temporary_hacks.h solving/check.h debugging/measure.h \
6916+
output/plaintext/protocol.h solving/post_move_iteration.h \
6917+
solving/observation.h solving/ply.h solving/fork.h \
6918+
solving/move_generator.h solving/conditional_pipe.h solving/pipe.h \
6919+
solving/machinery/slack_length.h solving/move_effect_journal.h
69216920
conditions/all_in_chess.h:
69226921
solving/machinery/solve.h:
69236922
stipulation/stipulation.h:
@@ -6945,12 +6944,6 @@ position/pieceid.h:
69456944
debugging/assert.h:
69466945
pieces/walks/vectors.h:
69476946
position/castling_rights.h:
6948-
pieces/walks/pawns/en_passant.h:
6949-
solving/move_effect_journal.h:
6950-
solving/ply.h:
6951-
solving/observation.h:
6952-
solving/temporary_hacks.h:
6953-
solving/fork.h:
69546947
solving/has_solution_type.h:
69556948
solving/has_solution_type.enum.h:
69566949
solving/has_solution_type.enum:
@@ -6970,14 +6963,19 @@ stipulation/traversal.h:
69706963
stipulation/branch.h:
69716964
stipulation/move.h:
69726965
stipulation/fork.h:
6966+
solving/temporary_hacks.h:
69736967
solving/check.h:
69746968
debugging/measure.h:
69756969
output/plaintext/protocol.h:
69766970
solving/post_move_iteration.h:
6971+
solving/observation.h:
6972+
solving/ply.h:
6973+
solving/fork.h:
69776974
solving/move_generator.h:
69786975
solving/conditional_pipe.h:
69796976
solving/pipe.h:
69806977
solving/machinery/slack_length.h:
6978+
solving/move_effect_journal.h:
69816979
conditions/alice$(OBJ_SUFFIX): conditions/alice.c conditions/alice.h \
69826980
solving/machinery/solve.h stipulation/stipulation.h \
69836981
stipulation/goals/goals.h position/board.h utilities/bitmask.h \

makefile.defaults

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Version number; . separates major and minor version part
88
# developer versions have minor version numbers divisible by 2
9-
VERSION=4.95
9+
VERSION=4.97
1010

1111

1212
# NOTES ON CONDITIONAL COMPILATION
@@ -102,7 +102,7 @@ VERSION=4.95
102102
# Other
103103
# -----
104104

105-
DEFS=$(DEFINEMACRO)SIGNALS $(DEFINEMACRO)MSG_IN_MEM $(DEFINEMACRO)FXF $(DEFINEMACRO)NDEBUG $(DEFINEMACRO)FXF_MAX_ALIGNMENT_TYPE=void* $(DEFINEMACRO)FXF_NOT_MULTIPLE_ALIGNMENT_TYPE=short
105+
DEFS=$(DEFINEMACRO)SIGNALS $(DEFINEMACRO)MSG_IN_MEM $(DEFINEMACRO)FXF $(DEFINEMACRO)DOMEASURE $(DEFINEMACRO)FXF_MAX_ALIGNMENT_TYPE=void* $(DEFINEMACRO)FXF_NOT_MULTIPLE_ALIGNMENT_TYPE=short
106106
# $(DEFINEMACRO)DOMEASURE
107107
# $(DEFINEMACRO)TESTHASH
108108
# $(DEFINEMACRO)NDEBUG

pieces/attributes/total_invisible/uninterceptable_check.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,21 @@ vec_index_type is_rider_check_uninterceptable(Side side_checking, square king_po
8585
static boolean can_interceptor_be_allocated(void)
8686
{
8787
dynamic_consumption_type const save_consumption = current_consumption;
88-
boolean result = allocate_flesh_out_unplaced(White);
89-
current_consumption = save_consumption;
90-
result = result || allocate_flesh_out_unplaced(Black);
91-
current_consumption = save_consumption;
88+
boolean result;
89+
90+
TraceFunctionEntry(__func__);
91+
TraceFunctionParamListEnd();
92+
93+
{
94+
result = being_solved.king_square[White]==initsquare || allocate_flesh_out_unplaced(White);
95+
current_consumption = save_consumption;
96+
result = result || being_solved.king_square[Black]==initsquare || allocate_flesh_out_unplaced(Black);
97+
current_consumption = save_consumption;
98+
}
99+
100+
TraceFunctionExit(__func__);
101+
TraceFunctionResult("%u",result);
102+
TraceFunctionResultEnd();
92103
return result;
93104
}
94105

0 commit comments

Comments
 (0)