-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add TT implementation. #28
Conversation
I have to add TT to Search. However search currently is just a simple function, so I would need to add it as a parameter. Weird. I have to think if I should do it correctly now or temporarily do it like that. |
TT should be either a global variable or we can wrap search into some class and put TT as a field there. |
Yes, we should. There should be a class that implements Engine like MinMaxEngine or sth. |
Oh that's what the engine class is for. I can refactor code to fit this template then. |
I have just committed changes we were discussing to #25. Feel free to review them. |
Ok done. |
Implementation based on https://www.chessprogramming.org/Shared_Hash_Table\#Lockless. TTData stores score, move, depth, age and type.
std::vector requires elements to be copy-constructible, which std::atomic doesn't allow. I guess we won't be resizing the TT after the creation, so simple dynamic array should be enough for now.
lgtm, merging |
No description provided.