Note: this is a reproduction of an article that originally appeared on the University of Vienna site in 1995 but which has since disappeared.

It appears with the permission of one of its authors, Johann Mitlöhner.

Note also that some of the formulae may not be reproduced correctly, as I had a hard time reading them (see the embedded scans for examples of what I was up against!).


Developing a Virtual Reality for the Simulation of Agent Based Economic Models

T. Grimm/Department of Applied Economics
J. Mitlöhner/Department of Applied Computer Science
Vienna University of Economics and Business Administration


We investigate into the possibilities of modelling artificial economic life by use of the MUD (multi user domain) framework. In the virtual world provided by the MUD, actors are controlled by human user input, or by programs. Users connect to the virtual reality via Telnet. This makes it possible to distribute the simulation of the virtual reality and of the actors among several hosts. For the simulation of economic agents we describe two approaches, the steepest ascend optimization and a more "human- like" decision algorithm using the concept of bounded rationality.

Keywords: artificial economic life, multi user domain, virtual worlds, distributed simulation, agent-based simulation, bounded rationality.


Conventional simulations start from a set of equations to derive statements about cause-effect relationships. However, finding all relevant relationships in complex dynamic environments is a nontrivial task, therefore, these models often state very strong assumptions which limit their plausibility and usefulness in explaining real economic phenomena. Furthermore, it is unlikely that all economic agents follow the same principles of behaviour, as assumed in most such models. To avoid these deficiencies, we base our simulation on the economic behaviour of single agents. We thereby do not need to identify all cause-event relationships in advance, since they are expected to arise from the interplay of the individual actors.

Note that we do not intend to optimize the solution of economic problems, but to optimize the simulation of economic problem solving by humans. We will borrow ideas from a relatively new discipline called artificial life which proved very successful in realistic simulations of primitive organisms:

"Artificial life is the study of man-made systems that exhibit behaviours characteristic of natural living systems. It complements the traditional biological sciences with the analysis of living organism by attempting to synthesize life-like behaviour within computers and other artificial media." [p. 1] Langton89a

Extending this view to economic phenomena, we plan to exploit the reservoir of methods of this approach for the generation of artificial life, since:

"Artificial life is concerned with generating lifelike behaviour. Thus, it focuses on the problem of creating behaviour generators. A good place to start is to identify the mechanisms by which behaviour is generated and controlled in natural systems, and to recreate this mechanisms in artificial systems." [p. 5]Langton89a

Having identified the mechanisms by which behaviour is generated and controlled in natural systems (economic actors, in our case), we can then proceed to engineer artificial devices that reproduce behaviour observed in human and organisational economic agents.

Design of an economic virtual world

In this section, we will describe what we stated as necessary for our simulation environment to provide. we proceed to show that the MUDs frequently found on the Internet as text-based adventure games hold the potential to offer the features we require, if augmented by some special procedures, which we describe at the end of the section.


As we introduce an artificial economic life environment, basic concepts of real life should be contained in the simulation. We require:

The perfect solution to the requirements stated above seemed to be to use one of the many MUD systems, whose source code are available on the Internet, and to rewrite only those parts necessary for economic actions.

Virtual reality and MUDs

Technically speaking, the term virtual reality is most commonly used to refer to systems that offer users visual, auditory and tactile information about an environment which exists as data in a computer system rather than as physical objects and locations [8]. MUDs are technically much simpler: they are networked, multi-participant, user-extensible systems which are most commonly found on the Internet, the international network that connects many thousands of educational, research and commercial institutions. Using a MUD does not require any of the paraphernalia commonly associated with virtual reality. There is no special hardware to sense the position and orientation of the user's real-world body, and no special clothes allowing users to see the virtual world through goggles and touch it through " datagloves". The MUD interface is entirely textual; all commands are typed in by the user and all feedback is displayed as text on a monitor. Any networked PC or terminal can act as a gateway into this kind of virtual world. A typical output would be:

You are standing at the end of a road before a small building. Around you is a forest. A small stream flows out of the building and down a gully. There is an apple beneath a tree next to the stream.

Instead of using sophisticated tools to see, touch and hear the virtual environment, users of MUD systems are presented with textual descriptions of virtual locations. A MUD consists of a database of "rooms", "exits", and other objects. The program accepts connections from users on a computer network, and provides each user with access to that database. There are many hundreds of MUD programs running on the Internet, each with its own unique database of descriptions of localities and objects. Within each of these systems users can interact with each other and with the virtual environment which the MUD presents to them.

