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

Better reuse of the transposition table? #114

Open
mortensp opened this issue Feb 14, 2021 · 0 comments · May be fixed by #115
Open

Better reuse of the transposition table? #114

mortensp opened this issue Feb 14, 2021 · 0 comments · May be fixed by #115

Comments

@mortensp
Copy link

mortensp commented Feb 14, 2021

A normal usecase for the DDS SolveBoard() method is to:

  1. Call SolveBoard() for the opening lead and play the suggested card for say West.
  2. Have the user (North) play a card.
  3. Call SolveBoard() again
    etc.

As I see it, it must be possible to reuse the transposition table and the rel/aggr structures in all calls after 1).
To make this possible, the test for NewDeal should only validate that all cards in the current deal was in the same hand as when the transposition table was initiated.

I've actually got it working with very minimal changes to the code. That is when the new deal is a subset of the old one. But is now working on a superset version also. By this I mean situations where all cards in the deal stored in the transpositiontable are placed in the same hands in the new deal and none of the extra cards was present in the former deal. This can be handled by "filling in the blanks" in the rel and aggr structures.

There is also a number of small errors like indexing with an negative value when cards count is 4 and setting upperbound to 13 when there is fewer cards

@mortensp mortensp linked a pull request Feb 26, 2021 that will close this issue
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 a pull request may close this issue.

1 participant