Lecture 2: Problem Formulation

Size: px
Start display at page:

Download "Lecture 2: Problem Formulation"

Transcription

1 1. Problem Solving What is a problem? Lecture 2: Problem Formulation A goal and a means for achieving the goal The goal specifies the state of affairs we want to bring about The means specifies the operations we can perform in an attempt to bring about the goal The difficulty is deciding what order to carry out the operations Solution will be a sequence of operations leading from initial state to goal state (plan) 2. Problem Formulation Problem Formulation: The sequence of required actions to move from current state to a goal state Once the goal is determined, formulate the problem to be solved First determine set of possible states S of the problem Then the problem has a: set of states S initial state - the starting point, s0 - a member of S set of operations - the actions that can be performed, {o1,..., on} goal - what you are aiming at - subset of S Operations cause changes in state. Performing an operation in a given state reaches some specified next state. Operations are functions s1 s2 A solution is a sequence of actions such that when applied to initial state s0, we reach the goal state Example 1: Romania On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest Formulate goal: be in Bucharest Formulate problem: states: various cities actions: drive between cities Find solution: Sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest 1

2 Single-state problem formulation A problem is defined by four items: 1. initial state e.g., "at Arad" 2. actions or successor function S(x) = set of action state pairs e.g., S(Arad) = {<Arad Zerind, Zerind>, <Arad Timisoara, Timisoara>, } 3. goal test, can be explicit, e.g., x = "at Bucharest" implicit, e.g., Checkmate(x) 4. path cost (additive) e.g., sum of distances, number of actions executed, etc. c(x,a,y) is the step cost, assumed to be 0 Example 2: Toy Problems: The 8 Puzzle States: 3 3 grid filled with numbers 1 8 and a blank Initial state: as shown on the left Goal state: as shown on the right Operations: o1: move any tile to left of empty square to right States? Locations of tiles Actions? Move blank left, right, up, down Goal test? Given Path cost? 1 per move Example 3: Toy Problems: The n Queens Problem This is a problem from chess Place 8 queens on chess board so that no queen can be taken by another (A queen attacks any piece in the same row, column or diagonal) Initial state: empty chess boar Goal state: n queens on chess board so that none can take any other Operations: place queen in empty square Place queens anywhere For the 8-queens problem 648 possibilities Place queens only where they are not attacked already Around 2,000 possible sequences to check 2

3 Example 4: robotic assembly States? real-valued coordinates of robot joint angles parts of the object to be assembled Actions? continuous motions of robot joints Goal test? complete assembly Path cost? time to execute More Examples of Real World Problems Game playing Route finding - routing in computer networks, rail travel, air travel Touring and travelling - find a route between Aberdeen and Glasgow; travelling salesperson problem Assembly sequencing VLSI layout Robot navigation Search Space An imaginary tree showing all possible states reachable from the initial state 724 5_6 831 A tree showing nodes explored by a search algorithm Root is the initial state: successor nodes found by applying operators (expanding nodes) Stops when goal is reached 3.1 Search Strategy Performance Completeness: does it always find a solution if one exists? Time complexity: number of nodes generated/expanded Space complexity: maximum number of nodes in memory Optimality: does it always find a least-cost solution? Time and space complexity: are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be infinite) 3.2 Selecting a state space Real world is absurdly complex state space must be abstracted for problem solving (Abstract) state = set of real states (Abstract) action = complex combination of real actions 3

4 e.g., "Arad Zerind" represents a complex set of possible routes, detours, rest stops, etc. For guaranteed realizability, any real state "in Arad must get to some real state "in Zerind" (Abstract) solution = set of real paths that are solutions in the real world Each abstract action should be "easier" than the original problem 3.3 Solution Cost For most problems, some solutions are better than others: 8 puzzle: number of moves to get to solution chess: number of moves to checkmate route planning: length of distance (or time) to travel Mechanism for determining cost of solution is the path cost function This is the length (cost) of the path through the state-space from the initial state to the goal state 4. Numerical Problem solving: example of optimization EXAMPLE 1: A farmer has 2400 ft of fencing and wants to fence off a rectangular field that borders a straight river. He needs no fence along the river. What are the dimensions of the field that has the largest area? Solution: Note that the area of the field depends on its dimensions: To solve the problem, we first draw a picture that illustrates the general case: The next step is to create a corresponding mathematical model: Maximize: A = xy Constraint: 2x + y = 2400 We now solve the second equation for y and substitute the result into the first equation to express A as a function of one variable: 2x + y = 2400 y = x A = xy = x(2400 2x) = 2400x 2x 2 To find the absolute maximum value of A = 2400x 2x 2, The derivative of A(x) is A (x) = (2400x 2x 2 ) = 2400x 2(x 2 ) = x = x So to find the critical numbers we solve the equation, x = = 4x x = = 600 To find the maximum value of A(x) we evaluate it at the end points and critical number: A(0) = 0, A(600) = = 720, 000, A(1200) = 0 4

5 Homework: EXAMPLE 2: We need to enclose a field with a rectangular fence. We have 500 ft of fencing material and a building is on one side of the field and so won t need any fencing. Determine the dimensions of the field that will enclose the largest area. Solution: We first draw a picture that illustrates the general case: EXAMPLE 3: We want to construct a box whose base length is 3 times the base width. The material used to build the top and bottom cost $10/ft2 and the material used to build the sides cost $6/ft2. If the box must have a volume of 50 ft3 determine the dimensions that will minimize the cost to build the box. EXAMPLE 4: We want to construct a box with a square base and we only have 10 m2 of material to use in construction of the box. Assuming that all the material is used in the construction process determine the maximum volume that the box can have. 5

COMP9414: Artificial Intelligence Problem Solving and Search

COMP9414: Artificial Intelligence Problem Solving and Search CMP944, Monday March, 0 Problem Solving and Search CMP944: Artificial Intelligence Problem Solving and Search Motivating Example You are in Romania on holiday, in Arad, and need to get to Bucharest. What

More information

Problem solving. Chapter 3, Sections 1 3

Problem solving. Chapter 3, Sections 1 3 Problem solving Chapter 3, ections 1 3 Artificial Intelligence, spring 2013, Peter junglöf; based on AIMA lides c tuart ussel and Peter Norvig, 2004 Chapter 3, ections 1 3 1 Problem types Deterministic,

More information

Intelligent Agents & Search Problem Formulation. AIMA, Chapters 2,

Intelligent Agents & Search Problem Formulation. AIMA, Chapters 2, Intelligent Agents & Search Problem Formulation AIMA, Chapters 2, 3.1-3.2 Outline for today s lecture Intelligent Agents (AIMA 2.1-2) Task Environments Formulating Search Problems CIS 421/521 - Intro to

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Berlin Chen 2005 Reference: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 3 AI - Berlin Chen 1 Introduction Problem-Solving Agents vs. Reflex

More information

Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing

Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing Informed Search II Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing CIS 521 - Intro to AI - Fall 2017 2 Review: Greedy

More information

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies Foundations of AI 3. Solving Problems by Searching Problem-Solving Agents, Formulating Problems, Search Strategies Luc De Raedt and Wolfram Burgard and Bernhard Nebel Contents Problem-Solving Agents Formulating

More information

Administrivia. CS 188: Artificial Intelligence Spring Agents and Environments. Today. Vacuum-Cleaner World. A Reflex Vacuum-Cleaner

Administrivia. CS 188: Artificial Intelligence Spring Agents and Environments. Today. Vacuum-Cleaner World. A Reflex Vacuum-Cleaner CS 188: Artificial Intelligence Spring 2006 Lecture 2: Agents 1/19/2006 Administrivia Reminder: Drop-in Python/Unix lab Friday 1-4pm, 275 Soda Hall Optional, but recommended Accommodation issues Project

More information

Artificial Intelligence Uninformed search

Artificial Intelligence Uninformed search Artificial Intelligence Uninformed search Peter Antal antal@mit.bme.hu A.I. Uninformed search 1 The symbols&search hypothesis for AI Problem-solving agents A kind of goal-based agent Problem types Single

More information

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies Foundations of AI 3. Solving Problems by Searching Problem-Solving Agents, Formulating Problems, Search Strategies Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller SA-1 Contents

More information

Problem Solving and Search

Problem Solving and Search Artificial Intelligence Topic 3 Problem Solving and Search Problem-solving and search Search algorithms Uninformed search algorithms breadth-first search uniform-cost search depth-first search iterative

More information

COMP5211 Lecture 3: Agents that Search

COMP5211 Lecture 3: Agents that Search CMP5211 Lecture 3: Agents that Search Fangzhen Lin Department of Computer Science and Engineering Hong Kong University of Science and Technology Fangzhen Lin (HKUST) Lecture 3: Search 1 / 66 verview Search

More information

Craiova. Dobreta. Eforie. 99 Fagaras. Giurgiu. Hirsova. Iasi. Lugoj. Mehadia. Neamt. Oradea. 97 Pitesti. Sibiu. Urziceni Vaslui.

