I need to implement a Minesweeper solver. I have started to implement a rule-based agent. I have implemented certain rules. I have a heuristic function for choosing the best matching rule for the current cell (with info about surrounding cells) being treated. So for each chosen cell, it can decide for 8 surrounding cells to open them, to mark them or to do nothing. I mean. at the moment, the agent gets as input some revealed cell and decides what to do with surrounding cells (at the moment, the agent does not know, how to decide which cell to treat).
My question is, what algorithm to implement for deciding which cell to treat?
Suppose, for, the first move, the agent will reveal a corner cell (or some other, according to some rule for the first move). What to do after that?
I understand that I need to implement some kind of search. I know many search algorithms (BFS, DFS, A-STAR, and others), that is not the problem, I just do not understand how can I use here these searches.
I need to implement it in principles of Artificial Intelligence: A modern approach.