1/19 Informed search algorithms Chapter 4 Modified by Vali Derhami.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Informed search algorithms
Local Search Algorithms
Local Search Algorithms Chapter 4. Outline Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Ant Colony Optimization.
Informed search algorithms
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Local search algorithms
Local search algorithms
Two types of search problems
Informed search algorithms
ارائه درس روباتيکز Extended Kalman Filter فريد ملازم استاد مربوطه دکتر شيري دانشگاه امير کبير – دانشکده کامپيوتر و فناوري اطلاعات.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
CS 4700: Foundations of Artificial Intelligence
Trading optimality for speed…
Adapted by Doug Downey from Bryan Pardo Fall 2007 Machine Learning EECS 349 Machine Learning Lecture 4: Greedy Local Search (Hill Climbing)
CSC344: AI for Games Lecture 4: Informed search
تعميم در يادگيري مبتني بر نمونه ها
Constraint Satisfaction Problems
Informed search algorithms
Local Search and Optimization
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
An Introduction to Artificial Life Lecture 4b: Informed Search and Exploration Ramin Halavati In which we see how information.
Local Search Algorithms This lecture topic Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after each lecture.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 3 Informed Search and Exploration Instructor: Alireza Tavakkoli September 10, 2009 University.
CS 380: Artificial Intelligence Lecture #4 William Regli.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
Artificial Intelligence for Games Online and local search
Local Search Algorithms
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
Solving problems by searching Chapter 3 Modified by Vali Derhami.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Local search algorithms In many optimization problems, the state space is the space of all possible complete solutions We have an objective function that.
Local Search Algorithms This lecture topic (two lectures) Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after.
Informed search algorithms Chapter 4 Slides derived in part from converted to powerpoint by Min-Yen.
Announcement "A note taker is being recruited for this class. No extra time outside of class is required. If you take clear, well-organized notes, this.
شرط و تصميم اصول كامپيوتر 1. 2 الگوريتم اقليدس E1: [find remainder] Divide m by n and let r be the remainder. Clearly, 0
Lecture 6 – Local Search Dr. Muhammad Adnan Hashmi 1 24 February 2016.
Local Search Algorithms and Optimization Problems
1/27 Informed search algorithms Chapter 4 Modified by Vali Derhami.
Solving problems by searching Chapter 3, part 2 Modified by Vali Derhami.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Local Search Algorithms CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and.
Constraints Satisfaction Edmondo Trentin, DIISM. Constraint Satisfaction Problems: Local Search In many optimization problems, the path to the goal is.
Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete"
Games: Expectimax MAX MIN MAX Prune if α ≥ β. Games: Expectimax MAX MIN MAX
Local Search Algorithms
Artificial Intelligence (CS 370D)
نمايش اعداد در کامپيوتر چهار عمل اصلي
Artificial Intelligence Informed Search Algorithms
هیدرولیک جریان در کانالهای باز
مثال : فلوچارتي رسم كنيد كه دو عدد از ورودي دريافت كرده بزرگترين عدد
Artificial Intelligence
First Exam 18/10/2010.
Local Search Algorithms
CSC 380: Design and Analysis of Algorithms
Beyond Classical Search
Local Search Algorithms
Presentation transcript:

1/19 Informed search algorithms Chapter 4 Modified by Vali Derhami

2/19 Relaxed problems مسائل تعديل شده A problem with fewer restrictions on the actions is called a relaxed problem The cost of an optimal solution to a relaxed problem is an admissible heuristic for the original problem If the rules of the 8-puzzle are relaxed so that a tile can move anywhere, then h 1 (n) gives the shortest solution If the rules are relaxed so that a tile can move to any adjacent square, then h 2 (n) gives the shortest solution تركيب هيوريستيك ها: h(n)=max(h 1 (n), h 2 (n),.. h m (n))

3/19 Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution, such as 8 queens problem State space = set of "complete" configurations Find configuration satisfying constraints, e.g., n- queens In such cases, we can use local search algorithms keep a single "current" state, try to improve it

4/19 Example: n-queens Put n queens on an n × n board with no two queens on the same row, column, or diagonal

5/19 مزاياي جستجوي محلي استفاده از حافظه بسيار كم تقريبا ثابت امكان استفاده در فضاهاي حالت بزرگ و نا متناهي (پيوسته)

6/19 Hill-climbing search "Like climbing Everest in thick fog with amnesia” همسايه هاي مجاور(توليد شده توسط تابع پسين) را بررسي مي كند و اگر حالتي بهتر است آن را جايگزين حالت فعلي ميكند

7/19 Hill-climbing search Problem: depending on initial state, can get stuck in local maxima

8/19 Hill-climbing search: 8-queens problem h = number of pairs of queens that are attacking each other, either directly or indirectly h = 17 for the above state تابع پسين تمامي حالتهاي ممكن را كه با جابجا كردن تنها يك وزير به مربعي ديگري در همان ستون توليد مي شود را بر مي گرداند (لذا هر حالت 8*7=56 پسين دارد)

9/19 Hill-climbing search: 8-queens problem A local minimum with h = 1

10/19 تپه نوردي اتفاقي بصورت تصادفي از حركتهاي رو به بالا يكي را انتخاب ميكند. –ميزان احتمال مي تواند بر اساس مقدار شيب روي به بالاي حركت باشد. هر دو روش تپه نوردي معمولي و اتفاقي ناكامل هستند. تپه نوردي با شروع مجدد تصادفي –يك مجموعه از جستجوي تپه نوردي را از حالتهاي شروع تصادفي اجرا مي كند.

11/19 Simulated annealing search جستجوي سخت سازي شبيه سازي شده Idea: escape local maxima by allowing some "bad" moves but gradually decrease their frequency هدف رفع مشكل تپه نوردي چرا كه در روش تپه نوردي هرگز حركت رو به پايين وجود ندارد. داخلي ترين حلقه روش مانند روش تپه نوردي است ليكن در اينجا به جاي انتخاب بهترين حركت يك حركت تصادفي انتخاب مي شود. –اگر حركت انجام شده شرايط را بهبود دهد آنگاه حالت جديد جايگزين حالت فعلي مي شود. –وگرنه با احتمال زير جايگزيني صورت مي گيرد. exp(  E/T) –  E ميزان بدي حالت جديد. –T ضريب دما كه در طول آزمايش كاهش مي يابد.

12/19 Simulated annealing search جستجوي سخت سازي شبيه سازي شده

13/19 Properties of simulated annealing search One can prove: If T decreases slowly enough, then simulated annealing search will find a global optimum with probability approaching 1 Widely used in VLSI layout, airline scheduling, etc

14/19 Local beam search جستجوي پرتوي محلي Keep track of k states rather than just one Start with k randomly generated states At each iteration, all the successors of all k states are generated If any one is a goal state, stop; else select the k best successors (or randomly) from the complete list and repeat.

15/19 Genetic algorithms Start with k randomly generated states (population) A state is represented as a string over a finite alphabet (often a string of 0s and 1s) Evaluation function (fitness function). Higher (sometimes lower) values for better states. Produce the next generation of states by selection, crossover, and mutation A successor state is generated by combining two parent states A suitable GUI for GA in MATLAB: gatool

16/19 Genetic algorithms Fitness function: number of non-attacking pairs of queens (min = 0, max = 8 × 7/2 = 28) 24/( ) = 31% 23/( ) = 29% etc

17/19 قدمهاي الگوريتم ژنتيک 1-انتخاب جمعيت (کروموزم هاي )اوليه 2 اعمال جمعيت به محيط و محاسبه تابع برازش 3- شرط توقف برقرار است يانه؟ اگر بلي توقف 4- انتخاب جميعت براي پيوند 5- انجام پيوند 6-جهش 7- برگشت به قدم دوم

18/19 Genetic algorithms

19/19 Genetic algorithms

20/19 تكليف کامپيوتري يک پاسخ مناسب براي مساله 8 وزير با استفاده از روشهاي زير بيابيد. الف- روش تپه نوردي ب- الگوريتم ژنتيک زمان اجراي هر دو روش و نيز پاسخ را مقايسه کنيد. زمان تحويل:تا تاريخ مشخص شده در سرکلاس باید به ایمیل مسئول حل تمرین درس ايميل کنيد.

تمرين اختياري هدف آن است که مقدار x1 و x2 را به گونه اي بيابيم که تابع زير مينيمم شود و ضمنا محدوديتهاي زير نيز برقرار باشد جواب اين مساله را با استفاده از روشهاي جستجوي زير بدست بياوريد: C(x)=2x 1 +5x 2 0<x 1 <5 0<x 2 <10 x 1 2 +x 1 +x 2 3 +log(x 1 )>100 21/19