A New Artificial Intelligence 3 Kevin Warwick. Classical AI Humans like to compare ourselves with...

34
A New Artificial A New Artificial Intelligence 3 Intelligence 3 Kevin Warwick Kevin Warwick

Transcript of A New Artificial Intelligence 3 Kevin Warwick. Classical AI Humans like to compare ourselves with...

A New Artificial A New Artificial Intelligence 3Intelligence 3

Kevin WarwickKevin Warwick

Classical AIClassical AI• Humans like to compare ourselves with others Humans like to compare ourselves with others

• We try to find ways in which we are better than We try to find ways in which we are better than someone or something elsesomeone or something else

• As artificial intelligence was born, the desire arose to As artificial intelligence was born, the desire arose to compare artificial intelligence with human intelligencecompare artificial intelligence with human intelligence

• Basic rule was that human intelligence is as good as it Basic rule was that human intelligence is as good as it gets - even human intelligence is the only intelligencegets - even human intelligence is the only intelligence

• The best artificial intelligence can achieve is to be as The best artificial intelligence can achieve is to be as good as human intelligence - to copy it in some way.good as human intelligence - to copy it in some way.

Minsky DefinitionMinsky Definition

• Classical artificial intelligence techniques focus Classical artificial intelligence techniques focus on getting a machine to copy human intelligence. on getting a machine to copy human intelligence.

• Marvin Minsky definition, “Artificial intelligence is Marvin Minsky definition, “Artificial intelligence is the science of making machines do things that the science of making machines do things that would require intelligence if done by men”. would require intelligence if done by men”.

• Definition side steps the concept of what Definition side steps the concept of what intelligence is - merely points to machines intelligence is - merely points to machines copying humans. copying humans.

Herb SimonHerb Simon

• Philosophy in 1957 described by Herb Simon Philosophy in 1957 described by Herb Simon

• ““There are now in the world machines that There are now in the world machines that think, that learn and that create. Moreover, think, that learn and that create. Moreover, their ability to do these things is going to their ability to do these things is going to increase rapidly until … the range of increase rapidly until … the range of problems they can handle will be problems they can handle will be coextensive with the range to which the coextensive with the range to which the human mind has been applied”.human mind has been applied”.

Top Down ApproachTop Down Approach

• An approach to artificial intelligence An approach to artificial intelligence arose along the lines of a psychiatristarose along the lines of a psychiatrist

• Attempt to understand the human Attempt to understand the human brain’s processing from the outside brain’s processing from the outside

• Then attempt to build a machine to Then attempt to build a machine to copy that way of functioning copy that way of functioning

ReasoningReasoning

• One key aspect of human intelligence is One key aspect of human intelligence is the ability of the human brain to reasonthe ability of the human brain to reason

• Given a number of facts, the human Given a number of facts, the human brain makes a reasoned assumption brain makes a reasoned assumption about a situation and decides on a about a situation and decides on a conclusionconclusion

• E.g. if it is 7am and my clock alarm is E.g. if it is 7am and my clock alarm is ringing then it is time to get upringing then it is time to get up

Expert SystemsExpert Systems

• An expert system reasons about facts in a An expert system reasons about facts in a specific domain and works like an expert’s specific domain and works like an expert’s brainbrain

• Needs knowledge about the domain, rules Needs knowledge about the domain, rules (from experts) to follow when new (from experts) to follow when new information occurs and a way of information occurs and a way of communicating with a usercommunicating with a user

• Called rule based systems, knowledge Called rule based systems, knowledge based systems or expert systems.based systems or expert systems.

MYCINMYCIN

• Early successful working system - a Early successful working system - a medical systemmedical system

• MYCIN contained 450 rules - claimed to MYCIN contained 450 rules - claimed to be better than junior doctors and as be better than junior doctors and as good some experts. good some experts.

• Built by interviewing large numbers of Built by interviewing large numbers of experts who reported from experience. experts who reported from experience.

• The rules reflected the uncertainties The rules reflected the uncertainties with medical conditions. with medical conditions.

RulesRules

• Rules of the form:Rules of the form:

• IF (condition) THEN (conclusion).IF (condition) THEN (conclusion).

