SciELO - Scientific Electronic Library Online

 
vol.48 issue3Study on homophobic bullying in Portugal using Multiple Correspondence Analysis (MCA) author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand

Journal

Article

Indicators

Related links

  • On index processCited by Google
  • Have no similar articlesSimilars in SciELO
  • On index processSimilars in Google

Share


Revista Latinoamericana de Psicología

Print version ISSN 0120-0534

rev.latinoam.psicol. vol.48 no.3 Bogotá Dec. 2016

https://doi.org/10.1016Zj.rlp.2016.06.002 

http://dx.doi.org/10.1016Zj.rlp.2016.06.002

ORIGINAL ARTICLE

The behavioral interaction of road users in traffic: An example of the potential of intelligent agent-based simulations in psychology

La interacción conductal de conductores en el tránsito: un ejemplo sobre el potencial de las simulaciones basadas en agentes inteligentes para la psicología

Juan Carlos Correaa,b

a Departamento de Ciencia y Tecnología del Comportamiento, Universidad Simón Bolívar, Caracas, Venezuela
b Facultad de Psicología, Fundación Universitaria Konrad Lorenz, Bogotá, Colombia

E-mail address: juancorrea@usb.ve.

Received 12 November 2015; accepted 17 June 2016


Abstract

This paper illustrates what psychologists can do and learn from the use of intelligent agent-based simulations, in combination with experimental designs, in order to model the behavioral interaction of motorists and motorcyclists in urban traffic, when motorcyclists ride in between the lanes of slow-moving or stopped vehicles. The results of the computer model were validated through a measure that estimates its agreement with the results of real-life traffic videos analyses. Lastly, this paper discusses the implications of adopting intelligent agent-based simulations in experimental psychology.

Keywords: Intelligent agents; Agent-based simulations; Research methods.


Resumen

Con un ejemplo se ilustra lo que los psicólogos pueden hacer y aprender al usar las simulaciones basadas en agentes inteligentes combinadas con diseños experimentales para modelar la interacción conductual de automovilistas y motociclistas en el tráfico urbano, cuando estos circulan entre los carriles de vehículos detenidos o circulando a baja velocidad. Los resultados del modelo computacional se validaron con una medida que estima su concordancia con los resultados obtenidos en análisis de videos de tráfico real. El artículo finaliza discutiendo las implicaciones que tiene para la psicología experimental la adopción de las simulaciones basadas en agentes inteligentes.

Palabras clave: Agentes inteligentes; Simulaciones basadas en agentes; Métodos de investigación.


Intelligent agents are well-known in computer sciences and artificial intelligence several decades ago (Wooldridge & Jennings, 1995) but their methodological relevance in social sciences is more recent (Axelrod, 1997; Troitzsch, 2009) and not so well-known to psychologists (Smith & Conrey, 2007). Intelligent agents are non-living objects that are conceived to resemble living organisms that interact among each other in certain types of environments. According to Wooldridge and Jennings (1995) the term agent has both a weak and a strong notion.

Roughly speaking, the weak notion of an intelligent agent defines them as a hardware or software-based computer system with the following properties: (a) autonomy (they behave without the direct intervention of humans, and have some degree of control over their actions and internal state); (b) social ability (they interact with other agents and humans by employing some kind of agent communication language); (c) reactivity (they perceive the environment that surrounds them, it may be the natural, physical world or a virtual environment represented in a graphical user interface) and (d) pro-activeness (they are able to show goal-oriented behaviors by taking the initiative). An agent is a sort of UNIX-like software process with the aforementioned characteristics. Concrete cases of this notion can be found, for example, in modeling human driving behavior in traffic (Bazzan & Klügl, 2013; Kesting, Treiber, & Helbing, 2009).

