Inference mechanisms - PowerPoint PPT Presentation

About This Presentation
Title:

Inference mechanisms

Description:

data-driven reasoning which must be initialized with all data values - system refines problem state towards solution state - good for configuration problems ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 7
Provided by: brian140
Category:

less

Transcript and Presenter's Notes

Title: Inference mechanisms


1
Inference mechanisms
Backward chaining - goal-driven
reasoning which gathers data as needed -
Prolog's default mechanism - good for
identification problems Forward chaining
- data-driven reasoning which must be
initialized with all data values - system
refines problem state towards solution state
- good for configuration problems
2
Misc Prolog notes
1. With Sicstus prolog, need to do either a "nl"
or a "ttyflush" command in order to see
output on screen before a read - these
commands flush the output buffer (similar things
happen in C) 2. With Prolog's "read", a
capitalized word will be interpreted as a
variable. eg. read(X) --gt enter Yes
means X is unified with variable Yes
enter 'Yes' unifies X
with constant 'Yes'
enter yes unifies X with constant 'yes'
3
Separation of KB and shell
Important to separate declarative KB code from
procedural shell utilities - knowledge base
can then be used by other inference schemes -
shell can be altered and made as flexible as one
needs, w/o touching KB - Basically, put each
into distinct files. In Merritt "bird"
system, one line in KB is top_goal(X) -
bird(X). Then, shell always executes
"top_goal(X)". --gt this gives a hook between
KB and shell
4
Bowen Toy system
from Prolog and Expert Systems, K.A. Bowen
(McGraw Hill)  similar in spirit to Bird he
handles some things differently eg. to keep
track of similar input words synonym(pain,
severe_pain).

synonym(pain, numb_pain).

... then you can check synonym for user input
X by doing ?- synonym(S, X). he also uses
setof(V, synonym(pain,V), Vlist) --gt
returns Vlist severe_pain, numb_pain, ...
- setof(Template, Goal, List) successively
solves Goal, and saves variables shared
between Goal and Template in List, using
Template - sorts List, and removes
duplicates - Template is a term a variables,
or even a structure eg. p(X,Y) bagof
similar, except that it keeps all solutions in
the order discovered, and doesn't sort nor
remove duplicates
5
Friendly User Input
Prolog's Input-Output is too unfriendly and
unforgiving should develop a library of
user-friendy I/O expert system interface
- users may have little or no computer
background - users may have little or no
background in domain area - recover from
errors (typing, misunderstandings, ...) -
avoid unnecessary dialog -
remember input - use menus
- perhaps remember input from different
sessions - keep a history
database - provide various levels of
explanation and help
6
Summary
The knowledge base and shell utilities are
separate. The knowledge base is declarative.
It can be processed by any kind of inference
system. It is easily modified. The system
prompts user for facts. It remembers input.
Menu input is used. Note that, although
shell utilities are procedural, it is possible
to write declarative utilities. This is an
ideal, but they might be inefficient.
possible enhancements - Better text
messages for queries - more error checking
- numeric input with menus (see handout)
- explanation
Write a Comment
User Comments (0)
About PowerShow.com