Craiova. Dobreta. Eforie. 99 Fagaras. Giurgiu. Hirsova. Iasi. Lugoj. Mehadia. Neamt. Oradea. 97 Pitesti. Sibiu. Urziceni Vaslui. Informed search algorithms Chapter 4, Sections 1{2, 4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 4, Sections 1{2, 4 1 Outline } Best-rst search } A search } Heuristics } Hill-climbing }

More information

Overview PROBLEM SOLVING AGENTS. Problem Solving Agents

Overview PROBLEM SOLVING AGENTS. Problem Solving Agents Overview PROBLEM SOLVING AGENTS Aims of the this lecture: introduce problem solving; introduce goal formulation; show how problems can be stated as state space search; show the importance and role of abstraction;

More information

Informed Search. Read AIMA Some materials will not be covered in lecture, but will be on the midterm.

Informed Search. Read AIMA Some materials will not be covered in lecture, but will be on the midterm. Informed Search Read AIMA 3.1-3.6. Some materials will not be covered in lecture, but will be on the midterm. Reminder HW due tonight HW1 is due tonight before 11:59pm. Please submit early. 1 second late

More information

Search then involves moving from state-to-state in the problem space to find a goal (or to terminate without finding a goal).

Search then involves moving from state-to-state in the problem space to find a goal (or to terminate without finding a goal). Search Can often solve a problem using search. Two requirements to use search: Goal Formulation. Need goals to limit search and allow termination. Problem formulation. Compact representation of problem

More information

Chapter 4 Heuristics & Local Search

Chapter 4 Heuristics & Local Search CSE 473 Chapter 4 Heuristics & Local Search CSE AI Faculty Recall: Admissable Heuristics f(x) = g(x) + h(x) g: cost so far h: underestimate of remaining costs e.g., h SLD Where do heuristics come from?

More information

Searching for Solu4ons. Searching for Solu4ons. Example: Traveling Romania. Example: Vacuum World 9/8/09

Searching for Solu4ons. Searching for Solu4ons. Example: Traveling Romania. Example: Vacuum World 9/8/09 Searching for Solu4ons Searching for Solu4ons CISC481/681, Lecture #3 Ben Cartere@e Characterize a task or problem as a search for something In the agent view, a search for a sequence of ac4ons that will

More information

Informed search algorithms

Informed search algorithms Informed search algorithms Chapter 3, Sections 5 6 Artificial Intelligence, spring 2013, Peter Ljunglöf; based on AIMA Slides c Stuart Russel and Peter Norvig, 2004 Chapter 3, Sections 5 6 1 Review: Tree

More information

CS188: Section Handout 1, Uninformed Search SOLUTIONS

CS188: Section Handout 1, Uninformed Search SOLUTIONS Note that for many problems, multiple answers may be correct. Solutions are provided to give examples of correct solutions, not to indicate that all or possible solutions are wrong. Work on following problems

More information

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina Conversion Masters in IT (MIT) AI as Representation and Search (Representation and Search Strategies) Lecture 002 Sandro Spina Physical Symbol System Hypothesis Intelligent Activity is achieved through

More information

2 person perfect information

2 person perfect information Why Study Games? Games offer: Intellectual Engagement Abstraction Representability Performance Measure Not all games are suitable for AI research. We will restrict ourselves to 2 person perfect information

More information

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game.

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game. CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25 Homework #1 ( Due: Oct 10 ) Figure 1: The laser game. Task 1. [ 60 Points ] Laser Game Consider the following game played on an n n board,

More information

Problem. Operator or successor function - for any state x returns s(x), the set of states reachable from x with one action

Problem. Operator or successor function - for any state x returns s(x), the set of states reachable from x with one action Problem & Search Problem 2 Solution 3 Problem The solution of many problems can be described by finding a sequence of actions that lead to a desirable goal. Each action changes the state and the aim is

More information

Spring 06 Assignment 2: Constraint Satisfaction Problems

Spring 06 Assignment 2: Constraint Satisfaction Problems 15-381 Spring 06 Assignment 2: Constraint Satisfaction Problems Questions to Vaibhav Mehta(vaibhav@cs.cmu.edu) Out: 2/07/06 Due: 2/21/06 Name: Andrew ID: Please turn in your answers on this assignment

More information

Once you get a solution draw it below, showing which three pennies you moved and where you moved them to. My Solution:

Once you get a solution draw it below, showing which three pennies you moved and where you moved them to. My Solution: Arrange 10 pennies on your desk as shown in the diagram below. The challenge in this puzzle is to change the direction of that the triangle is pointing by moving only three pennies. Once you get a solution

More information

Homework Assignment #1

Homework Assignment #1 CS 540-2: Introduction to Artificial Intelligence Homework Assignment #1 Assigned: Thursday, February 1, 2018 Due: Sunday, February 11, 2018 Hand-in Instructions: This homework assignment includes two

More information

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four 1

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four 1 Connect Four March 9, 2010 Connect Four 1 Connect Four is a tic-tac-toe like game in which two players drop discs into a 7x6 board. The first player to get four in a row (either vertically, horizontally,

More information

Part III F F J M. Name

Part III F F J M. Name Name 1. Pentaminoes 15 points 2. Pearls (Masyu) 20 points 3. Five Circles 30 points 4. Mastermindoku 35 points 5. Unequal Skyscrapers 40 points 6. Hex Alternate Corners 40 points 7. Easy Islands 45 points

More information

Artificial Intelligence Search III

Artificial Intelligence Search III Artificial Intelligence Search III Lecture 5 Content: Search III Quick Review on Lecture 4 Why Study Games? Game Playing as Search Special Characteristics of Game Playing Search Ingredients of 2-Person

More information

Eight Queens Puzzle Solution Using MATLAB EE2013 Project

Eight Queens Puzzle Solution Using MATLAB EE2013 Project Eight Queens Puzzle Solution Using MATLAB EE2013 Project Matric No: U066584J January 20, 2010 1 Introduction Figure 1: One of the Solution for Eight Queens Puzzle The eight queens puzzle is the problem

More information

UKPA Presents. March 12 13, 2011 INSTRUCTION BOOKLET.

UKPA Presents. March 12 13, 2011 INSTRUCTION BOOKLET. UKPA Presents March 12 13, 2011 INSTRUCTION BOOKLET This contest deals with Sudoku and its variants. The Puzzle types are: No. Puzzle Points 1 ChessDoku 20 2 PanDigital Difference 25 3 Sequence Sudoku

More information

Solution Algorithm to the Sam Loyd (n 2 1) Puzzle

Solution Algorithm to the Sam Loyd (n 2 1) Puzzle Solution Algorithm to the Sam Loyd (n 2 1) Puzzle Kyle A. Bishop Dustin L. Madsen December 15, 2009 Introduction The Sam Loyd puzzle was a 4 4 grid invented in the 1870 s with numbers 0 through 15 on each

More information

Adversary Search. Ref: Chapter 5

Adversary Search. Ref: Chapter 5 Adversary Search Ref: Chapter 5 1 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans is possible. Many games can be modeled very easily, although

More information

Informatics 2D: Tutorial 1 (Solutions)

Informatics 2D: Tutorial 1 (Solutions) Informatics 2D: Tutorial 1 (Solutions) Agents, Environment, Search Week 2 1 Agents and Environments Consider the following agents: A robot vacuum cleaner which follows a pre-set route around a house and

More information

Square Roots and the Pythagorean Theorem

Square Roots and the Pythagorean Theorem UNIT 1 Square Roots and the Pythagorean Theorem Just for Fun What Do You Notice? Follow the steps. An example is given. Example 1. Pick a 4-digit number with different digits. 3078 2. Find the greatest

More information

Problem of the Month. Miles of Tiles. 5 in. Problem of the Month Miles of Tiles Page 1

Problem of the Month. Miles of Tiles. 5 in. Problem of the Month Miles of Tiles Page 1 Problem of the Month Miles of Tiles Level A: You have a picture frame. You would like to decorate the frame by gluing tiles on it. The frame is a square shape. 14 in The frame is 1 inch wide all around.

More information

Backtracking. Chapter Introduction

Backtracking. Chapter Introduction Chapter 3 Backtracking 3.1 Introduction Backtracking is a very general technique that can be used to solve a wide variety of problems in combinatorial enumeration. Many of the algorithms to be found in

More information

Unit 12: Artificial Intelligence CS 101, Fall 2018

Unit 12: Artificial Intelligence CS 101, Fall 2018 Unit 12: Artificial Intelligence CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Explain the difference between procedural and declarative knowledge. Describe the

More information

22c:145 Artificial Intelligence

22c:145 Artificial Intelligence 22c:145 Artificial Intelligence Fall 2005 Informed Search and Exploration II Cesare Tinelli The University of Iowa Copyright 2001-05 Cesare Tinelli and Hantao Zhang. a a These notes are copyrighted material

More information

Perimeters of Composite Figures

Perimeters of Composite Figures 8. Perimeters of Composite Figures How can you find the perimeter of a composite figure? ACTIVITY: Finding a Pattern Work with a partner. Describe the pattern of the perimeters. Use your pattern to find

More information

CS188 Spring 2010 Section 3: Game Trees

CS188 Spring 2010 Section 3: Game Trees CS188 Spring 2010 Section 3: Game Trees 1 Warm-Up: Column-Row You have a 3x3 matrix of values like the one below. In a somewhat boring game, player A first selects a row, and then player B selects a column.

More information

Spring 06 Assignment 2: Constraint Satisfaction Problems

Spring 06 Assignment 2: Constraint Satisfaction Problems 15-381 Spring 06 Assignment 2: Constraint Satisfaction Problems Questions to Vaibhav Mehta(vaibhav@cs.cmu.edu) Out: 2/07/06 Due: 2/21/06 Name: Andrew ID: Please turn in your answers on this assignment

More information

Intriguing Problems for Students in a Proofs Class

Intriguing Problems for Students in a Proofs Class Intriguing Problems for Students in a Proofs Class Igor Minevich Boston College AMS - MAA Joint Mathematics Meetings January 5, 2017 Outline 1 Induction 2 Numerical Invariant 3 Pigeonhole Principle Induction:

More information

COMP9414/ 9814/ 3411: Artificial Intelligence. Week 2. Classifying AI Tasks

COMP9414/ 9814/ 3411: Artificial Intelligence. Week 2. Classifying AI Tasks COMP9414/ 9814/ 3411: Artificial Intelligence Week 2. Classifying AI Tasks Russell & Norvig, Chapter 2. COMP9414/9814/3411 18s1 Tasks & Agent Types 1 Examples of AI Tasks Week 2: Wumpus World, Robocup

More information

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm Ryan Ignatius Hadiwijaya / 13511070 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung,

More information

GET OVERLAPPED! Author: Huang Yi. Forum thread:

GET OVERLAPPED! Author: Huang Yi. Forum thread: GET OVERLAPPED! Author: Huang Yi Test page: http://logicmastersindia.com/2019/02s/ Forum thread: http://logicmastersindia.com/forum/forums/thread-view.asp?tid=2690 About this Test: This test presents a

More information

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements CS 171 Introduction to AI Lecture 1 Adversarial search Milos Hauskrecht milos@cs.pitt.edu 39 Sennott Square Announcements Homework assignment is out Programming and experiments Simulated annealing + Genetic

More information

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46

Section Marks Agents / 8. Search / 10. Games / 13. Logic / 15. Total / 46 Name: CS 331 Midterm Spring 2017 You have 50 minutes to complete this midterm. You are only allowed to use your textbook, your notes, your assignments and solutions to those assignments during this midterm.

More information

mywbut.com Two agent games : alpha beta pruning

mywbut.com Two agent games : alpha beta pruning Two agent games : alpha beta pruning 1 3.5 Alpha-Beta Pruning ALPHA-BETA pruning is a method that reduces the number of nodes explored in Minimax strategy. It reduces the time required for the search and

More information

The patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant]

The patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant] Pattern Tours The patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant] A sequence of cell locations is called a path. A path

More information

Year 7A Mathematics Homework Autumn Term

Year 7A Mathematics Homework Autumn Term Year 7A Mathematics Homework Autumn Term Week 1 2 3 Name : 4 5 Teacher: Class: Target: 6 7 8 9 10 The blank sheets should be used for working out Negative Numbers Top tip: Use these to help you! Equations

More information

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE The inclusion-exclusion principle (also known as the sieve principle) is an extended version of the rule of the sum. It states that, for two (finite) sets, A

More information

G53CLP Constraint Logic Programming

G53CLP Constraint Logic Programming G53CLP Constraint Logic Programming Dr Rong Qu Modeling CSPs Case Study I Constraint Programming... represents one of the closest approaches computer science has yet made to the Holy Grail of programming:

More information

Chapter 5 Backtracking. The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem

Chapter 5 Backtracking. The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem Chapter 5 Backtracking The Backtracking Technique The n-queens Problem The Sum-of-Subsets Problem Graph Coloring The 0-1 Knapsack Problem Backtracking maze puzzle following every path in maze until a dead

More information

IN THIS ISSUE. Cave vs. Pentagroups

IN THIS ISSUE. Cave vs. Pentagroups 3 IN THIS ISSUE 1. 2. 3. 4. 5. 6. Cave vs. Pentagroups Brokeback loop Easy as skyscrapers Breaking the loop L-oop Triple loop Octave Total rising Dead end cells Pentamino in half Giant tents Cave vs. Pentagroups

More information

: Principles of Automated Reasoning and Decision Making Midterm

: Principles of Automated Reasoning and Decision Making Midterm 16.410-13: Principles of Automated Reasoning and Decision Making Midterm October 20 th, 2003 Name E-mail Note: Budget your time wisely. Some parts of this quiz could take you much longer than others. Move

