Interesting example. I have not looked at the code yet... I would suggest, however, that you add more states: Instead of going immediately back to it's patrol route upon losing the target (player), it performs a small search algorithm to try to find them again. "Small" meaning something simple, such as go to each position that would extend line of sight beyond the obstacle blocking it -- but only the positions visible at the time/position it lost the player. (I.E., a hunt and seek algorithm, but only one iteration before it "gives up".)
Perhaps even add a control to set how many iterations it will attempt -- with an infinite number effectively making it roam the entire playing field rying to find and chase the player again.
It would be interesting to see how the "AI" handles these modifications.