[go: up one dir, main page]

0% found this document useful (0 votes)
20 views19 pages

Procedural Knowledge

The document distinguishes between procedural and declarative knowledge, with procedural knowledge focusing on 'how' to perform tasks and declarative knowledge dealing with 'what' is known about facts and concepts. It also discusses logic programming, specifically the use of PROLOG, and the concepts of forward and backward reasoning in problem-solving. Additionally, it covers the processes of matching and conflict resolution in rule-based systems, emphasizing the importance of indexing and the challenges of rule selection.

Uploaded by

cadetbro23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views19 pages

Procedural Knowledge

The document distinguishes between procedural and declarative knowledge, with procedural knowledge focusing on 'how' to perform tasks and declarative knowledge dealing with 'what' is known about facts and concepts. It also discusses logic programming, specifically the use of PROLOG, and the concepts of forward and backward reasoning in problem-solving. Additionally, it covers the processes of matching and conflict resolution in rule-based systems, emphasizing the importance of indexing and the challenges of rule selection.

Uploaded by

cadetbro23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Procedural Vs Declarative

• Declarative knowledge deals with factoid


questions (what is the capital of India? Who
won the FIFA world cup in 2018? Etc.)
• Procedural knowledge deals with “How”
• Procedural knowledge can be embedded in
declarative knowledge
Procedural Knowledge
• Procedural Knowledge: rules, strategies, agendas,
procedures.
• Also known as imperative knowledge
• Is knowing How to do something
• Can be directly applied to a task
• Depends upon the task on which it can be applied
• Example: How to cook vegetable or how to
prepare a particular dish is procedural
knowledge.
Declarative Knowledge
• Declarative Knowledge: concepts, objects, facts.
• Also known as descriptive knowledge
• Is knowing about something
• Is expressed in declarative sentences
• Consists of facts
• Example: The first step in cooking a vegetable is
chopping it.
• Example 2: To prepare a dish one needs to gather
its ingredients.
Procedural Knowledge Declarative Knowledge

Knowledge about “how to do Knowledge about “what to do


something”; e.g. to determine with knowledge and how to
if Peter or Robert is older, first use”; e.g., Peter is older than
find their ages. Robert.

Focus on tasks that must be Refers to representations of


performed to reach a objects and events; knowledge
particular objective or goal. about facts and relationships.

Examples: procedures, rules, Example: concepts, objects,


strategies, agendas, models. facts, propositions, assertions,
semantic nets, logic, and
descriptive models
More Examples of Declarative and
Procedural Knowledge
Procedural Knowledge Declarative Knowledge
Process of planting herbs Knowing something about herbs
Procedure to harvest a crop Knowledge of the month when
a crop should be harvested
Draw a line graph from a data Familiarity with the data sets
set and line graphs
Procedure to register a video Knowledge acquired in a video
lecture lecture
Type a text in a computer using Knowledge about the placement
a keyboard of keys in a keyboard
Logic Programming
• Logic programming is a programming language paradigm in
which logical assertions are viewed as programs.
• The most popular is PROLOG
• A PROLOG program is described as a series of logical
assertions, each of which is a Horn Clause.
• Horn Clauses: clauses with atmost one positive literal. Thus
p, ⌐pVq and p →q are all Horn clauses.
• Prolog
– If clause has all positive literals, leave as it is
– Otherwise, take all negative literal as antecedent and positive
literal as consequent.
– Or logic is implemented using disjuntion.
– P→Q is entered as Q:-P. The interpreter always works from
backward from a goal. The first component is called the head of the
rule.
Forward Versus Backward Reasoning
Forward Reasoning
• In forward reasoning, reasoning proceeds forward, beginning with
factors, chaining through rules and finally establishing the goal.
• When the left side of a sequence of rules are instantiated first and
rules are executed from left to right, this process is called forward
reasoning.
• Based on the available data a decision is taken.
• Therefore, it is also known as data driven search, since input data
are used to guide the direction of the inference process
• Example- When a student is encouraged, is healthy and has goal,
the student will succeed.
– Encouraged(student)→ motivated(student)
– Motivated(student) and Healthy(student)→workhard(student)
– Workhard(student) and hasgoal(student)→ excell(student)
– Excell(student) →succeed(student)
Backward Reasoning
• In backward reasoning, reasoning proceeds from the right
hand side of the rule, the left hand conditions become
subgoals; D→C→B→A
• These sub-goals may in turn cause sub-goals to be
established and so on until facts are found to match the
lowest subgoal conditions, when this form of inference
takes place it is known as backward reasoning.
• This type of inference is also known as goal-driven
inference since the initial goal establishes the backward
direction of the inference.
• Example- In “MYCIN” initial goal is consultation.
– Does patient have certain disease? This cause the sub-goal to be
established such as “are certain bacteria present”
– If certain bacteria are present then test will be done based on
them.
Factors that influence in choosing the
better reasoning
• Are there more possible start states or goal
states?

• In which direction is the branching factor greater?

• Will the program be asked to justify its reasoning


process to a user?

• What kind of event is going to trigger a problem-


solving episode?
Forward vs backward chaining rule
system
• Forward rules- Encode knowledge about how
to respond to certain input configurations.

• Backward rules- Encode knowledge about how


to achieve particular goals.
Bidirectional Search
• The search can be done forward from the start
state and backward from the goal state
simultaneously.

• Appealing- if the number of nodes at each


step is growing exponentially with the number
of steps that have been taken.

• Also known as hybrid reasoning.


Matching
• How to extract rules from the entire collection of rules
that can be applied at a given point?
• Matching between the current state and the
preconditions of the rule.

• Indexing
Comparing each one’s precondition to the current state
and extracting all the ones that match. But there are two
problems with this simple solution:
1. It will be necessary to use a large number of rules.
Scanning through all of them at every step of the search
would be hopelessly inefficient.
2. It is not always immediately obvious whether a rule’s
preconditions are satisfied at a particular state.
Matching
• Indexing
• A large number of rules => too slow to find a
rule
• Indexing: Use the current state as an index
into rules and select the matching ones
immediately.
• There’s a trade-off between the ease of
writing rules (high-level descriptions) and the
simplicity of the matching process.
Matching
• Matching with Variables
– The problem of selecting applicable rules is made
more difficult when preconditions are not stated as
exact descriptions of particular situations but rather
describe properties that the situations must have.
– In case of a single condition match against single
element in a state description, then the unification
procedure is suffice.
– In case of many rule-based systems, need to compute
the whole set of rules that match the current state
description.
– Backward chaining and forward chaining or apply
unification repeatedly.
Matching
• Complex and appropriate matching
– Rules should be applied if their preconditions
approximately match the current situation.
– Example- A speech-understanding program must contain
rules that map from description of a physical waveform to
phones.
– There is so much variability in the physical signal, as a
result of background noise, differences in the way
individual speak and so forth, that one can hope to find
only an approximate match between the rule that
describes an ideal sound and the input that describes an
unideal world.
– Particularly, it is difficult to deal with because as we
increase the tolerance in the match, we also increase the
number of rules that will match, ultimately increasing the
size of the main search process.
Conflict Resolution
• The result of the matching process is a list of
rules whose antecedents have matched the
current state description along with whatever
variable bindings were generated by the
matching process.
• It is the job of the search method to decide on
the order in which rules will be applied.
• Sometimes it is useful to incorporate some of
that decision making into the matching
process.
Basic approaches to the problem of
Conflict Resolution
1. Preferences based on Rules
– Specificity of the rules
– Physical order of rules
2. Preferences based on Objects
– Importance of Objects
– Position of Objects
3. Preferences based on States
– Evaluation of states

You might also like