The Internet MUD player community can serve us as a very rich supply of people who are willing to spend many hours playing and thereby (among other things) supplying vast amounts of significant data on economic decisions, provided that:

Users connect to the MUD with the Telnet program, which is available on practically all computer platforms; after identification by user id and password, the game begins to send messages from the virtual world and waits for commands typed in by the user. A line of input (usually not more than one or two words) is processed immediately by the MUD, and the results (changes in the virtual world caused by the user action) are described.

MUD objects come in several types: rooms, things and actors. Each object has a description (a few words of text), which is displayed when a player looks at it.


can contain things, actors, and exits to other rooms. Movement is achieved by giving directions, e.g., the command west moves an actor to the room west of his current location, if there is a corresponding exit. If a player enters a room, its description is displayed.


can be taken (and dropped) by actors and have properties like weight and size associated with them. For the purpose of our simulation, we assign a class to each object, such as food,textiles. Certain actions (like eating) can then be associated with classes of things, rather than with individual things.


can move through the network of rooms, take or drop things, or use them for some purpose, like eating food, or wearing clothes.

Economic MUD features

In addition to the basic object manipulation and communication functions, we provide the following commands as the minimum necessary for simple economic transactions.

Starting a deal:

An economic transaction is defined as the transfer of property rights. In the current implementation, property rights are modelled by the parent-relation. If an actor takes a thing, its parent-relation is set to the actor, which means that the actor becomes the owner.

Once an actor has accumulated (found, produced, bought) objects which can be sold, a deal may be started. The deal command has three arguments: partner, action (sell or buy), object. When a deal is issued, a contract is created, which contains information on:


Once a contract has been initiated, the partners start to negotiate the terms. This procedure is supported by the offer command: it takes at least one argument (the partner), plus terms and corresponding values, e.g., price 5. The values are written into the corresponding contract slots. After an offer, the partner has the following possibilities:

Partners can put an unlimited number of offers and backoffers. sooner or later, an agreement will be reached, in which case one of the partners accepts. The contract will then be executed by the MUD system, using the current terms, if possible. Obstacles to contract execution could be (e.g.): lack of enough money for payment, lack of the good to be sold. In such cases, the partner conforming to the contract is notified and can update his rating of the other. These services are (at the moment) costless, except for the time necessary to process the information.

If one of the partners wants to end the chain of negotiations, he can withdraw. In this case, the contract is deleted. Currently, there is no cost associated with this.

Standardized communication:

Aside from the basic mechanisms mentioned above, and those provided by the say command of the MUD (which simply prints a line of text to everyone in the room), actors might want to employ more sophisticated communication procedures. To facilitate the design of communication interfaces, we provide a message standard composed of the following parts:

  1. addressee,
  2. message type,
  3. one or more triples of. object/property/value.

The contents of the type field and the object/property/value triples are part of the communication protocol of the actors concerned; the MUD will not reject non-conforming messages.

Distributed architecture

The MUD only provides a rudimentary environment for economic transactions. The core of the simulation is contained in the client programs that simulate economic agents; these are not part of the MUD.

Figure 1:MUD server and clients.

As Fig. 1 shows, there is no need to run the whole simulation on one host; players (humans or computer programs) connect to the MUD via Telnet, which can happen from almost any host in the Internet. This offers a great potential for computationally expensive decision algorithms, which can easily be distributed among several computers; actor simulation programs written in different programming languages can connect to the same virtual world (provided that the Telnet protocol is supported by the client); therefore, existing software can be integrated into the system.

In conventional MUDs, one Telnet connection corresponds to one (human) player in the virtual world; in order to minimize network traffic, and to avoid a Telnet-imposed upper limit on the number of actors simulated, we included in our MUD a feature which allows for the control of several actors in the virtual world via one Telnet connection (shown in fig. 1 by the split of one connection to several actors in the MUD).

Creating adaptive agents

It is the clients that control the actors; in this section we describe some possible approaches for generating "life-like" economic behaviour. Note that any program which is able to use the Telnet interface can participate in a simulation run. This is even true with other types of actor programs and human players connected at the same time. As a basic concept, we describe first a simple optimization strategy known as the method of steepest ascend. Then we introduce the more life-like concept of bounded rationality, along with an example of a straight-forward implementation.

Steepest ascend

