
## 6.2 Experiments With Artificial Domains

In order to ensure the statistical significance of the results of comparing di erent ordering agorithms, we e perimented with man  di  erent domains.   or this purpose, we created a artificial domains, each with a small fi ed set of predicates, but with a random st of 1 number of clauses in each predicate, and with random rule lengths.

redicates in the rule bodies, and arguments in both rule heads and bodies are randoml  drawn from fi ed distributions. ach domain has its own training and testing sets (these two sets do not intersect).

The more training e amples are fed into the s stem on the learning phase, the better estimations of control values it produces.    n the other hand, the learning time must be lim ited, because after seeing a certain number of training e  amples, new e  amples do not bring much new information, and additional learning becomes wasteful.   e have e  perimentall built a learning curve which shows the dependence of the  ualit   of the control knowledge on the amount of training. The curve suggests that after control values were learned for literals, there is no significant improvement in the  ualit  of ordering appro imatel with new training e  amples. Therefore, in the subse  uent e  periments we stopped training cost values were learned. The training time was alwa s small  one learned cost after value corresponds to a complete proof of a literal. Thus, if ever predicate in a program has four clauses that define it, then cost values are learned after unifications, which is aver small time.

The control values were learned b  means of regression trees ( ection  ), with simple s ntactic tests that onl  checked whether some argument is bound or whether some argu ment is a term with a certain functor (the list of functors was created automaticall  when the domain was loaded). Owever, as we shall see, even these simple tests succeeded in making good estimations of control values.

e tested the following ordering methods Random: The subgoals are permuted randoml  and the control knowledge is not used.

Algorithm 3:
uilding ordered prefi es. ut of all prefi es that are permutation of one another, onl the cheapest one is retained.

Algorithm 3a: s lgorithm , but with best first search method used to define the ne t processed prefi .   similar algorithm was used in the lassy s  stem of   arkovitch and  cott (19 9).

Algorithm 3b:
ssssse similar algorithm was described b mith and enesereth (19 Algorithm 4: s lgorithm b, but whenever all the subgoals that are not in the prefi  are independent (under the binding of the prefi  ), the  are sorted and the result is appended to the prefi  as one unit.

## Algorithm 6: The Dac Algorithm.

In our e periments we alwa s used the ubble ort algorithm to sort literals in inde pendent sets. This algorithm is eas to implement, and it is known to be e cient for small