Top Banner
Com1005 Machines Com1005 Machines and Intelligence and Intelligence Amanda Sharkey Amanda Sharkey
62
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: Com1005 Machines and Intelligence Amanda Sharkey.

Com1005 Machines Com1005 Machines and Intelligenceand Intelligence

Amanda SharkeyAmanda Sharkey

Page 2: Com1005 Machines and Intelligence Amanda Sharkey.

Last week:Last week: Turing test – Turing test – A conversation stopper? (Dennett)A conversation stopper? (Dennett) OROR Flawed and anthropocentric?Flawed and anthropocentric?

Ways of improving it?Ways of improving it?

Page 3: Com1005 Machines and Intelligence Amanda Sharkey.

Early AI programsEarly AI programs

great optimism!great optimism! 1952 Arthur Samuel: draughts program 1952 Arthur Samuel: draughts program

which learned to beat its inventorwhich learned to beat its inventor Logic Theorist – Newell and SimonLogic Theorist – Newell and Simon 1956 Dartmouth Summer Research Project 1956 Dartmouth Summer Research Project

on AIon AI General Problem Solver – Newell, Simon General Problem Solver – Newell, Simon

and Shawand Shaw

Page 4: Com1005 Machines and Intelligence Amanda Sharkey.

Early AI ProgramsEarly AI Programs

Focus on ability to reason logically ...Focus on ability to reason logically ...

1956 The Logic Theorist1956 The Logic TheoristAllen Newell, Cliff Shaw and Herbert Allen Newell, Cliff Shaw and Herbert

SimonSimone.g. Given that either X or Y is true and e.g. Given that either X or Y is true and

given further that Y is in fact false, it given further that Y is in fact false, it follows that X is truefollows that X is true

Presented at Dartmouth ConferencePresented at Dartmouth Conference

Page 5: Com1005 Machines and Intelligence Amanda Sharkey.

Start with axioms of logic Start with axioms of logic To derive theorem (also sentence) from axiomsTo derive theorem (also sentence) from axioms

Rules of inferenceRules of inference (sentences describing what is known)(sentences describing what is known)

Could generate all possible sentences Could generate all possible sentences from axiom, and stop when theorem from axiom, and stop when theorem proved. (British Museum algorithm)proved. (British Museum algorithm)

Or use heuristics to guide searchOr use heuristics to guide search

Page 6: Com1005 Machines and Intelligence Amanda Sharkey.

The Logic TheoristThe Logic Theorist Proved 38 of the 52 theorems presented in Proved 38 of the 52 theorems presented in

Bertrand Russell and Alfred North Whitehead’s Bertrand Russell and Alfred North Whitehead’s book book Principia MathematicaPrincipia Mathematica

The Logic Theorist found a more The Logic Theorist found a more elegant proof for one theorem than elegant proof for one theorem than Russell and Whitehead’sRussell and Whitehead’s

Newell, Simon, Shaw wrote journal Newell, Simon, Shaw wrote journal paper on the proof, listing Logic paper on the proof, listing Logic Theorist as co-author.Theorist as co-author.

Page 7: Com1005 Machines and Intelligence Amanda Sharkey.

Logic Theorist: a reasoning program.Logic Theorist: a reasoning program. But too prompt at generating proofs. But too prompt at generating proofs. Newell – interest in designing a Newell – interest in designing a

computer simulation of human computer simulation of human problem solversproblem solvers

Printed trace of steps of program, Printed trace of steps of program, compared to records of students compared to records of students ‘thinking out loud’ as they grappled ‘thinking out loud’ as they grappled with problems.with problems.

Page 8: Com1005 Machines and Intelligence Amanda Sharkey.
Page 9: Com1005 Machines and Intelligence Amanda Sharkey.

General Problem Solver (GPS)General Problem Solver (GPS)

Designed to emulate human problem Designed to emulate human problem solving protocolssolving protocols

Means-end AnalyserMeans-end Analyser Developed over a 10 year period.Developed over a 10 year period. Reference:Reference: Newell, A., and Simon, H.A. (1961) GPS, a Newell, A., and Simon, H.A. (1961) GPS, a

