Title: Solving Problems by Searching AIMA: Chapter 3 (Sections 3.1, 3.2 and 3.3)

Similar documents
Oradea 71 Neamt. Sibiu 99. Fagaras. 80 Rimnicu Vilcea. Pitesti. 90 Craiova

ØÓ ÓÑÔ Ö Ø Ñ ÓÛ ØÓ Ò Ö Ø Ø Ñ ÓÛ º º ÓÙ ÖÝ ¾ ÁÒ ØÖÙØÓÖ³ ÒÓØ ÇÙØÐ Ò Ø ÓÖ Þ Ø ÓÒ Ó Ö Ø Ò ÕÙ ÇÖ Ö Ö Ö Û Ø Ò Ú ÐÙ Ø ÓÒ ÙÒØ ÓÒµ ع Ö Ø Ö Ö Ý Ö ½µ Ñ Ð ÙÖ Ø Ù

Introduction to Artificial Intelligence CSCE , Fall 2017 URL:

Title: Local Search Required reading: AIMA, Chapter 4 LWH: Chapters 6, 10, 13 and 14.

Arad Bucharest Craiova Dobreta Eforie Fagaras Giurgiu Hirsova Iasi Lugoj

Title: Adverserial Search AIMA: Chapter 5 (Sections 5.1, 5.2 and 5.3)

Uninformed search. Lirong Xia

Constraint satisfaction problems. Lirong Xia

Priority Queues & Heaps

Voting and Complexity

Cyber-Physical Systems Scheduling

Priority Queues & Heaps

The Australian Society for Operations Research

Subreddit Recommendations within Reddit Communities

SEMESTRIAL PROGRESS REPORT - FIGHT AGAINST TRAFFICKING IN HUMAN BEINGS -

Midterm Review. EECS 2011 Prof. J. Elder - 1 -

Minimum Spanning Tree Union-Find Data Structure. Feb 28, 2018 CSCI211 - Sprenkle. Comcast wants to lay cable in a neighborhood. Neighborhood Layout

Complexity of Manipulating Elections with Few Candidates

Priority Queues & Heaps

Prof. Dr. Bernhard Neumärker Summer Term 2016 Albert-Ludwigs-Universität Freiburg. Constitutional Economics. Exam. July 28, 2016

Genetic Algorithms with Elitism-Based Immigrants for Changing Optimization Problems

Police patrol districting method and simulation evaluation using agent-based model & GIS

Chapter 8: Recursion

Zoltán Rostás Florentina Ţone (eds.): Tânăr student caut revoluţionar (I.-II.).

Voting on combinatorial domains. LAMSADE, CNRS Université Paris-Dauphine. FET-11, session on Computational Social Choice

Hyo-Shin Kwon & Yi-Yi Chen

Designing police patrol districts on street network

Wasserman & Faust, chapter 5

11th Annual Patent Law Institute

Polydisciplinary Faculty of Larache Abdelmalek Essaadi University, MOROCCO 3 Department of Mathematics and Informatics

GUIDELINE 6: Communicate effectively with migrants

Combating Friend Spam Using Social Rejections

Political Districting for Elections to the German Bundestag: An Optimization-Based Multi-Stage Heuristic Respecting Administrative Boundaries

Comparison Sorts. EECS 2011 Prof. J. Elder - 1 -

Perspectives on decentralization The premises of decentralization and regionalization in Romania

From the AASHTO Transportation Policy Book, January 2000

Enriqueta Aragones Harvard University and Universitat Pompeu Fabra Andrew Postlewaite University of Pennsylvania. March 9, 2000

Politics is the subset of human behavior that involves the use of power or influence.

information it takes to make tampering with an election computationally hard.

PUBLIC CONSULTATION. Improving procedures for obtaining short-stay Schengen visas

Computational social choice Combinatorial voting. Lirong Xia

ECE250: Algorithms and Data Structures Trees

STUDY GUIDE FOR TEST 2

COMMUNICATION TIPS. Tips for Writing Your Legislator

CS 4407 Algorithms Greedy Algorithms and Minimum Spanning Trees

Influencing Expectations in the Conduct of Monetary Policy

FSPS 2nd Grade Social Studies Pacing Guide. Grade: 2nd Content Focus: Community ( Fort Smith) Unit Standards Content Resources

What is Computational Social Choice?

A Calculus for End-to-end Statistical Service Guarantees

Please reach out to for a complete list of our GET::search method conditions. 3

Forced to Policy Extremes: Political Economy, Property Rights, and Not in My Backyard (NIMBY)

Chapter 11. Weighted Voting Systems. For All Practical Purposes: Effective Teaching

CS 5523 Operating Systems: Synchronization in Distributed Systems

AGREEMENT. between. the Government of the Republic of Slovenia. and. the Government of the Republic of Serbia

Slide 2 We will discuss different areas where co operation with the judicial authorities may be important for prosecutors of environmental crime.

Optimization Strategies

Aligning claim drafting and filing strategies to optimize protection in the EPO, GPTO and USPTO

Quality of Service in Optical Telecommunication Networks

Voting System: elections

PUBLIC ADMINISTRATION (PUAD)

Web Mining: Identifying Document Structure for Web Document Clustering

Estimating the Margin of Victory for Instant-Runoff Voting

30 June 1 July 2015, Hofburg, Vienna

The UN Youth Association of Romania

INTERNATIONAL ECONOMICS, FINANCE AND TRADE Vol. II - Strategic Interaction, Trade Policy, and National Welfare - Bharati Basu

17.1 Introduction. Giulia Massini and Massimo Buscema

Search Trees. Chapter 10. CSE 2011 Prof. J. Elder Last Updated: :51 PM

An Integer Linear Programming Approach for Coalitional Weighted Manipulation under Scoring Rules

Aggregating Dependency Graphs into Voting Agendas in Multi-Issue Elections

Three Seas Initiative roots, aims, perspectives

1 Introduction. Cambridge University Press International Institutions and National Policies Xinyuan Dai Excerpt More information

The Personal. The Media Insight Project

Midterm Review. EECS 2011 Prof. J. Elder - 1 -

Wind power integration and consumer behavior: a complementarity approach

Digital copyright contention in France and Europe

Michael Laver and Ernest Sergenti: Party Competition. An Agent-Based Model

A Dead Heat and the Electoral College

Abstract. 1 Introduction. Yoav Shoham and Moshe Tennenholtz Robotics Laboratory Department of Computer Science Stanford University Stanford, CA 94305

Robust Electric Power Infrastructures. Response and Recovery during Catastrophic Failures.

File Systems: Fundamentals

Cluster Analysis. (see also: Segmentation)

Department of Industrial Engineering: Research Groups

Field report, WVS Romania 2012

AGENDAS AND SINCERITY: A SECOND RESPONSE TO SCHWARTZ

Comparison of Multi-stage Tests with Computerized Adaptive and Paper and Pencil Tests. Ourania Rotou Liane Patsula Steffen Manfred Saba Rizavi

Report on community resilience to radicalisation and violent extremism

Number of samples: 1,000 Q1. Where were you at the occurrence of Tsunami on 26 December, 2004?

Initiatives and Referenda Handbook

Lawyering Skills I Professor David E. Sorkin Fall 2006

Hoboken Public Schools. Project Lead The Way Curriculum Grade 8

2017 Municipal Election Review

Maps, Hash Tables and Dictionaries

Political Economics II Spring Lectures 4-5 Part II Partisan Politics and Political Agency. Torsten Persson, IIES

POLI 359 Public Policy Making

State and Local Politics

1 Electoral Competition under Certainty

Agendas and sincerity: a second response to Schwartz

Recruiting Your Way to Victory: Varying Strategies in Insurgent/Counterinsurgent Warfare

CHAPTER SEVEN. Conclusion and Recommendations

Key Words: public, policy, citizens, society, institutional, decisions, governmental.

Transcription:

B.Y. Choueiry 1 Instructor s notes #5 Title: Solving Problems by Searching AIMA: Chapter 3 (Sections 3.1, 3.2 and 3.3) Introduction to Artificial Intelligence CSCE 476-876, Fall 2017 URL: www.cse.unl.edu/~choueiry/f17-476-876 Berthe Y. Choueiry (Shu-we-ri) (402)472-5444

B.Y. Choueiry 2 Instructor s notes #5 Summary Intelligent Agents Designing intelligent agents: PAES Types of Intelligent Agents 1. Self Reflex 2.? 3.? 4.? Types of environments: observable (fully or partially), deterministic or stochastic, episodic or sequential, static vs. dynamic, discrete vs. continuous, single agent vs. multiagent

B.Y. Choueiry 3 Instructor s notes #5 Outline Problem-solving agents Formulating problems Problem components Importance of modeling Search basic elements/components Uninformed search (Section 3.4) Informed (heuristic) search (Section 3.5)

