Maze Adrian Fisher. Todd W. Neller

Similar documents
Optimization Methods via Simulation

A.I.: Beyond Classical Search

Teaching Stochastic Local Search

Simulated Annealing. Local Search. Cost function. Solution space

Dear Sixth Grade Parents and Guardians,

Finding optimal configurations ( combinatorial optimization)

Motivation, Basic Concepts, Basic Methods, Travelling Salesperson Problem (TSP), Algorithms

Local and Stochastic Search

Lecture 35 Minimization and maximization of functions. Powell s method in multidimensions Conjugate gradient method. Annealing methods.

Simulations with MM Force Fields. Monte Carlo (MC) and Molecular Dynamics (MD) Video II.vi

Methods for finding optimal configurations

Eigenvalues and eigenvectors

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

Puzzling through Problems as a Habit of Mind

Chapter 4 Beyond Classical Search 4.1 Local search algorithms and optimization problems

Homework 9: Protein Folding & Simulated Annealing : Programming for Scientists Due: Thursday, April 14, 2016 at 11:59 PM

For Internet Viewing. Only. Samples Only. Unlicensed Copy. Welcome! Contents and Teacher Notes.

In biological terms, memory refers to the ability of neural systems to store activity patterns and later recall them when required.

Problem of the Day. 7.3 Hypothesis Testing for Mean (Small Samples n<30) Objective(s): Find critical values in a t-distribution

Methods for finding optimal configurations

22c:145 Artificial Intelligence

P ( z 0.75)

AB EXAM. 2. When the first 2003 positive odd primes are multiplied together, what is the units digit of the product?

3.1 Inequalities - Graphing and Solving

Analog Computing: a different way to think about building a (quantum) computer

Lecture 7 Mathematics behind Internet Search

The Basics: Twenty-Seven Problems

Take the Anxiety Out of Word Problems

Local search algorithms. Chapter 4, Sections 3 4 1

Practice A. Inequalities. Choose an inequality for each situation. x > 10 x 10 x < 10 x 10

Using Matrices And Hungarian Method To Solve The Traveling Salesman Problem

Lecture 5: Latin Squares and Magic

CS 380: ARTIFICIAL INTELLIGENCE

Alabama School of Fine Arts Invitational Mathematics Tournament. January 12, Pre-Algebra Exam

Math 2114 Common Final Exam May 13, 2015 Form A

Chapter 6: Addition and Subtraction of Integers

3. A square has 4 sides, so S = 4. A pentagon has 5 vertices, so P = 5. Hence, S + P = 9. = = 5 3.

2016 King s College Math Competition. Instructions

Iterative improvement algorithms. Beyond Classical Search. Outline. Example: Traveling Salesperson Problem

Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities)

A1 Further Worksheet 1

Teacher s Pet Publications

4 Conservation of Energy

Local Search and Optimization

PREFACE: Table of Contents

A thorough derivation of back-propagation for people who really want to understand it by: Mike Gashler, September 2010

7.1 Sampling Error The Need for Sampling Distributions

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

Teacher s Pet Publications

A note on three water cups

Algebra Year 10. Language

Gauss School and Gauss Math Circle 2017 Gauss Math Tournament Grade 7-8 (Sprint Round 50 minutes)

Magic Of The Moonlight (Full Moon) By Ellen Schreiber


Exam EDAF May 2011, , Vic1. Thore Husfeldt

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint

Summary. AIMA sections 4.3,4.4. Hill-climbing Simulated annealing Genetic algorithms (briey) Local search in continuous spaces (very briey)

Gravity - What Goes Up, Must Come Down

Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. Apr Satisfiability Slide 1

Life of a Star. Lesson development

Massachusetts Tests for Educator Licensure (MTEL )

Assignment: Summer Assignment Part 1 of 8 Real Numbers and Their Properties. Student: Date:

Irreversibility. Have you ever seen this happen? (when you weren t asleep or on medication) Which stage never happens?

Homework 2: MDPs and Search

Econ 172A, Fall 2012: Final Examination (I) 1. The examination has seven questions. Answer them all.

Local Search & Optimization

Econ 172A, Fall 2012: Final Examination Solutions (II) 1. The entries in the table below describe the costs associated with an assignment

Monte Carlo Methods. PHY 688: Numerical Methods for (Astro)Physics

Number Theory and the abc Conjecture

EQUATIONS. Equations PASSPORT

7.1 Basis for Boltzmann machine. 7. Boltzmann machines

Pengju

REVIEW SHEETS ELEMENTARY ALGEBRA MATH 65

36 What is Linear Algebra?

Stellarium Walk-through for First Time Users

A C E. Answers Investigation 4. Applications

2016 King s College Math Competition. Instructions

MATH STUDENT BOOK. 8th Grade Unit 3

Session 7: Pseudoproofs and Puzzles - Handout

Statistical Computing (36-350)

Overview. Optimization. Easy optimization problems. Monte Carlo for Optimization. 1. Survey MC ideas for optimization: (a) Multistart

Teacher s Pet Publications

Chapter 10. Optimization Simulated annealing

PUZZLE PACK for The Red Pony

Linear Classification. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

Statistics and Quantum Computing

Analysis Methods in Atmospheric and Oceanic Science

UNIT I: MECHANICS Chapter 5: Projectile Motion

LET S GO ON A ROAD TRIP

METEOROLOGY 110 Lab 4 Name. Meteorological Measurements

Metaheuristics. 2.3 Local Search 2.4 Simulated annealing. Adrian Horga

MATH 1710 College Algebra Final Exam Review

Objective. The student will be able to: solve systems of equations using elimination with multiplication. SOL: A.9