Program that Simulates Human Thought. Program that Simulates Human Thought. In E.A. Feigenbaum and J. Feldman (Eds) In E.A. Feigenbaum and J. Feldman (Eds) Computers and ThoughtComputers and Thought, New York: , New York: McGraw-Hill, pp 279-93.McGraw-Hill, pp 279-93.

Page 10: Com1005 Machines and Intelligence Amanda Sharkey.
Page 11: Com1005 Machines and Intelligence Amanda Sharkey.

GPSGPS Could solve problems likeCould solve problems like Missionaries and cannibals problem.Missionaries and cannibals problem. Three missionaries are travelling through an Three missionaries are travelling through an

inhospitable landscape with their three native inhospitable landscape with their three native bearers. The bearers are cannibals, but it is the bearers. The bearers are cannibals, but it is the custom of their people never to attack unless the custom of their people never to attack unless the victims are outnumbered. Each missionary is victims are outnumbered. Each missionary is aware of what might happen if the party is aware of what might happen if the party is accidentally divided. The group reaches the bank accidentally divided. The group reaches the bank of a wide, deep flowing river. The party has to of a wide, deep flowing river. The party has to cross it. One of the bearers chances upon a two-cross it. One of the bearers chances upon a two-man dugout upturned in the mud. A terrible grin man dugout upturned in the mud. A terrible grin spreads across his face as he savours the spreads across his face as he savours the implications of his find.implications of his find.

Page 12: Com1005 Machines and Intelligence Amanda Sharkey.

3 missionaries, 3 cannibals3 missionaries, 3 cannibals Cannibals only attack if victims are Cannibals only attack if victims are

outnumbered.outnumbered. Have to cross river in 2 man dugout.Have to cross river in 2 man dugout. How to get all across without letting How to get all across without letting

cannibals outnumber missionaries on cannibals outnumber missionaries on either bank?either bank?

Page 13: Com1005 Machines and Intelligence Amanda Sharkey.

Try solving the problemTry solving the problem

Page 14: Com1005 Machines and Intelligence Amanda Sharkey.

Probably used similar methods to Probably used similar methods to GPS – build up sequence of river GPS – build up sequence of river crossings one at a time, back-crossings one at a time, back-tracking occasionally when things to tracking occasionally when things to wrong.wrong.

Page 15: Com1005 Machines and Intelligence Amanda Sharkey.

GPS works by working out how to arrive at GPS works by working out how to arrive at goal state from current state.goal state from current state.

Similar problems – Tower of HanoiSimilar problems – Tower of Hanoi Trying to get from home to Sheffield Trying to get from home to Sheffield

UniversityUniversity Procedures selected according to their Procedures selected according to their

ability to reduce the observed difference ability to reduce the observed difference between the current state and the goal between the current state and the goal state = state = means ends analysismeans ends analysis

Page 16: Com1005 Machines and Intelligence Amanda Sharkey.

GPS designed to imitate human GPS designed to imitate human problem solvingproblem solving– tries to identify a series of lesser tries to identify a series of lesser

problems, which if solved would lead to problems, which if solved would lead to solution of main problem.solution of main problem.

– The order in which goals and subgoals The order in which goals and subgoals considered was similar to the way considered was similar to the way humans approached problemshumans approached problems

Page 17: Com1005 Machines and Intelligence Amanda Sharkey.

GPSGPS– SearchSearch

Start positionStart positionTransitionsTransitionsGoal or solution positionGoal or solution position

HeuristicsHeuristics

– Human resemblance?Human resemblance?

Page 18: Com1005 Machines and Intelligence Amanda Sharkey.

GPS used heuristics (not algorithms)GPS used heuristics (not algorithms) Trial and error guided by tables telling it which Trial and error guided by tables telling it which

moves to try firstmoves to try first– ‘‘Heuristic’ from greek word heuriskein (to discover)Heuristic’ from greek word heuriskein (to discover)– Archimedes shouted ‘Heurika’ (eureka) as water Archimedes shouted ‘Heurika’ (eureka) as water

