0% found this document useful (0 votes)
13 views

AI Unit 1

Notes of ai contain all information realated to ai

Uploaded by

jiboss998
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
13 views

AI Unit 1

Notes of ai contain all information realated to ai

Uploaded by

jiboss998
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 18
handling bythe Faculty | Q&A aciliated by the ge a /faculye interaction lt ustration of the [Connect and lexample by the faquly lcontent with Chapter 1 Introduction to Artificial Intelligence troduction branch of Computer Science named Artificial Intelligence (Al) pursues creating the computers / jachines as intelligent as beings. John McCarthy the father of Artificial Intelligence ccribed Al as, “The er oe intelligent machines, especially intelligent, mmputer programs”. Artificial Intelligence (Al) is a branch of Science which deals with helping jachines find solutions to complex problems in a more human-like fashion. This generally involves borrowing characteristics from human intelligence, and applying them as Jeorithms in a computer friendly way. ‘A more or less flexible or efficient approach can be taken depending on the requirements Hablished, which influences how artificial the intelligent behavior appears. rtificial is defined in different approaches by various researchers during its evolution, such as rtificial Intelligence is the study of how to make computers do things which at the moment, 7 bility of the faculty to |deliver/ convey the =F ‘ople do better.’ ere are other possible definitions “AI is a collection of hard problems|which canibe solved by mans and other living things, but for which we don’t have good algorithms for solving,” g., understanding spoken/natural language, medical diagnosis, circuit design, learning, self- aptation, reasoning, chess playing, proving math theories, ete. 1AI Approaches \¢ difference between machine and human, intelligence. is that,the human think / act rationally upafe to machine. Historically, all four approaches to Al have been followed, cach by different ople withdifferent methods, Like humans Well cry Rational agents 2 Act Hew é systems e - é Figure 1: Al approaches hing wel a . % |_| Unedited Version:Anificial Intelligent S Develop formal models of knowledge representation, reasoning, learning, memory, problem solving that can be rendered in algorithms. ‘There is often an emphasis on a systems that are provably correct, and guarantee finding an optimal solution. Act well * For a given set of inputs, generate an appropriate output that is not necessarily correct but gets the job done. 4 heuristic (heuristic rule, heuristic method) is a rule of thumb, strategy, trick, simplification, or any other kind of device which drastically limits search for solutions in large problem spaces. Heuristics do not guarantee optimal solution$; infact, they do not guarantee any Solution at all: all that can be said for a useful heuristic is that it offers solutions which are good enough most of the time Think like humans Cognitive science approach. Focus not just onlbehavior and 1/O but also look at reasoning process. The Computational model should reflect “how” results were obtained. Provide a new language for expressing \cognitiveh theories “and new mechanisms for evaluating them) GPS (General Problem Solver):»Goal not just to produce humanlike behavior « (like BLIZA), but to produce a sequence of steps of the reasoning process that WaS'similar to the steps followed by a person in solving the samc task. Act like humans Behaviorist approach- Not interested in how you get results, just the similarity to what human results are. Exemplified by the Turing Test (Alan Turing, 1950). Example: ELIZA: A program that simulated a psychotherapist interacting with a patient and successfully passed the Turing)Test. It was coded at MIT during 1964-1966 by Joel Weizenbaum. First)script was DOCTOR. The script was a simple collection of syntactic patterns not.unlike regular expressions Each pattern had an associated reply which might include bits of the input (after simple transformations (my — your) Weizenbaum was shocked at reactions: Psychiatrists thought it had potenti ial. People unequivocally anthropomorphized. Many thought it solved the NL problem. 1.2Applications of Artificial Intelligence In 1981 In Artificial Intelligence became an Industry means the theories and techniques proposed in Artificial Intelligence literatures were accepted by Industries and they started inyesting in the area of Artificial Intelligence, The concepts of Artificial Intelligence are implemented in various fields. Few of them are listed as follows. © Game Playing 2 | Unedited Version: Artificial Intelligent * Computer Vision The computer vision leads the comy some systems as: ~ Face detection system installed at airport. - Medical diagnosis puter to understand the signals and act accordingly. There are * Expert Systems A knowledge engitiéérisinterviews)experts in a certain domain and tries to embody their knowledge ina computer program for carrying out some task. How well this works depends on Whether the intellectual mechanisms required for the task are within the present state of Al When this turned out not to be so, there were many disappointing results. One of the first expert systems was MYCIN in 1974, which diagnosed bacterial infections of the blood and suggested treatments. It did better than medical students or practieingdoctors, provided its limitations were observed. Namcly, its ontology included bacteria, symptoms, and treatments and did not include patients, doctors, hospitals, death, recovery, and events occurring in time. Its interactions depended ona single patient)being considered, Since the experts consulted by the knowledge engineers knew. about patients, doctors, death, recovery, etc., it is clear that the knowledge engineers forced what the experts told them into a predetermined framework. The usefulness of current expert systems depends on theinusers having common sense. * Heuristic Classification One of the most feasible kindsiof expert system given the present knowledge of AI is to put some information in one of a fixed set of categories using several sources of information. An example is advising whether to accept‘a proposed credit card purchase. Information is available about the owner of the credit card, his record of payment and also about the item he is buying and about the establishment from which he is buying it. . rent Robots 4 : Bice have sensors to detect physical data from the real world such as light, heat, temperature, movement, sound, bump, and pressure. They have efficient processors, multiple sensors and huge memory, to exhibit intelligence. | J Unedited Version:Artificial Intelligent Apart from regular application there are some domain task covered by Artificial Intelligence which are listed as follows: Perception - Vision = Speech Natural Language - Understanding - Generation = Translation Common Sense Reasoning Robot Control Games - Chess - Backgammon = Checkers - Go Mathematics - Geometry - Logic - Integral Calculus Expert Tasks - Design - Fault finding - Manufacturing Planning Scientific Analysis Medical Diagnosis Financial analysis 1,3 Historical Evolution of Artificial Intelligence Intelligence forms the foundation ofall humat there was a feeling that the human effort8:to lear laws of God or nature. E.g, Eve in Bible, of the history in AI dates backto Aristotl it technology and in fact all human civilization. But rn knowledge constitute a transgression against the Prometheus in Greck mythology. The logical starting point le. He formalized the insights, wonders and fears regarding nature with careful analysis into a diseiplined thought. For him, the study of thought it self was the basis of all knowledge. In his ‘Logie’, he investigated whether certain propositions can be said to be “true” because they are related to other things that are known to be true. Gottlob Frege, Bertrand Russel, Kurt Godel, Alan Turing etc followed this school of thought. The major development, which drastically changed the world view was the discovery of Copper Niccus - that the earth is not the center of universe but is a just a component of it, Though it was against the practiced dogmas and revered religious beliefs, it was a new realization that - © Our ideas about world may be fundamentally different from its appearance. © There is a gap between the human mind and its surrounding realities. © There is a gap between idea about things and things about themselves, The argument is that- We could separate mind and physical world. © It is necessary to find way to connect these, ‘The accepted view is that, though they are separate, they are not fundamentally different. Process, like physical process, can be characterized formal mathematics or logic. ‘The historical events are summarize in the following table: Year Event 1923 Karel Capek’s play named “Rossum’s Universal Robots” (RUR) opens in London, first use of the word "robot" in English. 1943 Foundations for neural networks laid. 1945 Tsaac Asimov, a Columbia University alumni, coined the term Robotics. 1950 ‘Alan Turing introduced Turing Test for evaluation of intelligence and published Computing Machinery and Intelligence. Clatide Shannon published Detailed Analysis of Chess Playingaswsearch. 1956 ‘Tohn McCarthy coined the term Avfificial Intelligence. Demonstration of the first running Al program at Camegie Mellon University. 1958 John McCarthy invents LISP programming language for AL 1964 Danny Bobrow’s dissertation at MIT showed that computers can understand natural Janguage well enough to solve algebra word problems correctly. 1965 Joseph Weizenbaum at MIT built ELIZA, an interactive problem that carries on a dialogue in English. 1969 Scientists at Stanford Research Institute Developed Shiakey, a robot, equipped with {ocomotion, perceptionjand problem solving. 1973 ‘The Assembly Robotics group at Edinburgh University built Freddy, the Famous Scottish Robot, capable of using vision to locate and assemble models. 1979 The first computer-controlled autonomous vehicle, Stanford Cart, was built 1985 Harold Cohen created and demonstrated the drawing program, Aaron. 1990 Major advanieesiin all areas of Al: ‘© Significant demonstrations in machine learning © Case-based reasoning ‘= Multi-agent planning ‘© Scheduling © Data mining, Web Crawler ‘© natural language understanding and translation ‘© Vision, Virtual Reality © Games 1997 The Deep Blue Chess Program beats the then world chess champion, Garry Kasparov. 2000 Interactive robot pets become commercially available. MIT displays Kismet, a robot ‘with a face that expresses emotions. The robot Nomad explores remote regions of Antarctica and locates meteorites. 1.4Intelligent System 5 | Unedi ‘The intelligent system part of artificial intelligence is defined as, the system that the ability to calculate, reasoning, perception, store and retrieve the information from memory, solving complex problems and adaption. 1.4.1 Types of Intelligence Linguistic intelligence Musical intelligence Logical-mathematical intelligence Spatial intelligence Bodily-Kinesthetic intelligence ‘Intelligence T Description — The ability to spéak, recognize, and use mecha 1s of phonology (speech s) syntax (grammar), and) semantics (meaning). “@ The ability rate, communicate with, and understand meanings made of sound, understanding of» pitch, rhythm. ‘The)ability of use and understand relationships in the absence. of action or objects. Understanding ‘complex and abstract ideas, The ability tOyperceive visual or spatial information, change it, and re-create. visual Images...without reference to the objects, construct 3D images, and to move and rotate them, ‘The ability to use complete or part of the body to solve problems or fashion products, control over fine and ‘coarse motor skills, and manipulate the objects. Intra-personal intelligence. W ability to distinguish among e's own feelings, intentions, and * motivations, Interpersonal intelligence The ability to recognize and make distinctions among other people's feelings, beliefs, and intentions. Example Narrators, Orators Musicians, Singers, Composers Ab Samatlons, ay Map readers, Astronauts, Physicists Players, Dancers Gautam Buddha Mass — Communicators, Interviewers. ‘The intelligence is intangible. It is composed of — Reasoning Learning Problem Solving Perception Linguistic Intelligence i en oS \\ problem Solving 7 ception Figure 1.1: Composition of Artificial/Intelligence Let us go through all the components briefly — + Reasoning ~ It is the set of processes that enables us to provide basis for judgement, making decisions, and prediction. There are broadly two types — Inductive Reasoning Deduetive Reasoning ; : i it starts with @ general statement and [Pores a Ne tomakes ‘Jexamines the possibilities to reach a specific, roel ee Semen [logical conclusion. [Even ifall of the premises are true in a lif Something is true of a class of things in statement, inductive reasoning allows for the ||general, it is also true for all members of that iconclusion to be false, elass. [Example — "Tarush is a teacher. Tarush is [Example — "All women of age above 60 tudious. Therefore, All teachers are lyears are grandmothers. Vijaya is 65 years, [studious." (Therefore, Vijaya is a grandmother." * Learning Is the activity of gaining knowledge or skill by studying, practicing, being taught, ‘or experiencing something. Learning enhances the awareness of the subjects of the study. ‘The ability of learning is possessed by humans, some animals, and Al-enabled systems, Learning is categorized as ~ © Auditory Learning ~ It is learning by listening and hearing. For example, students listening to recorded audio lectures, © Episodic Learning ~ To learn by remembering sequences of events that one has witnessed or experienced. This is linear and orderly. ‘Motor Learning ~ It is leaning by precise movement of muscles. For example, picking objects, Writing, ete, © Observational Learning ~ To leam by watching and imitating others. For example, child tries to learn by mimicking her parent. © Perceptual Learning ~ It is learning to recognize stimuli that one has seen before. For example, identifying and classifying objects and situations. © Relational Learning ~ It involves learning to differentiate among various stimuli on the basis of relational properties, rather than absolute properties. For Example, Adding ‘little less’ salt at the time of cooking potatoes that came up salty last time, when cooked with adding say a tablespoon of salt © Spatial Learning ~ It is learning through visual stimuli such as images, colors, maps, etc. For Example, A person can create roadmap in mind before actually following the road. © Stimulus-Response Learning ~ It is learning to perform a particular behavior when a certain stimulus is present. For example, a dog raises its ear on hearing doorbell. + Problem Solving ~ It is the process in which one perceives. and tries to arrive at a desired solution from a present situation by taking some path, which is blocked by known or unknown, hurdles. Problem solving also includes decision making, which is the process of selecting the best suitable alternative out of multiple alternatives to reach the desired goal are available, + Perception — It is the process, of acquiring, interpreting, selecting, and organizing sensory information. Perception presumes Sensing. In humans, perception is aided by sensory organs. In the domain of Al, perception mechanism puts the data acquired by the sensors together in a meaningful manner, + Linguistic Intelligence — It is one’s ability,to use, comprehend, speak, and write the verbal and ‘written Janguage. It is important in interpersonal communication. 1.4.2 Difference between Human and Machine Intelligence + Humans perceive by patterns whereas the machines perceive by set of rules and data. + Humans store and recall information by patterns, machines do it by searching algorithms. For example, the number 40404040 is easy to remember, store, and recall as its pattern is simple. + Humans can figure out the complete object even if some part of it is missing or distorted; whereas the machines cannot do itcorrectly. 1.5 Agent and Environment ‘An agent is anything that perceive its environment through sensors and acts upon that environment through effectors. + Ahuman agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the sensors, and other organs such as hands, legs, mouth, for effectors. + A robotic agent replaces cameras and infrared range finders for the sensors, and various motors and actuators for effectors. ‘A software agent has encoded bit strings as its programs and actions. 7 Effectors ee, Figure 1.2: Agent and Environment 1.5.1 Agent Terminology + Performance Measure of Agent ~ It is the criteria, which determines how successful an agent is, Behavior of Agent = Itisithe action that agent performs after any given sequence of percepts. Percept — It is agent's perceptual inputs at a given instance. Percept Sequence — It is the history of all that an agent has perecived till date Agent Function — It is a map from the precept sequence to an action. Rationality Rationality is nothing but status of being reasonable, sensible, and having good sense of judgment. is concerned with expected ctions and results depending upon what the agent has perceived. Performing actions with the aim of obtaining useful information is an important part of rationality. 1.5.2 Ideal Rational Agent An ideal rational agent is the one, which is’capable of doing expected actions to maximize its performance measure, on the basis of = + Its percept sequence Its built-in knowledge base Rationality of an agent depends on the following — ‘The performance measures, which determine the degree of success, ‘Agent's Percept Sequence till now. The agent's prior knowledge about the environment. The actions that the agent can carry out. a A rational agent always performs right action, where the right action means the action that causes th agent to be most successful in the given percept sequence. The problem the agent solves is characte by Performance Measure, Environment, Actuators, and Sensors (PEAS). 1.5.3 The Structure of Intelligent Agents Agent's structure can be viewed as — + Agent = Architecture + Agent Program + Architecture = the machinery that an agent executes‘on. + Agent Program = an implementation of an agent function. (a) Simple Reflex Agents + Fhey choose actions only based on the;current percept. + They are rational only if a correct decision ismade only on the basis of current precept. + Their environment is completely observable. Condition-Action Rule — It is a rule that maps a state (condition) fo an action, | Sensors a { How is the world | | | like now? | Agent Condition-Action Rule What actions | need to do? Environment Figure 1.3a: Agents and Environment. (b) Model Based Reflex Agents They use a model of the world to choose their actions. They maintain an internal state. jel — knowledge about “how the things happen in the world”, Internal State ~ It is a representation of unobserved aspects of current state depending on percept history. Updating the state requires the information about — + How the world evolves. + How the agent’s actions affect the world. How is the world like now? Agent ‘How world evolves Condition-Action Rule What actions | need to do? Figure 1.3 b: Agents and Environment Environment (c) Goal Based Agents ‘They choose their actions in order to achieve goals. Goal-based approach is more flexible than reflex agent since the knowledge supporting a decision is explicitly modeled, thereby allowing for modifications. » Goal — It is the description of desirable situations, Environment Figure 1.3c: Agents and Environment (d) Utility Based Agents They choose actions based on a preference (utility) for each state. Goals are inadequate when — There aré conflicting goals, out of which only few can be achieved. + Goals have some uncertainty of being achieved and you.nced to weigh likelihood of success against the importance of a goal. % Subject: Artificial Intelligence 4 r 2: Subject Code: ((BTCSE 6018) ae . Uninformed Search Algo! ‘Uninformed search is a class of general-purpose search algorithms which operates in brute force-way. Uninformed search algorithms do not have additional information about state or search space other than how to traverse the tree, so it is also called blind search. Following are the various types of uninformed search algorithms: a if 1. Breadth-first Search, 2. Dept j 3. Depth-limited Search 4. Iterative deepening depth-first search ; rst Search 5. Uniform cost search 6. Bidirectional Search bg I. Breadth-first Search: © Breadth-first search is the most common search strategy for traversing a tree or graph. ‘This algorithm searches breadthwise ina tree or graph, so it is called breadth-first search. © BFS algorithm starts searching from the root node of the tree and expands all successor node at the current level before moving to nodes of next level. o The breadth-first search algorithm is an example of a general-graph search algorithm. © Breadth-first search implemented using FIFO queue data structure. Advantages: ee o BFS will provide a solution if any solution’ exists, ‘ ‘9 Ifthere are more than one solutions fora given problem, then BFS will provide the a. minimal solution which requires the least number of steps. 7 Disadvantages: x ‘0 Itrequires Jots of memory since each level ofthe tree must be saved into memory to expand PR eos irae wc ee ene errant eer the root node S to goal node K, BFS search algorithm traverse in layers, so it will follo which is shown by the dotted arrow, and the traversed path will be: 1. Sm> A> Ba C--> D> GDH Ea Feed > K Breadth First Search cr — aaa — ie — fai > I > Bia —— >) Level 4 Time Complexity: Time Complexity of BFS algorithm can be obtained by the number of nodes traversed in BFS until the shallowest Node. Where the d= depth of shallowest solution and bisa node at every state. T()= 1b. +b'= 0 (b4) Space Complexity: Space complexity of BFS algorithm is given by the Memory size of frontier which is O(b*). ‘Completeness: BFS is complete, which means if the shallowest goal node is at some finite depth, then BFS will find a solution, ‘Optimality: BFS is optimal if path cost is a non-decreasing function of the depth of the node, 2. Depth-first Search ‘© Depih-first search isa recursive algorithm for traversing a tree or graph data structure, © DFS requires very less memory as it only needs to store a slack of the nodes on the path from root node to the current node. ©. It takes less time to reach to the goal node than BFS algorithm (ift traverses inthe right path. Disadvantage: © There is the possibility that many states keep re-occurring, and there is no guarantee of finding the solution. © DFS algorithm goes for deep down searching and sometime it may go to the infinite loop. Example: In the below scarch tree, we have shown the flow of depth-first search, and it will follow the order as: Root node-—>Left node-—--> right node. twill start searching from root node S, and traverse A, then B, then D and E, after traversing E, it will backtrack the tree as E has no other successor and still goal node is not found. After backtracking it will traverse node C and then G, and here it will terminate as it found goal node. Depth First Search >| Level 0 search algorithm is within finite: ee complete sik soma a 4 Tee 1+ n+ n+, + n™=O(n") Where, m= maximui depth of any node and this can be much larger than d (Shallowest solution depth) Space Complexity: D'S algorithm needs to store only single path from the root node, hence space complexity of DFS is equivalent to the size of the fringe set, which is O(bm). Optimal: DIS seareh «| -orithm is non-optimal, as it may generate a large number of steps or high cost to reach to the 2: rode. 3. Depth-Limited Search Algorithm: A depth-limitcd’ searci, algorithm is similar to depth-first search with a predetermined limit. Depth-limited search can solve the drawback of the infinite path in the Depth-first search. In this algorithm, t!»< node at lepth limit will treat as it has no successor nodes further. Depth-limited search ci: be terminated with two Conditions of failure: t indicates that problem does not have any solution. lure value: It defines no solution for the problem within a given depth limit. Advantage Depth-limited search is \iemory efficient. Disadvants o De ited» +1 also has a disadvantage of incompleteness. © Itmay not be o, val if the problem has more than one solution, Completeness: 01.8 Time Compl: Space Comp! Optim: even if Od 4, Uniform Uniform. algorithm << the uniforr Uniform-cnsi sw used tosolves implemen! Uniform cos Advantae Depthlimi —> Eee peeks tt “@— Level 2 g # — | Level 3 he solution is above the depth-limit. » algorithm is complete if tl ‘complexity of DLS algorithm is O(b') complexity of DLS algorithm is O(bxt). arch can be vi fed as a special case of DFS, and it is also not optimal fhm: carching algorithm used for traversing a weighted tree or graph. This ‘when a different cost is available for each edge. The primary goal of 10 find a path to the goal node which has the lowest cumulative cost. : 1 ds nodes according to their path costs form the root node. It can be \where the optimal cost is in demand. A uniform-cost search algorithm 4 “ily queue. It gives maximum priority to the lowest cumulative cost, : ~ valent to BES algorithm ifthe path cost ofall edges is the same. 7 Complete Uniform-e Time Cor Let CF is © number Hence, th Space C: The sane search i Opti Uniforn 5. Mterativ —| Level ‘ete, such as if there isa solution, UCS will find it. val solution, and e is each step to get closer to the goal node, Then the |. Here we have taken +1, as we start from state 0 and end to C*/e. snplexity of Uniform-cost search isO(b!* IC", complexity so, the worst-case space complexity of Uniform-cost + optimal as it only selects a path with the lowest path cost, ‘ist Search: -orithm is a combination of DFS and BES algorithms. This search “opth limit and does it by gradually inereasing the ee

You might also like