[Next] [Previous] [Up] [Top] [Contents]

5.4 Optimisations

5.4.3 Ordering within partitions


The order in which rules attempt to fire can affect the number of assumptions that are created. Whereas it sometimes takes several cycles around rules in a partition before an assumption is contradicted, assumptions are often contradicted the first time a rule fires. Reordering the rules in the partition may prevent the assumption from being made in the first place. A good heuristic is to order rules and assumable clauses within a partition so that rules which contain assumable clauses are placed after rules which do not.

This heuristic can be combined with the heuristic described in Section 4.3 that dependents should be placed after rules they depend on, to try to find an optimal ordering.*1 It may be possible to achieve further efficiency gains by detecting time being wasted and reordering dynamically.


Efficient Forward Chaining for Declarative Rules in a Multi-Agent Modelling Language - 16 FEB 95
[Next] [Previous] [Up] [Top] [Contents]

Generated with CERN WebMaker