displaced from the bath.displaced from the bath.– Like a rule of thumbLike a rule of thumb– ‘‘a process that may solve a given problem, but offers no a process that may solve a given problem, but offers no

guarantee of doing so, is called a ‘heuristic’ for that guarantee of doing so, is called a ‘heuristic’ for that problem’problem’

– - instead of working through all possible solutions, use - instead of working through all possible solutions, use short cuts ie. Rules that eliminate less likely candidates short cuts ie. Rules that eliminate less likely candidates and allow concentration on those that seem more likely.and allow concentration on those that seem more likely.

Page 19: Com1005 Machines and Intelligence Amanda Sharkey.

GPS – “general” because general GPS – “general” because general problem solving methods separated problem solving methods separated from knowledge specific to task in from knowledge specific to task in hand.hand.

Problem solving part (means end Problem solving part (means end analysis)analysis)

Task dependent knowledge, Task dependent knowledge, collected in data structures forming collected in data structures forming task environmenttask environment

Page 20: Com1005 Machines and Intelligence Amanda Sharkey.

GPSGPS

Can be considered from 3 Can be considered from 3 perspectivesperspectives

1.1. Relationship to human thought?Relationship to human thought?

2.2. AI hype and exaggeration?AI hype and exaggeration?

3.3. AI techniquesAI techniques

Page 21: Com1005 Machines and Intelligence Amanda Sharkey.

1. Relationship to human thought1. Relationship to human thought

GPS – behaves similarly to humansGPS – behaves similarly to humans A program that solves problemsA program that solves problems Is this evidence that human mind also Is this evidence that human mind also

solves problems like a computer?solves problems like a computer? Is mind a computer?Is mind a computer?

– Symbol processing hypothesisSymbol processing hypothesis– Strong symbol processing hypothesisStrong symbol processing hypothesis

.... To be returned to in later lectures..... To be returned to in later lectures.

Page 22: Com1005 Machines and Intelligence Amanda Sharkey.

2. AI hype?2. AI hype? Herbert Simon (1957)Herbert Simon (1957)““It is not my aim to surprise or shock you – but the It is not my aim to surprise or shock you – but the

simplest way I can summarize is to say that there simplest way I can summarize is to say that there are now in the world machines that think, that are now in the world machines that think, that learn and that create. Moreover, their ability to learn and that create. Moreover, their ability to do these things is going to increase rapidly until – do these things is going to increase rapidly until – in a visible future- the range of problems they can in a visible future- the range of problems they can handle will be coextensive with the range to handle will be coextensive with the range to which the human mind has been applied”which the human mind has been applied”

GPS – described as a program which simulates GPS – described as a program which simulates human thoughthuman thought

Page 23: Com1005 Machines and Intelligence Amanda Sharkey.

By 1976, Drew McDermott writingBy 1976, Drew McDermott writing ‘‘by now GPS is a colourless term denoting by now GPS is a colourless term denoting

a particularly stupid program to solve a particularly stupid program to solve puzzles. But it originally meant ‘General puzzles. But it originally meant ‘General Problem Solver’ which caused everybody a Problem Solver’ which caused everybody a lot of needless excitement and distraction’lot of needless excitement and distraction’

Problem of lack of knowledge.Problem of lack of knowledge. Also only suitable for particular kinds of Also only suitable for particular kinds of

problem – reaching a goal from a starting problem – reaching a goal from a starting positionposition

Page 24: Com1005 Machines and Intelligence Amanda Sharkey.

Different kinds of problemDifferent kinds of problem A man leaves a hut on the top of a mountain at noon and A man leaves a hut on the top of a mountain at noon and

walks down the track to a hut at the bottom of the walks down the track to a hut at the bottom of the mountain. Next day a woman leaves the hut at the bottom mountain. Next day a woman leaves the hut at the bottom of the mountain, again at noon, and walks up the track to of the mountain, again at noon, and walks up the track to the hut at the top. Is there a time, x o’ clock, such that at x the hut at the top. Is there a time, x o’ clock, such that at x o’ clock on the second afternoon the woman is at exactly o’ clock on the second afternoon the woman is at exactly the same place on the track as the man was at x o’ clock on the same place on the track as the man was at x o’ clock on the first afternoon?the first afternoon?

