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

Fix resolving --strict value #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karol-brejna-i
Copy link
Collaborator

Fixes #21

Please, note the following lines:
https://github.com/vitogit/pgn-tactics-generator/compare/master...karol-brejna-i:fix-strict?expand=1#diff-e31f1011e582ea3d502823f13a4a64fdef87e41ed47178a0a6e497df1402a27cR139-R140

There were cases where the number of analyzed legals was 2. In that case

self.analysed_legals[move_number].evaluation.cp

failed with IndexError

I proposed an addition condition (as above), but don't really know the intent of that piece of code.

@vitogit
Copy link
Owner

vitogit commented Jun 10, 2021

@karol-brejna-i I introduced that argument in this commit 0279b9d but to be honest I don't remember why.
I will vote to remove the Strict argument not sure if is that useful

@GoldenChrysus
Copy link

The change in position_list.py causes an out of range exception as len(self.analysed_legals) >= move_number does not mean that self.analysed_legals contains move_number. (e.g. if self.analysed_legals has a length of 1 and move_number is 1, that does not mean self.analysed_legals contains index 1; it only contains 0).

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

Successfully merging this pull request may close these issues.

strict argument doesn't seem to work as expected
3 participants