The strong notion of an intelligent agent defines them as computer systems that, in addition to having the properties of the weak notion, are either conceptualized or implemented using concepts that are more usually applied to humans (Wooldridge & Jennings, 1995). In artificial intelligence, for instance, agents can be characterized using mentalistic or emotional notions such as knowledge, belief, intentions and/or obligations. Concrete cases of these notions can be found in studies about the evolution of shame as an adaptation to social punishment in artificial societies (see for example, Jaffe, 2008). Intelligent agents, therefore, can be seen as a powerful research tool for studying physical, biological or social complex systems exhibiting the following two basic properties: (a) the system is composed of interacting agents which are seen as the "microscopic" elements of it and (b) the system exhibits emergent properties, arising from the interactions of agents that cannot be deduced simply by aggregating the properties of them to create a macroscopic level of the system. In other words, agent-based simulations represent a powerful methodological tool for psychologists who understand human or animal behavior from the point of view of social complex systems; a new field of science studying how parts of a social system give rise to the collective behavior of the system and how the system interacts with its environment and evolves over time (Wilensky & Rand, 2015).

Compared with other research tools in psychology, agent-based simulations have a broader scope. It allows the study of the individual behavior of agents not only in one moment (when comparing different groups of agents in just one period of observation) but also in their changes over time (by tracking their differences in several periods of observation). Thus, agent-based simulations allow the integration of different research designs in a single and coherent effort. Existent reviews on the use of intelligent agents in psychology (see for example Smith & Conrey, 2007) showed its potential by mentioning some examples of social simulations mainly developed by non-psychologists. Here I proceed differently. In the rest of this paper I show an example that illustrates, with some technical details, the use of intelligent agents as a research tool in traffic psychology.

The effects of motorcycle lane-sharing on motorists' behavior

In a recent work, Correa (2015) developed an agent-based model of the behavioral interaction of motorists and motorcyclists in urban traffic, when motorcyclists ride in between the lanes of stopped or slow-moving vehicles as depicted in Fig. 1.

The social relevance of this phenomenon is widely recognized in Venezuela, where the rising sales of motorcycles has proliferated this practice of mobilization due to its benefits for commuting in congested traffic despite their safety implications (see Fig. 2). In the literature it has been reported that motorcycle lane-sharing has psychological implications for road users, due to the fact that motorists have negative attitudes toward motorcyclists and how they filter through traffic (Crundall, Bibby, Clarke Ward, & Bartle, 2008).

In order to understand the source of these attitudes, the work presented an agent-based experiment to answer the following questions: (a) Does the practice of motorcycle lane-sharing impose a restriction for motorists to perform lane-changing maneuvers on the road? (b) Do the motorists need to accelerate and decelerate more often when sharing the lane with motorcyclists on the road? (c) What is the effect of motorcycle lane-sharing on the average speed of motorists? The behavior of motorists was analyzed in terms of the average speed; the frequency of accelerations/deceleration maneuvers and the frequency of lane-changing maneuvers, because these metrics are deemed relevant from the point of view of traffic management and traffic safety as traffic researchers have previously claimed (see for example, Kesting, Treiber, & Helbing, 2007).

Procedure

