**Canonization:**

Most modern programming languages already come equipped with a

*natural ordering*relation which is a sort of preferences with respect to mathematical structures. In clojure the natural ordering relation extends compare and it can be accessed by printing a hash set:

(= (set (list 1 10 [1 2] (list 5 6) #{8})) #{1 '(5 6) [1 2] #{8} 10})By maximizing with respect to a preference relation such as clojure's natural ordering relation we can convert any object into canonical form. Furthermore, since code is just another type of data structure in Lisp we can canonize code with respect to its equivalence relations:

(= (* 2 (+ 1 3 (inc (dec x)))) (+ (* 2 x) 8))The above canonization uses the equivalence relations of invertibility, associativity, and additivity (see the maxima operator properties). There are multiple ways to canonize code, so the canonical form corresponds to certain preferences such as that addition is preferred over multiplication. Computer algebra systems such as maxima can be described as systems of equivalence relations, well a separate component can be used to convert equivalent data structures to canonical form.

**Planning domains:**

PDDL (planing domain definition language) comes with the means to completely describe any planning domain, by describing the actions that can be taken in the planning domain and preferable actions that may have an associated metric for describing their utility:

(:constraints (and (preference pref1 (always (clean truck1))) (preference pref2 (and (at end (at package2 paris)) (sometime (clean track1)))))) (:metric (+ (* 8 (is-violated pref1)) (* 16 (is-violated pref2)))Sometimes our only way of evaluating the utility of any action is to measure how much closer it makes us to achieving our goals. In such a case we need to use a meta-heuristic evaluation function to decide upon an action. For example, in chess are only way of determining which move is the best is determine which one is most likely to allow us to checkmate the opponent at some point in the future. A sentient agent should have a variety of heuristics and AI optimization techniques at its disposal for achieving its goals.

## No comments:

## Post a Comment