Skip to content

Commit

Permalink
Update performance.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed May 7, 2023
1 parent 0f0c62c commit 804248c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 804248c

Please sign in to comment.