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

Move Loop Consistency in Probcut #5463

Closed

Conversation

yl25946
Copy link
Contributor

@yl25946 yl25946 commented Jul 9, 2024

In probcut move loop, everything is enclosed within a large if statement. I've changed it to guard clauses to stay consistent with other move loops.

@yl25946 yl25946 closed this Jul 9, 2024
@yl25946 yl25946 reopened this Jul 9, 2024
{
assert(move.is_ok());

if (move == excludedMove)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

join those two if statements, no need for comment

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    if (move == excludedMove || !pos.legal(move))
      continue;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in the other move loop, these two if statements are separated, and all the other legality checks have a comment on them, so I feel that this way is more consistent?

@vondele vondele added simplification A simplification patch to be merged Will be merged shortly labels Jul 9, 2024
@vondele vondele closed this in 362a77a Jul 9, 2024
yl25946 added a commit to yl25946/Stockfish that referenced this pull request Jul 9, 2024
In probcut move loop, everything is enclosed within a large if statement. I've
changed it to guard clauses to stay consistent with other move loops.

closes official-stockfish#5463

No functional change
linrock pushed a commit to linrock/Stockfish that referenced this pull request Jul 9, 2024
In probcut move loop, everything is enclosed within a large if statement. I've
changed it to guard clauses to stay consistent with other move loops.

closes official-stockfish#5463

No functional change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simplification A simplification patch to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants