I am having trouble adapting the A* algorithm to handle changing environments. As a minimum example, consider this rogue-like map:
######
#! #
### #
#S #
##+###
##F###
######
The goal is to get from S to F, but in order to do so the player must step on ! to open the door. The problem I'm having is that in A* once a grid point is visited it becomes "closed" and cannot be reentered. How can I modify the algorithm to solve this puzzle?
!opens the door+? Because if there are multiple switches without an indication which door they open, the A* assumption of full information fails and the algorithm cannot solve the problem. (Also, vanilla A* is pretty bad at handling mazes.)