-
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
Implement Transposition Table #17
Comments
Should be done after this: #10 |
I will start working on this today. |
One more thing: Operations on TT (write, read entry) should be safe to use with multiple threads. We'll rely on it later. One can do it with atomics or lockless tricks (like here https://www.chessprogramming.org/Shared_Hash_Table#Lockless) or whatever you consider good enough |
Ohhhh, that changes things a bit. Sure I will change it. |
Thx and sorry for the confusion |
I should come up with some solution by the EOW. |
@mateusz2173 Should TT also include age? |
If it doesnt require a lot of effort, let's include it. |
Read https://www.chessprogramming.org/Transposition_Table
Transposition Table is a cache table for search.
Implement transposition table which can store 3 types of scores:
that is when
alpha < score < beta
alpha < beta <= score
score <= alpha
)Along with scores we should also store:
If entry already exists for the position, replace it only if
current_depth > old_entry_depth
Add reading transposition table to the beginning of the search (before we jump into searching moves):
In case we've found cache entry for the position and
depth_entry >= current_depth
then we can return cached score.Let's make cache size = 16MB for now
Index the table using zobryist hashes (they are implemented in our base -
chess.hpp
)entry = table[position.hash % table_size]
The text was updated successfully, but these errors were encountered: