# HG changeset patch # User Oleksandr Gavenko # Date 1411246562 -10800 # Node ID 47d42234dd5cda23799ff45e02c1eea9e640a717 # Parent 54dfc3b4e7d3d4546a77d7b5784aa25e0cff0f3d Set better coefficient for blind-weight-random AI. diff -r 54dfc3b4e7d3 -r 47d42234dd5c 2048.html --- a/2048.html Sat Sep 20 23:47:48 2014 +0300 +++ b/2048.html Sat Sep 20 23:56:02 2014 +0300 @@ -194,13 +194,13 @@ left weight
- right weight + right weight
- up weight + up weight
- down weight + down weight
diff -r 54dfc3b4e7d3 -r 47d42234dd5c ai.js --- a/ai.js Sat Sep 20 23:47:48 2014 +0300 +++ b/ai.js Sat Sep 20 23:56:02 2014 +0300 @@ -76,7 +76,7 @@ this.threshold2 = (this.cfg.left + this.cfg.down)/total; this.threshold3 = (this.cfg.left + this.cfg.down + this.cfg.right)/total; } -ai.BlindWeightRandom.bestCfg = { left: 1, down: 10, right: 5, up: 1 }; +ai.BlindWeightRandom.bestCfg = { left: 1, right: 16, up: 4, down: 8 }; ai.BlindWeightRandom.prototype.analyse = function(brd) { var origBrd = new this.brdEngine(brd); while (true) {