3 ms·
That's a fair objection. You can view my rule as a heuristic that's easy to compute and gives good guesses in most situations, rather than calculating the mathe
by luckyt 9y ago
That's a fair objection. You can view my rule as a heuristic that's easy to compute and gives good guesses in most situations, rather than calculating the mathematically correct probability.
My AI does actually account for this, but only in the endgame when there are a small number of squares left -- then it considers the global configuration instead of just local. This works out because the endgame is where this problem is the most significant, it's computationally expensive unless there's a small number of squares remaining.
- leni536 9y agoThen I suggest an improved heuristics for mid-game. You can actually calculate the number of global configurations for each border configuration, they are just (n choose k) type calculations. It's somewhat more sophisticated when there are multiple disjoint border regions. Alternatively for a mid-game heuristic you can approximate the initial uniform distribution of the fixed amount of mines on the playing field with another distribution: Each square having an independent probability of having a mine or not. This could potentially simplify the calculation but it wouldn't be accurate when there are not so many mines left.
- Someone 9y ago”It's somewhat more sophisticated when there are multiple disjoint border regions.” I don’t see why that would be the case. Can you explain?