18
COMP 4640 COMP 4640 Intelligent & Interactive Intelligent & Interactive Systems Systems Programs Supporting Programs Supporting Model - Based Reflex Model - Based Reflex Agents Agents November 2008 November 2008 Dr. Cheryl Seals Dr. Cheryl Seals

COMP 4640 Intelligent & Interactive Systems Programs Supporting Model - Based Reflex Agents November 2008 Dr. Cheryl Seals

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

COMP 4640COMP 4640Intelligent & Interactive SystemsIntelligent & Interactive Systems

Programs Supporting Programs Supporting Model - Based Reflex AgentsModel - Based Reflex Agents

November 2008November 2008

Dr. Cheryl SealsDr. Cheryl Seals

22

Simple reflex agentsSimple reflex agents

Programs that support Programs that support Model - based Reflex AgentsModel - based Reflex Agents

Simple reflex agentsSimple reflex agents

select precepts based on the select precepts based on the current perceptcurrent percept

ignoring the rest of the precept ignoring the rest of the precept historyhistory

Example: BeetleExample: Beetle

44

Model-based reflex agentsModel-based reflex agents

Programs that support Programs that support Model - based Reflex AgentsModel - based Reflex Agents

Most systems are based on “condition-Most systems are based on “condition-action” rules action” rules (i.e. situation-action rules, productions, or if-then rules)(i.e. situation-action rules, productions, or if-then rules)

(e.g. If car-in-front is braking then initiate-braking p46)(e.g. If car-in-front is braking then initiate-braking p46)

Model-Based Reflex AgentsModel-Based Reflex Agents Most effective way to keep track of the part of the Most effective way to keep track of the part of the world it can’t see now. world it can’t see now. Maintain some internal state that depends on Maintain some internal state that depends on percept percept historyhistory and thereby reflects at least some and thereby reflects at least some of the unobserved aspects of the current state (e.g. of the unobserved aspects of the current state (e.g. using some type of variable).using some type of variable).

Production Based SystemsProduction Based SystemsThe production rule paradigm originated in the field of AI with the The production rule paradigm originated in the field of AI with the expert systems rule languages such as OPS5 (Brownston et al. 1985)expert systems rule languages such as OPS5 (Brownston et al. 1985)

condition action

An inference engine cycles through all the rules in the system An inference engine cycles through all the rules in the system matching the condition parts of the rules with data in working memory.matching the condition parts of the rules with data in working memory.

Of all the rules that match (the candidate set), one is selected using Of all the rules that match (the candidate set), one is selected using some conflict resolution policy and this selected rule is fired, that is, its some conflict resolution policy and this selected rule is fired, that is, its action part is executed. action part is executed.

The action part may modify the working memory, possibly according to The action part may modify the working memory, possibly according to the matched data and the cycle continues until no more rules match.the matched data and the cycle continues until no more rules match.

Rule basedRule based Rules have special ops: Rules have special ops:

Fire, which causes a rule to be triggeredFire, which causes a rule to be triggeredEnable, which causes a rule to be activatedEnable, which causes a rule to be activatedDisable, which causes a rule to be deactivatedDisable, which causes a rule to be deactivated

Conflict resolutionConflict resolution Break ties with Specification, Sequencing, Meta rulesBreak ties with Specification, Sequencing, Meta rules

Production Based SystemsProduction Based SystemsCLIPSCLIPS(“C”Language Integration Production System)(“C”Language Integration Production System)

Production system developed at Production system developed at NASA’s Johnson space Johnson space center.center.

Written in ANSI C instead of LISPWritten in ANSI C instead of LISP CLIPS implements standard forward-chaining pattern-CLIPS implements standard forward-chaining pattern-

matching algorithmmatching algorithm CLIPS knowledge representation similar to OPS5 and ART CLIPS knowledge representation similar to OPS5 and ART

systems.systems. ConstructsConstructs

simple string fact assertion & retractionsimple string fact assertion & retractionTemplatesTemplatesIf-then rules (“productions”)If-then rules (“productions”)Objects and instancesObjects and instances

NASA uses clips in the following projectsNASA uses clips in the following projects Intelligent computer aided crew training, weather Intelligent computer aided crew training, weather

forecasting, shuttle space planning, shuttle forecasting, shuttle space planning, shuttle diagnostics, Mission Control Center (telemetry data diagnostics, Mission Control Center (telemetry data analysis and diagnostics), flight assistance and analysis and diagnostics), flight assistance and controlcontrol

ART commercial expert system has many of the commercial expert system has many of the same features as CLIPSsame features as CLIPS

Agent Based SystemsAgent Based Systems

Systems to investigateSystems to investigate Stagecast CreatorStagecast CreatorTM TM (www.stagecast.com) (www.stagecast.com)

AgentsheetsAgentsheetsTMTM (www.agentsheets.com) (www.agentsheets.com)

End User Programming with agentsEnd User Programming with agentsStagecast Study Report:Stagecast Study Report:

We are attempting to create a cross-generational web We are attempting to create a cross-generational web based learning community for middle school students, based learning community for middle school students, teachers, and seniors.teachers, and seniors.

Learning community will design, construct, and discuss Learning community will design, construct, and discuss simulations of community issues.simulations of community issues.

Summary of results of formative evaluation with students Summary of results of formative evaluation with students creating simulation projects.creating simulation projects.

Proceedings of IEEE Visual Languages 2001, Rosson, Seals Proceedings of IEEE Visual Languages 2001, Rosson, Seals 2001; CHI 2001; DIS 2002; NSF Research: NSF ITR 0091102.2001; CHI 2001; DIS 2002; NSF Research: NSF ITR 0091102.

Based on a movie metaphorBased on a movie metaphor

Programming is facilitated by macro recorder to allow Programming is facilitated by macro recorder to allow “programming by demonstration”“programming by demonstration”

Behaviors are represented as a set of as a set of Behaviors are represented as a set of as a set of productions or “if-then” rulesproductions or “if-then” rules

Stagecast CreatorStagecast Creator

ProcedureProcedure

Participants: 10 middle school studentsParticipants: 10 middle school students

Background surveyBackground survey

Performed in usability testing lab study with “think aloud” Performed in usability testing lab study with “think aloud” protocolprotocol

Recorded critical incidentsRecorded critical incidents

Captured video, audio, and screen Captured video, audio, and screen

Subjective questionnaire, knowledge survey, Subjective questionnaire, knowledge survey, retrospective interviewretrospective interview

Visual Agent ProgrammingVisual Agent Programming

Spatial context and visual appearance are Spatial context and visual appearance are required elements in a rule’s preconditionrequired elements in a rule’s precondition

Correct position and appearance are Correct position and appearance are preconditions for rulespreconditions for rules

If Precondition is satisfied, Then rule is fired.

Characters may have many instantiations

Observations and ResultsObservations and Results

Duration 30-55 minutes Activity IDuration 30-55 minutes Activity I

Duration 34-47 minutes Activity IIDuration 34-47 minutes Activity II

Most students were successful in modifying simulations Most students were successful in modifying simulations and adding new characters.and adding new characters.

Usability satisfactionUsability satisfaction Easy and fun to useEasy and fun to use Would like to use it in their classesWould like to use it in their classes But needed more exposure to feel confidentBut needed more exposure to feel confident No problems with drawing toolsNo problems with drawing tools Problems with tools for rule creationProblems with tools for rule creation

IssueIssue Likely CauseLikely Cause

Directing input to the wrong Directing input to the wrong windowwindow

Too many similar-looking Too many similar-looking windowswindows

Confused between rules and Confused between rules and rule-actions listsrule-actions lists

Lists that look similar but have Lists that look similar but have different meaningsdifferent meanings

Select wrong iconSelect wrong icon Multiple similar iconsMultiple similar icons

Inability to find rules or other Inability to find rules or other content in windowcontent in window

Non-traditional method of Non-traditional method of scrollingscrolling

Misunderstand spotlight and Misunderstand spotlight and concept of stretching itconcept of stretching it

Spotlight metaphor is not Spotlight metaphor is not obvious or intuitiveobvious or intuitive

Stagecast Usability ProblemsStagecast Usability Problems

Practical metaphors for iconsPractical metaphors for icons

Bigger IconsBigger Icons

Fewer layers of scaffoldingFewer layers of scaffolding

Relation between internal variables and Relation between internal variables and visual state of the simulation.visual state of the simulation.

Role of visual context in rulesRole of visual context in rules Rules must match exact visual context, most Rules must match exact visual context, most

PBD system make rules to specific to be reusedPBD system make rules to specific to be reused

Visual Programming ChallengesVisual Programming Challenges

End User Programming with agentsEnd User Programming with agents AgentSheets Study Report: AgentSheets Study Report:

AgentSheets is a production based AgentSheets is a production based visual programming language where visual programming language where end users create with direct end users create with direct manipulation techniquesmanipulation techniques

Reports a study of teachers learning Reports a study of teachers learning to build educational simulations as to build educational simulations as curricula aids.curricula aids.

Summary of results of formative Summary of results of formative evaluation to design agent based evaluation to design agent based production system for end user production system for end user creation of educational simulations.creation of educational simulations.

Proceedings of IEEE Visual Proceedings of IEEE Visual Languages 2002, Seals 2002.Languages 2002, Seals 2002.

Example RuleExample Rule- left-handspecifies a“before” state

- right-handspecifies oneor moreactions to take if stateis confirmed

- multiple rulesare tested inorder, firstmatch fires

Empirical Study ResultsEmpirical Study Results Need robust drawing tools Need robust drawing tools Objects should be important, not their spatial Objects should be important, not their spatial

locationlocation Flexible object sizeFlexible object size Support for import of objectsSupport for import of objects Allow incremental testingAllow incremental testing Increase the level of usability for novice Increase the level of usability for novice

programmersprogrammers Platform independent implementationPlatform independent implementation