More information

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one.

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one. 1. Problems from 2007 contest Problem 1A Do there exist 10 natural numbers such that none one of them is divisible by another one, and the square of any one of them is divisible by any other of the original

More information

CPS331 Lecture: Heuristic Search last revised 6/18/09

CPS331 Lecture: Heuristic Search last revised 6/18/09 CPS331 Lecture: Heuristic Search last revised 6/18/09 Objectives: 1. To introduce the use of heuristics in searches 2. To introduce some standard heuristic algorithms 3. To introduce criteria for evaluating

More information

CMPS 12A Introduction to Programming Programming Assignment 5 In this assignment you will write a Java program that finds all solutions to the n-queens problem, for. Begin by reading the Wikipedia article

More information

CMPUT 396 Tic-Tac-Toe Game

CMPUT 396 Tic-Tac-Toe Game CMPUT 396 Tic-Tac-Toe Game Recall minimax: - For a game tree, we find the root minimax from leaf values - With minimax we can always determine the score and can use a bottom-up approach Why use minimax?

More information

COCI 2008/2009 Contest #3, 13 th December 2008 TASK PET KEMIJA CROSS MATRICA BST NAJKRACI

COCI 2008/2009 Contest #3, 13 th December 2008 TASK PET KEMIJA CROSS MATRICA BST NAJKRACI TASK PET KEMIJA CROSS MATRICA BST NAJKRACI standard standard time limit second second second 0. seconds second 5 seconds memory limit MB MB MB MB MB MB points 0 0 70 0 0 0 500 Task PET In the popular show

More information

Introduction to Genetic Algorithms

Introduction to Genetic Algorithms Introduction to Genetic Algorithms Peter G. Anderson, Computer Science Department Rochester Institute of Technology, Rochester, New York anderson@cs.rit.edu http://www.cs.rit.edu/ February 2004 pg. 1 Abstract

More information

Constraint Satisfaction Problems: Formulation

Constraint Satisfaction Problems: Formulation Constraint Satisfaction Problems: Formulation Slides adapted from: 6.0 Tomas Lozano Perez and AIMA Stuart Russell & Peter Norvig Brian C. Williams 6.0- September 9 th, 00 Reading Assignments: Much of the

More information

Project Connect Four (Version 1.1)

Project Connect Four (Version 1.1) OPI F2008: Object-Oriented Programming Carsten Schürmann Date: April 2, 2008 Project Connect Four (Version 1.1) Guidelines While we acknowledge that beauty is in the eye of the beholder, you should nonetheless

More information

Problem 1. (15 points) Consider the so-called Cryptarithmetic problem shown below.

Problem 1. (15 points) Consider the so-called Cryptarithmetic problem shown below. ECS 170 - Intro to Artificial Intelligence Suggested Solutions Mid-term Examination (100 points) Open textbook and open notes only Show your work clearly Winter 2003 Problem 1. (15 points) Consider the

More information

CS 188 Fall Introduction to Artificial Intelligence Midterm 1

CS 188 Fall Introduction to Artificial Intelligence Midterm 1 CS 188 Fall 2018 Introduction to Artificial Intelligence Midterm 1 You have 120 minutes. The time will be projected at the front of the room. You may not leave during the last 10 minutes of the exam. Do

More information

Grade 3 Area and Perimeter Unit Overview

Grade 3 Area and Perimeter Unit Overview Grade 3 Area and Perimeter Unit Overview Geometric measurement: Understand concepts of area and relate area to multiplication and to addition. 3.MD.C.5 Recognize area as an attribute of plane figures and

More information

More on games (Ch )

More on games (Ch ) More on games (Ch. 5.4-5.6) Alpha-beta pruning Previously on CSci 4511... We talked about how to modify the minimax algorithm to prune only bad searches (i.e. alpha-beta pruning) This rule of checking

More information

Page 1 part 1 PART 2

Page 1 part 1 PART 2 Page 1 part 1 PART 2 Page 2 Part 1 Part 2 Page 3 part 1 Part 2 Page 4 Page 5 Part 1 10. Which point on the curve y x 2 1 is closest to the point 4,1 11. The point P lies in the first quadrant on the graph

More information

Quintessence A Packet of Puzzles by John Bulten

Quintessence A Packet of Puzzles by John Bulten Quintessence A Packet of Puzzles by John Bulten Editor s Note: The last, giant grid here is one of the hardest puzzles we have ever presented. If I knew in advance John wanted to make a puzzle like this,

More information

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here: Adversarial Search 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse471/lectures/adversarial.pdf Slides are largely based

More information

Part I At the top level, you will work with partial solutions (referred to as states) and state sets (referred to as State-Sets), where a partial solu

