[ Jocelyn Ireson-Paine's Home Page | Free software | Publications ]

Traveller - a computerised buying and selling game

Some readers may have seen a posting on econ-business-educators for May 26th 2003 in which I offered a computerised trading game. The game, Traveller, was originally developed for teaching artificial intelligence, but I think it also has lots of potential for economics and business teaching, so I am announcing it here - the code is freely available - and hope it will be of interest. Comments would be really welcome, as would invitations from anyone who'd like to collaborate on enhancing it.

Traveller bears some resemblance to Monopoly, consisting of squares on a game board where the main concern is money. Where it differs is that it isn't people who are the players, but computer programs. These programs - think of them as robot lorries - race round the board (shown below) buying and selling goods while trying to make a profit and not run out of cash. Squares with names on are either petrol stations ("FUEL"), or shops which buy or sell goods at the price shown. There are five kinds of good - coal, diamonds, glasses, peaches and televisions - and each shop trades in just one of these.

[Guy - could you insert the figure here? Cheers.]

In its computerised incarnation, the game is equipped with robot lorry "shells" which have a fuel tank and a safe for cash. Students can load their own programs into these, in effect fitting their lorry with a brain, which then gets access to the lorry's "senses" - what square it's on, which shop is there, the goods it buys or sells, and their price - and also to the level of its fuel tank and the amount of cash left in the safe. The brain also knows the complete layout of the board, including the location of all shops and which squares are connected by roads. The objective for the student is to program a brain which, using this data, can act competently and even profitably within the world. There are some simple "laws of physics" enforced by the world simulator: if the total volume of goods bought won't fit into the lorry, it isn't permitted to load them; if its safe becomes empty, it can't buy anything; and if it runs out of fuel, it can't even move. Business is not without peril.

Why write such a thing? Many of my students had no previous experience of programming, editing, or even logging in and doing directory listings and other operating-systemy tasks. To give them something interesting to do right from Day 1, I developed the notion of a simulated world which they could insert their own programs into and watch them compete. The world would contain a kit of pre-built programs, so students not yet able to write their own could still change and run one of these. For example, someone still learning to edit could change, say, a numerical constant in one of the ready-made traders which denotes the fuel-level below which the program drops all else and heads in panic for the nearest garage. This way, the student would be doing something meaningful even when just starting out.

Traveller was partly inspired by Truckin' [Stefik et. al.], a game invented at Xerox Parc during the 1980s expert systems boom to teach expert systems programming. Truckin' was also a game of buying and selling. Its authors had considered other settings - space rocket raiders, caves and dragons - but decided it best to set their game in a world the students, many of whom were businessmen, would find familiar. Some online information is available at http://www2.parc.com/istl/members/stefik/truckin.htm.

Amongst the features of Truckin' that I've carried over to Traveller is that of goal and resource conflicts. (Aha! Now we're getting closer to economics). For example, I wanted something in the environment which, if not placated every so often with money, would remove a player from the game. This enables us to introduce a goal conflict which the traders must resolve: do you spend money to make a profit, or to ensure your continued existence? Fuel stations constitute such a financial imposition. In Truckin', conflicts include the fact that perishable goods needed to be transported as rapidly as possible, but then you might be fined for speeding. On top of such conflicts, I designed Traveller so that short-term profit-taking stragies will usually fail. For example, the "Beverley Hills" region of the board is a high-profit loop with many diamond and glassware shops. But since there are no fuel stations, a simple-minded trader can easily get stuck in a tight loop, not realising it has to leave to refuel. Similarly, on the link road between The Hub and Beverly Hills, a trader that just grabs the first items it can buy will fill its lorry with coal, thus leaving no capacity for trading amongst the richer pickings of Beverly Hills. There's more on this in "The Design of Traveller", at http://www.j-paine.org/traveller/design.html.

There must be many ways to use Traveller in economics, strategy, logistics and marketing. How about accounting? It would be straightforward to make Traveller log traders' and shopkeepers' transactions, emitting them as spreadsheets at the end of a game. Would this be useful as a source of examples for accounting practicals? With the aid of a few random numbers, errors could be introduced, or we might make a trader systematically underreport his takings. Are there accounting exercises that involve ferretting out such errors?

Another possibility, is experimental economics: inducing supply and demand curves from the behaviour of suitably enhanced traders, then imposing taxes and watching the curves shift.

Finally, and as a more way-out possibility, I want to suggest applying Traveller to the automatic marking of business strategy questions. Let's start with an analogy. Suppose we are examining a catering science class, and that we've set our students a question on restaurant management, asking them to construct a plan for optimal deployment of waiters, cooking stations, and other resources. The plans have to be able to cope with unexpected contingencies such as the local football team turning up unbooked and demanding 11 vindaloos in the midst of a Sunday lunchtime.

As examiners, it would save us much work if we could take each plan and assess it automatically by entering it into a restaurant simulation and subjecting it to a range of such contingencies. To be able to do so, we would need a language in which the students could write the plans, and one that will be as natural as possible for them to write in, given the constraints of present-day compiler technology. Incidentally, this isn't a contrived example - I knew someone working on such a simulation under funding from a certain fast-food giant. The objective was indeed to teach managers how to run smoothly in the face of unexpected events.

So could we do the same for business strategy? The most important thing, I assume, is to maximise. profit. But how? One has to be prepared for risk, and not to emphasise short-term gains at the expense of long (an approach which Traveller penalises). So, in the spirit of my previous paragraph, the teacher would introduce the game and ask each student to write out their plan for a successful trader. He then enters all these plans into the game and tests them by running them through numerous lifetimes in each of which a range of unexpected events - snap weight checks, an entire load of fruit going off, the main buyer closing down, freak snowstorms - get thrown at them. The winners are the ones that cope best with such risks. Now, can we design a language in which students can write these plans, and a system to assess them by running them through such a risk-laden simulation?

If anyone is interested, please contact me at popx@j-paine.org. You can experiment with a Web-based interface to Traveller at http://www.j-paine.org/cgi-bin/traveller.php, from which the code and an account of the design is also available.


The URLs below were checked on June 23rd 2003.

Jocelyn Ireson-Paine. The Design of Traveller. http://www.j-paine.org/traveller/design.html

Mark Stefik, Daniel G. Bobrow, Sanjay Mittal, and Lynn Conway. Knowledge Programming in Loops: Report on an Experimental Course, from The AI Magazine, Fall 1983.

Mark Stefik, Daniel G. Bobrow, and Sanjay Mittal. Truckin' and the Knowledge Competition (1983). http://www2.parc.com/istl/members/stefik/truckin.htm.

5 July 2003

[ Jocelyn Ireson-Paine's Home Page | Free software | Publications ]