• Several conditions may need to exist Several conditions may need to exist for the rule to fire. A rule may be:for the rule to fire. A rule may be:

• IF (condition1 and condition2 or IF (condition1 and condition2 or condition3) THEN (conclusion).condition3) THEN (conclusion).

• Example: IF (sneezing and coughing Example: IF (sneezing and coughing or headache) THEN (flu).or headache) THEN (flu).

Conflict Resolution Conflict Resolution • There might be several possible conclusions that There might be several possible conclusions that

can be drawn from the facts can be drawn from the facts

• The system needs further rules for such The system needs further rules for such instances – this is conflict resolutioninstances – this is conflict resolution

• In many situations several conditions are met In many situations several conditions are met but only one conclusion is requiredbut only one conclusion is required

• Decision is needed - which rules takes Decision is needed - which rules takes precedenceprecedence

Conflict Resolution - Conflict Resolution - TechniquesTechniques

• Highest priority rule Highest priority rule

• Highest priority conditions Highest priority conditions

• Most recent conditionMost recent condition

• Most specific (most conditions)Most specific (most conditions)

• Context limiting – rules in groups – a Context limiting – rules in groups – a rule must belong to an active grouprule must belong to an active group

Multiple RulesMultiple Rules

• Expert systems involve rules which Expert systems involve rules which depend on each other. Example: engine depend on each other. Example: engine management:management:

• Layer 1 Rules:Layer 1 Rules:

• IF (start button pressed) THEN (start IF (start button pressed) THEN (start engine)engine)

• IF (gear selection) THEN (engage gears)IF (gear selection) THEN (engage gears)

• Layer 2 Rule:Layer 2 Rule:

• IF (engine started and gears engaged) IF (engine started and gears engaged) THEN (vehicle drive)THEN (vehicle drive)

Forward ChainingForward Chaining

• Set of facts apparent at a particular Set of facts apparent at a particular timetime

• These fire a number of rulesThese fire a number of rules

• Realizing facts which fire other rules Realizing facts which fire other rules

• So on until a goal is reachedSo on until a goal is reached

• Working from input data to end goal is Working from input data to end goal is forward chainingforward chaining

• Discover what can be deduced from Discover what can be deduced from facts.facts.

Backward ChainingBackward Chaining• Expert systems can be used in reverse fashionExpert systems can be used in reverse fashion• When a goal has been achieved - rules are When a goal has been achieved - rules are

searched to see what facts occurred for the searched to see what facts occurred for the system to deduce its conclusionsystem to deduce its conclusion

• What facts we must input to the system to What facts we must input to the system to realize a specific goal?realize a specific goal?

• E.g. what happened to cause the vehicle to E.g. what happened to cause the vehicle to drive? drive?

• From backward chaining - the start button was From backward chaining - the start button was pressed and the gear selection had been made.pressed and the gear selection had been made.

• Backward chaining good for system verification, Backward chaining good for system verification, where the expert system must be safety critical where the expert system must be safety critical and cannot arrive at a ‘wrong’ conclusion. and cannot arrive at a ‘wrong’ conclusion.

Expert System AdvantagesExpert System Advantages

• Easy to program (IF-THEN structure). Easy to program (IF-THEN structure). • Each rule is a separate entity with its own data to Each rule is a separate entity with its own data to

fire and its own individual conclusion drawnfire and its own individual conclusion drawn• Ideal for dealing with natural real world Ideal for dealing with natural real world

information information • System structure is separate from the data - System structure is separate from the data -

same expert system structure could be employed same expert system structure could be employed in very different domainsin very different domains

• Can deal with uncertainty, e.g. 75% certain about Can deal with uncertainty, e.g. 75% certain about the conclusion the conclusion

• Speed of response – compared to a human Speed of response – compared to a human expert expert

ProblemsProblems• Gathering rules can be awkward. It is difficult for a Gathering rules can be awkward. It is difficult for a

person to put into simple terms what it is they do in an person to put into simple terms what it is they do in an everyday situation. If several experts are being asked, everyday situation. If several experts are being asked, they may well give contradictory answersthey may well give contradictory answers

• Human experts can be expensive & have full diaries Human experts can be expensive & have full diaries