The model was implemented with "SeSAm"; a software that has been used for traffic simulations (Klügl & Bazzan, 2004) and it was designed for social scientists with little computer programming experience (http://www.simsesam.de). The model comprised three agents: the road, the motorists and the motorcyclists. These agents interacted in a virtual environment represented as a map with a coordinate system whose origin lies in the upper, left corner. The physical dimensions of this map were 40 m of height by 400 m of width, representing a double-lane avenue with a length of 400m. The width of each lane was fixed to 4m (see Fig. 3).

The top lane of the road was identified with the number one and the bottom lane was identified with the number two for allowing the moving agents to change lanes according to the rules described in Table 2. The time was modeled as a discrete time step which is interpreted as one second in real life. The road has two state variables: traffic type and density. The first one allowed the distinction between traffic with motorcyclists (heterogeneous traffic) or without them (homogeneous traffic) and the latter identified the maximum number of cars on the road. Both motorists and motorcyclists shared the same set of state variables and their description is in Table 1.

The road was modeled to allow the entrance of cars on the right edge of the way, inside a randomly selected lane and with a random preferred speed. The difference between motorists and motorcyclists was their physical dimension and the driving behavior. Cars were set to 4.5 m length by 1.7m width, resembling a "standard compact vehicle" in the real world and motorcycles were set to 2 m length by 1 m width, resembling a "standard street motorbike". Motorists were allowed to drive "inside the lane" when entering to the road. Motorcycles were allowed to ride in between lane 1 and 2 of the road and they could also "switch lanes" but never travel "inside" them. Motorists and motorcyclists decided their instantaneous behavior following the rules defined in the format of "if-then-else" decisions that are summarized in Table 2.

The model proceeded in seconds and the road maintained a constant vehicular traffic flow by verifying the maximum number of cars or motorcycles that should be created for allowing their controlled entrance in either lane at the right edge of the map, and eliminating them when reaching the left edge of it. The simulation process iterated during 700 seconds for each simulation run and in the first 100 seconds no data was gathered from SeSAm to guarantee an invariant traffic flow which is a necessary condition required to satisfy experimental control. Thus, data collection was done from t = 101 until t = 700, a total of 600seconds or 10 minutes in real-life.

Design and analysis

The experiment followed "the completely randomized factorial design" (Fisher, 1935) to analyze the behavioral interaction between motorists and motorcyclists in five levels of traffic density (4, 8, 12, 16 and 20 cars on the road) and two types of traffic (homogeneous and heterogeneous). Both motorists and motorcyclists were modeled to drive with different preferred speeds as described in Table 1. The experimental setup was constituted by each combination of density and traffic type, resulting in ten experimental situations. As an additional control, the motorists/motorcyclists ratio remained constant in all experimental conditions (one motorcycle for each pair of cars on the road) (Table 3).

Data analysis was summarized in terms of minutes in a new database containing the agents' performance in 24 replications for each experimental situation. The sample size of the experiment was 100 observations, corresponding to a total of 4 hours of traffic in the real-life. A critical reader might argue that this sample size is not as big as it should for making credible the experimental results. Yet, in the literature of statistical hypothesis testing it is well-known that the sample size is a factor that might increase the probability of committing an error-type decision if conclusions are only based on statistical significance or p-values (Cohen, 1994). Thus, for a more robust testing it was included the calculation of an effect size index known as omega squared (Olejnik and Algina, 2000, 2003) which indicated the proportion of variance of agents' performance that is accounted for by the experimental variables (density and traffic type) and their combination. It is worth to mention that this is considered good practice in agent-based social simulations (Troitzsch, 2014), since it enables readers to evaluate the stability of results across samples, designs, and analyses.

Results of the simulations

The frequency of lane-changing maneuvers increased when density increased for both traffic types. Yet, as Fig. 4 depicts, motorists performed these maneuvers more frequently in the homogeneous traffic, suggesting that motorcycle lane-sharing produce a corral effect on motorists by limiting their freedom to make lateral movements on the road which can be the physical mechanism that explain the negative attitude they have toward motorcyclists.

The distributions for the frequency of lane-changing maneuvers were clearly different according to density and traffic type. For testing the statistical significance of these differences we applied a non-parametric version for the analysis of variance (ANOVA) (Anderson, 2001) which is appropriate when distributions do not satisfy the assumption of normality as in this case [Levene's test F(9;90) = 6.51; p=.00]. In this experiment, 86.9% of the variance of these maneuvers was accounted for by the traffic type (Ω2 =0.312), the density (Ω2 =0.306) and the combination of these factors (Ω2 =0.251).

The frequency of motorists' decelerations increased as a function of density in both traffic types. However, they decelerated less often in the homogeneous traffic as it can be seen in Fig. 5.

The observed distributions for the motorists' decelerations proved to be skewed and significantly different from the standard normal distribution [Levene's test F(9;90) = 12.572; p=.000]. The 95.8% of the variance of these distributions was mainly accounted for by the density (Ω2 =0.880), the type of traffic (Ω2 =0.011) and their combination (Ω2 =0.067). Similar results occur for the frequency of motorists' accelerations. These frequencies increased when density increased in both traffic types but motorists accelerated more frequently in the heterogeneous traffic (see Fig. 6).

The distributions for the frequency of motorists' accelerations were also different from the normal distribution [Levene's test F(9;90) = 6.893; p=.000]. The 98.1% of the variance of these distributions was accounted for by the density (Ω2 =0.939), being the traffic type (Ω2 =0.007) and its combination with density 2 = 0.036) less important factors associated with the variability of motorists' accelerations.

