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

Build transposition table #205

Merged
merged 51 commits into from
Sep 3, 2022
Merged

Conversation

ddugovic
Copy link
Collaborator

No description provided.

@@ -366,6 +391,7 @@ func (s *Solver) Solve(plies int) (float32, []*move.Move, error) {

tstart := time.Now()
s.mmCount = 0
s.zobrist.Initialize(s.game.Board().Dim(), alphabet.MaxAlphabetSize+1, alphabet.MaxAlphabetSize+1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for norwegian, the second argument to this function is smaller than the third argument. This is because Norwegian can make the blank a bunch of letters that are not actually in its tile distribution. I don't think I have this argument readily available but it should be kept in mind that we need to modify it for Norwegian.

zobrist/hash.go Outdated
z.posTable[i] = make([]int64, numtiles+numblankletters)
for j := 0; j < numtiles+numblankletters; j++ {
z.posTable[i][j] = int64(frand.Uint64n(bignum))
z.posTable[i] = make([]uint64, 256)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if you use numtiles+numblankletters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was observing index out of bounds accesses... spent the better part of an hour trying to make it work before trying 256 instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've committed this suggestion.

@domino14 domino14 merged commit 6031f63 into lower-mem-alphabeta Sep 3, 2022
@domino14 domino14 deleted the lower-mem-alphabeta-2 branch September 3, 2022 18:24
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