=)
Check out the eval function, and specifically the function smoothness() in grid.js. It implements the edge weighting you describe!
Check out the eval function, and specifically the function smoothness() in grid.js. It implements the edge weighting you describe!
One more thing - have you looked into storing the game tree? I noticed it is starting the search from the beginning every time. I'd expect you would see a branching factor of around 10, so this would only really make a difference at depths greater than 4.
You started an excellent and inspiring GitHub project - I feel like the AI research into this game has only just begun.