Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Drew Roos wrote this code to calculate the exact probabilities: https://github.com/mrgriscom/minesweepr/


Notice that in the example the field 'H' has much higher probability to contain a mine than the fields 'I' and 'F'. This can be very unintuitive. The reason is when counting configurations one needs to consider the placement of all the mines, not only the ones that have a neighbour uncovered. When this is considered then there are (76 choose 6) configurations that have a mine on 'H' and (76 choose 5) configurations that have mines on 'I' and 'F'. (76 choose 6) is a much larger number than (76 choose 5).

In general I found that in a normal game when a guess is needed then it's better to guess for configurations that have fewer number of mines on the perimeter of the uncovered area, as they have higher probability.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: