              On the Rails _ RESULTS                         

The competition set on 4 August (see Figure) requested a 
rule to discriminate Eastbound from Westbound trains. 

Eight impressed  with  numerical  
figure-skating but lost on rule-complexity.  
 
What of  those  who  took  the  logic  route?  Twenty built on  
original Theory A: if a train has a short closed car then  
Eastbound, otherwise Westbound. This discriminates over  the   
initial ten. While excluding the five new Westbounds, it 
covers all but two of the new ten's 
Eastbounds.  

To cover the two misfits, four readers tacked on linguistic variants of:
"or four cars and  a single  circle load".  
Using a trains-language that I call Trenglish:

   If a train has                                                 3
     either  a  car  that-has  a short-body  and  a closed-form   7       
     or  exactly  four  cars  and  a  circular  load              8
   then Eastbound, otherwise Westbound                            2      
                      TRENGLISH  SCORE                =          20
                         TROLOG  SCORE                =          25  

The reader will find that  the number  of words 
and hyphenated phrases comes to  20, 
as  indicated by  the  TRENGLISH  SCORE.  Words
performing  redundant functions  are   
ignored. Final complexity verdicts are based on TROLOG SCORE.  
"Trolog" is  a  trains-extended  version  of  the  logic   
programming  language  Prolog.
 
Even neater was Richard  Lawrence,   
analyst/programmer from Essex, whose add-on was:     

  or  exactly  two  cars   that-have  a  rectangular-shape  and  an open-form                                                                                   

                  TRENGLISH SCORE   =  20 
                    TROLOG  SCORE   =  24  
  
Trolog scoring thus puts Lawrence a whisker ahead.
 
But this competition was also open to  
the international  machine learning community.  From Austria  came  a    
computer-authored knockout,  coded  in  Trolog.  Bernhard   
Pfahringer's rule  (rather, his  program's rule)  scored   
just 16 on Trolog complexity. Here  is the  text, interpreting "if" as "if and  
only if".  Prolog uses "negation as failure", i.e. failure  
to demonstrate eastbound disproves it by default.
     
  eastbound ([A|B]) if    
 (closed(A) or has-load(B, triangle)) and (short(A) or eastbound (B)).  

This can be re-coded using a while loop. Starting from the back
of the train (farthest from engine)  we try to show that it's Eastbound:
   
  move to last car;     
     while (the current car is not the engine      
             and either it is closed or a car ahead has a triangle)   
        if  the  current  car  is  short  then  return  "success"   
        else  move to next car    
     endwhile;    
   return "failure".   

Here is a more brain-friendly rule, inspired by Pfahringer's:  

 If a train has   
     a car that-has a short-body and    
        either a closed-form   
        or a predecessor with a triangular load 
   then Eastbound, otherwise Westbound   
                                            TRENGLISH  SCORE = 18        
                                               TROLOG  SCORE = 16    

Some complained that we need a more brain-oriented
notion than Trolog scoring. Ken Kaufman of George Mason  
University's machine learning group, USA, cites a rule 
which says, in Trenglish:   

    If a train has    
     a third  car  that-has    
      either  a  triangular  or  hexagonal load   
      or  a  circular load  and  a single-wall   
   then Eastbound, otherwise Westbound       
                                        TRENGLISH  SCORE = 18        
                                           TROLOG  SCORE =  22  

In terms of humanly perceived  complexity, the Trenglish 
score quite reasonably brackets it  with the previous 
rule. Yet on the Trolog score, it bombs!  

Some entrants  may therefore have  
suffered rough justice.  Happily Computing  has offerred 
readers a series of replays in  alternate future months.  
Trenglish will  be the basis for complexity-scoring. 
Overseas readers can send their entries by email to 
"computed@cix.compulink.co.uk".  

A copy of Richard Gregory's Oxford Companion to the Mind
to Bernhard Pfahringer, courtesy Oxford University Press.
For the best brain-only entry, 
Richard Lawrence receives a  15 book token.

For the next competition four and twenty trains, 
pseudo-randomly generated, will be sorted 
twelve from twelve by a new secret Law.   	D.Michie-28/9/94
