From 804248ce51010dedf7e0741c3799b8bc8b4c944d Mon Sep 17 00:00:00 2001 From: rooklift <16438795+rooklift@users.noreply.github.com> Date: Sun, 7 May 2023 21:39:40 +0100 Subject: [PATCH] Update performance.js --- src/modules/performance.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/performance.js b/src/modules/performance.js index c55e4b4f..b4545df5 100644 --- a/src/modules/performance.js +++ b/src/modules/performance.js @@ -64,9 +64,6 @@ module.exports = function(any_node) { if (points_lost < 0) points_lost = 0; stats[key].points_lost += points_lost; - // KaTrain calculates some sort of difficulty statistic for the parent position (from which our move was played) by - // looking at its known moveInfos, and multiplying the points loss of each move by the prior. These are then summed... - let parent_difficulty_stat = node_difficulty_stat(node.parent); let parent_moveinfo_prior_sum = sum(node.parent.analysis.moveInfos.map(info => info.prior)); @@ -135,6 +132,9 @@ function declare_winners(stats) { function node_difficulty_stat(node) { // Assumes it has valid analysis. + // KaTrain calculates some sort of difficulty statistic for a position by looking at the known moveInfos and + // multiplying the points lost for each by the prior. Then these values are summed... + let ret = 0; for (let info of node.analysis.moveInfos) {