From 49da1de933b0b4b6cc5be3bcee8cacc18b954b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Wed, 11 Dec 2019 00:52:52 +0100 Subject: [PATCH] new builder heuristic based on distance from center + - some difficulty margin --- script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index 8c799d7..3d7e1f8 100644 --- a/script.js +++ b/script.js @@ -742,8 +742,9 @@ class SettingsStorage { version: 1, log: 'info', allowTemplateAugmenting: false, - retryTemplate: 30, - attemptTemplates: 50, + retryTemplate: 120, + attemptTemplates: 20, + difficulty: 35, svgEffects: false, dimBlocked: true, logSolution: false, @@ -1200,8 +1201,7 @@ class Game { if (neigh.freeSequence >= 3) { candidates.push({ n, - cw: neigh.centerWeight, - neighs: neigh.neighbours, + cw: neigh.centerWeight }); } } @@ -1214,7 +1214,7 @@ class Game { let top = []; let topw = candidates[0].cw; for(let cand of candidates) { - if (cand.cw <= topw + 18) { + if (cand.cw <= topw + this.cfg.difficulty) { // TODO this could vary by template top.push(cand); } }