Part I At the top level, you will work with partial solutions (referred to as states) and state sets (referred to as State-Sets), where a partial solu Project: Part-2 Revised Edition Due 9:30am (sections 10, 11) 11:001m (sections 12, 13) Monday, May 16, 2005 150 points Part-2 of the project consists of both a high-level heuristic game-playing program

More information

Games of Skill ANSWERS Lesson 1 of 9, work in pairs

Games of Skill ANSWERS Lesson 1 of 9, work in pairs Lesson 1 of 9, work in pairs 21 (basic version) The goal of the game is to get the other player to say the number 21. The person who says 21 loses. The first person starts by saying 1. At each turn, the

More information

Chapter 4: Patterns and Relationships

Chapter 4: Patterns and Relationships Chapter : Patterns and Relationships Getting Started, p. (a),, 9; rule: add fifteen, eighteen, twenty-one; rule: write out every third (c) n, q, t; rule: write every third letter (d) 55,, 77; rule: add

More information

A natural number is called a perfect cube if it is the cube of some. some natural number.

A natural number is called a perfect cube if it is the cube of some. some natural number. A natural number is called a perfect square if it is the square of some natural number. i.e., if m = n 2, then m is a perfect square where m and n are natural numbers. A natural number is called a perfect

More information

CSE 573 Problem Set 1. Answers on 10/17/08

