YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Academic Session – 2011-12

Minakshi bhatt Assistant professor Deptt. of Computer Sc. & Engg..

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 2: Course File Artificial Intelli

Artificial intelligence[ECS-801]

S.No. Content Page No.1. Time Table

2. Syllabus

3. Subject Coverage Plan

4. Tutorial Sheets/Assignment Sheets

5. Objective questions

6. Previous Year UPTU Question Papers

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 3: Course File Artificial Intelli

Artificial intelligence[ECS-801]

1st 2nd 3rd 4th

LUNCH

5th 6th 7th 8th

Mon Lab ECS-852 (VIII C)

Tue L

Wed L T(G1+G2)

Thu L L

Fri L

Sat

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 4: Course File Artificial Intelli

Artificial intelligence[ECS-801]

ARTIFICIAL INTELLIGENCE (TIT- 702)

UNIT -IIntroduction : Introduction to Artificial Intelligence, Foundations and History of Artificial Intelligence, Applications of Artificial Intelligence, Intelligent Agents, Structure of Intelligent Agents. Computer vision, Natural Language Possessing.

UNIT - IIIntroduction to Search : Searching for solutions, Uniformed search strategies, Informed searchstrategies, Local search algorithms and optimistic problems, Adversarial Search, Search for games, Alpha - Beta pruningUNIT IIIKnowledge Representation & Reasoning: Propositional logic, Theory of first order logic,Inference in First order logic, Forward & Backward chaining, Resolution, Probabilistic reasoning, Utility theory, Hidden Markov Models (HMM), Bayesian Networks.

UNIT - IVMachine Learning : Supervised and unsupervised learning, Decision trees, Statistical learning models, Learning with complete data - Naive Bayes models, Learning with hidden data - EM algorithm, Reinforcement learning,

UNIT - VPattern Recognition : Introduction, Design principles of pattern recognition system, Statistical Pattern recognition, Parameter estimation methods - Principle Component Analysis (PCA) and Linear Discriminant Analysis (LDA), Classification Techniques – Nearest Neighbor (NN) Rule, Bayes Classifier, Support Vector Machine (SVM), K – means clustering.

References:1. Charnick “Introduction to A.I.”, Addision Wesley2. Rich & Knight, “Artificial Intelligence”3. Winston, “LISP”, Addision Wesley4. Marcellous, “Expert System Programming”, PHI 5. Elamie, “Artificial Intelligence”, Academic Press 6. Lioyed, “Foundation of Logic Processing”, Springer Verlag

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 5: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 6: Course File Artificial Intelli

Artificial intelligence[ECS-801]

1. ----------have the general form: given such and such data, find X. A huge variety of types of problem is addressed in AI.

i. Learning ii. Solution

iii. Problemiv. All of these

2. To reason is to draw inferences appropriate to the situation in hand is called--------------.i. Solution

ii. Learningiii. Problemiv. Reasoning

3. The simplest is learning by---------.i. By example

ii. By erroriii. Trail by erroriv. None

4. The logical programming language-----------was conceived by Alain Colmerauer at the university of Marseilles.

i. PROLOGii. LISP

iii. C++iv. None of these

5. --------------is usually defined as the science of making computers do things that require intelligence when done by humans.

i. Natural languageii. Learning

iii. Artificial intelligenceiv. Intelligence

6. -------------system that use forward reasoning.i. AI

ii. A problem solving

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 7: Course File Artificial Intelli

Artificial intelligence[ECS-801]

iii. Visioniv. Game playing

7. Attributes of a state altered by an operator application is called----------.i. Post condition

ii. Pre post-conditioniii. Pre conditioniv. States

8. A problem space consists of ------------.i. States

ii. Operatorsiii. Both (a) & (b)iv. None

9. Search methods are classified in to mainly---------search methods.i. Four types

ii. Three typesiii. Two typesiv. None

10. uninformed search is also called------.i. Blind search

ii. Hill climbingiii. Best first searchiv. Worst first search

11. This method is basically a --------- as complete solutions must be created before testing.i. Depth first search