No obvious goal or starting position.No obvious goal or starting position. Also GPS relies on preset rankings and heuristics.Also GPS relies on preset rankings and heuristics. Too complicated for complex problems.Too complicated for complex problems. Work on GPS ceased around 1966.Work on GPS ceased around 1966.

Page 25: Com1005 Machines and Intelligence Amanda Sharkey.

3. AI techniques3. AI techniques

Search – fundamental to traditional Search – fundamental to traditional AIAI

Changing real world problem into a Changing real world problem into a search problemsearch problem– Start positionStart position– A set of transitions from one position to A set of transitions from one position to

anotheranother– Goal or solution position.Goal or solution position.

Page 26: Com1005 Machines and Intelligence Amanda Sharkey.

Search – originally developed in AI, but Search – originally developed in AI, but now fundamental to computing.now fundamental to computing.

Combinatorial explosion and heuristicsCombinatorial explosion and heuristics

Page 27: Com1005 Machines and Intelligence Amanda Sharkey.

Means-ends analysisMeans-ends analysis Involves detection of difference between Involves detection of difference between

current state and goal statecurrent state and goal state Once difference identified, an operator to Once difference identified, an operator to

reduce the difference must be foundreduce the difference must be found But perhaps operator cannot be applied to But perhaps operator cannot be applied to

current statecurrent state Subproblem of getting to state where Subproblem of getting to state where

operator can be appliedoperator can be applied Operator may not result in goal stateOperator may not result in goal state Second subproblem of getting from new Second subproblem of getting from new

state to goal statestate to goal state

Page 28: Com1005 Machines and Intelligence Amanda Sharkey.

MEAMEA

MEA process applied recursivelyMEA process applied recursively Each rule (operator) hasEach rule (operator) has LHS preconditions and RHS aspects LHS preconditions and RHS aspects

of problem state changed.of problem state changed. Difference table of rules and Difference table of rules and

differences they can reduce.differences they can reduce.

Page 29: Com1005 Machines and Intelligence Amanda Sharkey.

Problem for household robot: moving desk with 2 Problem for household robot: moving desk with 2 things on it from one room to another.things on it from one room to another.

Main difference between start and goal state is Main difference between start and goal state is location.location.

Choose PUSH and CARRYChoose PUSH and CARRY

Page 30: Com1005 Machines and Intelligence Amanda Sharkey.

Move desk with 2 things on it to new Move desk with 2 things on it to new roomroom

PushPush CarryCarry WalkWalk PickupPickup PutdownPutdown PlacePlace

Move Move objectobject

** **

Move Move robotrobot

**

Clear Clear objectobject

**

Get object Get object on objecton object

**

Get arm Get arm emptyempty ** **Be holding Be holding objectobject **

Page 31: Com1005 Machines and Intelligence Amanda Sharkey.

OperatorOperator PreconditionsPreconditions ResultsResults

PUSH (obj, loc)PUSH (obj, loc) at(robot,obj)at(robot,obj)

&large (obj) &large (obj)

&clear (obj) &&clear (obj) &

arm emptyarm empty

at(obj, loc) at(obj, loc)

& at (robot, loc)& at (robot, loc)

CARRY (obj, loc)CARRY (obj, loc) at(robot, obj) &Small at(robot, obj) &Small (obj)(obj)

at(obj, loc)at(obj, loc) & &at(robot, at(robot, loc)loc)

WALK(loc)WALK(loc) nonenone At(robot, loc)At(robot, loc)

PICKUP(obj)PICKUP(obj) At(robot, obj)At(robot, obj) Holding(obj)Holding(obj)

PUTDOWN(obj)PUTDOWN(obj) Holding(obj)Holding(obj) Not holding (obj)Not holding (obj)

PLACE(obj1, obj2)PLACE(obj1, obj2) At(robot,obj2) & holding At(robot,obj2) & holding (obj1)(obj1)