The average instantaneous speed of motorists decreased when density increased in both types of traffic but, it should be observed that the motorists' average instantaneous speed was a little bit higher in the homogeneous traffic for all levels of density (see Fig. 7).

The observed distributions of motorists' average speed proved to be significantly different from a normal distribution [Levene's test F(9;90) =4.015; p = .000]. Yet, almost all of the variability of motorists' average speed was accounted for by the density (Ω2 =0.885), traffic type (Ω2=4 x 10-4) and their combination 2 =0.03).

Validating the results

Due to the simplicity of the research design that was employed for analyzing the interaction between motorists and motorcyclists on the road, some researchers may cast doubts on the external validity of the preceding results. These concerns are also well-known in the agent-based community (see for instance Windrum, Fagiolo, & Moneta, 2007) and they are somehow equivalent to the problem of estimating the validity of psychological measurements in psychometrics (Borsboom, Mellenbergh, & Van Heerden, 2004); namely, we need a valid criterion with which we can compare the results of agent-based simulations. Researchers who work with agent-based simulations are well provided with a vast amount of techniques and procedures for validating the results of their agent-based models. Yet, psychologists might contribute to the agent-based community by presenting the statistical validation techniques that are commonly used in applied psychometrics. In this example, I contrasted the agreement between the results of simulations and the results of real-life traffic observations. The real traffic was filmed several times with the video-camera of a smartphone. The reader can watch a sample video of these observations in youtube in the following url http://youtu.be/QlCIqaXOQzY. This video shows a segment of Autopista Francisco Fajardo in Caracas Venezuela where both traffic types occur at the same time since motorcycle lane-sharing is observed between the left and the central lane of the road, while homogeneous traffic occurs between the central and the right lane of it, as depicted in Fig. 1. The resulting agreement between simulations and field observations was calculated by analyzing the frequency of lane-changing maneuvers and the speed of motorists. The resulting agreement reached the 92.91% as calculated with a measure of agreement "for multivariate observations by different sets of judges" (Janson & Olsson, 2004), where observations corresponded to the agents' behavior, and the judges corresponded to the source of results (simulations versus field observations). The results clearly showed that this pair of metrics was systematically lower when motorists shared the lane with motorcyclists on the way (see Fig. 8).

It is clear that this procedure is intended to validate the existence of ordinal patterns (Thorngate & Edmonds, 2013) in the behavior of road users when their interaction change as a function of traffic type and vehicular density. The procedure followed by Correa (2015) showed its relevance not only to validate the results of agent-based simulations, but also its usefulness to analyze a real traffic phenomenon that exists in several countries around the world where motorcyclists are allowed to ride in between stopped or slow-moving cars.

What can psychologists do and learn from intelligent agent-based simulations?

The precedent sections showed an effort that harmoniously combined the use of experimental design with agent-based simulations to model the interaction between motorists and motorcyclists when the latter drive in between the lanes of stopped or slow-moving vehicles. The first lesson from this case is that psychologists can go beyond their traditional research methods and data collection techniques (e.g., questionnaires, interviews, etc.) to tackle very interesting phenomena from the point of view of social complex systems. A first step for psychologists is learning how intelligent agents are implemented through agent architectures or toolkits. This step requires the recognition of available options (Nikolai & Madey, 2009) so at least one of them can be eventually employed for developing theories about human (or animal) behavior in social complex environments. Hopefully, efforts like the one described in this paper might promote agent-based simulations as alternative research methods in psychology.

The example above also showed a minimalist model which consisted in modeling the driving behavior with the minimum set of variables that allowed the most basic behavioral interaction between road users. This form of modeling, synthesized with the relationships exposed in Table 2, proved to be quite robust so as to grasp the independent and combined effects of only two variables (density and traffic type) on road users behavior. It is worth noting these variables proved to be sufficient for explaining at least the 90% of motorist's behavior, a robust macroscopic description of motorist's behavior. This aspect deserves additional comments from a wider point of view.

