![]() ![]() In fact, on Expert mode (16x30, 99 mines) when the only revealed number is 2, then the probability on adjacent tiles is 25%, whereas on the rest of the tiles we have 97/(16*30-9)=21%, so your program advises a bad move! I'm not for covering the whole area with numbers, but I think writing the probability of the unstable tales would be good. Then, the rest of the board has much less probability of not being mined, that these 8 tiles adjacent to this 5. Let's imagine situation where you have just made the first move, and the number 5 was revealed. My idea would be also to check probabilities of not only those tiles that are adjacent to open tiles. You can solve a grid by using the Solver class: from minesweeper.solver import Solver solver Solver(girdmygrid) n(timeout10) if solver. Its your job to use the numbers to figure out which of the blank squares have mines and which are safe to click. After clicking one of these squares, some of the squares will disappear, some will remain blank, and some will have numbers on them. ![]() Each Minesweeper game starts out with a grid of unmarked squares. And then I'd add an option for auto pressing Ctrl+Space as fast as possible.Īlso, after making a move, the capture engine could just check those fields that might have changed, if that would make the process faster. Last updated on Follow This simple python implementation is able to infer the solution from a minesweeper board. 1.Understand the principles behind Minesweeper. I'd add an option that allows the program to choose one of the fields with least probability of being mined, if nothing is obvious, so that all board can (might) be solved just by pressing Ctrl+Space. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |