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

compress table file #94

Merged
merged 1 commit into from
Apr 14, 2022
Merged

compress table file #94

merged 1 commit into from
Apr 14, 2022

Conversation

yffbit
Copy link
Contributor

@yffbit yffbit commented Apr 7, 2022

The strength of 5 cards is determined by suit distribution and rank distribution. For the offsuit combination, we only need rank distribution. So we need two hash tables. One for suited combination, use cards mask as key. One for offsuit combination, use rank distribution mask as key. In this way, number of records reduced from 2598960 to 5148+6175=11323, from 376992 to 504+1278=1782, respectively.

@bupticybee
Copy link
Owner

This is very interesting, I will spend some time veryfying it and do some tests.
Did you do some benchmarking? How does this change affect the speed of the solver and accuracy?

@bupticybee
Copy link
Owner

If I underestand this correctly, this change mainly affects the loading speed,right? So it does not change the solving speed and accuracy?

@yffbit
Copy link
Contributor Author

yffbit commented Apr 8, 2022

Yes. It speeds up the loading process and saves some memory. It doesn't change the cfr process.

@bupticybee
Copy link
Owner

Yes. It speeds up the loading process and saves some memory. It doesn't change the cfr process.

Okay I see. I will do some test first. Thanks very much for your effort.

@bupticybee
Copy link
Owner

Hi, I read the code, is it possible to make the new bin file normal txt file? I think it would not hurt the performance much, and would be much easier for any other developer to reuse in other languages.

@yffbit
Copy link
Contributor Author

yffbit commented Apr 14, 2022

Hi, I read the code, is it possible to make the new bin file normal txt file? I think it would not hurt the performance much, and would be much easier for any other developer to reuse in other languages.

To generate normal text file, just change the implementation of save() and load() function as you want.

@bupticybee
Copy link
Owner

Hi, I read the code, is it possible to make the new bin file normal txt file? I think it would not hurt the performance much, and would be much easier for any other developer to reuse in other languages.

To generate normal text file, just change the implementation of save() and load() function as you want.

Aha, I see that.

@bupticybee bupticybee changed the base branch from master to gui April 14, 2022 10:17
@bupticybee bupticybee merged commit 5040d7a into bupticybee:gui Apr 14, 2022
@bupticybee
Copy link
Owner

Merged to gui brach, after tests are complete will merge this to master.

@bupticybee
Copy link
Owner

bupticybee commented May 1, 2022

UPDATE: I have done some slight modification to the code and now it works prefectly on mac.
It did speed up the loading process a lot and seem didn't change the speed or accuracy. Great work.
Will transfer the code to linux branch after some futher checks. Thanks for the effort!

This pull request was closed.
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.

2 participants