ii. Hill climbingiii. Best first searchiv. Worst case search

12. ------------is a variation on a hill climbing and the idea is to include a general survey of the scene to avoid climbing false foothills.

i. Simulated annealingii. Best first search

iii. Worst case searchiv. None

13. A higher energy level is given by where k is-----------.i. Distance

ii. Boltzmann’s constantiii. Variationiv. None

14. -------------generating appropriate NL responses to unpredictable inputs.i. Speech synthesis

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 8: Course File Artificial Intelli

Artificial intelligence[ECS-801]

ii. Speech recognitioniii. Natural language understandingiv. Natural language generation

15. In S-ab the terminals here are”i. S

ii. Aiii. A and biv. None

16. ---------is a finite set of terminals,disjoint with V,which make up the actual content of the sentence.i. V

ii. Sigmaiii. Siv. R

17. The name expert system was derived from the term------.i. Knowledge base expert system

ii. Information based expert systemiii. Goal based expert systemiv. Data based expert system

18. The general purpose problem solver (GPS),a procedure developed by--------.i. Newell

ii. Simoniii. Newell & Simoniv. None

19. An expert system is set of programs that manipulate---------to solve problems.i. Encoded knowledge

ii. Decoded encoded knowledgeiii. Decoded knowledgeiv. None

20. ------------a declarative representation of the expertise, often in If THEN rules;i. Working storage

ii. Knowledge baseiii. Inference engineiv. User interface

21. ------------the data which is specific to a problem being solved.i. Working storage

ii. Knowledge baseiii. Inference engineiv. User interface

22. ------------the code at the core of the system which drives recommendations from the knowledge base and the problem-specific data in working storage.

i. Working storage

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 9: Course File Artificial Intelli

Artificial intelligence[ECS-801]

ii. Knowledge baseiii. Inference engineiv. User interface

23. ------------the code that control the dialog between the user and the system.i. Working storage

ii. Knowledge baseiii. Inference engineiv. User interface

24. ---------------the individual or individuals who currently expert solving the problems the system is intended to solve.

i. Domain expertii. Knowledge base

iii. Inference engineiv. User interface

25. --------------the ability of the system to reason with the rules and the data which are not precisely known.i. Copying with uncertainty

ii. Knowledge baseiii. Inference engineiv. User interface

26. --------------is an efficient way to solve problems that can be modeled as “structured selection” problems.i. Knowledge base

ii. Inference engineiii. User interfaceiv. Goal driven reasoning

27. This is a programming language that was designed for easy manipulation of data strings. It was developed in 1959 by John McCarthy and is still commonly used today in artificial intelligence (AI) programming.

i. LISP ii. assembly language

iii. machine code iv. Ruby

28. This is a system of programs and data structures that approximates the operation of the human brain.i. Intelligent Network

ii. decision support system iii. neural network iv. genetic programming

29. This is the ability of a computer to use binocular vision to differentiate between objects. The computer uses high-resolution cameras, a large amount of random access memory (RAM), and an artificial intelligence (AI) program to interpret data

i. DiffServ ii. model-view-controller

iii. machine vision Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 10: Course File Artificial Intelli

Artificial intelligence[ECS-801]

iv. eye-in-hand system

30. This is a program that allows the computer to simulate conversation with a human being. "Eliza" and "Parry" are early examples of programs that can at least temporarily fool a real human being into thinking they are talking to another person.

i. Speech Application Program Interface ii. chatterbot

iii. speech recognition iv. Amiga

31. This is a program that gathers information or performs some other service on a regular schedule without a human being's immediate presence.

i. aggregator ii. agile applet

iii. pageiv. intelligent agent

32. This is a type of computer program that simulates the judgment and behavior of a human or organization that possesses expert knowledge and experience in a particular field.

i. expert system ii. cyborg

iii. autonomous system iv. cybrarian

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 11: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Tutorial /Assignment – 01

Q.1. What is artificial intelligence? Does artificial intelligence aim at human-level

intelligence?

