The following is a trace of Progol learning
different rules to discriminate animals.
The trace was generated at verbosity level 1, which makes Progol
slightly more talkative than is usual. It shows various intermediate
steps in theory construction, enclosed within "[" and "]". In
the search, this trace shows every clause tried by Progol.
Each clause is preceded by 4 numbers. These are, in turn,
f = Number of positive examples covered -
Number of negative examples covered -
Number of literals in body of clause -
Optimistic estimate of literals needed
p = Number of positive examples covered
n = Number of negative examples covered
h = Optimistic estimate of literals needed
Below Progol reads in the file animals.pl. It notes all
mode declarations and adds background knowledge and positive
and negative examples to its clause base. Have a look at the file
animals.pl. A mode declaration is a query aimed at the Prolog
interpreter within Progol. Prolog queries have a `:-' at the
beginning and a `?' at the end to differentiate them from
from aserted statements. Thus
:- modeb(1,has_milk(+animal))?
class(dog,mammal).
:- class(trout,mammal).
has_eggs(trout).
:- modeh(1,class(+animal,#class))?
class(A,#) :- ...
:- modeb(1,has_milk(+animal))?
class(A,mammal) :- has_milk(A).
:- class(A,mammal), class(A,fish).
false :- class(A,mammal), class(A,fish).
:- class(trout,mammal).
class(A,bird) :- has_covering(A,feathers).
BEGINNING OF PROGOL TRACE
sparc007_{{24}}? progol animals
CProgol Version 4.1
[:- set(c,3)? - Time taken 0.00s]
[:- modeh(1,class(+animal,#class))? - Time taken 0.00s]
[:- modeb(1,has_milk(+animal))? - Time taken 0.00s]
[:- modeb(1,has_gills(+animal))? - Time taken 0.00s]
[:- modeb(1,has_covering(+animal,#covering))? - Time taken 0.00s]
[:- modeb(1,has_legs(+animal,#nat))? - Time taken 0.00s]
[:- modeb(1,homeothermic(+animal))? - Time taken 0.00s]
[:- modeb(1,has_eggs(+animal))? - Time taken 0.00s]
[:- modeb(100,habitat(+animal,#habitat))? - Time taken 0.00s]
[:- modeh(1,false)? - Time taken 0.00s]
[:- modeb(1,class(+animal,#class))? - Time taken 0.00s]
[Generalising :- class(trout,mammal).]
[Most specific clause is]
:- class(A,mammal), class(A,fish), has_gills(A), has_covering(A,
scales), has_legs(A,0), has_eggs(A), habitat(A,water).
[C:40,42,1,0 :- class(A,mammal).]
[C:5,7,0,0 :- class(A,mammal), class(A,fish).]
[C:39,42,1,0 :- class(A,mammal), has_legs(A,0).]
[C:39,42,1,0 :- class(A,mammal), has_eggs(A).]
[C:39,42,1,0 :- class(A,mammal), habitat(A,water).]
[C:38,42,1,0 :- class(A,mammal), has_eggs(A), habitat(A,water).]
[C:38,42,1,0 :- class(A,mammal), has_legs(A,0), habitat(A,water).]
[7 explored search nodes]
[f=5,p=7,n=0,h=0]
[Result of search is]
:- class(A,mammal), class(A,fish).
[7 redundant clauses retracted]
[Generalising :- class(lizard,mammal).]
[Most specific clause is]
:- class(A,mammal), class(A,reptile), has_covering(A,scales),
has_legs(A,4), has_eggs(A), habitat(A,land).
[C:34,36,1,0 :- class(A,mammal).]
[C:6,8,0,0 :- class(A,mammal), class(A,reptile).]
[C:33,36,1,0 :- class(A,mammal), has_legs(A,4).]
[C:33,36,1,0 :- class(A,mammal), has_eggs(A).]
[C:33,36,1,0 :- class(A,mammal), habitat(A,land).]
[C:32,36,1,0 :- class(A,mammal), has_legs(A,4), habitat(A,land).]
[6 explored search nodes]
[f=6,p=8,n=0,h=0]
[Result of search is]
:- class(A,mammal), class(A,reptile).
[8 redundant clauses retracted]
[Generalising :- class(eagle,mammal).]
[Most specific clause is]
:- class(A,mammal), class(A,bird), has_covering(A,feathers),
has_legs(A,2), homeothermic(A), has_eggs(A), habitat(A,
land), habitat(A,air).
[C:27,29,1,0 :- class(A,mammal).]
[C:5,7,0,0 :- class(A,mammal), class(A,bird).]
[C:26,29,1,0 :- class(A,mammal), has_legs(A,2).]
[C:26,29,1,0 :- class(A,mammal), homeothermic(A).]
[C:26,29,1,0 :- class(A,mammal), has_eggs(A).]
[C:26,29,1,0 :- class(A,mammal), habitat(A,land).]
[C:26,29,1,0 :- class(A,mammal), habitat(A,air).]
[C:25,29,1,0 :- class(A,mammal), has_legs(A,2), homeothermic(A).]
[C:25,29,1,0 :- class(A,mammal), has_legs(A,2), has_eggs(A).]
[C:25,29,1,0 :- class(A,mammal), has_legs(A,2), habitat(A,air).]
[C:25,29,1,0 :- class(A,mammal), homeothermic(A), has_eggs(A).]
[C:25,29,1,0 :- class(A,mammal), homeothermic(A), habitat(A,land).]
[C:25,29,1,0 :- class(A,mammal), homeothermic(A), habitat(A,air).]
[13 explored search nodes]
[f=5,p=7,n=0,h=0]
[Result of search is]
:- class(A,mammal), class(A,bird).
[7 redundant clauses retracted]
[Generalising :- class(lizard,fish).]
[Most specific clause is]
:- class(A,fish), class(A,reptile), has_covering(A,scales), has_legs(A,
4), has_eggs(A), habitat(A,land).
[C:21,23,1,0 :- class(A,fish).]
[C:5,7,0,0 :- class(A,fish), class(A,reptile).]
[C:20,23,1,0 :- class(A,fish), has_covering(A,scales).]
[C:20,23,1,0 :- class(A,fish), has_eggs(A).]
[C:19,23,1,0 :- class(A,fish), has_covering(A,scales), has_eggs(A).]
[5 explored search nodes]
[f=5,p=7,n=0,h=0]
[Result of search is]
:- class(A,fish), class(A,reptile).
[7 redundant clauses retracted]
[Generalising :- class(eagle,fish).]
[Most specific clause is]
:- class(A,fish), class(A,bird), has_covering(A,feathers), has_legs(A,
2), homeothermic(A), has_eggs(A), habitat(A,land), habitat(A,
air).
[C:15,17,1,0 :- class(A,fish).]
[C:4,6,0,0 :- class(A,fish), class(A,bird).]
[C:14,17,1,0 :- class(A,fish), has_eggs(A).]
[3 explored search nodes]
[f=4,p=6,n=0,h=0]
[Result of search is]
:- class(A,fish), class(A,bird).
[6 redundant clauses retracted]
[Generalising :- class(eagle,reptile).]
[Most specific clause is]
:- class(A,reptile), class(A,bird), has_covering(A,feathers),
has_legs(A,2), homeothermic(A), has_eggs(A), habitat(A,
land), habitat(A,air).
[C:10,12,1,0 :- class(A,reptile).]
[C:5,7,0,0 :- class(A,reptile), class(A,bird).]
[C:9,12,1,0 :- class(A,reptile), has_eggs(A).]
[C:9,12,1,0 :- class(A,reptile), habitat(A,land).]
[C:8,12,1,0 :- class(A,reptile), has_eggs(A), habitat(A,land).]
[5 explored search nodes]
[f=5,p=7,n=0,h=0]
[Result of search is]
:- class(A,reptile), class(A,bird).
[7 redundant clauses retracted]
:- class(A,mammal), class(A,fish).
:- class(A,mammal), class(A,reptile).
:- class(A,mammal), class(A,bird).
:- class(A,fish), class(A,reptile).
:- class(A,fish), class(A,bird).
:- class(A,reptile), class(A,bird).
[Total number of clauses = 6]
[Time taken 1.228s]
[Generalising class(dog,mammal).]
[Most specific clause is]
class(A,mammal) :- has_milk(A), has_covering(A,hair), has_legs(A,
4), homeothermic(A), habitat(A,land).
[C:1,4,3,0 class(A,mammal).]
[C:3,4,0,0 class(A,mammal) :- has_milk(A).]
[2 explored search nodes]
[f=3,p=4,n=0,h=0]
[Result of search is]
class(A,mammal) :- has_milk(A).
[4 redundant clauses retracted]
[Generalising class(trout,fish).]
[Most specific clause is]
class(A,fish) :- has_gills(A), has_covering(A,scales), has_legs(A,
0), has_eggs(A), habitat(A,water).
[C:1,4,3,0 class(A,fish).]
[C:3,4,0,0 class(A,fish) :- has_gills(A).]
[2 explored search nodes]
[f=3,p=4,n=0,h=0]
[Result of search is]
class(A,fish) :- has_gills(A).
[4 redundant clauses retracted]
[Generalising class(lizard,reptile).]
[Most specific clause is]
class(A,reptile) :- has_covering(A,scales), has_legs(A,4), has_eggs(A),
habitat(A,land).
[C:2,5,3,0 class(A,reptile).]
[C:3,5,1,0 class(A,reptile) :- has_covering(A,scales).]
[C:2,4,0,0 class(A,reptile) :- has_covering(A,scales), has_legs(A,4).]
[C:2,5,1,0 class(A,reptile) :- has_covering(A,scales), has_eggs(A).]
[C:2,4,1,0 class(A,reptile) :- has_legs(A,4).]
[C:1,5,3,0 class(A,reptile) :- has_eggs(A).]
[C:1,4,2,0 class(A,reptile) :- habitat(A,land).]
[7 explored search nodes]
[f=2,p=4,n=0,h=0]
[Result of search is]
class(A,reptile) :- has_covering(A,scales), has_legs(A,4).
[4 redundant clauses retracted]
[Generalising class(snake,reptile).]
[Most specific clause is]
class(A,reptile) :- has_covering(A,scales), has_legs(A,0), has_eggs(A),
habitat(A,land).
[C:-1,2,3,0 class(A,reptile).]
[C:0,2,1,0 class(A,reptile) :- has_covering(A,scales).]
[2 explored search nodes]
[f=1,p=7,n=6,h=0]
[No compression]
[Generalising class(eagle,bird).]
[Most specific clause is]
class(A,bird) :- has_covering(A,feathers), has_legs(A,2), homeothermic(A),
has_eggs(A), habitat(A,land), habitat(A,air).
[C:0,3,3,0 class(A,bird).]
[C:2,3,0,0 class(A,bird) :- has_covering(A,feathers).]
[2 explored search nodes]
[f=2,p=3,n=0,h=0]
[Result of search is]
class(A,bird) :- has_covering(A,feathers).
[3 redundant clauses retracted]
class(snake,reptile).
class(A,mammal) :- has_milk(A).
class(A,fish) :- has_gills(A).
class(A,bird) :- has_covering(A,feathers).
class(A,reptile) :- has_covering(A,scales), has_legs(A,4).
[Total number of clauses = 5]
[Time taken 0.332s]
END OF PROGOL TRACE
The final output from Progol are the following clauses:
class(snake,reptile). class(A,mammal) :- has_milk(A). class(A,fish) :- has_gills(A). class(A,bird) :- has_covering(A,feathers). class(A,reptile) :- has_covering(A,scales), has_legs(A,4).
Home Page