Truckin’ and the Knowledge Competitions

Origins

When Sanjay Mittal joined Danny Bobrow and me in the Knowledge Systems Area at PARC, our ambitions for Loops increased. Sanjay did several expert system projects based on Loops and also built a unit test system so that we could systematically test our new releases.

Xerox was starting a business of selling the interlisp-D programming environment and AI workstations based on the dandelion, D0, and Dorado computers. We decided to distribute Loops with Interlisp-D and to all of the customers who were buying the workstations to develop expert systems. We decided to create a course on “knowledge programming,” explaining how to combine the various programming paradigms in Loops to create knowledge systems.

The Truckin‘ Game

Lynn Conway suggested that a competition that would energize classes for learning a computer language. The Truckin‘ knowledge competition was the equivalent of a final exam for a one-week course that we offered periodically at PARC to teach people about object-oriented programming.

Truckin‘ was a video game but it was played by computer programs rather than by people. Each person taking the Loops course programmed their truck to act for them in the Truckin‘ simulation world.

The trucks  traversed a game board where a road connected road stops for buying and selling goods. For each kind of good, the stores at the road stops had posted prices for buying or selling goods of various classes.

Player’s trucks took turns driving on the highway. They could buy and sell goods at the various road stops.

Loops Class Lattice for goods in the Truckin' world

The goods that trucks bought and sold had properties that governed their behavior in the game, as suggested by the entries in the class browser in the figure to the left. For example, fruit was a PerishableCommodity, and could spoil if it was kept too long. A television was a FragileCommodity and could get broken if the truck drove too quickly over a patch of rough road. Meanwhile, the driver had to make sure to stop often enough at gas stations to keep the truck in fuel and wanted to avoid running into Bonnie or Clyde, two bandits who roamed the Truckin‘ world and robbed vehicles when they could.

 

Players could attach gauges to crucial quantities in their trucks, such as on the wallet (to show money), or the gas gauge, or the current destination of the truck. Two trucks could park at any given road stop. The particular configuration of the board for a given game was determined by a random number generator at the beginning of the game.

The Truckin‘ simulation world was complex and it was challenging to make to program a skilled player.

The screen shot on the left shows a debugging window where someone has interrupted a simulation. The debug command “stoppingplace” simply asks for the value of the instance variable “stoppingplace” for the current truck. If the user programmed the behavior using the simple Loops rules language, then the system could save an audit trail of how various values were set. The command “why stoppingplace” asks the system to check for an annotation on the instance variable, indicating what part of the program set its value. The debugger traces back to the individual rule that was fired and set the value. In the example shown, the rule says “If the goal is not to sit tight (an endgame strategy), and there is less than a quarter tank of gasoline, and there is a gas station within range, then make that gas station the next destination. In the upper left window, a trace of rules is shown as they are executed.

The winner of a game was the player who parked nearest to Alice’s Restaurant at the end of the game and had the most cash. The picture on the right shows Danny, Sanjay, and me when we borrowed a Xerox delivery truck to drive up to the real Alice’s Restaurant, acting out the parts of our video game. (Inside scoop: the helmets we wore had Loops logos on them and were an oblique reference to knowledge engineering. The books we carried were The Selfish Gene, Sociobiology, and The Art of War, reflecting underlying discussions in our group around ideas hinted at in my paper,  The Next Knowledge Medium.)

The Fun of Knowledge Competitions

The highlight of a course on Loops was the knowledge competition. Players would develop the strategy for their trucks by programming and testing it on workstations that we provided. We also provided some starting “shell players” to help them get started. Then at the end of the course, we would load all of the player’s trucks into a single simulation world and have a competition.

The photo on the right shows people during one of the knowledge competitions at PARC. We would gather in one of the open areas in the PARC lab space. When a game started, the people from the course would cheer on their trucks much like watching a favorite team at a sporting matach. People from across PARC would sometimes come to join in the fun.

The outcome of a competition was never certain until the end. Sometimes the trucks interacted with the Truckin‘ environment in surprising ways. In one game, a player had taken an early lead speeding between truck stops only to break all of its merchandise by going too quickly over a rough road with fragile goods. The truck was languishing, unable to sell its merchandise, and slowly running out of money buying gasoline to keep going. As luck would have it, the hapless player was robbed by Bonnie or Clyde at a road stop. Relieved of its broken merchandise, the truck was back in the game, competing again.

Furthermore, strategies that worked well when a truck was alone in the simulation world sometimes proved ineffective when the truck competed against others. For example, many people built their truck programs starting from a “luxury goods” specialist that we provided as a pedagogical example. This player did well by itself, because luxury goods (such as jewelry) tended to be lightweight and have a high value. They were not perishable and were not fragile, so they were relatively uncomplicated to transport and sell. However, in a competition (or “ecology”) with many luxury good specialists, the supply of luxury goods was quickly exhausted.

When a knowledge competition started, some people got into the spirit of Truckin’. This shot shows the winning team of the first knowledge competition — John Osterhout and Dave Patterson — complete with their trucking hats and shades. In the background is Lynn Conway. Ron Kaplan is leaning against the wall behind them.

Memes

In addition to naming the high-spirited contest that took place at the end of each course, the term “knowledge competition” reflected some underlying themes that we were thinking about at the time. We had all read Richard Dawkins’ book on The Selfish Gene including its chapter introducing the idea of “memes” as ideas that spread in a population. We thought about ideas that could spread and that would have viability according to how well they served their carriers. Lynn Conway and Carver Meade had taught a course with a simplified method for VLSI design, and there was a lot of discussion about how its ideas displaced earlier ones in the design community. Could we create a regime of knowledge systems and representations where ideas could be generated and propagate according to their viability? At least at a metaphorical level, these themes were also being pursued by other groups interested in forms of evolutionary programming.

Stefik, M., Bobrow, D. G., Mittal, S., and Conway, L. Knowledge Programming in Loops: Report on an Experimental Course. AI Magazine, 4:3, pp. 3-13, Fall 1983. (Reprinted in Readings From the AI Magazine, Volumes 1-5, 1980-1985, pp. 493-503, 1988.)Stefik et. al. 1983 Knowledge Programming in Loops

Comments are closed.