• Combinatorial explosion. To deal with absolutely every Combinatorial explosion. To deal with absolutely every eventuality, rules must be continually added to cover eventuality, rules must be continually added to cover for every possible situation, no matter how unlikely. for every possible situation, no matter how unlikely.

• Time - some expert systems contain thousands of Time - some expert systems contain thousands of rules, to deal with something that may be simple all rules, to deal with something that may be simple all these rules must be tested, along with conflict these rules must be tested, along with conflict resolutionresolution

• Expert systems just deal with one aspect of intelligenceExpert systems just deal with one aspect of intelligence

Machine LearningMachine Learning• Important though not to see such systems as merely Important though not to see such systems as merely

programmed decision making mechanisms that will programmed decision making mechanisms that will always perform as we expectalways perform as we expect

• It is possible to operate them in this wayIt is possible to operate them in this way• It is also possible to enable them to learn as they It is also possible to enable them to learn as they

draw conclusions and experience their domaindraw conclusions and experience their domain• If a system draws a number of conclusions then the If a system draws a number of conclusions then the

rules which result in the ‘winning’ conclusion can be rules which result in the ‘winning’ conclusion can be ‘rewarded’ by making them more likely to be part of ‘rewarded’ by making them more likely to be part of the overall conclusion next time around. the overall conclusion next time around.

• If a fired rule results in a conclusion which is not If a fired rule results in a conclusion which is not chosen then it is less likely to fire again. Success is chosen then it is less likely to fire again. Success is rewarded and failure is punished - rewarded and failure is punished - Bucket BrigadeBucket Brigade

Fuzzy Logic & Fuzzy RulesFuzzy Logic & Fuzzy Rules

• With the expert systems we have considered thus far With the expert systems we have considered thus far it has been assumed that either a condition exists or it has been assumed that either a condition exists or it doesn’t. This is Logic. A fact is either true or falseit doesn’t. This is Logic. A fact is either true or false

• It is found useful in certain circumstances for It is found useful in certain circumstances for conclusions to be partially true - for a confidence conclusions to be partially true - for a confidence percentage to be applied to resultspercentage to be applied to results

• If someone is having a shower they want the water If someone is having a shower they want the water to be warm. The water is not simply hot or cold, it is to be warm. The water is not simply hot or cold, it is warmwarm

• Fuzzy logic provides a basis for this.Fuzzy logic provides a basis for this.

ExampleExample• Assume for shower water to be completely cold it will Assume for shower water to be completely cold it will

be at a temperature of 0 deg C - to be completely hot be at a temperature of 0 deg C - to be completely hot it will be at a temperature of 50 deg Cit will be at a temperature of 50 deg C

• If the water is 65% hot – it is warm, but has some If the water is 65% hot – it is warm, but has some way to go to be hot. If it is 12% hot then it is pretty way to go to be hot. If it is 12% hot then it is pretty coldcold

• Using fuzzy logic this does not necessarily mean that Using fuzzy logic this does not necessarily mean that the actual measured temperature would be 65% of the actual measured temperature would be 65% of 50, i.e. 32.550, i.e. 32.5

• Fuzzy logic is more directed to a human concept of Fuzzy logic is more directed to a human concept of the temperature – it is a form of artificial intelligencethe temperature – it is a form of artificial intelligence

• We can draw up a relationship between the actual We can draw up a relationship between the actual temperature and the percentage value we will assign temperature and the percentage value we will assign it, between 0% and 100%.it, between 0% and 100%.

FuzzificationFuzzification

• A real-world value must be made fuzzy A real-world value must be made fuzzy – e.g. the water temperature is – e.g. the water temperature is measured and then fuzzified. A measured and then fuzzified. A temperature of 20 oC might become a temperature of 20 oC might become a fuzzy value of 45%fuzzy value of 45%

• The relationship between the actual The relationship between the actual value and fuzzy value needs to be value and fuzzy value needs to be defined – this could be done through defined – this could be done through graphical means or a look up table graphical means or a look up table

• The actual fuzzification routine depends The actual fuzzification routine depends entirely on the application. entirely on the application.

Fuzzy RulesFuzzy Rules• Once a value has been fuzzified it is passed to the rules for Once a value has been fuzzified it is passed to the rules for

