chainingx

siennaredwoodΤεχνίτη Νοημοσύνη και Ρομποτική

23 Φεβ 2014 (πριν από 3 χρόνια και 3 μήνες)

65 εμφανίσεις

Forward Chaining


DFS can supply compatible bindings for
forward chaining



Forward Chaining


Until no rule produces an assertion or the
animal is identified


For each rule


Try to support each of the rule’s antecedents by
matching it to known assertions


If all the rule’s antecedents are supported, assert the
consequent unless there is an identical assertion
already


Repeat for all matching and instantiation alternatives

Forward Chaining


Until no rule produces a new assertion


For each rule


For each set of possible variable bindings determined
by matching the antecedents to working memory


Instantiate the consequent


Determine whether the instantiated consequent is
already asserted. If it is not, assert it

Working Memory

Comet

Is
-
a

Horse

Prancer

Is
-
a

Horse

Comet

Is
-
a
-
parent
-
of

Dasher

Comet

Is
-
a
-
parent
-
of

Prancer

Prancer

Is

Fast

Dasher

Is
-
a
-
parent
-
of

Thunder

Thunder

Is

Fast

Thunder

Is
-
a

Horse

Dasher

Is
-
a

Horse

Rule


If


?x is
-
a horse


?x is
-
a
-
parent
-
of ?y


?y is fast


Then


?x is valuable

Find Bindings


If ?x is
-
a horse


?x can be bound to


Comet, Prancer, Thunder, Dasher


?x is
-
a
-
parent
-
of ?y





?y is fast




Backward Chaining


Start matching hypothesis against


Existing assertions


Rule consequents



Comet is valuable?

Backward chaining code


Until all hypothesis have been tried and none have
been supported or until the animal has been
identified


For each hypothesis


For each rule whose consequent matches the current hypothesis


Try to support each of the rule’s antecedents by matching it to
assertions in WM or by backward chaining through another rule,
creating new hypotheses. Be sure to check all matching and
instantiating alternatives


If all the rule’s antecedents are supported, announce success and
conclude that the hypothesis is true

Rules and Cognition


Simplicity of rule based systems enables you to
build extremely useful applications


RBS can explain their reasoning


How did you establish swifty was a cheetah? By using
rule six and by knowing that swifty is a mammal, has
pointed teeth, has claws, and has forward pointing eyes.


How…? : Report the assertions connected to the rule’s
antecedents. The rule that established the assertion.

Rules and Cognition


RBS can explain their reasoning


Why did you show that swifty is a mammal?
Because I wanted to use rule 6 to show that
the animal is a carnivore


Why..? Report the assertions to the then sides
of all rules that used the assertion referenced
in the question.

Knowledge Acquisition


Two key heuristics


Work with specific situations


Ask about situation pairs that look identical but
are handled differently

RBS behave like idiot savants


They do certain tasks well


But


They do not reason at multiple levels


They do not understand the reasoning behind their rules


They do not know how or when to break their own rules


They do not look at problems from different perspectives

SOAR models human problem
solving
-

MAYBE


Uses an automatic preference analyzer
instead of a fixed conflict resolution strategy

RBS vs C/Java/Lisp


In principle there is nothing to prevent
building a more human like system using
rules, because rules can be used as a sort of
programming language


However, compared to other programming
languages rules have little to offer