Q.2. Define the terms:

1. Turing test

2. Natural language

Q.3. Isn’t a solid definition of intelligence that doesn’t depend on relating it to human

intelligence?

Q.4. What are the applications of artificial intelligence?

Q.5. What is the water jug problem?

Q.6. What are the ways of searching? Explain with algorithm.

Q.7. Define Min-Max procedure.

Tutorial /Assignment – 02

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 12: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Q.1. What is the natural language processing? What are the different part of natural

language processing?

Q.2. What do you mean by conceptual dependency? What are the advantage and

disadvantage of conceptual dependency?

Q.3. What do you mean by the context free grammar?

Q.4. Parse tree for-“Bill loves the fish”

S – NP VP DET – the

NP – N V – Loves

NP – DET N N – Fish

VP – V NP

Q.5. CD representation for the following sentences:

While going home, I saw the frog.

I heard frog in the woods.

Ravi ate ice cream with a spoon.

Ram shot ravi.

Pankaj gives hari a book.

:

Tutorial /Assignment – 03

Q.01. What is the knowledge representation? Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 13: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Q.02. Define the first order predicate calculus with example.

Q.03. Define the following:

Semantic net

Minske’y frames

Partitioned net

Case grammar

Q.04. Define the clauses conversion procedure with example.

Q.05. Convert in to clausal form:

Tutorial /Assignment – 04

Q.01. What is the expert system? Explain with example.

Q.02. Define the following:

DENDRAL

MYCINCourse File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 14: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Q.03. What are the advantage and disadvantage of an expert system?

Q.04. Explain the features of expert system.

Q.05. What do you mean by expertise transfer?

Q.06. What is meta-knowledge?

:

Tutorial /Assignment – 05

Q.01.What do you mean by pattern recognition?

Q.02. What do you mean by template matching? Explain different types of template

matching.

Q.03. What is line finding? Explain.

Q.04. What do you mean by object identification (vision)?

Q.05. What do you mean by machine perception?

Q.06. What do you mean by supervised and unsupervised learning?

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 15: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 16: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 17: Course File Artificial Intelli

Artificial intelligence[ECS-801]

UNIT-1

INTRODUCTION

Syllabus: Introduction to artificial intelligence, problem solving games, natural language, automated reasoning, visual perception, simulation of sophisticated & intelligent behavior in different area, heuristic algorithm versus solution guaranteed algorithms.

Artificial Intelligence:

“Allow a computer to do things at a moment, which people do better”. Objective:Make a machine or computer or program which has some decision taking power.

Abstract:Artificial intelligence is the science and engineering of making intelligent machines, especially intelligent computer programs. it is similar task of using computer to understand human intelligence, but AI doesn’t have to confine itself to methods that are biological observable. History of AIThe history of artificial intelligence began in antiquity, with myths, stories and rumors of artificial beings endowed with intelligence or consciousness by master craftsmen; as Pamela McCorduck writes, AI began with "an ancient wish to forge the gods."

The field of artificial intelligence research was founded at a conference on the campus of Dartmouth College in the summer of 1956. Those who attended would become the leaders of AI research for decades. Many of them predicted that a machine as intelligent as a human being would exist in no more than a generation and they were given millions of dollars to make this vision come true. Eventually it became obvious that they had grossly underestimated the difficulty of the project. In 1973, in response

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 18: Course File Artificial Intelli

Artificial intelligence[ECS-801]

to the criticism of Sir James Lighthill and ongoing pressure from congress, the U.S. and British Governments stopped funding undirected research into artificial intelligence. Seven years later, a visionary initiative by the Japanese Government inspired governments and industry to provide AI with billions of dollars, but by the late 80s the investors became disillusioned and withdrew funding again. This cycle of boom and bust, of "AI winters" and summers, continues to haunt the field. Undaunted, there are those who make extraordinary predictions even now.