This approach works well to optimize a function F = F(x), where x in our case is an economic variable whose value can be determined by the actor [7]. The Function F might then return some payoff associated with the value of x. To illustrate the concept, let us take the example of a producer trying to optimize his profit as a function of the price.

The producer does not know his cost function; therefore, analytical optimum finding is not possible. However, we assume that the price/retum function is of the shape shown in fig. 2, i.e., it has one maximum Rmax at the price pr which we will search by hill climbing:

Initially (trial t=0), p0 = p', delta p = 1 where p' is some start value for the price P. Then, in each trial t = 1, , T, do the following:

  1. Calculate return Rt of current price pt and the change in return delta R from previous trial t-l:
  2. Calculate price change delta p:
  3. Set the price for the next trial (the price should never drop below the minimal cost per unit, cmin):

Starting from some initial price P0, we increase P by delta p in each time step, increasing the step width delta P itself by alpha as well. The price movement continues until delta r < 0, i.e., the return has decreased. Then, the direction of the price movement is reversed, and the step width is decreased by beta: the idea is that by now a price P is found that is "near" the optimal price pr.

Note that, in a model including adaptive consumers, the price/return curve of fig. 2 is not fixed in time, but moving, therefore the producer's search for the optimal price pr will never end, since pr is moving as well.

The steepest ascend method is not guaranteed to lead to the global optimum for any given function; other strategies are more appropriate for decisions whose return functions are more complex than the price/return- function shown above. Since the algorithm represents only a small fraction of human decision finding, we turn our attention to other approaches.

Figure 2:The producer's return R as a function of price p.

Bounded rationality

The concept of bounded rationality was introduced by HERBERT SIMON as describing economic actors that are "intendedly rational, but only limited so" [9]. The more complex the situation, the stronger the limits on human decision capacity apply. Since economic decisions tend to be rather complex, we think that artificial economic life has to incorporate the concept of bounded rationality, if it is meant to be a viable model of human behaviour.

DIIETRICH [2] describes the following two aspects of bounded rationality:

Or, as SIMON put it [p. 8] Simon78a:

Although rarely mentioned, we argue that informational uncertainty is an important part of the concept, since problems of different perception, e.g., because of different experience or cultural background of actors, can be modelled.

For an initial implementation of bounded rationality, we use the approach described by BRIAN ARTHUR [1].

Adaptive agents - the Brian Arthur approach

Consider a consumer confronted with the decision of where to buy a good. There are several shops in the vicinity. Which one should be chosen? Prices and qualities are not known, but differences are assumed to be small. The expected behaviour would be that many consumers will just try some of the shops and then stick to the best of that sample, ignoring opportunities of bigger return, defined as the ratio of quality and price. However, if afterwards the shop significantly lowers the quality without also decreasing the price, consumers will leave that shop for the competitors'. The consumers will "adapt" to the new situation. The adaptation will not occur immediately: for some time, many consumers will still buy at the old shop, just because they are used to it.

Let w be the n-element weight vector of the n possible actions of the agent. Initially (at trial t=0), each weight wI is set to Cn/n, where Cn, , Cr are predefined values for the T trials (see below). Then, repeat the following at each t = 1, , T: pick a random action i, where wi/sum(wi) is the probability of the action i to be chosen. After the return of action i is known (e.g., some amount of money), that value is added to the action's weight wi, and the weights are "normalized" to sum to Ct; this is achieved by computing the current sum of weights R and then multiplying each wi by Ct/R.

Through this procedure, the returns of the chosen actions are accumulated in the corresponding weights. The values Ct determine how strong the return of the last trial will influence the weights: with large values Ct and small returns, the influence will be small and change in the weight distribution will occur slowly over time. The calibration of the Ct therefore determines the behaviour of the adaptive agents.

In a conventional simulation, the implementation of the above algorithm is straightforward; see e.g. [5]. In the MUD enviromnent things are more complex:

  1. actors are faced with several needs (e.g., hunger, thirst),
  2. most parameters depend on the experience of the actor.

Consider a typical "life" of an actor in a simulation run. At the start, he (or she, in case of female actors) is set into an unknown world. Different needs compete for satisfaction. A choice mechanism for multiple goals (choose the need to be satisfied first) is applied, e.g. as described by SIMON in [10]. The actor has to determine which possibilities exist to satisfy the current needs. Finding any source of food, water etc. will be on the agenda first. Everytime a new possibility is discovered, the corresponding nj is increased. nj is the number of possible actions for satisfying a certain need j . For each need j there is a weight vector wj for the possible actions to satisfy this need.

