Donate | Print Page | Contact Us | Report Abuse | Sign In | Register
News & Information: Featured Content

Surviving the Hajj and Escaping from an Empty Palace: Agents and Games to the Rescue

Tuesday, July 21, 2015   (0 Comments)
Share |
Stephan Lewandowsky

Millions of pilgrims descend upon Mecca every year during the 
Hajj, one of Islam’s five pillars. The faithful gather to perform several rituals. For example, each person walks counter-clockwise seven times around the Ka'aba (shown below), a large black cube that determines the direction of prayer for Muslims around the world.

Unfortunately, this event is not without its own list of tragedies, and over the years thousands of pilgrims have perished owing to stampedes and other failures of crowd control. The worst incident, in 1990, claimed nearly 1,500 lives, and the most recent one, in 2006, claimed 346 pilgrims.

But there have been no fatalities since 2006. Why? Because based on computer models that borrowed concepts from fluid dynamics,researchers were able to suggest improvements to the architecture of the sites in Mecca that provided higher throughput and smoother flow of crowds.

Understanding the behavior of crowds can help save lives—not just in Mecca but any other place that attracts large crowds, such as London during the annual Notting Hill Carnival.

Understanding how people explore and navigate spaces indoors can also have life-saving ramifications, for example by allowing architects to design interior spaces to facilitate evacuation in an emergency. The easier it is to remember where the emergency exit is, the more likely it is that a person can escape a building when a fire breaks out.

recent article in the Psychonomic Society’s journal Behavior Research Methods provided a new tool with which to study people’s behavior during the exploration of indoor environments. Researchers Viswanathan, Lees, and Sloot developed a “serious game” that allowed them to examine the role of memory in indoor wayfinding. Serious games have a long history in training, for example as flight simulators and during medical training. Unlike other virtual environments, games are claimed to have an intrinsic enjoyability that increases participant engagement and hence facilitates data collection.

Viswanathan and colleagues designed a game that involved a three-story building, as shown in the figure below.

Participants did not have access to this floor plan: Instead, they navigate through the building using a “first-person” virtual-reality perspective, similar to the view shown below.

The premise of the game is that the player has been teleported into an abandoned palace where 11 people have been imprisoned in different locations spread across the three floors. Guess what the objective of the game is? Yes, of course, it is to find the 11 prisoners and rescue them by escaping from the palace. Each of the dark blue squares in the floor plan above represents the location of a prisoner, and participants stumble upon those locations during their self-paced and self-directed exploration of the palace.

The crucial phase of the game commences when all prisoners have been found and assembled to mount their escape from Dodge. The player receives instructions to enter certain rooms (e.g., the picture gallery, which is shown above) and find hidden switches within each room that operate the escape hatches from the palace. By cleverly arranging the sequence of target rooms, this phase of the game could test the “cognitive map” that participants formed of the palace while they rounded up the 11 prisoners earlier.

The analysis of participants’ behavior during the game was quite complex and sophisticated, so not all aspects can be covered here. One intriguing aspect of the analysis was a comparison between the way in which people explored the building and the way in which various “agents” accomplished the same task. Recall that while searching for the prisoners, players were allowed to move through the space in an unrestricted manner entirely of their own choosing. So how did people choose to explore the building?

Enter the “agents.” Agents are computerized models of a person’s exploration behavior, and Viswanathan and colleagues designed different variants of agents that were governed by different rules of behavior. For example, one type of agent was a “random walker”, which means they randomly chose the next location in the building to explore from all the available option. Another type of agent had perfect memory for a certain number of steps (call that number m). This type of agent moves exactly like the random walker except that it avoids moving back to any of the m steps it visited previously. A third type of agent, known as a “Markov” agent, was also governed bym steps into the past, but with an imperfect memory. (It’s a bit more complicated than that, but for the present discussion this will have to do.)

Comparison between humans and agents revealed that the participants acted very differently from a random walker. In particular, human participants afforded special status to the stairs that connected the floors, exploring more within floors than between floors. The random walkers, by contrast, treated the stairs identically to other options (e.g., the room to the right or to the left). The perfect-memory agent also failed to capture people’s behavior, although it did much better than the random walker.

The winning agent, which behaved almost exactly like the human participants, was the Markov agent with m=7. That is, an imperfect use of memory for the previous 7 steps combined with a probabilistic choice rule explained people’s behavior extremely well.

The intriguing implication of this result is that when we initially explore the environment around us, we keep track of at most 7 of the preceding steps, and we do so imperfectly. So let’s hope it does not take more than 7 decision points to get from where you are to the nearest fire exit when you are new to a building. (Viswanathan and colleagues also discovered a contribution from long-term knowledge after extensive practice, but here we focus on how people handle novel environments.)

Aside from illuminating an interesting aspect of human behavior, what are the implications of this research? Viswanathan and colleagues suggest that “… this type of model is an excellent starting point for developing agent-based models that can be used to evaluate safety-by-design architecture in complex structures.” Their work has identified a simple mathematical model, embodied in the Markov agents, that behaves much like humans do. It follows that those agents may be useful tools for architects and planners who are designing public buildings that facilitate rather than impede the flow of people.

This may save lives in the same way that other agent-based models have helped reduce the number of fatalities during the Hajj.


2424 American Lane • Madison, WI 53704-3102 USA
Phone: +1 608-441-1070 • Fax: +1 608-443-2474 • Email:

Use of Articles
Legal Notice