+ All Categories
Home > Documents > Production Systems

Production Systems

Date post: 30-Dec-2015
Category:
Upload: september-vasquez
View: 25 times
Download: 0 times
Share this document with a friend
Description:
Set of production rules – condition/action statements Working memory – set of current facts Recognize-act cycle – Match conditions of the rules against the working memory. Those that match make up the conflict set. A conflict resolution procedure selects a rule which is fired. - PowerPoint PPT Presentation
Popular Tags:
27
Production Systems Set of production rules – condition/action statements Working memory – set of current facts Recognize-act cycle – Match conditions of the rules against the working memory. Those that match make up the conflict set. A conflict resolution procedure selects a rule which is fired.
Transcript

Production Systems

Set of production rules – condition/action

statementsWorking memory – set of current factsRecognize-act cycle – Match conditions of the rules

against the working memory. Those that match

make up the conflict set. A conflict resolution

procedure selects a rule which is fired.

Backtracking

A pure production does not recover from dead ends.

If no production rules are enable, the system quits.

Other systems allow for backtracking from previous

states – restore the working memory and select a

different production rule to fire.

Conflict Resolution

There are different conflict resolution strategies that

range from simple to complex: Don't allow a rule to fire again unless some fact in

working memory that met the condition of the rule

is changed.Choose the least recently used ruleChoose the rule whose condition most recently

became trueChoose the more specific rule

Examples: Haunt (Laird)Haunt was a text-based interactive adventure. It was inspired by

Advent, although Haunt was a bit over-the-top, and quirky (and a bit

buggy). Haunt was developed by me while I was a graduate student at

Carnegie Mellon around 1980-1981. At that time, I was involved in

research on rule-based systems (working with Allen Newell), and

decided that I wanted to use rule-based systems to create a game

(inspired by Adventure). Haunt was written in OPS-4, which in turn

was written in Interlisp and it was never ported to any other

machines, so I'm afraid that Haunt is really dead. I started to port

Haunt to OPS-5, but quickly gave up. Haunt was the first rule-based

system to have over 1000 rules and it topped out at around 1500.

Because of its size, it served as an important data point in early

research on building large rule-based systems.

Rete Algorithm (Forgy)

From Wikipedia:A network of nodes – each node (except the root)

corresponds to a pattern in the condition of a ruleThe path of the root to a leaf specifies the entire

conditionEssentially the network is a search trieWhen facts are asserted or modifier, they are

propagated along the trieWhen a leaf is reached, the rule is triggered

