We propose to teach AI to children so that they, too, can think more concretely about mental processes.
-- Seymour Papert (Papert 1980)
The computer is a new medium for thought and expression, radically different from traditional media in its dynamism, interactivity, and flexibility. A universal device, the computer can be used to create dynamic interactive models of any conceivable process, mathematical, biological, or wholly imaginary. If we learn the world by constructing it, now we have at hand a medium that enables world-building as an everyday learning activity. Theories about how the world works--say, the laws of physics, or the behavioral patterns of animals--will no longer be mere dry abstractions but instead form the basis for concrete, visible simulations that can be observed, tinkered with, and inhabited. Computational environments that permit this sort of activity ought to be extraordinarily powerful mental tools, with the potential to transform how we think and learn.
But expressing ideas in this new medium is difficult, and its potential as a learning tool still largely unrealized. The fundamental skill needed to express dynamic ideas in the interactive medium is programming--the ability to tell the computer what to do and how to do it. What you can express (and, more subtly, what you can conceive of wanting to express) depends upon the tools available. The problem is that current programming tools are rather limited in what they offer in the way of expressive capabilities. While the computer can be made to do just about anything, given enough time and expertise, what can be done readily depends upon the languages and tools offered by the programming environment. This is especially true for young or novice programmers, who have a limited ability to build up their own abstractions and tools, and so must depend on those that the environment already supplies.
Computers were first developed to solve mathematical problems and still bear the marks of their history. Certain modes of thought and ways of structuring activity are woven into the way we think about computers, modes which are not necessarily the only or best ways of coming to grips with the potential of this new domain. The name "computer" itself reflects this--computation is only a part of what computers do now, and they might better be called "information manipulators" or "dynamic media machines". Indeed, at the consumer level, this is what computers have become. People are now accustomed to devices that while labeled computers are really video games or virtual reality engines or simulations of cities.
But programming, which is the only level of use in which the full power of computation as an intellectual tool can be realized, is still centered around traditional models of computation. At this level, a computer is seen as a device for performing mathematical calculations, or executing a sequence of rote operations--not as a dynamic world in which lifelike activity can take place. While the computer itself has gone through radical transformations as it penetrates into society at large, the languages, tools, and concepts used to program them have stayed pretty much the same.
As a result, a young programmer who might imagine building a dynamic world of interacting objects (say, a video game or a simulation of an ant colony), will be faced with numerous obstacles that stand in the way of bringing the vision into reality. Some of these will be inherent in the complexity of the task, and may not be possible to eliminate, but others will be due to the lack of proper expressive tools. For instance, few extant programming environments for novices support even so basic a facility as the ability to create multiple graphic objects that can move simultaneously and independently while interacting with each other. More fundamentally, the languages that the environments provide are often not suited to such tasks, because they rely on models of computation that are not particularly suited to the control of dynamic behavior.
I have coined the term "animate system" to describe these sorts of dynamic worlds that involve multiple active and interactive objects. Animate systems are simulated dynamic worlds that contain multiple independent but interacting graphic actors. I chose the term because its connotations include animals, animation, and the mind or soul (or anima). This thesis describes a search for a programming paradigm suitable to the control of behavior in animate systems.
The languages used for programming are defined, enabled, and limited by their underlying models and metaphors. While computer science strives towards formal definitions of its subject matter, the practical task of understanding computational entities relies on the informal technique of borrowing terminology and structure from more familiar domains via metaphoric mappings. Metaphorically-structured models are so pervasive that sometimes they are hard to see. Consider the notion of a computational "object", an understanding of some structure inside the computer that relies, in subtle ways, upon our existing knowledge of physical objects. Two examples of more obvious metaphors are the program-as-a-recipe metaphor that is often used to convey to beginning programmers the idea that the computer is following a sequential list of instructions, and the spreadsheet metaphor that allows business people to fit a form of functional programming into a familiar medium. These metaphors provide powerful frameworks for the understanding and construction of complex systems.
Unfortunately, many if not most real-world tasks do not easily fit into the conceptual frameworks supplied by these common metaphors. This is true both for the tasks faced by professional programmers (who more often than not are faced with the task of designing a program that will function as part of a larger mechanical system, and thus must spend most of its time reacting to and controlling events in a world outside the formal domain of the programming language) and the programs that children would like to create if only they could (for instance, video games with interacting objects). Few languages make tasks like these easy, because the most important aspects of the task--such as multiple autonomous objects, reactivity, and goal-directed behavior--have no direct representation in the underlying metaphor. This is not to say that such systems cannot be built using existing tools, only that building them requires a good deal of mental contortion that may be beyond the abilities of novice programmers.
So we seek new models and metaphors for computation that can enable novice programmers to build dynamic models of behavior. If our interest is in supporting animate systems, the thought that the programs to build such systems can be based on metaphors of life and motion is particularly attractive. Anthropomorphic metaphors are used for teaching novices how to visualize the operation of a computer, and they are common in the informal discourse of programmers. But such usages are restricted to the margins of the field, and are considered somewhat disreputable. Is it possible or desirable to bring the metaphor of a program as a living thing back into the foreground, and to make greater use of it? What qualities of programming will change if we try to look at it in animate terms?
There are many aspects of the animate domain that can be usefully mapped onto computational activity. The human ability to sequentially follow simple instructions was used as the basis for the Turing's theoretical machine. More recently, the object-oriented programming paradigm makes use of the metaphor of "message-passing" as the basis for structuring the activity of programs that are divided up into a collection of communicating objects. As we shall see, a degree of animism, explicit or implicit, is present in almost all ways of organizing computational activity.
Agent-based programming is my term for programming languages and environments that are explicitly grounded in animate metaphors. An agent, as we shall use the term, is any component of a program or system that is designed to be seen as animate. The term "agent" suggests a variety of attributes that have not generally been built into the underlying metaphors of programming; attributes such as purposefulness, autonomy, and the ability to react to outside stimuli. In other words, agent-based programming builds upon and extends the implicit animism of computation. Instead of the standard metaphor of the computer as an animate yet mechanical instruction follower, we substitute the metaphor of the agent that can initiate action autonomously in order to achieve a goal. Collections of agents work together to create complex behavior. The general idea of an agent as a component of a larger system is inspired by Marvin Minsky's Society of Mind theory (Minsky 1987), although the purposes to which agent-based programming puts them is different.
Thinking of program components in animate terms suggests a variety of new techniques for describing program activity to a user. If an agent has an explicit goal, the state of the agent can now be made available to the user in a meaningful way, through anthropomorphic interfaces. Goals and satisfaction provide the conceptual tools for thinking about inter-agent conflict, an important issue in a system with distributed control. A world of autonomous agents pursuing goals and coming into conflict with one another suggests that program activity can be represented in the form of narrative, which traditionally deals with motivated actors, their efforts to realize their goals, and their successes, failures, and conflicts.
Agent-based programming is an attempt to design tools and find new conceptual foundations for programming that are more suitable to the task of constructing animate systems. Programming has been said to provide us with an entirely new way of thinking, sometimes called procedural epistemology--"the structure of knowledge from an imperative point of view" (Abelson and Sussman 1985). One goal of this thesis is to provide a friendly critique of the existing forms of procedural epistemology, and an attempt to improve upon them. Call it an investigation into animate epistemology--an examination of the way we think about the animate world, how computation makes use of this way of thinking, how it fails to, and how it might do better.