2048.html
changeset 74 93cb48b73b39
parent 73 a50828ac954d
child 75 ab74c80beffd
--- a/2048.html	Wed Sep 17 23:30:02 2014 +0300
+++ b/2048.html	Thu Sep 18 00:39:41 2014 +0300
@@ -103,6 +103,9 @@
       border: 1px solid green;
       padding: 2px;
     }
+    table.report-by-maxval > tr > td:nth-child(3) {
+      background-color: yellow;
+    }
   </style>
 </head>
 <body>
@@ -231,6 +234,28 @@
       <div class="ai" id="ai-expectimax">
         <button class="ai">enable</button>
         <h5>expectimax</h5>
+        <div class="option">
+          <input type="text" name="depth" class="positive" pattern="[0-9]*" value="3"/> recursion depth
+        </div>
+        <div class="option">
+          <input type="text" name="balance" class="positive" pattern="[0-9]*[.]?[0-9]*" value=".9"/> probability of 2
+        </div>
+        <div class="option">
+          <input type="text" name="scoreCoef" class="positive" pattern="[0-9]*[.]?[0-9]*" value="1"/> score weight
+        </div>
+        <div class="option">
+          <input type="text" name="maxValCoef" class="positive" pattern="[0-9]*[.]?[0-9]*" value="0"/> max value weight
+        </div>
+        <div class="option">
+          <input type="text" name="cornerBonus" class="positive" pattern="[0-9]*[.]?[0-9]*" value="100"/> max value at corner bonus
+        </div>
+        <div class="option">
+          <input type="text" name="edgeBonus" class="positive" pattern="[0-9]*[.]?[0-9]*" value="0"/> max value at edge bonus
+        </div>
+        <div class="option">
+          <input type="text" name="freeBonus" class="positive" pattern="[0-9]*[.]?[0-9]*" value="10"/> free cell coefficient
+        </div>
+        <div class="clearfix"></div>
       </div>
     </div>
   </div>
@@ -624,8 +649,10 @@
       "ai-deep-max-score-corner": function() {
         return new ai.DeepMaxScoreCorner(ui.brdEngine);
       },
-      "ai-expectimax": function() {
-        return new ai.expectimax(ui.brdEngine);
+      "ai-expectimax": function(aiDom) {
+        var cfg = {};
+        ui.ai.parseCfg(aiDom, cfg);
+        return new ai.expectimax(ui.brdEngine, cfg);
       },
       // "": function() {
       //   return new ai.(ui.brdEngine);