Skip to content

Commit

Permalink
fix: update moveplot even if sf depth = 18
Browse files Browse the repository at this point in the history
thanks @jamma from discord!
  • Loading branch information
kevinjosethomas committed Nov 24, 2024
1 parent d7ca815 commit 84b4586
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/pages/analysis/[...id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,24 +288,24 @@ const Analysis: React.FC<Props> = ({
}
}

const evals = game.maiaEvaluations[model]
if (evals) {
const newAnalyzedGame = { ...analyzedGame }
newAnalyzedGame.maiaEvaluations[model] = evals

for (let i = 0; i < analyzedGame.moves.length; i++) {
const maiaValues = newAnalyzedGame.moves[i].maia_values
if (maiaValues) {
const newMaiaValues = game.moves[i].maia_values as {
[key: string]: number
}
maiaValues[model] = newMaiaValues[model]
const newAnalyzedGame = { ...analyzedGame }
newAnalyzedGame.maiaEvaluations = {
...newAnalyzedGame.maiaEvaluations,
...game.maiaEvaluations,
}

for (let i = 0; i < analyzedGame.moves.length; i++) {
const maiaValues = newAnalyzedGame.moves[i].maia_values
if (maiaValues) {
const newMaiaValues = game.moves[i].maia_values as {
[key: string]: number
}
maiaValues[model] = newMaiaValues[model]
}

setAnalyzedGame(newAnalyzedGame)
setCurrentMaiaModel(model)
}

setAnalyzedGame(newAnalyzedGame)
setCurrentMaiaModel(model)
}
}

Expand Down

0 comments on commit 84b4586

Please sign in to comment.