B.Y. Choueiry 4 Instructor s notes #5 Simple reflex agent unable to plan ahead - actions limited by current percepts - no knowledge of what actions do - no knowledge of what they are trying to achieve Problem-solving agent: goal-based agent Given: - a problem formulation: a set of states and a set of actions - a goal to reach/accomplish Find: - a sequence of actions leading to goal

Example: Holiday in Romania On holiday in Romania, currently in Arad, want to go to Bucharest B.Y. Choueiry 5 Instructor s notes #5

B.Y. Choueiry 6 Instructor s notes #5 Example: On holiday in Romania, currently in Arad, want to go to Bucharest Formulate goal: be in Bucharest Formulate problem: states: various cities actions: (operators, successor function) drive between cities Find solution: sequence of cities, e.g. Arad, Sibiu, Fagaras, Bucharest

B.Y. Choueiry 7 Instructor s notes #5 Drive to Bucharest... how many roads out of Arad? Arad 118 75 71 Zerind Timisoara 111 Oradea 140 70 75 Dobreta 151 Lugoj Mehadia 120 Sibiu 99 80 Rimnicu Vilcea Craiova 97 Fagaras Pitesti Neamt 146 101 85 138 211 Giurgiu Bucharest Urziceni Iasi Vaslui Hirsova Use map to consider hypothetical journeys through each road until reaching Bucharest 90 87 92 142 98 86 Eforie

B.Y. Choueiry 8 Instructor s notes #5 Arad 118 75 71 Zerind Timisoara 111 Dobreta Oradea 140 70 75 151 Lugoj Mehadia 120 Sibiu 99 Craiova Fagaras 80 Rimnicu Vilcea 97 Pitesti Neamt 146 101 85 Giurgiu Bucharest Looking for a sequence of actions search Sequence of actions to goal solution Carrying out actions execution phase 138 211 Urziceni Formulate, search, execute 90 87 Iasi 92 142 98 Vaslui Hirsova 86 Eforie

B.Y. Choueiry 9 Instructor s notes #5 Formulate, search, execute Update-State Formulate-goal Formulate-Problem Search Recommendation = first, and Remainder = rest Assumptions for environment: observable, static, discrete, deterministic sequential, single-agent

B.Y. Choueiry 10 Instructor s notes #5 Problem formulation A problem is defined by the following items: 1. initial state: In(Arad) 2. successor function S(x) (operators, actions) Example, S(In(Arad)) = { Go(Sibiu), In(Sibiu), Go(T imisoara), In(T imisoara), Go(Zerind), In(Zerind) } 3. goal test, can be explicit, e.g., x = In(Bucharest) or a property NoDirt(x) 4. step cost: assumed non-negative 5. path cost (additive) e.g., sum of distances, number of operators executed, etc. A solution is a sequence of operators leading from the initial state to a goal state. Solution quality, optimal solutions.

B.Y. Choueiry 11 Instructor s notes #5 Importance of modeling (for problem formulation) Real art of problem solving is modeling, state description deciding what s in action description choosing the right level of abstraction State abstraction: road maps, weather forecast, traveling companions, scenery, radio programs,... Action abstraction: generate pollution, slowing down/speeding up, time duration, turning on the radio,.. Combinatorial explosion. Abstraction by removing irrelevant detail make the task easier to handle

State space vs. state set R R L L S S R R L R L R L L S S S S R 1 2 3 4 5 6 7 8 B.Y. Choueiry 12 Instructor s notes #5 R L L S S

B.Y. Choueiry 13 Instructor s notes #5 Example problems Toy Problems: intended to illustrate or exercise concepts problem-solving methods can be give concise, exact description researchers can compare performance of algorithms yield methods that rarely scale-up may reflect reality inaccurately (or not at all) Real-world Problems: more difficult but whose solutions people actually care about more credible, useful for practical settings difficult to model, rarely agreed-upon descriptions

B.Y. Choueiry 14 Instructor s notes #5 Toy problem: vacuum States: Initial State: Successor function: Goal test: Path cost: Single state case With 2 locations: 2.2 2 states. With n locations: n.2 n states

B.Y. Choueiry 15 Instructor s notes #5 Toy problem: 8-puzzle States: Initial state: Successor function: Goal test: Path cost: instance of sliding-block puzzles, known to be NP-complete Optimal solution of n-puzzle NP-hard so far, nothing better than search 8-puzzle, 15-puzzle traditionally used to test search algorithms

B.Y. Choueiry 16 Instructor s notes #5 Toy problem: n-queens Formulation: incremental vs. complete-state States: Any arrangement of x 8 queens on board Initial state: Successor function: add a queen (alt., move a queen) Goal test: 8 queens not attacking one another Path cost: irrelevant (only final state matters) 64 8 possible states, but other more effective formulations

