© Copyright JASSS
Alexander Repenning, Andri Ioannidou and John Zola (2000)
AgentSheets: End-User Programmable Simulations
Journal of Artificial Societies and Social Simulation
vol. 3, no. 3,
To cite articles published in the Journal of Artificial Societies and Social Simulation, please reference the above information and include paragraph numbers if necessary
Simulations conceptualized as black boxes offer only limited insight to the general public. Without the ability to open up existing simulations or, more ambitiously, to build one's own simulations the true value of simulations remains only accessible to the scientifically-minded members of society possessing programming skills. End-user programming can significantly enhance the value of simulations by allowing users without traditional programming skills to engage in complex issues through the creation of their own simulations. AgentSheets is an agent-based simulation-authoring tool for end-users. This article provides a brief overview of the AgentSheets environment and illustrates the concept of end-user programming by showing how kids build their own social simulations.
Agent-based simulations, end-user programming, graphical rewrite rules, programming by demonstration, Java, component-based programming
- End-user programmable simulations reach out to a wide audience of computer users interested in exploring complex issues. We assume that no point needs to be made to the JASSS audience about the general value of simulations. However, the supposition behind AgentSheets is that the usefulness of simulation authoring is not limited to the traditional simulation builder target group primarily comprised of professional scientists. As a society we live in a highly complex world. The need to communicate effectively how things work is increasing and new media such as end-user programmable simulations can help us to not only comprehend complex causality but also to communicate our understanding. A particularly exciting application domain for these kinds of simulations is education. In the context of education, simulations become tools to express, communicate, and evaluate ideas. More importantly, the general appreciation of simulations and the understanding of simulation principles (what makes a good/bad simulation) could become a new cognitive thinking tool.
- The idea of simulations as thinking tools is challenged by (a) the complexity of simulation-authoring mechanisms and (b) the lack of simulation literacy. The perceived value of simulations is only gradually entering the awareness of the information society through simulation games such as SimCityTM or the more recent SimsTM. The complexity of simulation authoring requires radically new programming paradigms. End-user programming has many flavors and is still a relatively new research field of computer science. However, what most of the end-user programming approaches have in common is that they recognize that the end-user programmer is typically not intrinsically interested in programming or in some case may flatly reject the usefulness of programming. Consequently, end-user programming needs to be much more concerned with the specific goals of end-users instead of enabling general-purpose programming.
- In the following sections we briefly describe the origins of AgentSheets, describe some of the different end-user programming concepts explored over time and illustrate how end-user programming is used to connect simulations to other information components, including the web.
History of AgentSheets
- AgentSheets (Repenning, Ioannidou, & Ambach, 1998a; Repenning & Sumner, 1995) initially grew out of the idea of building a new kind of computational media that allows casual computer users to build highly parallel and interactive simulations, replacing simple numbers and strings of spreadsheets with behaving agents. An agentsheet is a grid-structured container of interacting agents represented as icons (Figure 1 left).
- An early prototype built in 1988 was created in *Lisp running on Connection machines (highly parallel computers with up to 65536 CPUs and 12-dimensional hypercube communication topology). Building the prototype revealed three main problems. The programming tools available at the time proved to be intricate and not suited for computer end-users. The architecture of the Connection machine, Single Instruction Multiple Data (SIMD), was a mismatch for heterogeneous AgentSheets applications in which there typically were many different kinds of agents. Finally, it was hard to build interactive simulations with rich GUI-based interaction between the users and the running simulation. For these reasons, the next generation of AgentSheets was built on a radically different platform - the Macintosh.
- The main challenge of designing an interactive simulation-authoring tool is to find the right kind of end-user programming paradigm. In 1991, the Lisp-based textual programming language called AgenTalk was replaced with a completely new programming approach combining graphical rewrite rules with agents and programming by example (Figure 1). Using graphical rewrite rules, users can define behaviors simply by manipulating agents, e.g. by moving them and in the process of doing so creating before and after pictures. Apple Computer became very interested in these kinds of programming approaches resulting in collaboration for commercialization. Starting in 1993, an array of AgentSheets versions got implemented in experimental new programming environments, including the ill-fated SK8, later ScriptX and finally Java. AgentSheets served as precursor for the children's programming environment called KidSim (Smith, Cypher, & Spohrer, 1994) (later Cocoa).
Figure 1. Programming a train to follow a train track by example in AgentSheets. When a user moves a train on a train track in the worksheet (left) AgentSheets records the movement including context and represents it as graphical rewrite rule (right).
- The idea of graphical rewrite rules used in AgentSheets91 proved to be highly usable in the sense that even young children could very quickly and without any previous programming background create simple animations. However, the graphical rewrite rules were not sufficiently powerful to create more realistic simulations and sophisticated games, especially when compared with the earlier text-based AgenTalk programming language of AgentSheets. In 1995, the desire to achieve a better balance between language usability and expressiveness resulted in the implementation of Visual AgenTalk, a completely different programming approach called Tactile Programming described in this article.
- AgentSheets research continues and is currently exploring extremely high level programming concepts including Programming by Analogous Examples(Repenning & Perrone, 2000). In Programming by Analogous Examples, users create new behaviors by defining analogical relationships between agents (Figure 2).
Figure 2. Transferring the relationship between objects. The behavior of a car agent driving on a road can be expressed as an analogy to how trains interact with train tracks.
- AgentSheets is a commercial product. A free demo version can be downloaded from http://www.agentsheets.com. The Macintosh version of AgentSheets includes the Ristretto Java generator (Repenning & Ioannidou, 1997) allowing users to instantly publish simulations as Java applets and JavaBeans. The Windows/Linux version of AgentSheets is currently in alpha.
- AgentSheets' main programming language, called Visual AgenTalk (VAT), is a rule-based language allowing users to express agent behavior as IF-THEN rules containing conditions and actions. The VAT language is extensible. New conditions and actions can be added to the language to build more domain-oriented programming languages. For a step-by-step tutorial on building an AgentSheets simulation from scratch, refer to the Learning Technology Review article on building the Virus Attack simulation.
Figure 3. Agent behavior is expressed as rules aggregated into methods. The first method of the Traffic Light ("While Running") is called each simulation tick but only every 3 seconds will it call a second method called "switch". In the "switch" method, the Traffic Light agent will cycle through its 3 main states: Red, Yellow and Green.
- Visual AgenTalk enables Tactile Programming (Repenning & Ambach, 1996). As an extension to visual programming paradigms, Tactile Programming is not just concerned about readability of program representation but is concerned about the interactivity of program representation. On the one hand, since they are threaded as objects, program fragments can be manipulated through drag and drop operations to compose behaviors. On the other hand, however, program fragments enable many more operations that help end-user programmers to explore and test agent behaviors. For instance, conditions, actions and even rules and methods can at any point in time be dragged to any agent in the agentsheet to test if a certain condition is true or to understand the consequences of executing a specific action. Moreover, the "Explain" button (at the bottom of the Behavior editor, Figure 3), once pressed, uses a combination of animation and speech to explain what conditions and actions with all their parameters do. Tactile Programming is geared towards a bottom-up programming style in which users gradually explore new programming primitives, learn about these primitives through their use, and build complete behaviors incrementally. Tactile Programming is hard to explain in the context of this static article but the reader is invited to experience it first-hand by downloading free demos of AgentSheets.
- The built-in repertoire of conditions and actions allows agents to perceive mouse clicks, sound and keyboard input, the existence of other agents, attribute values, messages, and even web page content. Agents can be programmed to act by moving, changing their appearance, playing sounds, playing video clips, computing values, "speaking" text through voice synthesis, sending messages to other agents, opening URLs and performing several other actions.
Figure 4. Agents Perceive and Act
- Visual AgenTalk enables a wide range of applications and through the use of tailorable languages also includes a diverse set of users ranging from elementary school kids to professional scientists.
K-12 Education: Elementary School
Collaborative Learning: Students learn about life sciences topics such as food webs and ecosystems by designing their own animals. The AgentSheets Behavior Exchange is used to facilitate collaborate animal design. Groups of students put their animals into shared worlds to study the fragility of their ecosystems.
|K-12 Education: High School|
Interactive Story Telling: History students create interactive stories of historical events such as the Montgomery bus boycott.
Distance Learning: With SimProzac patients can explore the relationships among Prozac, the neurotransmitter serotonin, and neurons. By playing with this simulation in their browsers, patients get a better sense of what Prozac does than by reading the cryptic description included with the drug.
Learning by visualization and modeling: The effects of microgravity onto E.coli bacteria are modelled by NASA. This is a simulation of an experiment that was aboard the Space Shuttle with John Glenn. This simulaton requires several thousand agents.
Learning through simulation use: This simple voting simulation explains concepts such as clustering, migration and stability of two party systems. Can it predict the outcome of the election in 2000?
Learning through design: Even if the finished simulation/game is not directly related to educational goals, the process of building the simulation may be very educational. The Ultimate Pacman is a complete game based on complex Artificial Intelligence algorithms and the non-trivial math of diffusion processes.
How does a TV work? This simulation illustrates how a picture is scanned in by a camera (left), transmitted to a TV set and converted back in to a picture (right). Users can paint their own pictures and play with TV signal processing parameters.
Learning by taking apart: What makes a bridge stable? The goal presented to the users of this simulation is to remove as many elements of the bridge as possible without making the bridge collapse. A number of connected issues are revealed including forces, architecture, and geometric perspective. This simulation was featured on the PBS Mathline.
Agents connect to the world
- An important aspect of AgentSheets is that most simulations become more interesting when connected to the world. Mechanisms in support of this connection include:
HTTP and TCP/IP
- AgentSheets simulations can directly read and parse existing web pages for numerical information.
Figure 5. Agents positioned on a map of Boulder Colorado access weather information data in real time from weather web pages. The temperature is plotted and announced periodically using speech.
- Ristretto, the AgentSheets Java generator technology, can render simulation properties (also called global simulation variables) into JavaBean properties. Using tools such as BeanBox or Jbuilder, simulation beans can be combined with other JavaBeans into complete applications with complex interfaces (Repenning, Ioannidou, & Phillips, 1999).
Figure 6. An AgentSheets virus simulation bean is connected to a SimCalc Charting bean to plot the number of infected people over time.
- Agent attributes and simulation properties can be piped into Microsoft Excel Workbooks from which they can be represented as all kinds of plots.
Figure 7. Classical oscillation patterns become apparent, using MS Excel to plot predator and prey population over time.
AppleScript and Apple Events
- A currently limited set of AppleEvents can be used to control AgentSheets simulations from other applications. For instance the FileMaker database application can run AgentSheets simulations and record simulation data into a database for further analysis.
AgentSheets in the classroom
- Epstein and Axtell (Epstein & Axtell, 1996) claim that
the social sciences are hard [..] because certain kinds of controlled experimentation are hard. In particular, it is difficult to test hypotheses concerning the relationship of individual behaviors to macroscopic regularities [..]. How does the heterogeneous microworld of individual behaviors generate the global macroscopic regularities of the society?
Interactive simulations are well suited for exploring social phenomena in ways that are not possible to experiment with in the real world. Social scientists and Distributed Artificial Intelligence researchers use a variety of agent-based software such as Sugarscape (Epstein & Axtell, 1996) and SWARM (Terna, 1998) for modeling social phenomena, but these systems are rarely, if at all, used in K-12 social studies classrooms.
- Whereas simulation technologies have been successfully used in math and science classes (Rader, Cherry, Brand, Repenning, & Lewis, 1998), the same is not true for social studies classes. The fact that social processes are often more complex and therefore more difficult to simulate than physical phenomena and that social studies teachers do not see a connection between their subject and simulation technology may be part of the explanation. However, using end-user programmable simulations in social studies classes can both support and enhance the learning experience. The combination of social studies content with simulation technology can be enticing and effective as well as an alternative way for students to explore topics relevant to the class.
- AgentSheets is a tool that can be used to create educational simulations not only in the math and science realm, but also in the social studies realm. It has been used both in the context of extra-curricular activities, such as Friday-afternoon computer clubs, and as part of the curriculum. In elementary school science classes, students use AgentSheets to explore issues of ecosystem sustainability and food webs by designing and building their own animal and then incorporating it in an ecosystem populated with animals created by classmates (Cherry, et al., 1999). In the context of the ESCOT project, middle school math students use AgentSheets to learn about the derivation of the mathematical constant (p) using experimental probabilities and other related concepts of probability (Roschelle, DiGiano, Koutlis, Repenning, Phillips, Jackiw, et al., 1999). In a completely different setting, in high school history classes, students build simulations of historical events such as the Grape Boycott and social processes such as protest marches and the impact of the automobile on 20th century America (Cherry, et al., 1999; Ioannidou, Repenning, & Zola, 1998).
- One of the authors, a social studies teacher at New Vista High School, interested in exploring what can be done with simulations in the social studies context, worked with AgentSheets researchers and developers to bring the power of simulations to his history classes. In this context, students, teacher, and researchers work in synergy to brainstorm good mappings of their existing knowledge of the topic to a computer simulation. This synergy is important since complex design problems, such as creating these social simulations, require more knowledge than any single person can possess. Students learn a lot about the content and teachers know a lot about educational content and methods, but often know very little about technology. On the other hand, technology developers know a lot about technology, but less about the content. In isolation, each party has a difficult time envisioning what an educationally valuable social studies simulation might look like, but working together compensates for this.
Figure 8. The Grape Boycott project web page includes descriptions of the agents, historical background and related links, and a simulation applet.
- AgentSheets simulations and web pages are developed by students without extensive computer skills and demonstrate the depth of understanding that is necessary to simulate historical events. In the "Protest and Reform" class, which takes topics such as the American Revolution, abolition, suffrage, and the social movements of the 1960s and examines them as protest movements and efforts at social or political reform, students build their own AgentSheets simulations to explore and present subjects such as:
- The California Grape Boycott led by Cesar Chavez (Figure 8)
- Protest Marches and how they evolve when violent and non-violent protesters come in contact with the police
- The Kent State demonstrations
- The Ludlow Mine Massacre
- The Montgomery Bus Boycott which started with Rosa Parks' refusal to give up her seat to a white passenger
- The Flint, Michigan Sit-down Strike
- In the 20th Century Social History class students built simulations to explore issues such as:
- The impact of the automobile on city growth, the economy and the environment of 20th century America
- The growth of suburbs
Students building simulations
- Students in the high school history classes mentioned above build complex simulations using advanced concepts such as hill climbing and diffusion. For example, the students building the suburban growth simulation used Artificial Intelligence search techniques such as Hill Climbing to attract the developers from the city to the sparsely developed city outskirts. Moreover, students used diffusion to represent the spread of ideas, such as the influence of Cesar Chavez on consumers to boycott grapes in the Grape Boycott simulation or the pollution in the Impact of the Automobile simulation. The students in this case used diffusion to calculate and display pollution originating from cars and factories. Figure 9 (left) shows an overview of the automobile simulation with cars driving around in the city and the houses showing the pollution. Figure 9 (right) shows the part of the House agent's behavior that computes pollution using a diffusion equation
Pollution = (pollution[left]+pollution[right]+pollution[up]+pollution[down])/4
Using the Set action, the pollution is therefore set to the average of the pollution of the things around the house. Then, the behavior uses the Map action to colorize the pollution in a specified color range to make it appear as if there is a cloud hanging over the house.
Figure 9. The Impact of the Automobile simulation (left) and part of the behavior of the House agent that computes and visualizes the pollution at that spot (right).
Educational outcomes of using and building simulations
- Enabling students to simulate complex social studies content can serve powerful learning and motivational goals. In the New Vista case, students who had not been interested in computers or social studies combined the two to create significant projects. As Claire, one of the students who created the Grape Boycott project, put it:
I don't get into technology, I don't get into history, but I like the combination of the two! Moreover, the teacher has used the products created by students as teaching tools. The combination of simulation development and web page authoring is a powerful one. The content needed to create the simulation provides the foundation for the web page; and the web page provides a rich context within which to embed the simulation. Together, students create powerful demonstrations of their understanding of social studies content and processes.
Simulations as learning tools
- Building a simulation requires students to learn about the history behind the simulated subject at a level of understanding well beyond that of typical high school projects. Students do not have the option of mindless cutting and pasting information as they sometimes do when creating a posterboard or writing a report. To create a simulation, students must form a deep understanding of the underlying principles of the topic. They must decide which aspects of a phenomenon or scenario are most significant and worth simulating. After discarding the less significant details, students must choose representations for the simulation agents and decide on rules which represent the behavior of individual actors as well as the relationships among actors. All these tasks demand significant intellectual effort by students.. Moreover, the process of building the simulation, running it and observing the consequences often leads to new questions. When the Grape Boycott students programmed the workers to get angry and refuse to work, the result was confusing. What really happened? How could there be grapes in the market when the workers were on strike? To answer these questions, the students went back to historical sources. They learned that when the Mexican and Filipino workers went on strike, farmers hired undocumented immigrant workers. The students added information to their simulation in order to reflect this new piece of knowledge. In this case, building the simulation provided a focus for group discussion which pushed the students' ideas beyond their initial conceptions.
Simulations as teaching tools
- It is an old maxim of teaching that to really learn something you have to teach it. When students have the responsibility of transferring their understanding of content to others, they realize that this task demands a far deeper level of understanding than what might be needed to complete an essay or multiple choice test. Students using AgentSheets in the history classes were encouraged to think of their projects as teaching tools for the next generation of students.
- To accompany their simulations, the students also created web pages with historical information about their subject and links to related web sites. These web pages provide a critical connection between the course content and the simulation technology - a simulation consisting of brightly colored icons moving on a screen does not convey much meaning to its intended audience unless the creators of the simulation situate it in an informative context.
- By embedding their simulations in a web page, students not only provided a context for greater understanding of their topic, but also created an external audience, beyond the teacher and fellow classmates. A physical posterboard has a limited audience, whereas a simulation applet on the web can have a much wider audience and this helps raise the standards for the final project. What we did not anticipate was the postitve impact the notion of a web audience would have on the students' motivation.
- By using simulations that other people built, students discovered that a high degree of interactivity and the ability to manipulate features of the simulation to examine different elements and "what if" scenarios, is important when using simulations for teaching. The greater the degree of interactivity, the greater the interest of the user and the greater the usefulness as a teaching tool.
Simulations as collaboration-enabling tools
- Collaboration is an important aspect of simulation building in classrooms since it allows a group of students to create a more complete project than any individual could have produced alone. Initially intimidated by the computer, students found the task of creating a simulation less daunting when they all worked together, sharing ideas and helping each other out with the programming. The dual tasks of creating the web site and building the simulation allowed members of the group to distribute the workload among themselves according to their individual interests. At the same time, communication among the group members working on the different tasks needed to be maintained, for the group to produce a coherent final artifact.
Figure 10. The Sustainopolis agents on the Behavior Exchange, such as cars, buildings and streets were reused by students building the simulations.
- Students can collaborate not only among the group, but also via the Behavior Exchange (Figure 10), a web-based repository used by AgentSheets users to exchange agents. Students used the Behavior Exchange (Repenning, Ioannidou, Rausch, & Phillips, 1998b) to locate useful agents that they could then reuse as-is or customize looks and/or behavior to fit their specific purposes. While building simulations is a useful pedagogical activity with high gains for the builders, building them from scratch is a difficult task. Having a base to start with, such as the example agents found in the Behavior Exchange, is a great instrument for scaffolding the simulation building process. Scaffolding in this context is a process enabling students to go through a smooth transition from using existing simulation agents to designing their own.
The research was supported by the National Science Foundation under grants No. DMI-9761360, RED 925-3425, and Supplement to RED 925-3425. AgentSheets research and AgentSheets Inc. are supported by the National Science Foundation ( REC 9804930, REC-9631396, CDA-940860).
CHERRY , Gina, Andri Ioannidou, Cyndi Rader, Cathy Brand, & Repenning, A. (1999). Simulations for Lifelong Learning. In National Educational Computing Conference, NECC '99, . Atlantic City, NJ:.
EPSTEIN, J. M., & Axtell, R. (1996). Growing Artificial Societies. Cambridge, MA: MIT Press.
IOANNIDOU, A., Repenning, A., & Zola, J. (1998). Posterboards or Java Applets? In A. Bruckman, M. Guzdial, J. Kolodner, & A. Ram (Ed.), International Conference of the Learning Sciences 1998, (pp. 152-159). Atlanta, GA: Association of the Advancement of Computing in Education.
RADER, C., Cherry, G., Brand, C., Repenning, A., & Lewis, C. (1998). Designing Mixed Textual and Iconic Programming Languages for Novice Users. In Proceedings of the 1998 IEEE Symposium of Visual Languages, (pp. 187-194). Nova Scotia, Canada: Computer Society.
REPENNING, A., & Ambach, J. (1996). Tactile Programming: A Unified Manipulation Paradigm Supporting Program Comprehension, Composition and Sharing. In Proceedings of the 1996 IEEE Symposium of Visual Languages, (pp. 102-109). Boulder, CO: Computer Society.
REPENNING, A., & Ioannidou, A. (1997). Behavior Processors: Layers between End-Users and Java Virtual Machines. In Proceedings of the 1997 IEEE Symposium of Visual Languages, (pp. 402-409). Capri, Italy: Computer Society.
REPENNING, A., Ioannidou, A., & Ambach, J. (1998a). Learn to Communicate and Communicate to Learn. Journal of Interactive Media in Education, http://www-jime.open.ac.uk/98/7, 98(7).
REPENNING, A., Ioannidou, A., & Phillips, J. (1999). Building a Simulation of the Spread of a Virus. Learning Technology Review(Fall 1999/Winter 2000), 56-72.
REPENNING, A., Ioannidou, A., Rausch, M., & Phillips, J. (1998b). Using Agents as a Currency of Exchange between End-Users. In Proceedings of the WebNET 98 World Conference of the WW, Internet, and Intranet, (pp. 762-767). Orlando, FL: Association for the Advancement of Computing in Education.
REPENNING, A., & Perrone, C. (2000). Programming by Analogous Examples. Communications of the ACM, 43(3), 90-97.
REPENNING, A., & Sumner, T. (1995). Agentsheets: A Medium for Creating Domain-Oriented Visual Languages. IEEE Computer, 28(3), 17-25.
ROSCHELLE, J., DiGiano, C., Koutlis, M., Repenning, A., Phillips, J., Jackiw, N., & Suthers, D. (1999). Developing Educational Software Components. IEEE Computer, 32(9), 50-58.
SMITH, D. C., Cypher, A., & Spohrer, J. (1994). KidSim: Programming Agents Without a Programming Language. Communications of the ACM, 37(7), 54-68.
TERNA, P. (1998). Simulation Tools for Social Scientists: Building Agent Based Models with SWARM. Journal of Artificial Societies and Social Simulation, 1(2), https://www.jasss.org/1/2/4.html.
Return to Contents of this issue
© Copyright Journal of Artificial Societies and Social Simulation, 1998