26
Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Life Cycle Life Cycle Life Cycle of a Classical Software Development Requirement Analysis Design Implement Test / Maintenance

Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Embed Size (px)

Citation preview

Page 1: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Life CycleLife Cycle

Life Cycle of a Classical Software Development

Requirement Analysis

Design Implement

Test /Maintenance

Page 2: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Problems Problems

Traditional Life Cycle model is Linear

Every Step can be completed before the next starts

Requires exact understanding of the problem at the start of the project

Ability to trace back to the original requirements

Page 3: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Expert System Life CycleExpert System Life Cycle

Basic Principle:

Iteration are inevitable Why?

No body understands the problem exactly

The problem becomes severe when the system under consideration is Knowledge based

Page 4: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

ES Development Life CycleES Development Life Cycle

ProblemSelection

PrototypeConstruction

Formalisation

Implement EvaluationLong-Term Evolution

Page 5: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Unique Characteristics Unique Characteristics

Customer is involved through out the process

Frequent Demonstrations are encouraged

Change is viewed as healthy

Page 6: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Details: Problem Selection Details: Problem Selection

Problem Survey

Candidate Selection

Candidate AnalysisDomain Applicability

Expert Availability

Problem Scope

Cost/benefit Analysis

Final Candidate SelectionTask Characteristics (defining the nature of the ES)

Page 7: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Details: Problem Selection Details: Problem Selection

Candidate Selection

Does the task require expert knowledge?

How much benefit the system will be to the organisation.?

Is the solution valuable for long time to the organisation.?

Page 8: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Problem Selection: Example Problem Selection: Example

Black Board ArchitectureUsed for problems when knowledge acquisition is done from different sources

Rule and Control SchemeUsed under conditions when exact rules can be defined for a problem. The scope of application is also limited

Page 9: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Problem Selection: Example Problem Selection: Example

An expert System has to be developed for incorporating knowledge from a manufacturing plant. The knowledge from various shops have to be collected into a control unit, that would indicate the time delays of the complete assembly plant. The system should also indicate the remedies for reducing the time delays in the each shop of the plant such as paint shop, heat treatment shop etc. The system to be equipped with on-line modification facility for each shop.

TASK CHARACTERISTRICS !!!!!!!

Page 10: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Problem Selection: Solution Problem Selection: Solution

Black Board

Diverse Source of knowledge from each shop

Cooperating Knowledge sources

Rule and Control

For each Shop

With Modification Facilities such as knowledge base editor

Page 11: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Prototype ConstructionPrototype Construction

What should be the primary aim of Prototyping?

To learn more about the domain

To gain deeper understanding of the nature of the project

To demonstrate overall systems’ functionalities

To test the initial design

Page 12: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Prototype ConstructionPrototype Construction

Should the prototype be kept for detailed design?

Keep only those parts of the prototype whose level of implementation quality is similar to that expected of the final system

If it has to be discarded that should only be done after guidelines are for new implementation are extracted from the experience

Page 13: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

FormalisationFormalisation

Formalisation is the development proces

Record key understandings from the prototyping phase

Plan the implementation

Provide visibility at each level

Draw implementation plans

Revisit pre formalisation steps to improve

When formalisation is inevitable?.

For large scale systems the formalisation step becomes very important

Page 14: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Formalisation: StepsFormalisation: Steps

Page 15: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Implementation PlansImplementation Plans

Prototype revisited

System framework development

Core knowledge Acquisition

Coding

Internal Integration

Internal verification

Revision of inference engine and representation methods

Establishing and revising knowledge base partitioning

Further verification

Page 16: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Core Knowledge DevelopmentCore Knowledge Development

Page 17: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

EvaluationEvaluation

Gradual degradation Vs Sudden Collapse

Task difficulty Task difficulty

Ad

equ

acy

Ad

equ

acy

Page 18: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Complete ExampleComplete Example

Want to develop an expert system for detecting fire and suggesting remedial action

Gather Initial Data

Fire occurs when the room temperature is high and smoke appears

Temperature can be measured using Temperature gauge

Smoke can be indicated using smoke detector

Remedial action could be to assert that fire is on and then to call the fire brigade/or switch on the sprinklers

Page 19: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Complete ExampleComplete Example

Carry Out Task Characteristics

What should be the architecture of the knowledge representation?.

Black Board or Rule control based

Rule Based Control

Represent knowledge in appropriate manner

Tree format

Extract rules from the tree

Page 20: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Tree FormatTree Format

Switch on the sprinklers

Fire

hotsmokyAlarm beeps

Page 21: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

RulesRules

IF alarm beeps THEN smoky

IF hot AND smoky THEN fire

IF fire THEN switch on the sprinklers

Which rule should be fired?.

Depends on the state of the initial database of facts

Page 22: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Rules Based SystemRules Based System

Need to assert the initial facts in a database and then to change them

after each rule is fired

Control Scheme

Database of factsalarm beeps

hot

RulesIF alarm beeps THEN ADD smokyIF hot AND smoky THEN ADD fireIF fire THEN ADD switch on the sprinklers

Page 23: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Rules – Rules – Representation Using CLIPSRepresentation Using CLIPS

IF temperature(R,hot) AND environment(R,smoky) THEN fire-in(R)

(defrule fire-alarm

(temperature ?r1 hot)

(environment ?r1 smoky)

(assert (fire-in ?r1)))

Page 24: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

ProblemProblem

A problem faced by an organisation is to select candidates from among a very large pool of individuals for appointment to advanced training. Since the cost incurred for such training is considerable it is deemed important to carry out this process in a logical, efficient manner. The selection is done in two phases. First a test is conducted followed by the second phase of physical examination and evaluation. People who perform good go straight to the second phase. After the 2nd phase the Outstanding candidates are approved while poor are reject and average are placed on the waiting list. The marginal candidates after the first phase are examined on the bases of their job performance. Good performers in this test are allowed for the second phase and rest are rejected.

Page 25: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Decision TreeDecision Tree

Page 26: Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 2 Development Life Cycle of ES

Lahore University of Management Sciences, Lahore, Pakistan

Dr. M.M. Awais- Computer Science Department

Rule ExtractionRule Extraction