Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with IntelligentMode, Dummies and condition promonly #299

Closed
thomas-maeder opened this issue Oct 30, 2020 · 11 comments
Closed

Issues with IntelligentMode, Dummies and condition promonly #299

thomas-maeder opened this issue Oct 30, 2020 · 11 comments
Assignees
Labels

Comments

@thomas-maeder
Copy link
Owner

Reported by Andrew Buchanan over in dturevski/olive-gui#29

(1) First: h#6 intelligent problems P1359493 and P1375440 run fine, with promonly Q R S B DU in the second case. Only odd thing is that the solution in the second case begins 1.c2-c1=TI. Don't know what a "TI" is - not in the list of fairy pieces.

(2) Now I try to run 5P2/6B1/8/8/3p4/8/2p2P2/k5K1 with promonly Q R S B P. It basically never comes back.

(3) If instead I try to replace wPf8 with wDU, it finds the solution (beginning 1.c2-c1) and does nothing for a while. When I select the window, an error pop-ups where you can't copy the text comes up, saying olive-1.3 Failed to run popeye executable (pywin64.exe). I am running 64 bit laptop. Hope this is enough for you to diagnose.

@JoshuaGreen
Copy link
Collaborator

@thomas-maeder, I don't see the input(s) leading to these issues on either ticket. Could you please attach them?

@dturevski
Copy link
Contributor

@JoshuaGreen
This is the one with "TI":

BeginProblem
Stipulation h#6
Option Variation NoBoard Intelligent
Condition PromOnly Q R S B DU
Pieces
  white  Bf6 duf2 Kg1
  black  Pe7c2d4 Ka1
EndProblem
Popeye Windows-64Bit v4.85 (4000 MB)

  1.c2-c1=TI Bf6*e7   2.d4-d3 Kg1-f1   3.d3-d2 Kf1-e2   4.d2-d1=B + Ke2-d2   5.Bd1-b3 Kd2*c1   6.Bb3-a2 Be7-f6 #

solution finished. Time = 4.677 s

@dturevski
Copy link
Contributor

I would suspect that it has something to do with parsing "Condition PromOnly Q R S B DU"
Allowing reductions in a format that is expected to be extensible...

@JoshuaGreen
Copy link
Collaborator

JoshuaGreen commented Oct 30, 2020

@dturevski, thanks for that example. I'm starting with the "mostly orthodox" one

BeginProblem
    forsyth 5P2/6B1/8/8/3p4/8/2p2P2/k5K1
    condition promonly Q R S B P
    stipulation h#6
    option intelligent
EndProblem

which also triggers bad behavior (e.g., an assertion violation in debug mode).

@JoshuaGreen
Copy link
Collaborator

JoshuaGreen commented Oct 31, 2020

@dturevski (and @thomas-maeder), it seems that much of the intelligent infrastructure assumes that we only have pawns, Knights, Bishops, Rooks, Queens, and Kings, and that promotion to pawn is illegal; I'm getting lots of assertion violations for each of these examples. We have to decide how many of these assumptions we're willing to give up.

@dturevski
Copy link
Contributor

@JoshuaGreen
It would seem that "TI" issue is not really related to the intelligent mode and can be triggered simply by "PromOnly DU", as if there's some problem with printing moves that include "DU":

BeginProblem
Stipulation ~1
Condition PromOnly DU
Pieces
  black  Kh6
  white  Kh8 Pf7
EndProblem
1.f7-f8=TI ! (expecting DU)
1.Kh8-g8 !

@JoshuaGreen
Copy link
Collaborator

@dturevski, I'll try to pin that one down as it may very well be a separate issue. Thanks for distilling it.

@JoshuaGreen
Copy link
Collaborator

JoshuaGreen commented Nov 2, 2020

@dturevski, the printing of Dummy pieces as "TI" seems to have been an intentional choice that was made at some point during Popeye's development. I don't know enough about these pieces or concepts to know if this decision was reasonable. Nonetheless, I offer feature/outputDummyAsDU as a change to that behavior, and I invite @thomas-maeder to merge it in if he agrees that it's preferable.

@thomas-maeder
Copy link
Owner Author

the printing of Dummy pieces as "TI" seems to have been an intentional choice that was made at some point during Popeye's development.

Not quite.

It is an artifact of the fact that when a problem with Total Invisible pieces is solved, dummies are used as placeholders if the position of a Total Invisible piece is known or assumed.

@JoshuaGreen
Copy link
Collaborator

Thanks for that input; it was possibilities like that that prevented me from merging my "fix" directly into the codebase. I guess the right fix for this -- if it's really a problem -- might require some deeper analysis to determine the precise nature of the relevant piece.

@thomas-maeder
Copy link
Owner Author

Fixed for 4.87. Popeye will:

  • display Dummies as DU in the solution (it hadn't occurred to me that Dummies might be printed in the solution)
  • reject promotion to Pawn in Intelligent Mode
  • accept Dummies (including promotion into Dummy) in Intelligent Mode
  • not crash in Intelligent Mode when there are Dummies (not at this one spot anyway :-) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants