Top Banner
PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy
21

PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Dec 24, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

PARALLELIZATION OF EXPERT SYSTEMCS6260 Project PresentationVinay B Gavirangaswamy

Page 2: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

What is Expert System?

Expert system is a program/application that mimics decision taking ability of a domain expert.

Knowledge Base

Domain Knowledge

Working Memory

Inference Engine

Use

r Inte

rface

Page 3: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Implementation Techniques – Buzz words

Bayes Rule Bidirectional Search Causal Models Chronological Backtracking Control Rules Dempster-Shafer Uncertainty

Management MYCIN

Forward-Chaining Fuzzy-Set Theory Goal-Driven Reasoning Model Driven Reasoning Opportunistic Search Semantic Networks Rules Truth Maintenance Systems

Page 4: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Production Systems

‘It’s a set of syntactic and semantic conventions that make it possible to describe things’.

Syntax – Set of rules for combining symbols and arrangements of symbols to form expression in a representational language.

Semantic – Specifies how constructed expressions should be interpreted.

Page 5: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Production Rules

Consists of premise-action pairs, for example

P’s – are called conditions or ‘left-hand side’

Q’s – are called conclusions or ‘right-hand side’

Working Memory (WM): It is to hold data, often in the form of object-attribute-value triples.

m & ... & Q1

then Q

& ...&P1

Pif n,

Page 6: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

The Behavior of the Interpreter/Inference Engine

Interpreter or inference engine for a set of production rules can be described in term of ‘recognize-act cycle’.1. Match the calling patterns of rules against

elements in working memory.2. If there is more than one rule that could fire,

then decide which one to apply; this is called ‘conflict resolution’.

3. Apply the rule, perhaps adding a new item to WM or deleting an old one, and then go to step (1).

Page 7: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Forward Chaining

At the Global level of control, production rules are driven forward.

Chains forward from condition that we know to be true, towards conclusions which the facts allow us to establish, by matching data in working memory against the left-hand sides of the rules.

The mode of chaining describes the way rules are activated by matching WM elements.

Page 8: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Related Work

Page 9: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Blue DRAGON

Analyzes Minimal Invasive (MIS) surgical tasks into primary elements.

Kinematics and dynamics of left & right endoscopic tools along with visual surgical scene is used as input to derive model.

Decomposed surgical model consists of 30 fully connected finite states Markov model. And its equivalent grammar.

Objective learning curve is defined for expert surgeon and trainee using a scoring function (MM). Evaluation is based on distance between the two.

Page 10: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Blue DRAGON (Contd.)

Fully connected FSD for decomposing MIS

Signature of forces, velocities associated with different states

Page 11: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Red DRAGON (Blue DRAGON Contd.)

CAD Design Actual Machine

http://bionics.soe.ucsc.edu/research/surgical_index.html

Page 12: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Parallel Implementation of Rule-Based Expert System

Or- parallelism: Each rule, whose head unifies with a fact, can be solved in parallel.

And-parallelism: Processes execute in parallel to solve each clause of the body.

Conflict resolution is the bottle-neck for parallel execution. Rule Based system is described by following attributes

functionn transitioas considered is R so DD:R and 1tA that

,...,2

,1

RR :rules ofset a .6i

vof value theis D ,,...,2

,1

tA :state System 5.

system. of space state defines D V, .,...,2

,1

DD :parametersfor domain 4.

,...,,2

,1O

V outputs; ofset a .3

,,...,2

,1I

V inputs; ofset a 2.

,,...,2

,1

vV ;parameters ofset a 1.

tARsuch

mRR

ti

awheretnatata

nDD

VOh

vO

vO

v

VIk

vI

vI

v

nvv

Page 13: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Knowledge Base Organization Uses AND/OR graph formalism for the

knowledge network Rules and parameters are organized to

form a knowledge network.

parameter and rulebetween formed islink a : v

parameter and rulebetween formed ischain a : v

j

j

i

i

ROUT

RIN

Page 14: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Knowledge Base Organization (Contd.)

3:R and *2:Q THEN 6X and YhA IF :

3*2: Zand 32:Y THENG F IF :

B2:Y and *2:X THEN 2A IF :

FR

R

AR

k

j

i

ABXY

FGYZ

ABXYZ

