For use in a simple project of mine, I've hit a bit of a blockade.
I have a series of points in a grid, "walls" and "open space." Space outside the grid is assumed to be walls. I have an arbitrary number of points in this grid which are open, and I must determine if which ones are connected will change if I make one specific block in the grid change from open space to a wall.
What's an efficient way of doing this?
.
Example: Determine whether the presence/absence of paths between the red squares will change if the green square is a wall or open space. (PS: I sincerely apologize for my terrible grid)
Right now, I'm assuming some sort of cellular automata is best, but I'm not sure. I've looked at pathfinding before, but never really saw anything that got into this sort of problem.
Please note: I don't care how long the paths are, (I know their maximum length) they just MUST EXIST. So finding the BEST path between points is not necessary.
Oh, and while it shouldn't matter, I'm writing this project in Java, but any language (or pseudo-code) or an English description of an algorithm will suffice. (I know most of the Curly Bracket languages, and limited Haskell and LISP, they'll all do.)