Fast constraint satisfaction problem and learning-based algorithm for solving Minesweeper