Whenever some need has to be satisfied, the above stated algorithm is applied and the resulting action will be executed in the MUD world. E.g., a certain food supplier will be visited. The payoff of the action is used for updating the action weights, as described above, and the result of the action is used to update the corresponding need level, e.g. decreasing hunger, thirst etc. After that, the choice mechanism for multiple goals is applied again.

So far, the approach only provides for informational complexity. To introduce informational uncertainty, we disturb the actors' sense data by a certain amount of white noise.

State of the project

We have implemented the basic economic MUD functions described above, as well as the multiple Telnet connections to allow for client/server-based distributed processing. We re- designed the database access functions found in the Internet public domain MUD code and put it into a more modular shape to allow for easier enhancements. We also improved the file format for describing and storing MUD objects and made it easier to read and write for humans, so that authoring interesting areas of the virtual world is encouraged. We are now in the process of creating a test world to implement the ARTHUR algorithm described above.

For the implementation of client control programs, we used the source code for a popular MUD client and added some experimental C code for random movement. We now plan to add the choice mechanism and the ARTHUR decision selection algorithm.

Future Work

Among the uses we envision the MUD simulation platform to serve for are the following:

Other types of client programs.

In the context of artificial life, the term genetic algorithms [4] comes to mind. Particularly, we are interested in an approach suggested by KARL SIMS [13] who develops artificial swimming and jumping creatures composed of orthogonal blocks as body and neuronal circuitry for control; physical movement is very realistically simulated in a 3-dimensional environment. The creatures are selected based on the distance travelled within a given time interval. Among other things, the representation of the creatures is based on directed graphs; we want to transpose this approach to the modelling of economic control circuitry and building blocks of economic decision rules. To facilitate the concept of generations of individuals, we plan to incorporate into the MUD system such concepts as death and birth of actors and inheritance of wealth.

Training environment for economic education.

As it is possible with the MUD interface to combine simulated actors and human players, it offers a potential for training and education. Students can enter a virtual world of economic adventure, combined with more game-like features. In this world, they will experience the results of their economic decisions in a way they are used to in real life, and not only as some figures in a table or diagram. From this we expect a high degree of student motivation.

Study of cultural differences.

Since Telnet connections in the Internet are possible around the globe, players are not restricted to the MUD computer site. The influence of cultural differences on economic behaviour can easily be studied, since players can be routed to different virtual worlds according to their computer host of origin.


  1. B. ARTHUR, Designing economic agents that act like human agents: a behavioural approach to bounded rationality, AEA Papers and Proceedings, 81 (1991).
  2. M. DIETRICH, Transaction cost economics and beyond, Routledge, London, 1994.
  3. M. EGIDI AND R. MARRIS, eds., Economics, bounded rationality and the cognitive revolution, Edward Elgar Publishing Company, 1992.
  4. D. E. GOLDBERG, Genetic algorithms in search, optimization, and machine learning, Addison-Wesley, 1989.
  5. T. GRIMM, J. MITLOHNER, AND W. SCHONFELDINGER, Bounded rationality and adaptive agents in economic modeling, APL Quote Quad, (1995). in print.
  6. C. G. LANGTON, ed., Artificial Life, Santa Fe Institute, Addison-Wesley, 1989.
  7. W. LORENZ, Gewinnmaximierung durch Versuch und Irrtum - Eine Simulation, WiStInforum, (1991).
  8. E. REID, Cultural formations in text-based virtual realities, Master's thesis, Department of English, University of Melbourne, 1994.
  9. H. SIMON, Models of man, John Wiley & Sons Inc., London, 1957.
  10. Rational choice and the structure of the environment, in Economics, bounded rationality and the cognitive revolution, M. Egidi and R. Marris, eds., Edward Elgar Publishing Company, 1992, pp. 39-54.
  11. Rationality as process and as product of thought, American Economic Review, 68 (78), pp. I- 1 6.
  12. K. SIMS, Evolving 3d morphology and behaviour by competition, in Artificial Life IV Proceedings, R. Brooks and P. Maes, eds., MIT Press, 1994, pp. 28-39.
  13. Evolving virtual creatures, in SIGGRAPH '94, Computer Graphics, Annual Conference Series, July 1994, pp. 15-22.


Elsewhere on this site:

Richard A. Bartle (
17th July, 2003.