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

Aspiration window with "wrong" depth ? #5

Open
mkd opened this issue Feb 18, 2022 · 0 comments
Open

Aspiration window with "wrong" depth ? #5

mkd opened this issue Feb 18, 2022 · 0 comments

Comments

@mkd
Copy link

mkd commented Feb 18, 2022

Hi Maksim,

First of all, a HUGE THANKS for your code and video tutorials on YouTube. You inspired me to retake my old chess engine Chess0 and include the NNUE evaluation. It has been a success thanks to you and Daniel Shawul.

I'm now trying to optimize the search code, and I'm learning from your code a lot! However, there's one thing I still don't get:

In your search_position, you set a kind of aspiration window (alpha = alpha - 50; beta = beta + 50). If you fall outside and try to do a full search, you tell in your comment that it should be a full-width window at the same depth. However, after doing "continue" in the code below, current_depth gets incremented when starting the loop over (current_depth++).

See code below:

    // we fell outside the window, so try again with a full-width window (and the same depth)
    if ((score <= alpha) || (score >= beta)) {
        alpha = -infinity;    
        beta = infinity;      
        // current_depth--    should you add this to search at the same depth??
        continue;
    }

Thanks again for the excellent video tutorials and taking all the time. I'm sure it has inspire many more people!

Cheers,
--Claudio

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

No branches or pull requests

1 participant