artificial intelligence


Published on

foundations of AI

Published in: Education, Technology, Spiritual
1 Comment
1 Like
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

artificial intelligence

  1. 1. Fundamentals ofARTIFICIAL INTELLIGENCE Rajendra Akerkar
  2. 2. 2INTRODUCTION• What is “intelligence”? intelligence ? ▫ no single exact definition ▫ what seems intelligent to one person, may person not be so, for another person
  3. 3. 3• Intelligence is studied from many perspectives ▫ hardcore AI: computer scientists creating theories and programs to solve computationally difficult problems ▫ psychology: psychologists interested in h l h l i i di human intelligence ▫ cognitive scientists: similar to AI and psych schools, except they want to implement human models of intelligence on the computer (ie. simulate neurology behind vision)
  4. 4. 4• Following characteristics are g suggestive of essential abilities for possessing intelligence ▫ responding to situations, flexibly ▫ making sense of ambiguous/noisy messages ▫ assigning relative importance to elements of a situation ▫ finding similarities in situations even though the situations might be different ▫ddrawing distinctions between situations i di i i b i i even though there may be many similarities between them
  5. 5. 5• Assuming that the mentioned g characteristics suggest the possession of intelligence, following are examples of tasks that require i f k h i intelligence lli ▫ speech generation and understanding h ti d d t di ▫ painting a sensible picture ▫ recognizing the face of a friend ▫ understanding a story or a fairy tale ▫ understanding a moral delivered in a g discourse ▫ making decisions, e.g. a doctor or a company didirector t
  6. 6. 6 ▫ finding the shortest tour to visit a number of places ▫ playing chess well ▫ moving in a dynamic obstacle filled space ▫ mathematical theorem proving h i l h i ▫ giving explanations ▫ writing a program etc. program, etcWith this overview, some of the definitions of “Artificial Intelligence” are as follows
  7. 7. 7• Artificial Intelligence (AI), is the study of how to make computers do things, at which, at the moment, humans are better.• Artificial Intelligence (AI) is the branch of computer science dealing with f i d li ih symbolic methods of problem solving.• Artificial Intelligence (AI) is the study of how to make computers get knowledge from information, store, update, and use it for problem-solving in an environment, so as to reach the desired goal.
  8. 8. 8But why computers? y p • Numerical computations ▫ computers are definitely faster and more accurate • Information storage ▫ computers can store very h t t huge amounts t of information • Repetitive operations ▫ computers don’t get fatigued or bored
  9. 9. 9How does the computer becomeartificially intelligent?• The program running on the computer makes it seem intelligent• in fact it is this program which is artificially intelligent• such programs are called artificial intelligence(ai) programs g ( )p g
  10. 10. 10AI Programs g• A complete AI program consists of two components, namely, ▫ knowledge base, and, ▫ inference/reasoning engine• AI programs can be written in high level languages like, C, C++, etc., or in special purpose artificial intelligence languages like, Lisp, Prolog, etc.
  11. 11. 11• The knowledge base represents the knowledge of the problem domain. Several knowledge representation g p models exist.• The inference/reasoning engine is an algorithm which embodies the capability to “search” for a solution in the i th given knowledge base, for the k l d b f th relevant situation.• In principle the AI languages provide principle, in-built search capabilities.
  13. 13. 13Definition• An algorithm that ▫ concludes by LOGICAL DEDUCTION using the Knowledge Base ▫ SEARCHES for conclusion in the S C S Knowledge Base ▫ GENERATES the conclusion by a mixed method of LOGICAL DEDUCTION and h d f d SEARCH techniques
  14. 14. 14Logical Deduction gExampleAssume that we have the following factsF(1): If it is hot and humid, then it will rainF(2): If it is humid then it is hot humid,F(3): It is humid nowThe question is: Will it rain?
  15. 15. 15The given facts are in English gi enWe shall use symbols to represent them.LetP <=> It is hotQ <=> It is humidR < > It will rain <=>^ <=> and-> <=> imply py
  16. 16. 16Using the symbols mentioned, the facts i h b l i d h f stated can be represented as followsF(1) : P ^ Q -> RF(2) : Q -> PF(3) : QIn the above form of representation the representation, facts are now called as logical formulas, hence the deduction is , operating on “symbolic logic”
  17. 17. 17ConclusionF(2) follows F(3)F(3) says it is humid, F(2) says, since it is humid sayshumid, it is hot.F(1) follows F(2) F(2).Since F(2) says it is hot, and F(3) says it ishumid,humid hence F(1) says “it will rain”. it rain
  18. 18. 18Logic g LOGIC is the ART OF “CORRECT” REASONING/INFERENCING but What is meant by “CORRECT”? CORRECT ?
  19. 19. 19CORRECTNESSFor the reasoning process to be called “CORRECT”, it should possess the CORRECT following two properties COMPLETENESS SOUNDNESS
  20. 20. 20COMPLETENESSThis is the property of a reasoning process p p y gp to conclude “ALL” the true facts over the given set of statements
  21. 21. 21SOUNDNESSThis the property of the reasoning process, to conclude no “WRONG” fact over the given set of statements
  22. 22. 22Prepositional Logic • Simplest form of symbolic logic • Here we are interested in declarative statements that can be either TRUE or FALSE, but not both! Definition A““preposition” i a declarative iti ” is d l ti statement which is either TRUE or FALSE but not both.
  23. 23. 23Logical Consequences g qDefinitionGiven formulas F1, F2, … , Fn and a F1 F2 formula G, G is said to be a logical consequence of F1, F2, … , Fn (or G logically follows from F1, F2, … , Fn) if and only if, for any interpretation I in which F1 ^ F2 ^ … ^ Fn is TRUE, G is also TRUE
  24. 24. 24Theorem 1Given formulas F1, F2, … , Fn , and a formula G G is said to a “logical G, logical consequence” of F1, F2, … , Fn, if and only if, the formula ((F1 ^ F2 ^ … ^ Fn) -> G)is valid
  25. 25. 25Theorem 2Given the formulas F1, F2, … , Fn and a formula G G is said to be a “logical G, logical consequence” of F1, F2, … , Fn, if and only if, the formula (F1 ^ F2 ^ … ^ Fn ^ ~G)is inconsistent
  27. 27. 27Knowledge Representation Schemes • Logical representation • Procedural representation • Network representation • Structured Representation schemes
  28. 28. 28Logical Representation Schemes g p• Representation in formal Logic ▫ Prepositional ▫ Predicate• Rules can be considered as a subset of Predicate logic• Prolog is an ideal language for implementing g g g p g this.
  29. 29. 29Procedural Representation Scheme• Represents Knowledge as a set of instructions for solving a problem• Rule based system is an example of this
  30. 30. 30 Network Representation Schemes• Semantic Network ▫ Maps of relationships utilizing nodes and links• Conceptual Graphs ▫ Nodes in the maps are concepts or conceptual relations. l tiAssociationist theories define the meaning of an object in the terms of a network of associations with other objects in the mind or a KB.Graphs by providing a means of explicitly representing relations using arcs and nodes, h i l i i d d have proved to be an ideal vehicle for formalizing associationist theories of knowledge.
  31. 31. 31 Some Principles of Semantic Networks• Semantic nets describe relationship between things that are represented as nodes• The nodes are circles that have names• The relationship between nodes re h l i hi b d represented by arcs that connect the circles.• A semantic net can be used to generate se a t c et ca ge e ate ▫ structures and objects. ▫ Rules for a knowledge baseThus a semantic network represents knowledge as a graph with the nodes corresponding to facts or concepts, and arcs to relations or associations between concepts.
  32. 32. 32 Conceptual GraphsA conceptual graph is a finite, connected, bipartite graph.Features• Concept nodes represents either concrete or abstract objects in the world of discourse discourse.• Conceptual relation nodes indicate a relation involving one or more concepts• Each conceptual graph represents one single h l h i l proposition. A typical KB may contain a number of such graphs. Graph may be arbitrarily complex, but must b finite be fi i• Theory of Conceptual graphs includes a number of operations that allow us to form new graphs from p g p existing graphs
  33. 33. 33Structured Representation S hS dR i Schemes -FRAMES • Extends semantic net in a number of important ways • Procedural attachment is an important feature of frames. • Representing knowledge with frame system allows us to reason at least to some extent, even though the information is incomplete, and quickly infer facts that p , q y are not explicitly observed. • One problem with frames is the difficulty for establishing default value for a frame accurately.
  34. 34. 34 Structured Representation Schemes - SCRIPTSA representation describing stereo type sequence of p g yp q events in particular context.Components• Entry conditions - Description of the world that must be true for the script to be called• Results - Fact that are true when the script is terminated. terminated• Props - Things that make up the context of the script.• R l - A ti Roles Actions of the individual participant that f th i di id l ti i t th t form the actions of the scripts.• Scenes - Subparts of the script, Formed by breaking the script into parts on temporal aspect. h i i l
  35. 35. 35Technique for dealing withcomplexity• Certainty ▫ A mathematical property that attaches a confidence factor to the conclusion reached by rules• Modularization ▫ Partitioning the rule base into modules• Blackboard l kb d ▫ Concept is similar to a group of experts working out the problem by standing around a black board
  36. 36. 36 Technique for Dealing with Complexity• Blackboard ▫ Control Blackboard Means of controlling the flow of a KB system by allowing the module to schedule and prioritize p p processing g ▫ Data Blackboard Means of processing information from one module of a system to another• External Data Sources ▫ Making use of sensors, historical data, data bases, etc. to avoid asking the users• Back tracking ▫ The retreat of the IE from the examination of the current hypothesis in order to pursue another.
  37. 37. 37 Knowledge Based Systems g y - Desired FeaturesIdeal KB System should • Construct solutions selectively and efficiently from a space of alternatives. • Identify useful ones and explore them further. • Keep eliminating not so useful ones till an optimal solution is obtainedIntelligent Problem solving activity • Uses knowledge about that domain Knowledge = beliefs+facts+heuristics • To achieve necessary success Success = finding a good solution with the available g g resources.
  38. 38. 38 Intelligent Problem Solving ActivityFactor responsible for efficient solutions • Applicable, correct and discriminatory knowledge • Elimination of unproductive views • Multiple cooperative sources of knowledge • Dividing the solution at various levels of abstractionFactor which lead to difficulties • Wrong and errorful knowledge • Number of possibilities mighty be large • Complex procedures to rule them out • Dynamically changing problem
  39. 39. 39Architecture of a Knowledge Based System g y Language Processor Facts and Rules Justifier Plan Interpreter p Agenda Scheduler S h d l Consistency Solution Enforcer
  40. 40. 40 Ideal Architecture of a Knowledge Based g SystemLanguage Interface g g To help the user to communicate in a problem oriented way, handles user questions, commands Provide justifications, and request for data when needed. justifications neededPlan A General method to attack problems in the domainAgenda Various actions that are applicable at any stage of the p problem solving gSolution Record the partial solution of the problem.
  41. 41. 41 Ideal Architecture of an Knowledge Based g SystemScheduler Maintains control of the agenda and determines which pending action has to be executed next.InterpreterI t t Executes a chosen agenda item by applying the corresponding KB rule. Validates the relevant conditions.Consistency Enforcer It tries to maintain consistent representation of the emerging solutionJustifier Provides Explanation facility, answering user questions regarding system actions t ti
  42. 42. Knowledge Based Systems vsConventional ProgramsConventional KB SystemsData Processing Knowledge ProcessingRepresentation and use of Representation and use ofstatic data data+control=knowledgeAlgorithms HeuristicsRepetitive Process Inferential ProcessFew control and Large data Large control and few data data,kept seperately kept together 42
  43. 43. 43Generic Knowledge Based SystemArchitecture Inference Engine User Interface Knowledge Base
  44. 44. 44Generic Knowledge Based System g yArchitectureUser Interface (UI) •Editor to Input Knowledge •Knowledge debugger K l d d b •Display conclusion •Request for data User Interface •Explanation of actions Knowledge Base
  45. 45. 45Generic Knowledge Based System ArchitectureKnowledge Base • Represents the knowledge of the problem domain. domain • Several knowledge representation models exist.Inference/Reasoning Engine •Algorithm which embodies the capability to “search” for a solution in the given knowledge base, for the relevant situation. • AI l languages provide i b ilt search id in-built h capabilities.
  46. 46. 46 Knowledge Based System Development Phases Identifying Problem y g Characteristics Requirements IDENTIFICATION Find concepts to Concepts C Represent K.B. CONCEPTUALIZATIONReformulation Design structures to Structures organize knowledge FORMALIZATION Reformulation Formulate rules to Redesign embody knowledge Rules IMPLEMENTATION Validate rules TESTING Acquisition and Organisation Representation and Implementation
  47. 47. 47 Knowledge Based System g y Development Phases• Identification – Participants – Problem • Class of problems ES expected to solve • Definition and characterization • Sub S b problems and partitioning of the t k bl d titi i f th tasks • Data available • Important terms and interrelations p • Required kind of solutions • Aspect of human expertise essential – Resource – Goal
  48. 48. 48 Knowledge Based System Development Phases• Conceptualization p – Make concepts and relationship identified in the earlier stages more explicit • What type of data available ? • What is given and what has to be inferred ? • Do sub tasks have names ? • Do strategies have names ? • Are there identifiable partial hypothesis that are commonly used ? If so what are they ? • Can we represent concepts and relationships d g diagrammatically ? c y • What are the constrain on these processes ? • What is the information flow pattern ?
  49. 49. 49 Knowledge Based System Development Phases• Formalisation – Involves mapping the key concepts, subproblems, and information flow characteristics identified in the previous stage into more formal representation based on various knowledge engineering tools. – Knowledge Engineer has to identify the suitable shell. • Knowledge Representation Format • Data types provided • Inferencing strategy
  50. 50. 50 Knowledge Based System g y Development Phases• Formalisation – Concepts are structured objects or primitives ? – Is casual or spatio-temporal relationships among concepts inportant ? – Are the concept and hypothesis space finite or not? – Are there uncertainties and other judgemental elements related to the final and intermediate hypothesis ? – Is hypothesis hierarchy present or not? – Type of process model purely judgemental or mathmatical and judgemental ? – D t model d Data d l depends on d • Completeness, consistency • Is there any relationship between logical interpretation and their order of occurrence over time ?
  51. 51. 51 Knowledge Based System g y Development Phases• Implementation – Mapping the formalized knowledge from the previous stage into the representational frame i i i f work. – Development of a prototype system is extremely important
  52. 52. 52 Knowledge Based System Development Phases• Testing – Evaluating the prototype and representational forms. – Test the prototype with examples – Test with real world problems. –CCauses of poor performance f f • I/O characteristics which refers to knowledge acquisition and conclusion presentation • Incorrect, incomplete, and inconsistent inference rules • Control strategy (sequencing the rules) • Test example selection (Homogeneous examples)
  53. 53. 53 Intelligent Agents• What is an Agent ?• What are a multi agent systems ?• How i i H it is used for solving problems ? df l i bl• Stages involved in the development process.
  54. 54. 54What is an Agent ? gA simple way to conceptualize an agent is that of a process (software) which has some properties listed below.• Autonomy ▫ Ability to operate without direct intervention of humans or others.• Social Ability ▫ Ability to communicate with human and other agents• Pro-activeness Pro activeness ▫ Ability to take initiative and exhibit goal directed behaviour.• Reactivity ▫ Ability to perceive the environment respond to it’s changes• Intelligence ▫ Have human like mentalistic notions of knowledge, beliefs, intentions and obligations
  55. 55. 55What is an Agent ?• Veracity ▫ Not knowingly communicating false information.• Benevolence ▫ Assumption that agents do not have conflicting goals• Rationality ▫ Acting to achieve its goals and not preventing their achievement. achievement• Selectivity ▫ Ability to focus attention on what is needed and ignoring the rest• Robustness ▫ Ability to cope up with failures and tolerate imperfectionsA close look at an Agent reveal that basically it is anKnowledge Based System with inherent processing g y p g powers besidesdeduction.
  56. 56. 56Multi Agent Systems g y• Systems Comprising of multiple autonomous agents agents.ISSUES• Homogeneity of the Knowledge representation p• Agent Communication Protocol• Topology• Reliability and Security of Communication
  57. 57. 57System Status Monitor• Consider a Production Plant id d i l• It may have many complex sub systems• St t of th plant will d Status f the l t ill depend ond status of all the subsystems• Each subsystem can have various states• Based on the state of each sub system, certain action has to be taken for smooth functioning of the Plant
  58. 58. 58System Status Monitor- An Agent based Perception System Monitor Agent Agent -1 Agent -2 Agent -n Sub system Sub system Sub system 1 1 1
  59. 59. 59Multi Agent Systems- Hierarchical Agent - 0 Agent -1/1 Agent -2/1 Agent -1/2 Agent -2/2 Agent -3/2 Agent -4/2 ... ... ...
  60. 60. 60 Agent Oriented Analysis & Design• Extension of Object Oriented Analysis & Design• Only Agents can perceive events, perform actions. Objects are passive entities with no such capacities.• State of an Object has no generic structure but an Agent has mentalistic structure consists of mental A h li i i f l component such as beliefs .• Messages in OO Systems are coded in application specific manner but Agent Communication Language can be application independent.
  61. 61. 61 Agent O e ed Analysis & ge Oriented ys s Design• Abstraction level of Object Oriented Analysis & Design should be level at which each object represents an Agent (Knowledge Based System).• Based on the structure, each agent can be developed individually i di id ll as explained in the Knowledge Based l i di h l d d Systems development process.• All the required abilities should be implemented as the th i d biliti h ld b i l t d th part of the Knowledge Based System to make it as an Agent. Agent