Help with Grid movement script + AI script

Hi! I and som friends recently started with a gameproject that will outplay in a maze from a 2d angle. We now wonder if anyone can help us with a script for AI patrol? It only needs to be able to go between two points in a grid but it would be nice if it could adapt to a change in the grid aswell as following the player if he gets close to him.

Thank you in advance //Anton Ek

You should also learn about Waypoints at least for the patrol part.

Maybe this helps http://www.youtube.com/watch?v=-5RiMoILHTA