I'm more familiar with Arma's AI processing, but if I were trying to scrap together a YanSim style AI in Arma, I'd probably use agents, which are a form of limited AI actor. If you've seen gameplay footage of goats wandering around in Arma 3 content, those are agents. They have a limited AI tree, so they don't use many resources, but can still trip other processes like detection or landmines. By default, agents don't have a panic action in response to shooting or explosions but they can be made to do so.
So if I had a map of a school I'd make the overwhelming majority of students into agents so they use minimal resources, especially since all it seems regular students exist to do in YanSim is be detectors for the players shenanigans or be targets of said shenanigans. Because of this, they only need extremely basic pathfinding and delay timers. So you'd have a group of students, let's say 25, that spawn at the school gates, follow markers to their locker, then their classroom, sit down, and delay getting back up to go the next class for an hour, for example.
Hall monitors would be full AIs with interlocking patrol paths around the corridors but their own set of delay timers and waypoints to give the illusion of randomness in their behaviors. Since the hall monitors would need to be able to do more, they would be the first of the AI with full decision trees to respond to what they see. So for example, an agent that sees a body will only have two or three states once it sees the body. Panic, run, get an authority figure. Hall monitors need to be able to do all those things, but also look for the cause of the disturbance, get a teacher, investigate suspicious activity, etc.
Teachers do more than hall monitors like starting a lockdown, calling the police, restrain the suspect, etc but still maintain much the same decision tree as the hall monitors, which in turn means that both are drawing from the same behaviors which in turn reduces performance costs ever so slightly.
If we have 10 classrooms of 25 students and a teacher each, plus 1 hall monitor for every 50 students that's 250 students, 5 monitors, and 10 teachers. Agents have next to no performance impact since they're more or less just lobotimites, to a point I've filled cities with them in Arma 3 and only lost 2-5 frames. This leaves a whopping 15 AI actors per floor, which is nothing in Arma terms.
I'm in the mood for some armchair Software engineering. How would you guys implement the npc simulation for YanSim? I'm out of the loop with programming, but theoretical informatics and data structures have always been fun and i wonder how you can handle the Students states without tanking Performance like the game does.