on(obj1, obj2)on(obj1, obj2)

CARRY: preconditions cannot be metPUSH: 4 preconditionsWALK to object, clear desk using PICKUP and PLACE. After PUSH objects not on desk. Must WALK to collect them and put on table using PICKUP and CARRY

Page 32: Com1005 Machines and Intelligence Amanda Sharkey.

Means-Ends AnalysisMeans-Ends Analysis 1. Compare CURRENT to GOAL. If no differences, return.1. Compare CURRENT to GOAL. If no differences, return. 2. Otherwise select most important difference and reduce 2. Otherwise select most important difference and reduce

it by doing the following until success or failure is it by doing the following until success or failure is indicated.indicated.

(a)(a) Select an as yet untried operator Select an as yet untried operator O O that is applicable to that is applicable to the current difference. If there are no such operators then the current difference. If there are no such operators then signal failure.signal failure.

(b)(b) Attempt to apply Attempt to apply O O to the current state. Generate to the current state. Generate descriptions of two states descriptions of two states OO-START a state in which -START a state in which O’O’s s preconditions are satisfied and preconditions are satisfied and O-O-RESULT, the state that RESULT, the state that would result if O were applied in would result if O were applied in O-O-START.START.

(c)(c) If (FIRST-PART MEA (CURRENT,If (FIRST-PART MEA (CURRENT,OO-START) AND (LAST-PART -START) AND (LAST-PART MEA (MEA (OO-RESULT, GOAL) are successful then signal -RESULT, GOAL) are successful then signal success.success.

Page 33: Com1005 Machines and Intelligence Amanda Sharkey.

Other search strategiesOther search strategies

Exhaustive search Exhaustive search – Depth first Depth first – Breadth firstBreadth first

Generate and testGenerate and test Hill climbingHill climbing Best first searchBest first search Problem reductionProblem reduction Constraint satisfactionConstraint satisfaction Means-ends Analysis.Means-ends Analysis.

Page 34: Com1005 Machines and Intelligence Amanda Sharkey.

Generate and testGenerate and test

Simplest search strategySimplest search strategy(1) Generate a possible solution(1) Generate a possible solution(2) Test to see if it is a solution (compare end (2) Test to see if it is a solution (compare end

point of path to goal state)point of path to goal state)(3) If solution is found, quit. Else return to (1) (3) If solution is found, quit. Else return to (1) Depth first search procedureDepth first search procedureShould find a solution eventually, but could take Should find a solution eventually, but could take

a long time. a long time. AKA British museum algorithm – like finding an AKA British museum algorithm – like finding an

object in the British Museum by wandering object in the British Museum by wandering randomly.randomly.

Page 35: Com1005 Machines and Intelligence Amanda Sharkey.

ChessChess

Page 36: Com1005 Machines and Intelligence Amanda Sharkey.
Page 37: Com1005 Machines and Intelligence Amanda Sharkey.

"Within ten years a digital computer "Within ten years a digital computer will be the world's chess champion will be the world's chess champion unless the rules bar it from unless the rules bar it from competition.“competition.“

Allen Newell (1957)Allen Newell (1957) 1997 defeat of chess world Grand 1997 defeat of chess world Grand

Master, Gary Kasparov by Deep Blue, Master, Gary Kasparov by Deep Blue, and IBM team.and IBM team.

Page 38: Com1005 Machines and Intelligence Amanda Sharkey.

ChessChess Combinatorial explosion – in middle part of Combinatorial explosion – in middle part of

game, about 36 moves possible.game, about 36 moves possible. Your opponent can respond to your moves Your opponent can respond to your moves

in 36 different ways.in 36 different ways. So to consider effect of your moves, need So to consider effect of your moves, need

to consider 1296 possibilitiesto consider 1296 possibilities Following move, 1,679,616 possibilitiesFollowing move, 1,679,616 possibilities

Page 39: Com1005 Machines and Intelligence Amanda Sharkey.
Page 40: Com1005 Machines and Intelligence Amanda Sharkey.

Computer can’t consider all possible Computer can’t consider all possible moves.moves.

Heuristic: static evaluation function (how Heuristic: static evaluation function (how good does the board look) for as many good does the board look) for as many possible board moves in time available.possible board moves in time available.

Alpha-beta pruning to reduce size of Alpha-beta pruning to reduce size of search tree.search tree.– Don’t consider moves that lead to bad board Don’t consider moves that lead to bad board

positionspositions– Or moves that lead to good board positions but Or moves that lead to good board positions but

opponent won’t let you takeopponent won’t let you take Still requires powerful computersStill requires powerful computers

Page 41: Com1005 Machines and Intelligence Amanda Sharkey.

Arthur Samuel, early draughts (checkers) Arthur Samuel, early draughts (checkers) playing programplaying program

One of the first AI programsOne of the first AI programs Credit assignment Credit assignment problem – which of the problem – which of the

many moves was responsible for winning?many moves was responsible for winning? Samuel introduced static evaluationSamuel introduced static evaluation One version of program played against One version of program played against

another – another – – One used randomly modified static evaluation One used randomly modified static evaluation

function, the other didn’t change.function, the other didn’t change.– If randomly modified version did better, then that If randomly modified version did better, then that

version was adopted for next round.version was adopted for next round.

Page 42: Com1005 Machines and Intelligence Amanda Sharkey.
Page 43: Com1005 Machines and Intelligence Amanda Sharkey.

Knowledge representationKnowledge representation

GPS – no knowledge of problem GPS – no knowledge of problem domaindomain

ELIZA – no knowledgeELIZA – no knowledge How can knowledge be represented?How can knowledge be represented? Next week: Knowledge .....Next week: Knowledge .....

Page 44: Com1005 Machines and Intelligence Amanda Sharkey.

SummarySummary Early AI programsEarly AI programs

– The Logic TheoristThe Logic Theorist– GPS General Problem SolverGPS General Problem Solver

Relationship to human thought?Relationship to human thought? AI hype?AI hype? AI techniquesAI techniques

SearchSearch– Means-Ends-AnalysisMeans-Ends-Analysis

ChessChess– Illusion and AIIllusion and AI– Comparison to humansComparison to humans– searchsearch

Page 45: Com1005 Machines and Intelligence Amanda Sharkey.
Page 46: Com1005 Machines and Intelligence Amanda Sharkey.

LabelLabel typetype sizesize X-positionX-position Y-positionY-position

aa boxbox largelarge 33 44

bb boxbox smallsmall 22 22

cc ballball largelarge 44 22

dd ballball smallsmall 33 33

ee pyramidpyramid largelarge 22 33

ff pyramidpyramid smallsmall 22 66

Page 47: Com1005 Machines and Intelligence Amanda Sharkey.

Winograd’s method: based on logic and Winograd’s method: based on logic and idea that words point to things in the idea that words point to things in the world.world.

E.g pick up the ball to the right of the E.g pick up the ball to the right of the small boxsmall box

Known instruction – pick upKnown instruction – pick up Find object that satisfies constraints – ball Find object that satisfies constraints – ball

c and dc and d Ambiguous – can ask.Ambiguous – can ask. If answer ‘the large one’ -> ball cIf answer ‘the large one’ -> ball c

Page 48: Com1005 Machines and Intelligence Amanda Sharkey.

But Shrdlu’s knowledge of the world limited.But Shrdlu’s knowledge of the world limited. Example from Haugeland.Example from Haugeland. Build a steepleBuild a steeple SORRY I DON’T KNOW THE WORD ‘STEEPLE’SORRY I DON’T KNOW THE WORD ‘STEEPLE’ A ‘steeple’ is a stack that contains two green cubes and a A ‘steeple’ is a stack that contains two green cubes and a

pyramid.pyramid. I UNDERSTANDI UNDERSTAND Trade you the steeple for three red cubesTrade you the steeple for three red cubes SORRY I DON’T KNOW THE WORD ‘TRADE’SORRY I DON’T KNOW THE WORD ‘TRADE’ A ‘trade’ is a free exchange of ownershipA ‘trade’ is a free exchange of ownership SORRY I DON’T KNOW THE WORD ‘FREE’SORRY I DON’T KNOW THE WORD ‘FREE’ Sorry, I thought you were smarter than you areSorry, I thought you were smarter than you are SORRY I DON’T KNOW THE WORD ‘SORRY’.SORRY I DON’T KNOW THE WORD ‘SORRY’.

Page 49: Com1005 Machines and Intelligence Amanda Sharkey.

Shrdlu: Shrdlu: domain-specific domain-specific knowledge knowledge (as opposed to (as opposed to domain-generaldomain-general) ) about microworld.about microworld.

But does it really understand even its But does it really understand even its microworld?microworld?

Page 50: Com1005 Machines and Intelligence Amanda Sharkey.

Expert systemsExpert systems

Depth of knowledge about Depth of knowledge about constrained domain.constrained domain.

Commercially exploitable, real Commercially exploitable, real applicationsapplications

Knowledge stored as production rulesKnowledge stored as production rules– If the problem is P then the answer is AIf the problem is P then the answer is A

Page 51: Com1005 Machines and Intelligence Amanda Sharkey.

Expert systemsExpert systems Basic idea – experts have knowledge, and Basic idea – experts have knowledge, and

this knowledge can be given to computer this knowledge can be given to computer program.program.

1. Requires knowledge base – interview 1. Requires knowledge base – interview and observe experts and convert words and observe experts and convert words and actions into and actions into knowledge baseknowledge base

2. Reasoning mechanisms to apply 2. Reasoning mechanisms to apply knowledge to problems: knowledge to problems: inference inference engineengine

3. Mechanisms for explaining their 3. Mechanisms for explaining their decisionsdecisions

Page 52: Com1005 Machines and Intelligence Amanda Sharkey.

IF THEN rules + facts + interpreterIF THEN rules + facts + interpreter– Forward chaining (start with facts and Forward chaining (start with facts and

use rules to draw new conclusions)use rules to draw new conclusions)– Backward chaining (start with Backward chaining (start with

hypothesis, or goal, to prove and look hypothesis, or goal, to prove and look for rules to prove that hypothesis).for rules to prove that hypothesis).

Page 53: Com1005 Machines and Intelligence Amanda Sharkey.

Forward chaining – simple exampleForward chaining – simple example Rule 1: IF hot AND smoky THEN ADD fireRule 1: IF hot AND smoky THEN ADD fire Rule 2: IF alarm-beeps THEN ADD smokyRule 2: IF alarm-beeps THEN ADD smoky Rule 3: IF fire THEN ADD switch-on sprinklersRule 3: IF fire THEN ADD switch-on sprinklers FACT1: alarm beepsFACT1: alarm beeps FACT2: hotFACT2: hot (i) check to see rules whose conditions hold (r2). (i) check to see rules whose conditions hold (r2).

Add new fact to working memory (FACT3: smoky)Add new fact to working memory (FACT3: smoky) (ii) check again (r1). Add new fact (FACT4: fire)(ii) check again (r1). Add new fact (FACT4: fire) (iii) check again (r3) Sprinklers on!(iii) check again (r3) Sprinklers on!

Page 54: Com1005 Machines and Intelligence Amanda Sharkey.

Expert systems usually use Expert systems usually use production rules (IF-THEN)production rules (IF-THEN)

E.g MYCIN knowledge based system E.g MYCIN knowledge based system for diagnosis and treatment of for diagnosis and treatment of infectious diseases of the blood.infectious diseases of the blood.

Developed at Stanford University, Developed at Stanford University, California in mid to late 1970s.California in mid to late 1970s.

Page 55: Com1005 Machines and Intelligence Amanda Sharkey.

E.g. MYCIN ruleE.g. MYCIN rule IfIf 1. the stain of the organism is gram-1. the stain of the organism is gram-

positive and positive and 2. the morphology of the organism is 2. the morphology of the organism is

coccus, andcoccus, and 3. the growth conformation of the 3. the growth conformation of the

organism is clumpsorganism is clumps ThenThen there is suggestive evidence (0.7) there is suggestive evidence (0.7)

that the identity of the organism is that the identity of the organism is staphylococcus.staphylococcus.

Page 56: Com1005 Machines and Intelligence Amanda Sharkey.

1979 performance of MYCIN shown 1979 performance of MYCIN shown to be comparable to that of human to be comparable to that of human experts.experts.

But never used in hospitalsBut never used in hospitals– Knowledge base incomplete – didn’t Knowledge base incomplete – didn’t

know full spectrum of infectious know full spectrum of infectious diseasesdiseases

– Needed too much computing powerNeeded too much computing power– Interface not good.Interface not good.

Page 57: Com1005 Machines and Intelligence Amanda Sharkey.

DENDRALDENDRAL

Expert’s assistant – could work out Expert’s assistant – could work out from data from mass spectographs from data from mass spectographs which organic compound was being which organic compound was being analysed.analysed.

Heuristic search technique Heuristic search technique constrained by knowledge of human constrained by knowledge of human expert.expert.

Page 58: Com1005 Machines and Intelligence Amanda Sharkey.

Advantages of expert systemsAdvantages of expert systems– Human experts can lose expertiseHuman experts can lose expertise– Ease of transfer of artificial expertiseEase of transfer of artificial expertise– No effect of emotionNo effect of emotion– Low cost alternative (once developed)Low cost alternative (once developed)

Disadvantages of expert systemsDisadvantages of expert systems– Lack of creativity, not adaptive, lacks sensory Lack of creativity, not adaptive, lacks sensory

experience, narrow focus, no common sense knowledgeexperience, narrow focus, no common sense knowledge– E.g won’t notice if medical history says patient weighs E.g won’t notice if medical history says patient weighs

14 pounds and is 130 years old.14 pounds and is 130 years old. More like More like idiot savantsidiot savants (retarded person who can (retarded person who can

perform well in one domain), or automated perform well in one domain), or automated reference manuals.reference manuals.

Page 59: Com1005 Machines and Intelligence Amanda Sharkey.

Hubert Dreyfus criticismsHubert Dreyfus criticisms 1972 What computers can’t do1972 What computers can’t do 1992 What computers still can’t do1992 What computers still can’t do

More to expert understanding than following rulesMore to expert understanding than following rules E.g learning to drive a car. E.g learning to drive a car.

– Novice, thinking consciouslyNovice, thinking consciously– Expert, can decide what to do without thinkingExpert, can decide what to do without thinking

Page 60: Com1005 Machines and Intelligence Amanda Sharkey.

But expert systems can still be a But expert systems can still be a useful tool, especially when used useful tool, especially when used together with a human expert.together with a human expert.

As long as we don’t expect too much As long as we don’t expect too much of them.of them.

Page 61: Com1005 Machines and Intelligence Amanda Sharkey.

SummarySummary

Early AI programsEarly AI programs– Logic theorist Logic theorist – General Problem SolverGeneral Problem Solver

Classic AI techniquesClassic AI techniques– SearchSearch– Knowledge representationKnowledge representation

KnowledgeKnowledge– Microworlds – Shrdlu and blocks worldMicroworlds – Shrdlu and blocks world– Expert SystemsExpert Systems

Page 62: Com1005 Machines and Intelligence Amanda Sharkey.

Early history of AI continuedEarly history of AI continued Lighthill Report 1973Lighthill Report 1973 Early enthusiasm for AI, but methods that Early enthusiasm for AI, but methods that

worked for demonstrations on simple worked for demonstrations on simple problems failed when tried on wider problems failed when tried on wider selections, or more difficult problems.selections, or more difficult problems.

Lighthill report – ended most support for AI Lighthill report – ended most support for AI research in UKresearch in UK

GPS – only useful for simple problems of a GPS – only useful for simple problems of a particular kind.particular kind.– approach depends of pre-set rankings – too approach depends of pre-set rankings – too

complicated for complex problems.complicated for complex problems. Lack of knowledge.Lack of knowledge.