MATH3200, Lecture 31: Applications of Eigenvectors. Markov Chains and Chemical Reaction Systems

CS 781 Lecture 9 March 10, 2011 Topics: Local Search and Optimization Metropolis Algorithm Greedy Optimization Hopfield Networks Max Cut Problem Nash

Local Search & Optimization

5.1 Simplifying Rational Expressions

Daily Skill Builders:

Section 5: Ratios and Proportions

Section 5.4. Ken Ueda

Transcription:

Maze Adrian Fisher Todd W. Neller

Lines, hedges, corn rows, etc. delineate paths Find a path from start to goal From The Amazing Book of Mazes by Adrian Fisher

Smaller, more complex states and/or transitions Find a path (state sequence) from start state to goal state Small footprint, novel rules, fast accessibility and solving From The Amazing Book of Mazes by Adrian Fisher

Basic form: square grid, start state (square), goal state, jump numbers for each non-goal state. Jump number: Move exactly that many squares forward, backward, left, right. (Not diagonally.) Objectives: Find a path from start to goal Find the shortest of these paths

Adrian Fisher Rook Jumping Maze Robert Abbott No U-Turn Number Maze Forward, left, right but not back

The number of possible 5 5 rook jumping mazes configurations with a center goal: 4 16 * 3 8 > 2.8 10 13 (a lot) The number of possible n n mazes is bounded above by (n-1) n*n The number of good puzzle configurations is considerably less (many needles in a very large haystack) Can t generate and test all, but can search for a good one

First, I need a way to rate the maze relative (un)desirability e.g. penalize if goal not reachable from a state Then, I need a method for looking around: Start with a random maze configuration Change a random position to a random different jump but sometimes these changes are counterproductive

Imagine an extremely hilly landscape with many hills and valleys high and low Goal: find lowest spot Means: airlift a drunk! Starts at random spot Staggers randomly More tired rejects more uphill steps

The Super-Drunk never tires Never rejects uphill steps How well will the Super-Drunk search? The Dead-Drunk is absolutely tired Always rejects uphill steps How well will the Dead-Drunk search? Now imagine a drunk that starts in fine condition and very gradually tires.

Quenching Heated metal into a cold water barrel Rapid cooling brittle metal Annealing Heated metal allowed to cool slowly Slow cooling strong metal

Large number of atoms in a random configuration high energy state High temperature (energy input) atoms reconfigure freely to higher or lower energy states Low temperature atoms reconfigure less freely (usually to lower energy states) Metropolis algorithm (Metropolis et al., 1953)

State: a total configuration of jumps Energy: rating of maze s undesirability Step: select a random position and change to a different random jump The prime design challenge is to define a good energy function, scoring a maze s undesirability. What are examples of undesirable characteristics?

We definitely want to have a solution, and we may want to have all states to have a path to the goal. Score: Add 1 per unreaching state, i.e. state with no path to goal. [ 1] 1 1 1 2 4 1 2 3 2 1 2 2 2 2 3 3 2 1 1 2 4 3 2 GOAL Distances to Goal: 4 5 4 3 2 3 4 3 4 2 4 5 2 4 1 3 2 2 2 1 5 6 4 5 0 score = getnumunreaching();

First priority: no unreaching states Second priority: maximize minimum path length from start to goal Find the range of 2 nd priority ratings r Solution: Multiply each 1 st priority unit by (r+1) Example: Max path length less than rows times columns Multiply number of unreaching states by rows times columns, and subtract minimum path length from start to goal

Score: Add rows*cols per unreaching state, i.e. state with no path to goal. Subtract minimum path length from start to goal (if path exists). [ 3] 3 4 4 3 4 1 2 3 2 3 1 1 1 2 3 2 3 3 2 3 4 1 3 GOAL Distances to Goal: 18 7 10 17 8 14 5 12 15 13 3 4 3 2 1 19 6 11 18 12 15 8 9 16 0 score = rows * cols * getnumunreaching(); if (getdistance(startstate, goalstate)!= NONE) score -= getdistance(startstate, goalstate);

Should all states be reachable? Which structures are/aren t enjoyable challenging? Is distance the right measure? Should number of choice points along the path be used instead? Etc. etc. etc. lots of room for creativity! If you can define the measure, we can program the measure. Experiment and observe the change in mazes generated

Stochastic local search is a simple, powerful algorithm for finding good configurations in a vast space of configurations, if: One can identify a good local step, and One can characterize relative (un)desirability via an energy function. It is in the energy function that art and science meet. Energy measure is often non-trivial and requires careful consideration and creativity You can become an expert maze designer. Experiment, observe, introspect, express

Free iphone app Publication of paper on maze design Public, walkable, student-generated jumping maze Daily maze on department website Showcase of student work at Celebration 2010 Puzzle book??? What would be fun for you? What would add most to your portfolio / resumé?

Abbott, Robert. SuperMazes: Mind Twisters for Puzzle Buffs, Game Nuts and Other Smart People, Prima Publishing, Rocklin, California, 1997. Fisher, Adrian. The Amazing Book of Mazes, Harry N. Abrams, Inc., New York, 2006.

Have to travel a circuit around n cities (n = 400) Different costs to travel between different cities (assume cost = distance) State: ordering of cities (> 8 10 865 orderings for 400 cities) Energy: cost of all travel Step: select a portion of the circuit and reverse the ordering

Pick any starting state While gradually cooling the temperature: Randomly change the state Compare old and new energy If new energy lower accept new state Otherwise accept new state with a probability computed from the energy change E and temperature T (probability e - E/kT )