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 some bugs + some improvements #3

Merged
merged 6 commits into from
Mar 2, 2025
Merged

Conversation

hansbinderup
Copy link
Owner

I've been hunting a search bug for a few days now. I could not get my head around what was actually causing it.
I fixed the evaluator print debugging -> clear that an over/underflow could happen on deeper searches.
The move sorting felt a bit weird, so I added tests for most of my heuristics. In the end I found the little bugger.. it was a copy paste error in the PVTable meaning that we never followed the PV line. Now the search is waay faster.

Given the search depth I started notifying that the "good moves"
starting being extremely bad. This could ofc mean overflow which was in
fact the case.
I was a bit naive with my previous implementation. Instead increase the
scoring to use 32bit value to avoid over/underflows.
Also printing the score from the evaluator always returning 0. Also
fixed that bug.

Signed-off-by: Hans Binderup <[email protected]>
Static inline has been abused a bit. Remove some and add some where
needed.

Signed-off-by: Hans Binderup <[email protected]>
Previously we would clear all tables for a given position when going for
a new search. This is not necessary. We should only reset if position
has changed.

Signed-off-by: Hans Binderup <[email protected]>
This commit adds simple tests for killer moves.

Signed-off-by: Hans Binderup <[email protected]>
This commit adds simple tests for history moves

Signed-off-by: Hans Binderup <[email protected]>
This commit adds tests for PV table.
Also it helped me find the bug I was looking for. Now the search seems
good!

Also, the compile_commands.json file was only symlinked if the build
suceeded. Not very practical :)

Signed-off-by: Hans Binderup <[email protected]>
@hansbinderup hansbinderup merged commit 0dc1c74 into main Mar 2, 2025
3 checks passed
@hansbinderup hansbinderup deleted the hansbinderup/bug-fixes branch March 2, 2025 16:03
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.

1 participant