As psychologists we are more or less committed with the advance of our discipline toward its recognition as a science. This commitment requires the use of formal languages (like logic and mathematics) to achieve this desired recognition. Almost two decades ago, Luce (1999), a well-known mathematical psychologist, foresaw the role of simulations as an important step in this direction. The example illustrated in this paper confirms what Luce foresaw years ago; namely, "the criterion for success often seems one more appropriate to artificial intelligence and engineering than to psychology, which, after all, is concerned with actual human behavior and capabilities" (p. 733). Even in the case that we psychologists enthusiastically adopted the use of intelligent agent-based simulations as a research tool, we should not forget that we are always confronted with the issue of finding empirical evidences that support the relationships among the variables we study. Here, again, the validity of our theoretical hunches (explicitly written in terms of equations or logical statements) must be rigorously confronted with facts. Luce offered his concerns in this regard by indicating that "complex issues of empirical validation exist for all these computational models, and they are far from resolved to the satisfaction of all, including me" (p. 733). I think that one of the best bets in this regard is to welcome interdisciplinary research methods and work along with colleagues of other disciplines so the validity concerns can be appropriately tackled and resolved.

Concluding remarks

Psychologists share with other colleagues a complex object of study; namely, the human and animal behavior. The research methods that we traditionally teach in psychology courses are often split into two major segments. On one hand, we can find the so-called quantitative methods that comprise the use of multivariate statistical techniques (Wilkinson & The task Force on Statistical Inference, 1999) and on the other we have the well-known qualitative methods that deal with qualitative data such as spoken or written discourses (Sayago, 2014).

I believe that intelligent agent-based simulations represent a new promising segment given its compatibility to combine the design of experiments with computer simulations intended to mimic real complex systems that are quite difficult to analyze with traditional research methods. Given the fact that this new segment is not well-known to the majority of psychologists and thus ignored in psychology programs, we must expect some time before it can be formally included in our academic curricula. While we learn how to use intelligent agents as a research tool in psychology, we must welcome colleagues from other disciplines to teach us concrete examples that help us understand how we can benefit of adopting this research tool.

Acknowledgments

I am fully indebted with "Centro de Computo Científico del Grupo de Relatividad y Campos" and "Centro de Estudios Estratégicos" of Universidad Simón Bolívar in Caracas - Venezuela, for allowing the use of their facilities in conducting the experiments. I also thank professors Franziska Klügl, Ana L.C. Bazzan, Klaus Jaffe and Mario I. Caicedo for their uninterested support in some technical details of the experiments. I finally thank the anonymous reviewers for their valuable comments and suggestions.


References

Anderson, M. J. (2001). A new method for non-parametric multi-variate analysis of variance. Austral Ecology, 26, 32-46.         [ Links ]

Axelrod, R. (1997). Advancing the art of simulation in the social sciences. Complexity, 3(2), 16-22.         [ Links ]

Bazzan, A. L. C., & Klügl, F. (2013). A review on agent-based technology for traffic and transportation. The Knowledge Engineering Review, 1-29. http://dx.doi.org/10.1017/S0269888913000118.         [ Links ]

Borsboom, D., Mellenbergh, G. J., & Van Heerden, J. (2004). The concept of validity. Psychological Review, 111, 1061-1071.         [ Links ]

Cohen, J. (1994). The earth is round (p < .05). American Psychologist, 49, 997-1003.         [ Links ]

Correa, J. C. (2015). Simulaciones y observaciones de la filtración de motos en el tránsito heterogéneo (Doctoral dissertation). Venezuela: Universidad Simón Bolívar.         [ Links ]

Crundall, D., Bibby, P., Clarke, D., Ward, P., & Bartle, C. (2008). Car drivers' attitudes towards motorcyclists: A survey. Accident Analysis & Prevention, 40, 983-993.         [ Links ]

Fisher, R. A. (1935). The design of experiments. Edinburgh, Scotland: Oliver and Boyd.         [ Links ]