Progress in AI has continued, despite the rise and fall of its reputation in the eyes of government bureaucrats and venture capitalists. Problems that had begun to seem impossible in 1970 have been solved and the solutions are now used in successful commercial products. However, no machine has been built with a human level of intelligence, contrary to the optimistic predictions of the first generation of AI researchers. "We can only see a short distance ahead," admitted Alan Turing, in a famous 1950 paper that catalyzed the modern search for machines that think. "But," he added, "we can see much that must be done."

Applications of AI

Artificial intelligence has been used in a wide range of fields including medical diagnosis, stock trading, robot control, law, scientific discovery and toys. However, many AI applications are not perceived as AI: "A lot of cutting edge AI has filtered into general applications, often without being called AI because once something becomes useful enough and common enough it's not labeled AI anymore." "Many thousands of AI applications are deeply embedded in the infrastructure of every industry." In the late 90s and early 21st century, AI technology became widely used as elements of larger systems, but the field is rarely credited for these successes.

Finance

Banks use artificial intelligence systems to organize operations, invest in stocks, and manage properties. In August 2001, robots beat humans in a simulated financial trading competition.[4]

Financial institutions have long used artificial neural network systems to detect charges or claims outside of the norm, flagging these for human investigation.

Hospitals

A medical clinic can use artificial intelligence systems to organize bed schedules, make a staff rotation, and provide medical information.

Artificial neural networks are used as clinical decision support systems for medical diagnosis, such as in Concept Processing technology in EMR software.

Robotics

Robots have become common in many industries.. They are often given jobs that are considered dangerous to humans. Robots have proven effective in jobs that are very repetitive which may lead to mistakes or accidents due to a lapse in concentration and other jobs which humans may find degrading. Japan is the leader in using and producing robots in the world. In 1999, 1,700,000 robots were in use worldwide. For more information, see survey[5] about artificial intelligence in business.

Transportation

Fuzzy logic controllers have been developed for automatic gearboxes in automobiles (the 2006 Audi TT, VW Toureg[citation needed] and VW Caravell feature the DSP transmission which utilizes Fuzzy logic, a number of Škoda variants (Škoda Fabia) also currently include a Fuzzy Logic based controller).

Telecommunication

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 19: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Many telecommunications companies make use of heuristic search in the management of their workforces, for example BT Group has deployed heuristic search[8] in a scheduling application that provides the work schedules of 20,000 engineers.

Toys And Games

The 1990s saw some of the first attempts to mass-produce domestically aimed types of basic Artificial Intelligence for education, or leisure. This prospered greatly with the Digital Revolution, and helped introduce people, especially children, to a life of dealing with various types of AI, specifically in the form of Tamagotchis and Giga Pets, the Internet (example: basic search engine interfaces are one simple form), and the first widely released robot, Furby. A mere year later an improved type of domestic robot was released in the form of Aibo, a robotic dog with intelligent features and autonomy. AI has also been applied to video games.

Music

The evolution of music has always been affected by technology. With AI, scientists are trying to make the computer emulate the activities of the skillful musician. Composition, performance, music theory, sound processing are some of the major areas on which research in Music and Artificial Intelligence are focusing.

Aviation

The Air Operations Division AOD, uses AI for the rule based expert systems. The AOD has use for artificial intelligence for surrogate operators for combat and training simulators, mission management aids, support systems for tactical decision making, and post processing of the simulator data into symbolic summaries.

The use of artificial intelligence in simulators is proving to be very useful for the AOD. Airplane simulators are using artificial intelligence in order to process the data taken from simulated flights

Automated reasoning:

Objective:To make a computer program which can reason completely or partially completely automatically?

Abstract:Automated reasoning is a process to make a machine or computer program, which has some decision taking power or inference capability. Reasoning is nothing but it just a process of drawing conclusion from facts. We can say that reasoning is mental (cognitive) process of looking for reason for beliefs,conclusions,action or feelings.

Visual perception:

Objective:To know about vision system.

Abstract:Visual perception is the part of nervous system which allows our organism to see. It interprets the information from the light source and builds the world surrounding our body.

Problem solving agent:

