I'm developing a top-down 2D game mostly based off a tilemap/grid. The player will be able to build structures on this grid while other objects like vehicles will move around freely. I've been working on the AI for awhile and have struggled with coming up with a searching method.
The basic behavior I'm looking for is that of a dog barking at someone inside a house. When the person inside runs to the left out of view, the dog will run left and could very well run around the whole house trying to reach/see the person.
Standard pathfinding algorithms look for shortest paths or near shortest paths. But the behavior I'm looking for is more dynamic and isn't about finding a path as much as searching for a way in.
The example I'm working with currently, as seen below, depicts a zombie that has sight of a player inside a building through a window. The player then moves to the right out of view. The desired effect would be that the zombie runs to the right and all the way around the building until finding the player again or giving up. Note that I don't want the zombie to go left and in through the door (which would be the shortest path) to reach the player.
I've fiddled with ideas about using steering behavior, weighted tiles based on distance, wall-following, etc. and nothing has really made sense yet. I'm looking for any thoughts on ways to go about this kind of behavior driven searching.