Jaffe, K. (2008). Evolution of shame as an adaptation to social punishment and its contribution to social cohesiveness. Complexity,14, 46 -52.         [ Links ]

Janson, H., & Olsson, U. (2004). A measure of agreement for interval or nominal multivariate observations by different sets of judges. Educational and Psychological Measurement, 64, 62 -70.         [ Links ]

Kesting, A., Treiber, M., & Helbing, D. (2007). General lane-changing model MOBIL for car-following models. Transportation Research Record, 1999, 86 -94.         [ Links ]

Kesting, A., Treiber, M., & Helbing, D. (2009). Agents for traffic simulation. In A. Uhrmacher, & D. Weyns (Eds.), Multi-agent systems: Simulation and applications (pp. 325-356). CRC Press. Retrieved from http://arxiv.org/abs/0805.0300.         [ Links ]

Klügl, F., & Bazzan, A. L. C. (2004). Route decision behaviour in a commuting scenario: Simple heuristics adaptation and effect of traffic forecast. Journal of Artificial Societies and Social Simulation, 7. Retrieved from http://jasss.soc.surrey.ac.uk/7/1/1.html.         [ Links ]

Luce, R. D. (1999). Where is mathematical modeling in psychology headed? Theory & Psychology, 9, 723 -737.         [ Links ]

Nikolai, C., & Madey, G. (2009). Tools of the trade: A survey of various agent based modeling platforms. Journal of Artificial Societies and Social Simulation, 12.         [ Links ]

Olejnik, S., & Algina, J. (2000). Measures of effect size for comparative studies: Applications, interpretations, and limitations. Contemporary Educational Psychology, 25, 241-286.         [ Links ]

Olejnik, S., &Algina, J. (2003). Generalized eta and omega squared statistics: Measures of effect size for some common research designs. Psychological Methods, 8, 434-447.         [ Links ]

Sayago, S. (2014). The construction of qualitative and quantitative data using discourse analysis as a research technique. Quality & Quantity, 49, 727-737. http://dx.doi.org/10.1007/s1113501400200.         [ Links ]

Smith, E. R., & Conrey, F. R. (2007). Agent based modeling: A new approach for theory building in social psychology. Personality and Social Psychology Review, 11 , 87 104. http://dx.doi.org/10.1177/1088868306294789.         [ Links ]

Thorngate, W., & Edmonds, B. (2013). Measuring simulation-observation fit: An introduction to ordinal pattern analysis. Journal of Artificial Societies and Social Simulation, 16. http://jasss.soc.surrey.ac.uk/16/2/4.html.         [ Links ]

Troitzsch, K. G. (2009). Multi-agent systems and simulation: a survey from an application perspective. In A. M. Uhrmacher, & D. Weyns (Eds.), Multi-Agent Systems: Simulation and Applications (pp. 53-76). Boca Raton, Fl, USA: Crc Press.         [ Links ]

Troitzsch, K. G. (2014). Analysing simulation results statistically: Does significance matter? In D. F.Adamatti, G. Pereira Dimuro, & H. Coelho (Eds.), Interdisciplinary applications of agent-based social simulation and modeling (pp. 88-105). IGI Global.         [ Links ]

Wilkinson, L., & The Task Force on Statistical Inference. (1999). Statistical methods in psychology journals: Guidelines and explanations. American Psychologist, 54, 594-604.

Wilensky, U., & Rand, W. (2015). An introduction to agent-based modeling: Modeling natural, social, and engineered complex systems with NetLogo. MIT Press.         [ Links ]

Windrum, P., Fagiolo, G., & Moneta, A. (2007). Empirical validation of agent-based models: Alternatives and prospects. Journal of Artificial Societies and Social Simulation, 10.         [ Links ]

Wooldridge, M., & Jennings, N. R. (1995). Intelligent agents: Theory and practice. The Knowledge Engineering Review, 10, 115-152.         [ Links ]

Creative Commons License All the contents of this journal, except where otherwise noted, is licensed under a Creative Commons Attribution License