evaluation. evaluation. • Fuzzy rules are the same as before, E.g. IF (water is hot) THEN Fuzzy rules are the same as before, E.g. IF (water is hot) THEN

(turn water heater on)(turn water heater on)• The condition part and conclusion part will be a percentage The condition part and conclusion part will be a percentage

value as they are only partially true. The water heater will not value as they are only partially true. The water heater will not be turned on or off, but will be turned on to a certain extent be turned on or off, but will be turned on to a certain extent

• It may be that a rule has several conditions that need to be It may be that a rule has several conditions that need to be satisfied satisfied

• E.g. IF (water temperature is hot AND energy tariff is high) E.g. IF (water temperature is hot AND energy tariff is high) THEN (turn water heater on)THEN (turn water heater on)

• Each of the conditions has a percentage assigned to it. Where Each of the conditions has a percentage assigned to it. Where the AND term appears so the MINIMUM percentage value of the the AND term appears so the MINIMUM percentage value of the conditions is carried forward. Where the OR term appears so conditions is carried forward. Where the OR term appears so the MAXIMUM percentage value of the conditions is carried the MAXIMUM percentage value of the conditions is carried forward. forward.

• E.g. after fuzzification the water temperature has been assigned E.g. after fuzzification the water temperature has been assigned a percentage 62% AND the energy tariff has been assigned a a percentage 62% AND the energy tariff has been assigned a percentage 48%. The value carried forward will be 48%. percentage 48%. The value carried forward will be 48%.

• Normally a number of different rules will fire. Each of the rules Normally a number of different rules will fire. Each of the rules will result in a different value taken forward - these values will result in a different value taken forward - these values must be aggregated to provide a single value that actually must be aggregated to provide a single value that actually means something means something

DefuzzificationDefuzzification

• Simplest is to average the values.Simplest is to average the values.• We have three rules R1, R2 and R3 which have We have three rules R1, R2 and R3 which have

produced the resultant percentage values. R1 – produced the resultant percentage values. R1 – 23%, R2 – 81% and R3 – 49% - the average value 23%, R2 – 81% and R3 – 49% - the average value would be the three percentages added together would be the three percentages added together divided by three, i.e. 51%.divided by three, i.e. 51%.

• Some rules may be more important than others - Some rules may be more important than others - Centre of Gravity (COG) method. Centre of Gravity (COG) method.

• If Rule R1 is more important than the others, give If Rule R1 is more important than the others, give it a weighting of 5, R2 a weighting of 2 and R3 a it a weighting of 5, R2 a weighting of 2 and R3 a weighting of 3. We multiply 23 by 5, 81 by 2 and weighting of 3. We multiply 23 by 5, 81 by 2 and 49 by 3, the result of which is 424, which, when we 49 by 3, the result of which is 424, which, when we divide it by the sum=10, gives us a defuzzified divide it by the sum=10, gives us a defuzzified value of 42.4%. It is lower than the unweighted value of 42.4%. It is lower than the unweighted calculation as emphasis was placed on R1 calculation as emphasis was placed on R1

Problem SolvingProblem Solving• We may need an AI system to solve problems for We may need an AI system to solve problems for

us. One example of this exists in a SatNav. We us. One example of this exists in a SatNav. We know where our start point is and we know where know where our start point is and we know where we wish to get to, but we don’t know how to get we wish to get to, but we don’t know how to get there.there.

• Many solutions exist. We usually have further Many solutions exist. We usually have further requirements, we wish to know the quickest route requirements, we wish to know the quickest route or the shortest one. This problem is something that or the shortest one. This problem is something that AI can be very good at solving - quickly.AI can be very good at solving - quickly.

• Assume we wish to travel from Reading to Assume we wish to travel from Reading to Newcastle. Many possible routes – we could travel Newcastle. Many possible routes – we could travel from Reading to Oxford or Reading to London. Both from Reading to Oxford or Reading to London. Both routes have costs associated with them - the time routes have costs associated with them - the time the route would take, the petrol used and so on. the route would take, the petrol used and so on. From Oxford we could travel to Banbury etc. Until From Oxford we could travel to Banbury etc. Until Newcastle was reached. Newcastle was reached.

