The nice thing about being in the programming business, is that the computers do exactly what we tell them to do. Even our random numbers aren't really random - they just follow a systematic progression based on a particular starting point. Emergent and adaptive behaviors (when simulated on a computer) are totally predetermined based on the inputs. Our problem here was that we had a storage data structure (a hash table that stored the list of boundary edges) using random numbers with an unknown starting point.
Most of the behavior-based simulators out there do give different answers if you run them multiple times. I believe Steps can specify the random seed, but I don't know how effective that is in forcing the simulation to always come out the same. The designers do this for a number of reasons. Usually the one I hear advertised is to enable you to run the simulation 100 times and do a sort of monte-carlo analysis of the scenario. Having worked on a simulator, I can also tell you that it is very tempting to replace actual occupant-decision making AI with random decisions. For example:
Early on, we were pursuing an approach where our occupants moved toward exits based on the gradient of a pre-calculated flow field. The solution was very fast and, with some cornering exceptions, worked quite well. Unfortunately, it looked unnatural. People followed perfect lines and curves and it just didn't look right. Our first throught was to perturb their motion with some random numbers and that made it look a lot better, but it still didn't seem quite right. Also, we had lost control of the occupants! What if we wanted to introduce family grouping to the perturbed walking motion. We'd just be building more and more onto this unnatural model. Instead we shifted gears and started using more and more of this steering-type behavior that originated from an organized AI process within the agent - no external controls. By swearing off random numbers we avoided a crutch and in the end we have a decision-making model that more closely resembles the problem.
Another great example is two or more occupants in counter-flow. If you add a random component to their motion, they'll glance off each other very nicely. It's more difficult to make them properly dodge around each other using an organized process.
Pathfinder has a rich enough representation of the space that we can get away with a more "natural" decision making model. Gridded simulations pretty much have to use tricks to work around the grid.
You can still run 100 different simulations with Pathfinder and get different answers. In the UI, if you distribute speed, size, etc based on distributions the occupant characteristics will be randomized before the input file is generated and the simulator takes over. But the simulation logic should always be completely deterministic.
I guess the punchline is that when we get this next beta out, if you run the simulation once and the occupants get stuck, they'll always get stuck. However, it also means that we'll be able to reproduce that case and fix it. Every time.
- Charlie