A big part of my day job is making sure that I run designs past people before releasing anything. I almost inevitably learn a ton from just a few sessions (the UX industry standard is 5 testers).
An important part of my design strategy is to get builds into people's hands early and often. So far I've tapped some friends for feedback and this example shows how that feedback translates into design iterations.
I sent a couple friends a link to a test build and jumped on separate Discord calls to get their reactions. I had them share their screens and encouraged them to speak out loud about their experience and specifically whether the guards were behaving in accordance with their expectations.
Observing my friends play and getting their feedback, a persistent theme was the guard's searching behavior was not working the way the players expected. Rather than a systematic search, guards just kind of ran about randomly, as in the clip above. In fact, they were programmed to do just that: run around systematically.
I was unsure how exactly to create a search behavior that would be scalable and work in different environments and levels so I looked into some other stealth games for inspiration.
In this (rather funny) example of enemy search AI in Metal Gear Solid 2, the guards have particular places they search for the player in a way that seems believable (except for the hilarious bug at the end). They check behind objects and in containers where the player can hide. This system most likely relies on designers manually setting up each room to tell the AI where the door is, what objects to search behind, and what lockers to open. I decided to set up a test using similar, manually placed points of interest.
In the above example, the green rectangle is the Search Area and the green circles are the search waypoints. When a guard is alerted near the Search Area, he goes to the closest waypoint then begins a search at each of the waypoints until his awareness level drops to 0, at which point he returns to his patrol. Here's a clip of the guard following this behavior after spotting a dead body.