CSE 573 Problem Set 1. Answers on 10/17/08 CSE 573 Problem Set. Answers on 0/7/08 Please work on this problem set individually. (Subsequent problem sets may allow group discussion. If any problem doesn t contain enough information for you to answer

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 10 Today Adversarial search (R&N Ch 5) Tuesday, March 7 Knowledge Representation and Reasoning (R&N Ch 7)

More information

CS61B Lecture #22. Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55: CS61B: Lecture #22 1

CS61B Lecture #22. Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55: CS61B: Lecture #22 1 CS61B Lecture #22 Today: Backtracking searches, game trees (DSIJ, Section 6.5) Last modified: Mon Oct 17 20:55:07 2016 CS61B: Lecture #22 1 Searching by Generate and Test We vebeenconsideringtheproblemofsearchingasetofdatastored

More information

Final Practice Problems: Dynamic Programming and Max Flow Problems (I) Dynamic Programming Practice Problems

Final Practice Problems: Dynamic Programming and Max Flow Problems (I) Dynamic Programming Practice Problems Final Practice Problems: Dynamic Programming and Max Flow Problems (I) Dynamic Programming Practice Problems To prepare for the final first of all study carefully all examples of Dynamic Programming which

More information

More on games (Ch )

More on games (Ch ) More on games (Ch. 5.4-5.6) Announcements Midterm next Tuesday: covers weeks 1-4 (Chapters 1-4) Take the full class period Open book/notes (can use ebook) ^^ No programing/code, internet searches or friends

More information

Mathematics Enhancement Programme TEACHING SUPPORT: Year 3

Mathematics Enhancement Programme TEACHING SUPPORT: Year 3 Mathematics Enhancement Programme TEACHING UPPORT: Year 3 1. Question and olution Write the operations without brackets if possible so that the result is the same. Do the calculations as a check. The first

More information

2009 ACM ICPC Southeast USA Regional Programming Contest. 7 November, 2009 PROBLEMS

2009 ACM ICPC Southeast USA Regional Programming Contest. 7 November, 2009 PROBLEMS 2009 ACM ICPC Southeast USA Regional Programming Contest 7 November, 2009 PROBLEMS A: Block Game... 1 B: Euclid... 3 C: Museum Guards... 5 D: Knitting... 7 E: Minesweeper... 9 F: The Ninja Way... 10 G:

More information

In the game of Chess a queen can move any number of spaces in any linear direction: horizontally, vertically, or along a diagonal.

In the game of Chess a queen can move any number of spaces in any linear direction: horizontally, vertically, or along a diagonal. CMPS 12A Introduction to Programming Winter 2013 Programming Assignment 5 In this assignment you will write a java program finds all solutions to the n-queens problem, for 1 n 13. Begin by reading the

More information

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015.

Monday, February 2, Is assigned today. Answers due by noon on Monday, February 9, 2015. Monday, February 2, 2015 Topics for today Homework #1 Encoding checkers and chess positions Constructing variable-length codes Huffman codes Homework #1 Is assigned today. Answers due by noon on Monday,

More information

Conway s Soldiers. Jasper Taylor

Conway s Soldiers. Jasper Taylor Conway s Soldiers Jasper Taylor And the maths problem that I did was called Conway s Soldiers. And in Conway s Soldiers you have a chessboard that continues infinitely in all directions and every square

More information

Determining the Cost Function In Tic-Tac-Toe puzzle game by Using Branch and Bound Algorithm

Determining the Cost Function In Tic-Tac-Toe puzzle game by Using Branch and Bound Algorithm Determining the Cost Function In Tic-Tac-Toe puzzle game by Using Branch and Bound Algorithm Teofebano - 13512050 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi

More information

CMPT 310 Assignment 1

CMPT 310 Assignment 1 CMPT 310 Assignment 1 October 16, 2017 100 points total, worth 10% of the course grade. Turn in on CourSys. Submit a compressed directory (.zip or.tar.gz) with your solutions. Code should be submitted

More information

PART 2 VARIA 1 TEAM FRANCE WSC minutes 750 points

PART 2 VARIA 1 TEAM FRANCE WSC minutes 750 points Name : PART VARIA 1 TEAM FRANCE WSC 00 minutes 0 points 1 1 points Alphabet Triplet No more than three Circles Quad Ring Consecutive Where is Max? Puzzle Killer Thermometer Consecutive irregular Time bonus

More information

Unit. The double attack. Types of double attack. With which pieces? Notes and observations

Unit. The double attack. Types of double attack. With which pieces? Notes and observations Unit The double attack Types of double attack With which pieces? Notes and observations Think Colour in the drawing with the colours of your choice. These types of drawings are called mandalas. They are

More information

SUDOKU1 Challenge 2013 TWINS MADNESS

SUDOKU1 Challenge 2013 TWINS MADNESS Sudoku1 by Nkh Sudoku1 Challenge 2013 Page 1 SUDOKU1 Challenge 2013 TWINS MADNESS Author : JM Nakache The First Sudoku1 Challenge is based on Variants type from various SUDOKU Championships. The most difficult

More information

CS188 Spring 2010 Section 3: Game Trees

CS188 Spring 2010 Section 3: Game Trees CS188 Spring 2010 Section 3: Game Trees 1 Warm-Up: Column-Row You have a 3x3 matrix of values like the one below. In a somewhat boring game, player A first selects a row, and then player B selects a column.

More information

UMBC 671 Midterm Exam 19 October 2009

UMBC 671 Midterm Exam 19 October 2009 Name: 0 1 2 3 4 5 6 total 0 20 25 30 30 25 20 150 UMBC 671 Midterm Exam 19 October 2009 Write all of your answers on this exam, which is closed book and consists of six problems, summing to 160 points.

More information

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5 Adversarial Search and Game Playing Russell and Norvig: Chapter 5 Typical case 2-person game Players alternate moves Zero-sum: one player s loss is the other s gain Perfect information: both players have

More information

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 Today: Introductory comments Some example problems Announcements course information sheet online (from my personal homepage: Rogaway ) first HW due Wednesday

More information

If a word starts with a vowel, add yay on to the end of the word, e.g. engineering becomes engineeringyay

If a word starts with a vowel, add yay on to the end of the word, e.g. engineering becomes engineeringyay ENGR 102-213 - Socolofsky Engineering Lab I - Computation Lab Assignment #07b Working with Array-Like Data Date : due 10/15/2018 at 12:40 p.m. Return your solution (one per group) as outlined in the activities

More information

Games (adversarial search problems)

Games (adversarial search problems) Mustafa Jarrar: Lecture Notes on Games, Birzeit University, Palestine Fall Semester, 204 Artificial Intelligence Chapter 6 Games (adversarial search problems) Dr. Mustafa Jarrar Sina Institute, University

More information

Title: Oct 9 8:27 AM (1 of 30)

Title: Oct 9 8:27 AM (1 of 30) Applied Max and Min (Optimization) 1. If you have 100 feet of fencing and you want to enclose a rectangular area up against a long, straight wall, what is the largest area you can enclose? Title: Oct 9

More information

CS188 Spring 2014 Section 3: Games

CS188 Spring 2014 Section 3: Games CS188 Spring 2014 Section 3: Games 1 Nearly Zero Sum Games The standard Minimax algorithm calculates worst-case values in a zero-sum two player game, i.e. a game in which for all terminal states s, the

More information

Introduction to Spring 2009 Artificial Intelligence Final Exam

Introduction to Spring 2009 Artificial Intelligence Final Exam CS 188 Introduction to Spring 2009 Artificial Intelligence Final Exam INSTRUCTIONS You have 3 hours. The exam is closed book, closed notes except a two-page crib sheet, double-sided. Please use non-programmable

More information

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST First Round For all Colorado Students Grades 7-12 October 31, 2009 You have 90 minutes no calculators allowed The average of n numbers is their sum divided

More information