• Assume we limit the number of possible towns to be Assume we limit the number of possible towns to be considered from Reading to Newcastle and we only considered from Reading to Newcastle and we only visit a town once - there are a number of ways that visit a town once - there are a number of ways that an AI system could search for the best solution.an AI system could search for the best solution.

SearchingSearching

• To decide the best solution to our travel problem To decide the best solution to our travel problem we must consider all possibilities we must consider all possibilities

• In our example with Reading as a start point then In our example with Reading as a start point then we could search for the best route by firstly looking we could search for the best route by firstly looking at all the possible towns to travel to from Reading – at all the possible towns to travel to from Reading – Oxford and London included. From each of those Oxford and London included. From each of those towns we could then look at all choices - cost towns we could then look at all choices - cost

• We would eventually arrive at Newcastle via a We would eventually arrive at Newcastle via a number of different routes. As we know the total number of different routes. As we know the total cost of each route then we can decide which is best cost of each route then we can decide which is best in terms of distance, time or whatever in terms of distance, time or whatever

MethodsMethods

• Depth first searchDepth first search

• Breadth first searchBreadth first search

• Depth limited searchDepth limited search

• Bidirectional searchBidirectional search

• Heuristic searchHeuristic search

ExampleExample

• In May 1997 the IBM computer ‘Deep Blue’ In May 1997 the IBM computer ‘Deep Blue’ beat the erstwhile human world chess beat the erstwhile human world chess champion, Gary Kasparov, over a 6 match champion, Gary Kasparov, over a 6 match series. series.

• The computer was capable of searching and The computer was capable of searching and analyzing 200 million positions every second analyzing 200 million positions every second

• Kasparov said: “There were many, many Kasparov said: “There were many, many discoveries in this match, and one of them was discoveries in this match, and one of them was that sometimes the computer plays very, very that sometimes the computer plays very, very human moves. It deeply understands human moves. It deeply understands positional factors”. positional factors”.

FramesFrames• A frame represents everyday knowledge A frame represents everyday knowledge

about an entityabout an entity• It is a computer file, with a number of It is a computer file, with a number of

pieces of information stored in slots in the pieces of information stored in slots in the file. Each of those slots is a sub-frame with file. Each of those slots is a sub-frame with further levels of information.further levels of information.

• If we have a frame based artificial If we have a frame based artificial intelligence system used to describe a intelligence system used to describe a house – the initial frame is the househouse – the initial frame is the house

• Within the house are slots, dining room, Within the house are slots, dining room, kitchen, lounge. Each slot is a frame itself. kitchen, lounge. Each slot is a frame itself. A kitchen frame contains slots, refrigerator, A kitchen frame contains slots, refrigerator, cooker, sink etc. These slots are frames cooker, sink etc. These slots are frames with their own slots. with their own slots.

Data MiningData Mining

• Extracting knowledge from data is called data mining. Extracting knowledge from data is called data mining. • AI systems are well suited - they store enormous AI systems are well suited - they store enormous

quantities of data and can draw out all sorts of quantities of data and can draw out all sorts of relationships relationships

• The amount of data in the world doubles each year – The amount of data in the world doubles each year – in a ten year span (e.g. 2002 to 2012) there will be a in a ten year span (e.g. 2002 to 2012) there will be a 1,000 times increase in data!1,000 times increase in data!

• New data is usually not well understood and New data is usually not well understood and meanings are not readily drawn out. E.g. The human meanings are not readily drawn out. E.g. The human genome project has opened up the complexities of genome project has opened up the complexities of DNA - we can look at the functioning of brains and DNA - we can look at the functioning of brains and make sense of it based on the data make sense of it based on the data

• There are new business opportunities, new medical There are new business opportunities, new medical techniques and a more in depth understanding of the techniques and a more in depth understanding of the scientific world scientific world

CorrelationsCorrelations

• To discover similarities, links and relationships between data To discover similarities, links and relationships between data and to predict outcomes and to predict outcomes

• Example - supermarket shopping. Such shopping is a regular Example - supermarket shopping. Such shopping is a regular exercise. Approximately 100 different types of produce exercise. Approximately 100 different types of produce available. Every time a person uses the supermarket, data is available. Every time a person uses the supermarket, data is obtained on their purchases obtained on their purchases