Toy problems: requiring search 8 puzzles n-queens vacuum Others: Missionaries & cannibals, farmer s dilemma, etc. B.Y. Choueiry 17 Instructor s notes #5

B.Y. Choueiry 18 Instructor s notes #5 Real-world problems: requiring search Route finding: state = locations, actions = transitions routing computer networks, travel advisory, etc. Touring: start in Bucharest, visit every city at least once Traveling salesperson problem (TSP) (exactly once, shortest tour) VLSI layout: cell layout, channel layout minimize area and connection lengths to maximize speed Robot navigation (continuous space, 2D, 3D, ldots) Assembly by robot-arm States: robot joint angles, robot and parts coordinates Successor function: continuous motions of the robot joins goal test: complete assembly path cost: time to execute + protein design, internet search, etc. (check AIMA)

B.Y. Choueiry 19 Instructor s notes #5 Problem solving performance Measures for effectiveness of search: 1. Does it find a solution? complete 2. Is it a good solution? path cost low 3. Search cost? time & space Total cost = Search cost + Path cost problem? Example: Arad to Bucharest Path cost: total mileage, fuel, tire wear f(route), etc. Search cost: time, computer at hand, etc.

B.Y. Choueiry 20 Instructor s notes #5 So far Problem-solving agents Formulate, Search, Execute Formulating problems Problem components: States, Initial state, Successor function, Goal test, Step cost, Path cost Solution: sequence of actions from initial state to goal state Importance of modeling Now, search Terminology: tree, node, expansion, fringe, leaf, queue, strategy Implementation: data structures Four evaluation criteria..?

B.Y. Choueiry 21 Instructor s notes #5 Search: generate action sequences partial solution: sequence yielding a (non goal) intermediate state Search Two aspects: generate maintain 1. how to generate sequences a set of sequences of partial solutions 2. which data structures to keep track of them

B.Y. Choueiry 22 Instructor s notes #5 Search generate action sequences Basic idea: offline, simulated exploration of state space by generating successors of already-explored states expanding states Start from a state, test if it is a goal state If it is, we are done If it is not: expand state Apply all operators applicable to current state to generate all possible sequences of future states now we have set of partial solutions...

B.Y. Choueiry 23 Instructor s notes #5 Search tree, nodes (a) The initial state Sibiu Arad Fagaras Oradea (b) After expanding Arad Sibiu Arad Fagaras Oradea Rimnicu Vilcea Arad Lugoj Arad (c) After expanding Sibiu Sibiu Arad Fagaras Oradea Rimnicu Vilcea Rimnicu Vilcea Arad Arad Arad Arad Arad root: initial state Timisoara Timisoara Timisoara Lugoj Lugoj Arad Arad Zerind Zerind Zerind Oradea Oradea Oradea leaves: states that can/should not be expanded

B.Y. Choueiry 24 Instructor s notes #5 Data structure LHW Chapter 13 A node x has a parent, children, depth, path cost g(x) A data structure for a search node State[x] state in state space Parent Node[x] parent node Action[x] Path Cost[x] Depth[x] operator used to generate node path cost of parent+cost step, path cost g(x) depth: # nodes from root (path length) Nodes to be expanded constitute a fringe (frontier) managed in a queue, order of node expansion determines search strategy

B.Y. Choueiry 25 Instructor s notes #5 Warning: 5 6 7 4 1 3 8 2 STATE PARENT-NODE Node ACTION = right DEPTH = 6 PATH-COST = 6 Do not confuse: State space and Search (tree) space What is a state? Holiday in Romania: What is the state space? What is the size of state space? What is the size of search tree? A node has a parent, children, depth, path cost g(x) A state has no parent, children, depth, etc..

B.Y. Choueiry 26 Instructor s notes #5 Types of Search Uninformed: use only information available in problem definition Heuristic: exploits some knowledge of the domain Uninformed search strategies: Breadth-first search, Uniform-cost search, Depth-first search, Depth-limited search, Iterative deepening search, Bidirectional search

B.Y. Choueiry 27 Instructor s notes #5 Search strategies Criteria for evaluating search: 1. Completeness: does it always find a solution if one exists? 2. Time complexity: number of nodes generated/expanded 3. Space complexity: maximum number of nodes in memory 4. Optimality: does it always find a least-cost solution? Time/space complexity measured in terms of: b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the search space (may be )