Enter the maze

Strictly X-factor: Pass it on

If you have been following the story so far then you will have seen how to create a plan with instructions for making robot X-factor judges. Those judges can be given different personalities, rude or supportive and make judgments about acts. All this has been done by creating a single plan from which judges can be cloned, without having to spell out all the detail again each time. We can also easily make changes, improving the plan that will apply to any robot judges we then make.

Owl Eyes

The trouble with what we've done so far though is the plan assumes a specific game show format. All judges do is make judgments and make comments. They can't for example actually give a points score (needed for example for Strictly Ballroom) or shoot weak competitors (as in the Dr Who version of the Weakest Link). We don't want to just add these abilities to the general plan, because we don't want all game show judges to have these abilities. The abilities should fit the particular game show.

How can we make these new and other, as yet unthought of, kinds of judges without having to start from scratch again writing a new plan each time?

Computer Scientists borrowed an idea from biology at this point: inheritance. Parents pass on family traits to their children. Biologists also apply a similar idea in the way animals are described, using family tree like relationships to describe animals. Mammals all share a set of properties. Cats are mammals. Tigers are cats. Birds all share properties. Owls are birds. Once we know the properties and behaviours of a class of creatures like birds we can describe new classes of things from them without spelling out all the general properties again. They have those traits and more:

Owls have (inherit) the traits of birds.
In addition, they eat mice and have good eyesight.

Now if we say Hedwig is an owl, we know she is a bird with all those properties and behaviours (has feathers, lays eggs) but also that she has the extra trait of owls: eating mice.

We can use these inheritance ideas in defining different kinds, or classes, of robot judge too. Our new kinds of judge inherit all the features of a basic judge but then have some new ones as well. For example, we could also describe a MarkingJudge by extending our description of a judge with the new trait of also being able to reveal their mark:

DESCRIPTION OF A MarkingJudge
        EXTENDS Judge WITH
  TO RevealMark:
     SAY mark

This says that a MarkingJudge has everything a Judge has - a personality, it remembers a mark, it can invent a mark, can comment on an act, but also if asked can reveal its mark. It gets all but the last part using inheritence (...EXTENDS Judge...)

Evil Robot Judge

Shoot em up

For a different show we might want to allow different kinds of judges again. For example, rather than say the mark, an Exterminator Judge in a Dr Who-like future might shoot really poor contestants. The prizes would have to be good though. Come to think of it one of my favourite Stephen King stories, "The Long Walk" uses the same idea: the prize there is really, really good and life otherwise is really, really hopeless.

DESCRIPTION OF A ExterminatorJudge 
        EXTENDS Judge WITH
  TO RevealMark:
     IF mark <= 3
        {SAY "Exterminate". SHOOT}
     IF mark > 3
        SAY mark

We now have several different kinds of Judge - the basic kind, Marking Judges and Exterminator Judges, and if need be we could create more. We can also make individuals using any of these plans:

Dredd IS A NEW ExterminatorJudge WITH personality RUDE
TerryTheTOGG IS A NEW MarkingJudge WITH personality SUPPORTIVE

...and so on.

So how can SharONN judges make daughter KeLEE judges without the help of Ozzie?