
Show HN: MathMax.io – Select the greater value - mcep5f
https://mathmax.io/
======
arsenide
Console program to auto solve:

    
    
      String.prototype.replaceAll = function(search, replacement) 
      {
          var target = this;
          return target.replace(new RegExp(search, 'g'), replacement);
      };
    
      function sleep (time) {
        return new Promise((resolve) => setTimeout(resolve, 
      time));
      }
    
      for (var i=0;i<100;i++) { sleep(i*2000).then(() => {
        if 
      (eval(document.getElementById("opt1").innerText.replaceAll("×", "*").replaceAll("÷", "/").replaceAll("−", "-")) > eval(document.getElementById("opt2").innerText.replaceAll("×", "*").replaceAll("÷", "/").replaceAll("−", "-")))
      {
          document.getElementById("opt1").click()
      } else {
    	  document.getElementById("opt2").click()
      }
      })}

------
et15
I found myself developing various rules in my head with negatives versus
division, etc. to solve these quicker without having to do most of the math.
Interesting game, thanks for sharing!

~~~
alexeldeib
I did exactly the same, and got fairly high accuracy. Funny how we can use
heuristics with a relatively high success rate more quickly than doing the
math.

