Solve minesweeper game automatically, efficiently.