• Links can be drawn as to what a person buys and how often Links can be drawn as to what a person buys and how often they buy it OR which people buy certain products and when they buy it OR which people buy certain products and when they buy themthey buy them

• We want a prediction - next Thursday a person will enter the We want a prediction - next Thursday a person will enter the supermarket, they will buy certain products – if they are supermarket, they will buy certain products – if they are available, the person will buy other products based on our available, the person will buy other products based on our predictions. Over 1,000 people it may well be sufficiently predictions. Over 1,000 people it may well be sufficiently accurate for a significant profit accurate for a significant profit

• Correlation - Look at a person’s purchases of milk and cheese. Correlation - Look at a person’s purchases of milk and cheese. Over a one year period this can be analyzed to see how the Over a one year period this can be analyzed to see how the two pieces of data are related to each other. two pieces of data are related to each other.

• A number of statistical tools are available for this, Principal A number of statistical tools are available for this, Principal Component Analysis, which detects the main links between Component Analysis, which detects the main links between pieces of data, e.g. for one person the purchasing of shoe pieces of data, e.g. for one person the purchasing of shoe polish may be closely linked to buying pickles. polish may be closely linked to buying pickles.

Decision TreesDecision Trees

• To reduce the complexity of problems to make a To reduce the complexity of problems to make a database easier to analyze - decision trees. database easier to analyze - decision trees.

• The data base is chopped up into manageable portions The data base is chopped up into manageable portions which makes it easy to follow a path through the tree.which makes it easy to follow a path through the tree.

• For the supermarket example, we could only consider For the supermarket example, we could only consider female purchasers. A user specified branch - only data female purchasers. A user specified branch - only data associated with female purchasers need be consideredassociated with female purchasers need be considered

• We can input requirements, the branches of which We can input requirements, the branches of which could be discovered as a part of the analysis. E.g. only could be discovered as a part of the analysis. E.g. only those who spend more than £60, regularly purchase those who spend more than £60, regularly purchase soup and buy fresh vegetables.soup and buy fresh vegetables.

• Rather than dealing with a large number of people, say Rather than dealing with a large number of people, say 50,000, we may only need to consider 1,000, which 50,000, we may only need to consider 1,000, which will reduce the time taken and improve the accuracy will reduce the time taken and improve the accuracy of results of results

Concluding CommentsConcluding Comments• Classical AI techniques are based on trying to get Classical AI techniques are based on trying to get

machines to copy humans in tasks that when humans machines to copy humans in tasks that when humans do those tasks, we deem them to be intelligent acts do those tasks, we deem them to be intelligent acts

• Discussion ranged from the way we store information Discussion ranged from the way we store information (frames) to how we reason and decide (expert (frames) to how we reason and decide (expert systems) systems)

• Motivation - advantages of artificial intelligence when Motivation - advantages of artificial intelligence when compared with human intelligence – to replace compared with human intelligence – to replace humans!humans!

• Speed of processing, accuracy of mathematical Speed of processing, accuracy of mathematical calculations, extent of memory, relating complex calculations, extent of memory, relating complex data and the ability to function 24/7 data and the ability to function 24/7

• Intelligence is a controversial topicIntelligence is a controversial topic• When we consider machines being intelligent this When we consider machines being intelligent this

raises the stakesraises the stakes• How does machine intelligence compare with human How does machine intelligence compare with human

intelligence? Can a machine be alive? Next we look at intelligence? Can a machine be alive? Next we look at philosophical issues that underpin the subject philosophical issues that underpin the subject

NextNext

• Philosophy of New AIPhilosophy of New AI

Contact InformationContact Information

• Web site: Web site: www.kevinwarwick.comwww.kevinwarwick.com

• Email: Email: [email protected]@reading.ac.uk

• Tel: (44)-1189-318210Tel: (44)-1189-318210

• Fax: (44)-1189-318220Fax: (44)-1189-318220

• Professor Kevin Warwick, Department Professor Kevin Warwick, Department of Cybernetics, University of Reading, of Cybernetics, University of Reading, Whiteknights, Reading, RG6 6AY,UKWhiteknights, Reading, RG6 6AY,UK