* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download In 9122 Applied Soft Computing
Survey
Document related concepts
Existential risk from artificial general intelligence wikipedia , lookup
Embodied cognitive science wikipedia , lookup
Philosophy of artificial intelligence wikipedia , lookup
Multi-armed bandit wikipedia , lookup
Genetic algorithm wikipedia , lookup
Transcript
SOFT COMPUTING 1. 2. 3. 4. 5. 6. 7. 8. A. B. Define : - Artificial Intelligence. Mention the characteristics of an artificial intelligent problem. A. How to represent a problem in State Space Search? Explain with an example B. Discuss on Depth First Search and Breadth First search. A. How knowledge can be represented through Prepositional Logic? B. Explain the importance of Scripts and Frames. A. Define – RESOLUTION. B. With an Example discuss on UNIFICATION algorithm. A. Define – Fuzzy Sets. B. Discuss on Fuzzy Reasoning. A. How Membership functions can be included in Fuzzy Set? B. Discuss on Fuzzy relations. A. How learning can be done with simple neurons? B. Explain the concept of Back Propagation Network. Discuss the following in Genetic Algorithms: i. Rank Method. j. Rank Space Method. SOFT COMPUTING Page 1 Artificial Intelligence (AI) Artificial intelligence, commonly abbreviated as AI, also known as machine intelligence, is the practice of developing algorithms that make machines (usually computers) able to make seemingly intelligent decisions, or act as if possessing intelligence of a human scale. The branch of computer science concerned with making computers behave like humans. The term was coined in 1956 by John McCarthy at the Massachusetts Institute of Technology. Artificial intelligence includes o o o o o games playing: programming computers to play games such as chess and checkers expert systems : programming computers to make decisions in real-life situations (for example, some expert systems help doctors diagnose diseases based on symptoms) natural language : programming computers to understand natural human languages neural networks : Systems that simulate intelligence by attempting to reproduce the types of physical connections that occur in animal brains robotics : programming computers to see and hear and react to other sensory stimuli Problem Characteristics: The term heuristic is used for algorithms which find solutions among all possible ones, but they do not guarantee that the best will be found, therefore they may be considered as approximately and not accurate algorithms. These algorithms, usually find a solution close to the best one and they find it fast and easily. Sometimes these algorithms can be accurate, that is they actually find the best solution, but the algorithm is still called heuristic until this best solution is proven to be the best. The method used from a heuristic algorithm is one of the known methods, such as greediness, but in order to be easy and fast the algorithm ignores or even suppresses some of the problem's demands. SOFT COMPUTING Page 2 Is the problem decomposable into a set of nearly independent smaller or easier sub problems? Can solutions steps be ignored or at least undone if they prove unwise? Is the problem’s universe predictable? Is a good solution to the problem obvious without comparison to all other possible solutions? Is the desired solution a state of the world or a path to a state? Is a large amount of knowledge absolutely required to solve the problem, or its knowledge important only to constrain the search? Can a computer that is simply given the problem return the solution, or will the solution of the problem require interaction between the computer and a person? Is the problem decomposable? Consider the below problem tree where the computer is trying to find out a solution to the given problem – ∫x2+3x+sin2xcos2xdx. ∫x2+3x+sin2xcos2xdx ∫x2dx ∫3xdx ∫sin2xcos2xdx ∫x3/3 3∫xdx ∫(1-cos2x)cos2xdx ∫3x2/2 ∫cos2xdx -∫cos4xdx From the above problem tree, a set of problem equation has been decomposed into smaller further decomposable segments. To arrive at this, system checks whether it can be further decomposable or not at each and every state by a simple recursive integration program. If the steps leads to an answer, then the answer is directly returned otherwise it will search will go on. Using this technique of problem decomposition, we can often solve very large problems easily. Let us consider one more example. SOFT COMPUTING Page 3 We have got three [3] set of cubes namely {A}, {B} & {C}. These were to be arranged in such a manner, the Set {A} should be placed top followed by set {B} and then by set {C}. Given set is like this, Set {B} is outside and set {A} is at the bottom, and set {C} is at top. The aim to realign the same as A,B & C from top to bottom. Start Goal A C B A B C ON (C, A) Steps 1. 2. 3. 4. 5. 6. 7. 8. 9. ON (B, C) & ON (A, B) involved in this problem: CLEAR [x] [block x has nothing on it] On(x, Table) [Pick up x and put it on the table] CLEAR (x) and CLEAR (y) ON(x, y) [put x on y] ON (B, C) and ON (A, B) ON (B, C) and ON(A, B) ON (B, C) and CLEAR (A) and ON (A, B) ON (B, C) and CLEAR (A) and ON (A, B). Now GOAL SET (A, B & C) is achieved. Figuratively it is achieved as below: On (b, c) and on (a, b) on (a, b) On (b, c) On (b, c) clear (a) clear (a) SOFT COMPUTING on (a, b) on (a, b) Page 4 By this way we can also try to solve puzzle game where it consists of 9 cubes placed by 3 x 3 matrix. Out of this, one cube will be empty or space. The remaining 8 cubes of the matrix will have numbers. The aim of the game is to realign the numbers from the present position [What we call it as “Start” position] to the new position [what we call it as “Goal” position]. Here one has to move the adjacent number to the empty cube. Through this means one has to move the numbers in such a way that they reach the goal conveniently. Is the universe predictable? It is the planning that is going to pave way for solutions. Whether such planning has to be done well in advance or to be done at that time of activity or there is no such possibility of such planning? It is to be explored and can’t be unique to all problem solving games. Considering the 8 cube puzzle and bridge card game, where unknown things are available as commonality. But in the 8 cube puzzle game before making a move, it is possible to compute the permutation and combination of the available moves to choose the one. Even if we make a wrong move, then it is possible to undo such moves to start from the same position. Whereas, it is not so in the game bridge, where once committed is once for all committed. Though planning is a must, it needs proper place to be implemented. In the first 8 cube puzzle game, even if planning fails there is recoverable process. But in the bridge card game, if planning is failed, it is out once for all. Improper planning and executing the same is very expensive and risky. It may succeed or may not succeed. The problem characteristics of this is ignorable versus recoverable versus irrecoverable and certain outcome versus uncertain outcome. Is a Good Solution Absolute or Relative? Considering the following database that reveals simple facts: 1. 2. 3. 4. 5. 6. 7. Marcus was man. Marcus was a Pompeian. Marcus was born in 40 A. D. All men are mortal. All Pompeian died when the volcano erupted in 79 A. D. No mortal lives longer than 150 years. It is now 2007 A. D. SOFT COMPUTING Page 5 Now, if anybody ask one question, whether Marcus is alive or Dead? We have to go through the above statement and find out the answer. Let us see the methodology of finding out the answer through predicate logic, and using formal inference methods. Decisions 8. 9. 10. 11. 12. 13. 14. 15. 16. Justifications. Marcus was a man. Axiom 1. All men are mortal. Axiom 4. Marcus is mortal. 1, 4. Marcus was born in 40 A. D. Axiom 3. It is now 2007 A. D. Axiom 7. Marcus’ age is 1967 years Axiom 3 & 7. No mortal lives longer than 150 yrs. Axiom 6. All Pompeian died when the Volcano erupted in 79 A. D. Axiom 5. So, Marcus is dead. 10, 13 & 14. Is the solution A State or Path? It is always best to choose the example of traveling salesmen, who has to travel from one city to another and a must that he is not supposed to return to the same city again and finally he has to reach back to his starting position. For this the law of finding the solution is n-1!, where n is total number of cities, he has to travel and assuming that he has to travel from a particular city and that is reduced. Say for example, he has to travel 6 cities then the answer path will be 5! [5x4x3x2x1 = 120] solutions are there to identify the best possible shortest route. So it will be always very difficult to identify the best possible shortest route for this salesmen route. Though, one may come to a conclusion that it is possible to asses certain totally ignoring others for want of time and other activities and to proceed based on the assumption that the decision taken already is correct. Someone at some time may come up with best possible shortest route. Until then, one will go by the same path. What is the role of knowledge? Chess and General opinion poll. For chess it is limited option and good logic. For general opinion poll, it is lot of reasons. Every time we have to break our head to identify the reason for our success or failures. SOFT COMPUTING Page 6 Does the task require Human Interaction or not? Answer to this is always difficult as many times, the reason assigned by the computer to identify the answer is not known properly or at times not acceptable to the human. Someone may thing that it is necessary for human interaction. We may take the same in the best manner that if the system [computer] needs, we can say human is assisting computer and if the human requires assistance, it is then assisting human to make understand the computer. The AI Problem: 1. Mundane tasks: 2. Perception. Understanding. Speech. Natural Language. Understanding. Generation. Translation. Common sense reasoning Robot Control Formal Tasks: Games. Chess. Backgammon. Checkers. Go. Mathematics. SOFT COMPUTING Page 7 3. Geometry. Logic. Integral Calculus. Proving properties of Programs. Expert Tasks: Engineering. Design. Fault Finding. Manufacturing Planning. Scientific Analysis. Financial Analysis. Medical Analysis. Problems, Problem Spaces ad Search. 1. Define the problem precisely. 2. Analyze the problem. 3. Isolate and represent the task knowledge that is necessary to solve the problem. 4. Choose the best problem – solving technique(s) and apply it to the particular problem. SOFT COMPUTING Page 8 Defining the problem as a state space search A water jug problem: Aim to fill 2 gallon water in the 4 gallon water jug using 3 gallon water jug, where both 4 and 3 gallon jug does not have any marking on it. May be on look the answer will be very simple. For god’s sake, the problem does not mention about the quantity of water to be used to fill 2 gallon of water in 4 gallon jug. So it is the user’s choice that by spending n number of gallons of water, he can fill 2 gallons of water. The steps involved in identifying the same. 1. There are two jugs without any measurement in it but identifying itself as 4 gallons and 3 gallons depending on its size [Large – 4 gallons and smaller – 3 gallons]. 2. Assuming both the jugs is empty. Let us name the bigger jug as ‘x’ for 4 gallons and smaller jug as ‘y’ for 3 gallons. 3. Fill 4 gallon jug with water. 4. Fill 3 gallon jug with water. 5. Pour all water from 4 gallon jug. 6. Now, transfer all water from 3 gallon jug to 4 gallon jug. 7. Now, 4 gallon jug has 3 gallons of water and 3 gallon jug is empty. 8. Fill 3 gallon jug full. 9. Now, 3 gallon jug has 3 gallon water and 4 gallon jug as 3 gallon water. 10. Pour water from 3 gallon jug carefully to 4 gallon jug till it reaches full [Care has to be taken no to drop any water down to earth either from 4 gallon jug or 3 gallon jug]. SOFT COMPUTING Page 9 11. Now 4 gallon jug has 4 gallon water and 3 gallon jug after filling the balance 4 gallon jug, now has 2 gallon water. 12. Pour all water from 4 gallon jug. 13. Now, 4 gallon jug is empty and 3 gallon jug has 2 gallon water. 14. Now, transfer the 2 gallon water from 3 gallon jug to 4 gallon jug so that 4 gallon jug has 2 gallon of water. The same is represented as table here: Gallons in the 4 Gallon Jug [x] Bigger Gallons in the 3 Gallon Jug [y] Smaller 0 0 Both the jugs are empty. 4 0 Fill jug [x] – 4 gallons with water. 4 3 Fill jug [y] – 3 gallons with water. 0 3 Empty the 4 gallon jug[x]. 3 0 Pour all the water from 3 gallon jug[y] to 4 gallon jug[x]. 3 3 Fill 3 gallon jug[y] with fresh water. 4 2 Pour water from 3 gallon jug[y] to 4 gallon jug[x] till it is full. 0 2 Empty the 4 gallon jug[x] 0 Pour all the water from 3 gallon jug[y] to 4 gallon jug[x] - RESULT 2 SOFT COMPUTING Rules applied. Page 10 Breadth First Search - How it works BFS is an uninformed search method that aims to expand and examine all nodes of a graph systematically in search of a solution. In other words, it exhaustively searches the entire graph without considering the goal until it finds it. It does not use a heuristic. From the standpoint of the algorithm, all child nodes obtained by expanding a node are added to a FIFO queue. In typical implementations, nodes that have not yet been examined for their neighbors are placed in some container (such as a queue or linked list) called "open" and then once examined are placed in the container "closed". The breadth-first tree one gets when running BFS on the given map and An example map of Germany with some Animated example of a breadthfirst search starting in Frankfurt. connections between cities. Uninformed search An uninformed search algorithm is one that does not take into account the specific nature of the problem. As such, they can be implemented in general, and then the same implementation can be used in a wide range of problems thanks to abstraction. The drawback is that most search spaces are extremely large, and an uninformed search (especially of a tree) will take a reasonable amount of time only for small examples. As such, to speed up the process, sometimes only an informed search will do. SOFT COMPUTING Page 11 Algorithm (informal) 1. Put the ending node (the root node) in the queue. 2. Pull a node from the beginning of the queue and examine it. If the searched element is found in this node, quit the search and return a result. Otherwise push all the (so-far-unexamined) successors (the direct child nodes) of this node into the end of the queue, if there are any. 3. If the queue is empty, every node on the graph has been examined -- quit the search and return "not found". 4. Repeat from Step 2. C++ implementation This is the implementation of the above informal algorithm, where the "so-far-unexamined" is handled by the parent array. Suppose we have a struct: struct Vertex { ... std::vector<int> out; ... }; and an array of vertices: (the algorithm will use the indexes of this array, to handle the vertices) std::vector<Vertex> graph(vertices); the algorithm starts from start and returns true if there is a directed path from start to end: bool BFS(const std::vector<Vertex>& graph, int start, int end) { std::queue<int> next; std::vector<int> parent(graph.size(), 0); // 0 means filled with zeros. parent[start] = -1; next.push(start); while (!next.empty()) { int u = next.front(); next.pop(); // Here is the point where you can examine the u th vertex of graph For example: if (u == end) return true; for (std::vector<int>::const_iterator j = graph[u].out.begin(); j != graph[u].out.end(); ++j) { // Look through neighbors. int v = *j; if (parent[v] == 0) { // If v is unvisited. parent[v] = u; next.push(v); } } } return false; } SOFT COMPUTING Page 12