Objective:To solve a problem by intelligent computer program.

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 20: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Abstract:An agent is something that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. Problem solving agent is one kind of goal based agent that decides what to do by finding sequence of actions that leads to desirable states. The most common method of problem solving representation artificial intelligence are: state space representation, problem reduction.

PROBLEM FORMULATION

-  Well-defined problems can be defined by the following 4 components

1.      Initial State – the start state of the agent

2.      Operators – possible actions available to agent. Example is the Successor function.   State space  =   initial state + successor function. A path is a sequence of states connected by a sequence of actions.

3.      Goal Test – determine whether a given state is a goal state; in general, there are many goal states.

4.      Path cost – function that assigns a numeric cost to each path; the step cost is the cost of moving from a state to the next state.

Measuring Problem-Solving Performance

  Criteria for evaluating search strategies

·              Completeness – will algorithm find solution if one exists?

·             Time Complexity   -  how long it takes to find solution

·                Note:  Time is measured in terms of the number of nodes generated during search                 

·             Space Complexity  -  memory required to perform search

·                Note:  Space is measured in terms of maximum number of nodes stored in memory

·             Optimality  -  does algorithm find optimal solution? 

Heuristic search: Objective:By using domain specific information, decide where to search next.

Abstract:The term heuristic is used for algorithms which find solutions among all possible ones. They do not guarantee that the best will be found. These algorithms usually find a solution close to the best one and they find it fast and easily. Example- travelling salesman problem.The travelling salesman problem (TSP) is an NP-hard problem in combinatorial optimization studied in operations research and theoretical computer science. Given a list of cities and their pairwise distances, the task is to find the shortest possible route that visits each city exactly once. It is a special case of the travelling purchaser problem.

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 21: Course File Artificial Intelli

Artificial intelligence[ECS-801]

The TSP has several applications even in its purest formulation, such as planning, logistics, and the manufacture of microchips. Slightly modified, it appears as a sub-problem in many areas, such as DNA sequencing. In these applications, the concept city represents, for example, customers, soldering points, or DNA fragments, and the concept distance represents travelling times or cost, or a similarity measure between DNA fragments. In many applications, additional constraints such as limited resources or time windows make the problem considerably harder.

Simulation of sophisticated and intelligent behavior in different areas:

Objective:To simulate the human intelligence on a computer.

Abstract:The research done by cognitive scientist,(scientist who study how human beings learn, reason, store knowledge and use it) helps to explain the working of human intelligence. This, in turn, has helped workers in the field of artificial intelligence to simulate that intelligence on a computer. Simulation of sophisticated and intelligent behavior can be achieved by the following methods: turing test , agents(intelligent agent) application area of Artificial intelligence

Turing testThe Turing test is a test of a machine's ability to exhibit intelligent behaviour. In Turing's original illustrative example, a human judge engages in a natural language conversation with a human and a machine designed to generate performance indistinguishable from that of a human being. All participants are separated from one another. If the judge cannot reliably tell the machine from the human, the machine is said to have passed the test. The test does not check the ability to give the correct answer, it checks how closely the answer resembles typical human answers. The conversation is limited to a text-only channel such as a computer keyboard and screen so that the result is not dependent on the machine's ability to render words into audio.

Natural language:

Objective:To build, the ability to use and understand natural language by machine.

Abstract:Natural language is the language in which we communicate like English, Hindi etc. natural language processing include: language understanding, language generation, translation. If we want to make a intelligent machine then its necessary for that machine to understand human language (natural language) to communicate with the human beings.

Natural language processing (NLP)

is a field of computer science and linguistics concerned with the interactions between computers and human (natural) languages; it began as a branch of artificial intelligence.[1] In theory, natural language processing is a very attractive method of human–computer interaction. Natural language understanding is sometimes referred to as an AI-complete problem because it seems to require extensive knowledge about the outside world and the ability to manipulate it.

Whether NLP is distinct from, or identical to, the field of computational linguistics is a matter of perspective. The Association for Computational Linguistics defines the latter as focusing on the theoretical aspects of NLP. On the other hand, the open-access journal "Computational Linguistics", styles itself as "the longest running publication devoted exclusively to the design and analysis of natural language processing systems" (Computational Linguistics (Journal))

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 22: Course File Artificial Intelli

