0 The animation which I am proposing here will be a 2D animation and can be developed in JAVA or Flash.

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization.
Cooperating Intelligent Systems
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
CS344: Principles of Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 7, 8, 9: Monotonicity 16, 17 and 19 th Jan, 2012.
Heuristic Search techniques
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
Traveling Salesperson Problem
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture– 4, 5, 6: A* properties 9 th,10 th and 12 th January,
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
Best-First Search: Agendas
Artificial Intelligence
Artificial Intelligence
Cooperating Intelligent Systems Informed search Chapter 4, AIMA.
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
Problem Solving and Search in AI Heuristic Search
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–2,3: A* 3 rd and 5 th January, 2012.
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Monotonicity 13 th Jan, 2011.
Chapter 4 Search in State Spaces Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
CS 344 Artificial Intelligence By Prof: Pushpak Bhattacharya Class on 15/Jan/2007.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 13– Search 17 th August, 2010.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17– Theorems in A* (admissibility, Better performance.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lectures 18, 19, 20– A* Monotonicity 2 nd, 6 th and 7 th September, 2010.
February 18, 2016Introduction to Artificial Intelligence Lecture 8: Search in State Spaces III 1 A General Backtracking Algorithm Sanity check function.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3: Search, A*
Solving problems by searching Uninformed search algorithms Discussion Class CS 171 Friday, October, 2nd (Please read lecture topic material before and.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Traveling Salesperson Problem
Introduction to Artificial Intelligence
Artificial Intelligence Problem solving by searching CSC 361
CS 4100 Artificial Intelligence
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
Haskell Tips You can turn any function that takes two inputs into an infix operator: mod 7 3 is the same as 7 `mod` 3 takeWhile returns all initial.
CS621: Artificial Intelligence
CS621: Artificial Intelligence
Artificial Intelligence Chapter 9 Heuristic Search
A General Backtracking Algorithm
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
State-Space Searches.
State-Space Searches.
HW 1: Warmup Missionaries and Cannibals
CS621 : Artificial Intelligence
CS621: Artificial Intelligence
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
Supplemental slides for CSE 327 Prof. Jeff Heflin
Presentation transcript:

0 The animation which I am proposing here will be a 2D animation and can be developed in JAVA or Flash.

1 A Star Algorithm CS344:Artificial Intelligence-B - Swati Priyam

2 Basic Keywords Used: A Star algorithm:Basic Definition A Star algorithm is a best first graph search algorithm that finds a least cost path from a given initial node to one goal node. Basic Terminologies Used:  Problem Space :The set of all possible configurations is the space of problem states or the problem space.

Keywords used : Functions used in the algorithm: Evaluation Function f(n): At any node n,it estimates the sum of the cost of the minimal cost path from the start node s to node n plus the cost of a minimal cost path from node n to a goal node. f(n)=g(n)+h(n) Where g(n)=cost of the path in the search tree from s to n; h(n)=cost of the path in the search tree from n to a goal node; Function f*(n): At any node n,it is the actual cost of an optimal path from node s to node n plus the cost of an optimal path from node n to a goal node. f*(n)=g*(n)+h*(n) Where g*(n)=cost of the optimal path in the search tree from s to n; h*(n)=cost of the optimal path in the search tree from n to a goal node; 3

Keywords Continued: 4 h*(n):It is the cost of the minimal cost path from n to a goal node and any path from node n to a goal node that acheives h*(n) is an optimal path from n to a goal. h is an estimate of h*. h(n) is calculated on the heuristic information from the problem domain.

A star Algorithm-An Example Given: A graph of nodes, is start, is goal. Aim of the Experiment:To find out the path from to with the minimum cost. Procedure: 1.Create a search graph G,consisting solely of the start node s.Put s on a list called OPEN. 2.Create a list called CLOSED that is initially empty. 3.LOOP:if OPEN is empty,exit with failure. 5

4.Select the first node on OPEN,remove it from OPEN and put it on CLOSED.Call this node n. 5.If n is a goal node,exit successfully with the solution obtained by tracing a path along the pointers from n to s in G. 6.Expand node n,generating the set,M,of its successors and install them as successors of n in G. 7.Establish a pointer to n from those members of M that were not already in G(I.e, not already on either OPEN or CLOSED). Add these members of M to OPEN.For each member of M that was already on OPEN or CLOSED,decide whether or not to redirect its pointer to n.For each member of M already on CLOSED,decide for each of its descendents in G whether or not to redirect its pointer. 6

8.Reorder the list OPEN,either according to some scheme or some heuristic merit. 9.Goto LOOP (NOTE:The above algorithm I have taken from the book Principles of Artificial Intelligence by Nils J.Nilsson.) 7

An Example: The proposed animation will look like this: 8 The user will be asked to set the start node S by clicking on a node in the graph search tree. The user will also be to set the goal node G by clicking on another node in the graph search tree. When the user clicks on START,the algorithm begins,and it is executed step by step indicating the status of OPEN and CLOSED list after every step. When the goal node is reached,the least costly path can be seen in the graph itself in a different color by clicking on “Show the least costly path”.

We can show the f value of each node as it enters the closed list by highlighting that particular node in red and displaying it in the animated graph itself and after the traversal is over,we can show the Winner node, i.e. the node which has the minimal f-value. The final Graph after the traversal is over is shown is slide- 14. After the algorithm is over,the final graph with winner nodes and the minimal path to the final node G should be shown in the animation. 9

A Graph search tree: Here the Starting node S is represented in RED and the goal node is represented in GREEN. Our aim is to reach the goal node G by tracing out the algorithm described in the previous slides. 10

OBSERVATION: Status of OPEN and CLOSED list after each step: NOTE: OPEN list and CLOSED list will be abbreviated as OL and CL from henceforth. Whenever a node enters the OL,the value of its parent node and its total cost from the starting node S will be included within simple braces(). Step 1: OL: S ( ; 0) CL: 10

Step 2: OL: A (S,1), B(S,3), C(S,10) CL:S Step 3: OL: B(S,3), C( S,10), D(A,6) CL: S,A Step 4: OL:C(S,10), D(A,6), E(B,7) CL: S,A,B The arrows in the diagram show that those nodes have been visited till step 4 S A B C D E F G 11

Step 5: OL: D(A,6), E(B,7) CL: S,A,B,C Step 6: OL: E(B,7), F(D,8) CL: S,A,B,C,D Step 7: OL: F(D,8),G(E,14) CL: S,A,B,C,D,E Step 8: OL: G(E,14) CL: S,A,B,C,D,E,F Step 9: OL: -- CL: S,A,B,C,D,E,F,G S A B C D E F G 12

F(n)=g(n)+h(n) Calculating the f value for each of the following nodes, we get f as: A: 1+5+3=9 B:3+4+7=14 C:10+6+7=23 D:1+5+3=9 E:3+4(10+6 is not minimal so not taken)+7 F:the goal node G cannot be reached from F 13

So,we can say that node A or node D is the winner as they have the least f-value. S B D E G F A C Winner nodes After the complete traversal is over,the final graph will show the winner nodes and the least estimated distance to the goal, which is 1+5+3=9,starting from S and reaching G via A and D. Least costly path:S  A  D  G 14

15 Questionnaire: Q1. What are the applications of A Star algorithm? A. A Star algorithm is often used to search for the lowest cost path from the q_start to the q_goal location in a graph of cells/voronoi/visibility/quad tree. Q2.Give some real life problems which uses the above algorithm. A. The algorithm solves problems like 8-puzzle problem and missionaries & Cannibals problem. Q3. List some differences between the A Star algorithm and Dijkshtra’s algorithm. A. A Star is generally considered to be the best pathfinding algorithm.Also Djikshtra’s algorithm is essentially the same as A *,except that there is no heuristic(H is always 0).Because it has no heuristic,it searches by expanding out equally in every direction.So it usually ends up exploring a much larger area before the target is found.This generally makes it slower than A *.

References and further Reading: 1.Principles of Artificial Intelligence by Nils J. Nilsson A * pathfinding for beginners by Patrick Lester. 4. CDEEP Lecture :CS 344-lecture no. 2 notes. Prof. Pushpak Bhattacharya 16