Skip to content

Shouldnt this return beta instead? #18

@BinaryInitials

Description

@BinaryInitials

Hey, I know you probably haven't maintained this project in a while, I found your youtube channel recently when I was in desperate need to improve my own chess engine... Your code helped me with the quiescence portion I was struggling with so I am already grateful!

I was going through your code and I noticed that in the transposition table you have some logic that mimics the alpha beta pruning logic in negamax (which is clever since it shaves off a bit more time). But I noticed that the beta portion of your logic i.e. the portion for when node type is set to lower bound i.e. beta pruning, you are returning the true score instead of the beta score. But shouldn't it be capped at the beta level? In other words, the maximum score the opponent would allow to be scored?
This is the line I am referring to
https://github.com/SebLague/Chess-AI/blob/d0832f8f1d32ddfb95525d1f1e5b772a367f272e/Assets/Scripts/Core/TranspositionTable.cs#L70

It's a bit curious because you do it correctly in the actual alpha-beta pruning evaluation of your code, i.e.

https://github.com/SebLague/Chess-AI/blob/main/Assets/Scripts/Core/AI/Search.cs#L183

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions