diff --git a/config/config.go b/config/config.go index caa4aae5..7d7c030c 100644 --- a/config/config.go +++ b/config/config.go @@ -66,7 +66,7 @@ func DefaultConfig() *Config { c.SetDefault(ConfigDefaultLexicon, "NWL23") c.SetDefault(ConfigDefaultLetterDistribution, "English") - c.SetDefault(ConfigTtableMemFraction, 0.25) + c.SetDefault(ConfigTtableMemFraction, 0.20) c.SetDefault(ConfigDefaultBoardLayout, "CrosswordGame") c.SetDefault(ConfigTritonUseTriton, false) c.SetDefault(ConfigTritonURL, "localhost:8001") @@ -155,7 +155,7 @@ func (c *Config) Load(args []string) error { c.SetDefault(ConfigDataPath, "./data") // will be fixed by toAbsPath below if unspecified. c.SetDefault(ConfigDefaultLexicon, "NWL23") c.SetDefault(ConfigDefaultLetterDistribution, "English") - c.SetDefault(ConfigTtableMemFraction, 0.25) + c.SetDefault(ConfigTtableMemFraction, 0.20) c.SetDefault(ConfigDefaultBoardLayout, "CrosswordGame") c.SetDefault(ConfigTritonURL, "localhost:8001") c.SetDefault(ConfigTritonModelName, "macondo-nn") diff --git a/endgame/negamax/transposition_table.go b/endgame/negamax/transposition_table.go index 63928215..af274336 100644 --- a/endgame/negamax/transposition_table.go +++ b/endgame/negamax/transposition_table.go @@ -235,10 +235,10 @@ func (t *TranspositionTable) Reset(fractionOfMemory float64, boardDim int) { p := message.NewPrinter(language.English) log.Info(). - Str("num-elems", p.Sprintf("%d", numElems)). - Str("desired-num-elems", p.Sprintf("%.0f", desiredNElems)). - Str("estimated-total-memory-bytes", p.Sprintf("%d", numElems*entrySize)). - Str("mem-limit", p.Sprintf("%d", totalMem)). + Str("allocated-elems", p.Sprintf("%d", numElems)). + Str("desired-elems", p.Sprintf("%.0f", desiredNElems)). + Str("allocated-bytes", p.Sprintf("%d", numElems*entrySize)). + Str("memory-budget", p.Sprintf("%d", totalMem)). Bool("reset", reset). Msg("transposition-table-size") diff --git a/gcgio/gcg.go b/gcgio/gcg.go index 33de83b6..656eb6c8 100644 --- a/gcgio/gcg.go +++ b/gcgio/gcg.go @@ -615,7 +615,7 @@ func ParseGCGFromReader(cfg *config.Config, reader io.Reader) (*pb.GameHistory, parser.history.OriginalGcg = strings.TrimSpace(originalGCG) // Determine if the game ended. - if parser.game.Playing() == pb.PlayState_GAME_OVER { + if parser.game != nil && parser.game.Playing() == pb.PlayState_GAME_OVER { parser.history.PlayState = pb.PlayState_GAME_OVER parser.game.AddFinalScoresToHistory() }