Skip to content

Commit

Permalink
fixed issue #256
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-maeder committed Apr 18, 2020
1 parent 7ab8cf8 commit 12e7c76
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 1 deletion.
8 changes: 8 additions & 0 deletions REGRESSIONS/4_83_to_4_85.inp
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,13 @@ stipulation h#2.5
pieces white kg1 qc1 black kh3 rg4 pf4 total 4
twin move h3 f3

next

author Francois Labelle
origin CPoisson-226
stip dia 3.5
forsyth rsbqkb1r/pppppppp/8/8/8/8/PPP1PPPP/RSBQKBSR
cond FaceToFace

end

35 changes: 35 additions & 0 deletions REGRESSIONTESTS/4_83_to_4_85.reg
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,38 @@ b) bKh3-->f3
solution finished.



Francois Labelle
CPoisson-226

+---a---b---c---d---e---f---g---h---+
| |
8 -R -S -B -Q -K -B . -R 8
| |
7 -P -P -P -P -P -P -P -P 7
| |
6 . . . . . . . . 6
| |
5 . . . . . . . . 5
| |
4 . . . . . . . . 4
| |
3 . . . . . . . . 3
| |
2 P P P . P P P P 2
| |
1 R S B Q K B S R 1
| |
+---a---b---c---d---e---f---g---h---+
dia3.5 15 + 15
FaceToFace

1.d2-d3 Sg8-h6 2.Bc1*h6 h7*d3 3.Bh6-d2 d3-h7 4.Bd2-c1 dia
add_to_move_generation_stack: 21592323
play_move: 21597213
is_white_king_square_attacked: 1507094
is_black_king_square_attacked: 186795

solution finished.


12 changes: 12 additions & 0 deletions REGRESSIONTESTS/4_83_to_4_85.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,17 @@
\Co+%
\end{diagram}%
\hfill%
\begin{diagram}%
\author{Labelle, Francois}%
\year{-226}%
\source{CPoisson}%
\pieces{wTa1, wSb1, wLc1, wDd1, wKe1, wLf1, wSg1, wTh1, wBa2, wBb2, wBc2, wBe2, wBf2, wBg2, wBh2, sBa7, sBb7, sBc7, sBd7, sBe7, sBf7, sBg7, sBh7, sTa8, sSb8, sLc8, sDd8, sKe8, sLf8, sTh8}%
\stipulation{dia3.5}%
\condition{FaceToFace}%
\solution{ 1.d2-d3 Sg8-h6 2.Bc1*h6 h7*d3 3.Bh6-d2 d3-h7 4.Bd2-c1 dia
}%
\Co+%
\end{diagram}%
\hfill%
\putsol%
\end{document}%
6 changes: 6 additions & 0 deletions input/plaintext/depend
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ input/plaintext/twin$(OBJ_SUFFIX): input/plaintext/twin.c input/plaintext/twin.h
options/maxsolutions/maxsolutions.h \
options/stoponshortsolutions/stoponshortsolutions.h \
pieces/attributes/neutral/neutral.h pieces/attributes/chameleon.h \
pieces/attributes/total_invisible.h \
pieces/attributes/total_invisible/goal_validation.h \
position/underworld.h position/effects/piece_creation.h \
position/effects/board_transformation.h position/effects/piece_removal.h \
position/effects/piece_movement.h position/effects/walk_change.h \
Expand Down Expand Up @@ -655,6 +657,10 @@ pieces/attributes/neutral/neutral.h:

pieces/attributes/chameleon.h:

pieces/attributes/total_invisible.h:

pieces/attributes/total_invisible/goal_validation.h:

position/underworld.h:

position/effects/piece_creation.h:
Expand Down
4 changes: 4 additions & 0 deletions input/plaintext/twin.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "options/stoponshortsolutions/stoponshortsolutions.h"
#include "pieces/attributes/neutral/neutral.h"
#include "pieces/attributes/chameleon.h"
#include "pieces/attributes/total_invisible.h"
#include "position/underworld.h"
#include "position/effects/piece_creation.h"
#include "position/effects/board_transformation.h"
Expand Down Expand Up @@ -917,6 +918,8 @@ static void ReadInitialTwin(slice_index start)
{
unsigned int ghost_idx = nr_ghosts;

total_invisible_number = 0;

tok = ReadNextTokStr();
tok = ParsePieces(tok);

Expand Down Expand Up @@ -976,6 +979,7 @@ static void ReadInitialTwin(slice_index start)
break;

case Forsyth:
total_invisible_number = 0;
ParseForsyth();
tok = ReadNextTokStr();
break;
Expand Down
3 changes: 2 additions & 1 deletion optimisations/intelligent/proof.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ slice_type proof_make_goal_reachable_type(void)
|| CondFlag[dynasty]
|| CondFlag[whsupertrans_king] || CondFlag[blsupertrans_king]
|| CondFlag[lostpieces]
|| CondFlag[facetoface] || CondFlag[backtoback] || CondFlag[cheektocheek]
|| CondFlag[breton]);

/* TODO these can't possibly be the only elements that doesn't
/* TODO these can't possibly be the only elements that don't
* allow any optimisation at all.
*/
if (piece_walk_may_exist_fairy
Expand Down

0 comments on commit 12e7c76

Please sign in to comment.