Pathfinding enemy

I was wondering if there was a way to make an enemy chase you around a house and not go through walls or crash into them. It would be really cool and if its possible please tell me how. thank you