Goal Optimization Definitions


There may be more than one action (procedure?) be available for satisfying a goal. By default when satisfying a goal, a tree of all possible actions will be searched to find which possibility results in the goal being satisfied.

It is possible to manually tell a goal which actions to use to satisfy it, which is explained in Satisfying Goals topic.

However, it is more desirable to have the machine automatically determine the best action to take based on the current state of the microworld (dynamically choosing an optimization). Therefore, any number of goal optimizations can be defined to aid the machine to choose the best actions:

    syntax:
                 goal-optimization <class name> <goal name> use <action name> <predicate>.

Consider sorting for instance. The best choice of a sort algorithm depends on the list to be sorted. For example some procedures are better when list is almost sorted, but are worse when the list is totally unsorted. Thus a goal optimization definition would make sense:

    > goal-optimization List-obj sort use fast-sort if its items partially-sorted.
    > goal-optimization List-obj sort use complete-sort if not its items partially-sorted.
 
Page last modified on September 18, 2008, at 09:28 PM

simplaPoweredBy

 

Warning: fopen(wiki.d/.flock) [function.fopen]: failed to open stream: Permission denied in /home/hesam/public_html/pmwiki/pmwiki.php on line 417

PmWiki can't process your request

Cannot acquire lockfile

We are sorry for any inconvenience.