Artificial intelligence[ECS-801]

Modern NLP algorithms are grounded in machine learning, especially statistical machine learning. Research into modern statistical NLP algorithms requires an understanding of a number of disparate fields, including linguistics, computer science, and statistics. For a discussion of the types of algorithms currently used in NLP, see the article on pattern recognition.

UNIT-2Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 23: Course File Artificial Intelli

Artificial intelligence[ECS-801]

INTRODUCTION

TO

SEARCH

What is SearchAI search is an intelligent way of solving problems in the field of Artificial Intelligence. Adding some ntelligence to the search techniques have proved worthy. There are many search techniques developed in the area of Artificial Intelligence. This article explains the background for AI searchand some of the AI search techniques.

Problem SpaceWhat is problem space? A problem space is a set of states and a set of operators. The operators map from one state to another state. There will be one or more states that can be called initial states, one or more states which we need to reach what are known as goal states and there will be states in between initial states and goal states known as intermediate states. So what is the solution? The solution to the given problem is nothing but a sequence of operators that map an initial state to a goal state. This sequence forms a solution path. What is the best solution? Obviously the shortest path from the initial state to the goal state is the best one. Shortest path has only a few operations compared to all other

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 24: Course File Artificial Intelli

Artificial intelligence[ECS-801]

possible solution paths. Solution path forms a tree structure where each node is a state. So searhing is nothing but exploring the tree from the root node.

Types of AI Search Techniques

Solution can be found with less information or with more information. It all depends on the problem we need to solve. Usually when we have more information it will be easy to solve the problem. There are two kinds of AI search techniques: uninformed searh and informed search.

Uninformed SearchSometimes we may not get much relevant information to solve a problem. Suppose we lost our car key and we are not able to recall where we left, we have to search for the key with some information such as in which places we used to place it. It may be our pant pocket or may be the table drawer. If it is not there then we have to search the whole house to get it. The best solution would be to search in the places from the table to the wardrobe. Here we need to search blindly with less clue. This type of search is called uninformed search or blind search. There are two popular AI search techniques in this category: breadth first search and depth first search.

Breadth first search (BFS), as the name implies, searches from the initial state breadth-wise. That is it searches all the states in the tree level by level. Only after exploring all the states in one level it will jump to the next level. Once the solution is found the search stops. The breadth first search is guaranteed to find the solution if one exists. Another approach is to explore only one branch deeper till the solution is found or there is no new state to explore and then start searching the adjacent level. This technique is called depth first search (DFS). By chance the solution exists in the first branch then depth first search can find the solution quickly. If the solution exists in some other branches farther away, there won't be much difference between depth first search and breadth first search. The problem with DFS is that it may get trapped in a indefinite loop. An alternate way is to search in both directions. That is one search from initial state to goal state and another search from goal state to initial state. This technique is called bidirectional search. Uninformed search is also called brute force search.

Informed SearchWe can solve the problem in an efficient manner if we have relevant information, clues or hints. The clues that help solve the problem constitute heuristic information. So informed search is also called heuristic search. Instead of searching one path or many paths just like that informed search uses the given heuristic information to decide whether or not to explore the current state further. Hill climbing is an AI search algorithm that explores the neighboring states and chooses the most promising state as successor and continue searching for the subsequent states. Once a state is explored, hill climbing algorithm simply discard it. Hill climbing search technique can make substantial savings if it has reliable information. It has to face three challenges: foothill, ridge and plateau. Best first search is a heuristic search technique that stores the explored states as well so that it can backtrack if it realizes that the present path proves unworthy.

Depth-first Search (DFS)

Expand the node deepest in the tree. Backtrack when you reach a non-goal node with no descendants Problems with DFS It can make a wrong choice and go down a long (possibly    infinite) path, although there may be a solution close to the root of the tree. DFS is not optimal.

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 25: Course File Artificial Intelli