Rete Algorithm (cont'd)

Advantages:Eliminates or reduces redundancy through the use

of node-sharingStores partial matchesAvoids complete re-evaluation of all facts when

changes madeAllows for efficient retrieval of memory elements

when facts are remove

Example - OPS5

Production system used in the R1/Xcon expert

system to configure VAXen (1970s)Written in LISP, then BLISSUses forward-chaining algorithmUses the RETE algorithm

OPS5 Example Rule

(p Holds::Object-Ceiling

{(goal ^status active ^type holds ^objid <O1>) <goal>}

{(physical-object

^id <O1>

^weight light

^at <p>

^on ceiling) <object-1>}

{(physical-object ^id ladder ^at <p> ^on floor) <object-2>}

{(monkey ^on ladder ^holds NIL) <monkey>}

-(physical-object ^on <O1>)

-->

(write (crlf) Grab <O1> (crlf))

(modify <object-1> ^on NIL)

(modify <monkey> ^holds <O1>)

(modify <goal> ^status satisfied)

)

Simple Example

Rules:ba -> abca -> accb -> bc

Working memory: cbaca

will sort to aabcc.

Example – Bankruptcy and Default

If Earnings Trend is Negative

Then there will be a loan default

Else If Earnings Trend is Positive

Then there will be no loan default

Else If Earnings Trend is stable

Then If Current Ratio Trend is up

Then there will be no loan default

Else If Current Ratio Trend is down

Then there will be loan default

Example - Logic

Forward chaining:If p and q, then assert(p ^ q)If p and p -> q, then assert(q)If p -> r and q -> r and p v q, then assert(r)

Backward chaining:If goal(p ^ q), then add goal(p) and goal(q)If goal(p v q), then add goal(p)

Question: What do we do about boxes?

Advantages of Production Systems

Separation of knowledge and controlNatural mapping for certain problemsModularity of rulesPattern-directed controlPossibility of heuristic control of searchTracing and explanationPossible randomnessPlausible model of human behavior

ARPA Challenge

The ARPA Speech Understanding Research (SUR)

(1971) challenge:Accept connected speech, from many cooperative speakers,

in a quiet room, using a good microphone, with slight

tuning/speaker, accepting 1000 words, using an artificial

syntax, in a constrained task, yielding < 10% semantic

error, in a few times real time, on a 100 MIPS machine.

Harpy (Lowerre)

Conventional segmentation and labeling approachCompiled acoustic models with the lexical

representation of words, syntactic production rules

for sentences, and set of word boundaries into one

large network (finite state machine)Used beam search to find the best match

Hearsay-II (Erman, Reddy)

Parallel and synchronous processing for word

hypothesesBlackboard architecture for coordinating

informationKS: waveform analysis, extract acoustic parameters,

classify acoustic segments into phonetic classes,

recognize words, parse phrases, hypothesize about

unknown words of syllables

Blackboard Architecture

Coordinates multiple processes or knowledge

sources (KS)Global data base of partial results, accessible by all

KS.Each KS gets data from the blackboard, processes

it, and returns the result to the blackboardEach KS works independently, asynchronouslyPossibly has a scheduler to decide who goes next

Expert Systems

Type of knowledge-intensive or strong method

problem-solving“Knowledge is king” - Inference engine of lesser

importanceModel of human problem solvingGather knowledge from human sources – experts,

books, articles, manuals

Advantages of Expert Systems

Rules sets can be modularCan combine knowledge from difference sources

(be wary of differences)Can inspect reasoning process, explanation facilityEasy to add/delete/modify rulesReason heuristicallyReason stochastically

Use of Expert Systems

Interpretation – form conclusions from dataPrediction – give probable consequences in a give

situationDiagnosis – determine the cause given the

symptomsDesign/Planning – find a configuration or list of

steps to accomplish a goalMonitoring – compare current behavior to expected

behavior

Components of an Expert System

Knowledge base – set of production rulesGeneral knowledgeCase specific information

Inference engineUser interfaceKnowledge base editorExplanation subsystem

Roles in Creating an Expert System

Knowledge engineerDomain expertEnd User

When to Create an Expert System

Expert systems are expensive to create – a

considerable investment of human time and money

– but relatively inexpensive to use

Criteria

The need justifies the costHuman expertise may not be available in the fieldThe problem may be solved using symbolic

reasoningThe problem domain is well-structuredNo common sense reasoning neededHuman experts existTraditional methods don't work

Development Cycle

Similar to program development cycle:Define problemConstruct prototypeTest/use systemDebug/Modify

If necessary, start over againFinal evaluation, alpha-testing, beta-testing, releaseMaintenance

Conceptual Models

One difference between an expert and a novice is that

the expert has conceptual model(s) for organizing

information and rules, that is a set of concepts that

are not apparent in the data, but are a way to group

together different elements and reason about them.

For example, aerobic vs. anaerobic bacteria, the

electrical system of a car, leaf classification for

trees.

Expert Systems – Classic Exs.

MycinProspectorDendralOPS5

Expert System Shells

An advantage of expert systems is that one can

segregate the knowledge base for a specific problem

from the general system. Removing the knowledge

base leaves an expert system shell that can be used

for other domains, e.g., MYCIN -> EMYCIN.


Recommended