FGQR

AFXYQR

IF

THEN

IF

THEN

THEN

IF

R100 R102

Knowledge Base of three rules

Knowledge Network

Q R

X Y

A B

Z

GF

R102

R100 R101

Page 15: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Implementation on shared memory MIMD machine Implemented using tables, markers and

message broadcasting. Only forward chaining is used in the inference

process. Shared memory is divided into number of

banks Each parameter is stored in memory bank and

rule is loaded into one processor. Rules and parameters do not migrate to other

processors and memory banks during execution.

pBBB ,...,,

21

Page 16: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Implementation on shared memory MIMD machine (Contd.)

Knowledge network is implemented through message broadcasting

1. Execute the actions of the rule being fired

2. If the execution of an action changes the value of parameter, then the processor broadcasts a message, containing parameter-id, to the bus.

3. Processor enters critical section to change value of the parameter.

4. Processor resets the variable counter for the rule to 1.

5. Pickup message broadcasted and update the local parameter values.

Page 17: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Rule base partitioning and allocation

Each input parameter is associated with probability for the relative frequency that appears in lth position in input sequence

Use and to denote numerical values

(min and max) with rule and the parameter min/max equations for input and rules are

written in matrix form In iteration step is computed

first followed by

ijv

ijv

lpij

k

lijij

lPlis1

sijf vofpriority the:

iR j

v

EVDR and VRCV

EVDR tt 1

11 tt RCV

Page 18: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Algorithm of partitioning rules for parallel execution

.

;PROC toLAssign

END;

END;

i;index

;PROCsuch that Revery for Linfd

Begin

procs ofnumber theis P DO p TO 2j FOR

1;index

;PROCsuch that Revery for Linfd

Begin

rules ofnumber theis m DO m TO 1iFor .4

L.list in the rule i theofpriority thedenotes L

;priorities their toaccording Llist a into rules Sort the

priorites; rulefor equationsmin/max thesolve toiteration sequential Use3.

equations;min/max theForm

E; vector timeexecution theForm .2

;R to1priority assign ,R

;1k , v

; v toassign , v

tionInitializa .1

indexi

lki

lki

th

i

ii

iij

ijijij

END

RR

RR

R

VV

V

kk

kk

I

I

It’s a greedy algorithm Produces good but not

necessarily optimal rule assignment to multiprocessors

Cost of rule assignment

Problem of partitioning and assigning rules to minimize cost C(RA) is NP-complete.

n

i

n

jjiij

ARAC1 1

/

Page 19: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Allocating parameter to memory banks

Algorithm to allocate memory banks such that they do not cause many memory access conflicts when executed in parallel.

Problem of allocating parameter to memory banks to minimize the reference cost is NP-complete and developed algorithm has time complexity of

2nO

Page 20: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

Parallel tools for implementing Expert System

MultiLisp –  interpreter written in Fortran and ported to C  extended with constructs for parallel execution and shared memory.

Brain Aid Prolog –  a parallel PROLOG environment for Transputer systems of 1-512 processors.

BeBOP – language combines sequential and parallel Logic Programming (LP), object oriented programming and meta-level programming.

Multi-BinProlog –Linda-style parallel extension to BinProlog.

Page 21: PARALLELIZATION OF EXPERT SYSTEM CS6260 Project Presentation Vinay B Gavirangaswamy.

References

Peter Jackson, Introduction to expert systems, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1986

Rosen J., J. D. Brown, L. Chang, M. Barreca, M. Sinanan, B. Hannaford, The Blue DRAGON - A System for Measuring the Kinematics and the Dynamics of Minimally Invasive Surgical Tools In–Vivo, Proceedings of the 2002 IEEE International Conference on Robotics & Automation, Washington DC, USA, May 11-15, 2002.

Rosen J., L. Chang, J. D. Brown, B. Hannaford, M. Sinanan, R. Satava, Minimally Invasive Surgery Task Decomposition - Etymology of Endoscopic Suturing, Studies in Health Technology and Informatics - Medicine Meets Virtual Reality, vol. 94, pp. 295-301, IOS Press, January 2003.

Tao Li, Parallel implementation of rule-based expert systems for interactive applications, Parallel Computing Volume 10, Issue 3, May 1989, Pages 309–318