Artificial intelligence[ECS-801]

If left subtree is of unbounded depth, but contained no solutions, DFS would never terminate. Hence, DFS is not complete. Time complexity of DFS is O(bm) Space complexity of DFS is O(bm)

            Blind Search Depth-First Search

1. Set L to be a list of the initial nodes in the problem.2. If L is empty, fail otherwise pick the first node n from L3. If n is a goal state, quit and return path from initial node.

4. Otherwise remove n from L and add to the front of L all of n's children. Label each child with its path from initial node. Return to 2.

Fig. 1.

Note: All numbers in Fig 1 refer to order visited in search.

 

  (b) Breadth-first Search (BFS)

Expand all the nodes at depth d before expanding at depth d+1. (Sequence is: root node, then its children, its grandchildren, etc)

Optimal? Yes, if path cost is a non-decreasing function of the depth of the goal node (in particular, if all step costs are equal).

Complete? Yes. If the shallowest goal node is at depth d, BFS will find it after expanding all shallower nodes (if branching factor b is finite)

Note: BFS is not very popular because of its time and space complexities – they are both exponential in nature!!

Space complexity of BFS is O(bd+1) Time complexity of BFS is O(bd+1)

      Note: The memory requirements of BFS are a bigger problem than is the                                             

                    execution time.

            Breadth-First Search

1. Set L to be a list of the initial nodes in the problem.2. If L is empty, fail otherwise pick the first node n from L

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 26: Course File Artificial Intelli

Artificial intelligence[ECS-801]

3. If n is a goal state, quit and return path from initial node.4. Otherwise remove n from L and add to the end of L all of n's children. Label each child with its path from initial node. Return to 2.

            Note: All numbers in Fig 1 refer to order visited in search. 

(c) Depth-limited Search (DLS)

“Solves” problem of unbounded trees (the infinite-path problem) in DFS by using a predetermined depth limit l. DLS is still incomplete if l < d – that is, the shallowest goal is beyond the limit. DLS is nonoptimal  if l > d. Time complexity is O(bl); space complexity is O(bl). 

  (d) Iterative Deepening Search (IDS)

-         Finds the best depth limit. Gradually increase the limit – 0, 1, 2, … - until    

     goal is found at depth limit d.

IDS combines the benefits of DFS and BFS. Like DFS space complexity is O(bd). Like BFS it is complete when the branching factor is finite; and it is optimal if path cost is a non-

decreasing function of the depth of the goal node. Time complexity is  O(bd).

Note:  IDS is the preferred uninformed search when search     

           space is large and the depth of the solution is not known.

 

Heuristic Search methods Generate and Test Algorithm

1. generate a possible solution which can either be a point in the problem space or a path from the initial state.

2. test to see if this possible solution is a real solution by comparing the state reached with the set of goal states.

3. if it is a real solution, return. Otherwise repeat from 1.

This method is basically a depth first search as complete solutions must be created before testing. It is often called the British Museum method as it is like looking for an exhibit at random. A heuristic is

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 27: Course File Artificial Intelli

Artificial intelligence[ECS-801]

needed to sharpen up the search. Consider the problem of four 6-sided cubes, and each side of the cube is painted in one of four colours. The four cubes are placed next to one another and the problem lies in arranging them so that the four available colours are displayed whichever way the 4 cubes are viewed. The problem can only be solved if there are at least four sides coloured in each colour and the number of options tested can be reduced using heuristics if the most popular colour is hidden by the adjacent cube.

a. Hill climbing

Here the generate and test method is augmented by an heuristic function which measures the closeness of the current state to the goal state.

1. Evaluate the initial state if it is goal state quit otherwise current state is initial state.2. Select a new operator for this state and generate a new state.3. Evaluate the new state

o if it is closer to goal state than current state make it current stateo if it is no better ignore

4. If the current state is goal state or no new operators available, quit. Otherwise repeat from 2.

In the case of the four cubes a suitable heuristic is the sum of the number of different colours on each of the four sides, and the goal state is 16 four on each side. The set of rules is simply choose a cube and rotate the cube through 90 degrees. The starting arrangement can either be specified or is at random.

  b) Best First Search

