diff --git a/analysis.go b/analysis.go index fec9812..dde487f 100644 --- a/analysis.go +++ b/analysis.go @@ -9,9 +9,9 @@ import ( var QueueBufferSize = 4096000 var ( - WeightBlot = 1.05 + WeightBlot = 1.025 WeightHit = -1.0 - WeightOppScore = -1.5 + WeightOppScore = -3.0 ) // rollProbabilities is a table of the probability of each roll combination. diff --git a/board_test.go b/board_test.go index 0b40bb9..d75b73d 100644 --- a/board_test.go +++ b/board_test.go @@ -102,15 +102,17 @@ func TestHitScore(t *testing.T) { analysis := make([]*Analysis, 0, AnalysisBufferSize) b.Analyze(available, &analysis) - expectedHits := []int{296, 341, 0, 296, 0, 296} - if len(analysis) != len(expectedHits) { - t.Errorf("unexpected analysis length: expected %d, got %d", len(expectedHits), len(analysis)) - } - for i, a := range analysis { - if a.hitScore != expectedHits[i] { - t.Errorf("unexpected hit score for analysis %d: expected %d, got %d", i, expectedHits[i], a.hitScore) + var reached bool + minHitScore := 200 + for _, a := range analysis { + if a.hitScore >= minHitScore { + reached = true + break } } + if !reached { + t.Errorf("unexpected hit score for analysis: expected hit score of at least %d", minHitScore) + } } func TestAnalyze(t *testing.T) {