is a combination of depth first and breadth first searches. Depth first is good because a solution can be found without computing all nodes and breadth first is good because it does not get trapped in dead ends. The  best first search allows us to switch between paths thus gaining the benefit of both approaches. At each step the most promising node is chosen. If one of       the nodes chosen generates nodes that are less promising it is possible to choose another at the same level and in effect the search changes from depth to    breadth. If on analysis these are no better then this previously unexpanded node and branch is not forgotten and the search method reverts to the   descendants of the first choice and proceeds, backtracking as it were.

            This process is very similar to steepest ascent, but in hill climbing once a move is chosen and the others rejected the others are never reconsidered whilst in best first they are saved to enable revisits if an impasse occurs on the apparent best path. Also the best available state is selected in best first even its value is  worse than the value of the node just explored whereas in hill climbing the progress stops if there are no better successor nodes. The best first search algorithm will involve an OR graph which avoids the problem of node duplication and assumes that each node has a parent link to give the best node from       which it came and a link to all its successors. In this way if a better node is found this path can be propagated down to the successors. This method of using  an OR graph requires 2 lists of nodes

            OPEN is a priority queue of nodes that have been evaluated by the heuristic function but which have not yet been expanded into successors. The most promising nodes are at the front. CLOSED are nodes that have already been generated and these nodes must be stored because a graph is being used in preference to a tree.

b) Best First Search Algorithm:

1. Start with OPEN holding the initial state2. Pick the best node on OPEN3. Generate its successors

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 28: Course File Artificial Intelli

Artificial intelligence[ECS-801]

4. For each successor Doo If it has not been generated before evaluate it add it to OPEN and record its parento If it has been generated before change the parent if this new path is better and in that case

update the cost of getting to any successor nodes

5. If a goal is found or no more nodes left in OPEN, quit, else return to 2.

  The A* Algorithm

            Best first search is a simplified A*.

1. Start with OPEN holding the initial nodes.2. Pick the BEST node on OPEN such that f = g + h' is minimal.3. If BEST is goal node quit and return the path from initial to BEST Otherwise4. Remove BEST from OPEN and all of BEST's children, labelling each with its path from initial

node.

A* Search

-         minimizes total estimated solution cost-         estimates nodes by combining g(n) – the cost to reach node n -, and h(n) – the cost to get from

node n to the goal:

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 29: Course File Artificial Intelli

Artificial intelligence[ECS-801]

     thus,   f(n) = g(n) + h(n) =  estimated cost of the cheapest solution through n. A* is optimal if h(n) is an admissible heuristic – that is, h(n) never overestimates the cost to reach the goal.

            Disadvantages of A* -         Although generally better than the uninformed searches, the computation time of A* is too large-         Because it keeps all generated nodes in memory, A* usually runs out of space-         Not practical for many large-scale problems.

AO* Algorithm

1. Initialise the graph to start node2. Traverse the graph following the current path accumulating nodes that have not yet been expanded or solved3. Pick any of these nodes and expand it and if it has no successors call this value FUTILITY otherwise calculate only f' for each of the successors.4. If f' is 0 then mark the node as SOLVED5. Change the value of f' for the newly created node to reflect its successors by back propagation.6. Wherever possible use the most promising routes and if a node is marked as SOLVED then mark the parent node as SOLVED.7. If starting node is SOLVED or value greater than FUTILITY, stop, else repeat from 2.

 

UNIT-3

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 30: Course File Artificial Intelli

Artificial intelligence[ECS-801]

KNOWLEDGE

REPRESENTATION

UNIT-4Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 31: Course File Artificial Intelli

Artificial intelligence[ECS-801]

M/C LEARNING

UNIT-5Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.

Page 32: Course File Artificial Intelli

Artificial intelligence[ECS-801]

PATTERN

RECOGNITION

Course File/Minakshi bhattAssistant ProfessorC.S.E. deptt.


Related Documents