Minesweeper Solver Marina Maznikova Artificial Intelligence II Fall 2011.

Slides:



Advertisements
Similar presentations
Artificial Intelligence Presentation
Advertisements

Local Search Jim Little UBC CS 322 – CSP October 3, 2014 Textbook §4.8
CPSC 322, Lecture 14Slide 1 Local Search Computer Science cpsc322, Lecture 14 (Textbook Chpt 4.8) Oct, 5, 2012.
The Normal Distribution
IBM Labs in Haifa © 2005 IBM Corporation Adaptive Application of SAT Solving Techniques Ohad Shacham and Karen Yorav Presented by Sharon Barner.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
Computational Modeling Lab Wednesday 18 June 2003 Reinforcement Learning an introduction part 3 Ann Nowé By Sutton.
Test Case Filtering and Prioritization Based on Coverage of Combinations of Program Elements Wes Masri and Marwa El-Ghali American Univ. of Beirut ECE.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
Local Search for Distributed SAT JIN Xiaolong (Based on [1] )
Maggie Zhou COMP 790 Data Mining Seminar, Spring 2011
Determining Reaction Rate and Order of Reaction An example of Using the Excel Solver function by: Vanadium Sigma.
1 Refining the Basic Constraint Propagation Algorithm Christian Bessière and Jean-Charles Régin Presented by Sricharan Modali.
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
CPSC 322, Lecture 14Slide 1 Local Search Computer Science cpsc322, Lecture 14 (Textbook Chpt 4.8) February, 4, 2009.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Informed Search Strategies Tutorial. Heuristics for 8-puzzle These heuristics were obtained by relaxing constraints … (Explain !!!) h1: The number of.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Minesweeper is a game of logic. It originated from “Relentless Logic,” which was written by Conway, Hong, and Smith around In Relentless Logic, the.
Algorithms in Exponential Time. Outline Backtracking Local Search Randomization: Reducing to a Polynomial-Time Case Randomization: Permuting the Evaluation.
Problem Solving and Search in AI Heuristic Search
Game of Life Changhyo Yu Game of Life2 Introduction Conway’s Game of Life  Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies.
Ken Bayer, Josh Snyder, and Berthe Y. Choueiry Constraint Systems Laboratory University of Nebraska-Lincoln A Constraint-Based Approach to Solving Minesweeper.
Sparse vs. Ensemble Approaches to Supervised Learning
1 Algorithm Design Techniques Greedy algorithms Divide and conquer Dynamic programming Randomized algorithms Backtracking.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 5 Jim Martin.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Chapter 2 Describing distributions with numbers. Chapter Outline 1. Measuring center: the mean 2. Measuring center: the median 3. Comparing the mean and.
Heuristic Search Heuristic - a “rule of thumb” used to help guide search often, something learned experientially and recalled when needed Heuristic Function.
SUDOKU Via Relaxation Labeling
林偉楷 Taiwan Evolutionary Intelligence Laboratory.
An advanced greedy square jigsaw puzzle solver
1 Sampling Distributions Lecture 9. 2 Background  We want to learn about the feature of a population (parameter)  In many situations, it is impossible.
June 21, 2007 Minimum Interference Channel Assignment in Multi-Radio Wireless Mesh Networks Anand Prabhu Subramanian, Himanshu Gupta.
Modular Arithmetic Shirley Moore CS4390/5390 Fall September 3, 2013.
P, NP, and Exponential Problems Should have had all this in CS 252 – Quick review Many problems have an exponential number of possibilities and we can.
Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun 3
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
INVESTIGATION Data Colllection Data Presentation Tabulation Diagrams Graphs Descriptive Statistics Measures of Location Measures of Dispersion Measures.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Ç ç Cellular Operators in a Shared Spectrum Sivan Altinakar Supervisors: Tinaz Ekim-Asici Márk Félegyházi.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Principles of Intelligent Systems Constraint Satisfaction + Local Search Written by Dr John Thornton School of IT, Griffith University Gold Coast.
Robot Intelligence Technology Lab. Generalized game of life YongDuk Kim.
A local search algorithm with repair procedure for the Roadef 2010 challenge Lauri Ahlroth, André Schumacher, Henri Tokola
Design and Analysis of Algorithms (09 Credits / 5 hours per week) Sixth Semester: Computer Science & Engineering M.B.Chandak
© 2008 McGraw-Hill Higher Education The Statistical Imagination Chapter 5. Measuring Dispersion or Spread in a Distribution of Scores.
Different Local Search Algorithms in STAGE for Solving Bin Packing Problem Gholamreza Haffari Sharif University of Technology
Chapter 5. Advanced Search Fall 2011 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Intro. ANN & Fuzzy Systems Lecture 37 Genetic and Random Search Algorithms (2)
Metaheuristics for the New Millennium Bruce L. Golden RH Smith School of Business University of Maryland by Presented at the University of Iowa, March.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Formal Complexity Analysis of RoboFlag Drill & Communication and Computation in Distributed Negotiation Algorithms in Distributed Negotiation Algorithms.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Discrete ABC Based on Similarity for GCP
Heuristic Optimization Methods
Evolving the goal priorities of autonomous agents
Computer Science cpsc322, Lecture 14
Artificial Intelligence
Christopher Hodgson and Gregory Tyler Loftis
Artificial Intelligence
Data Mining – Chapter 4 Cluster Analysis Part 2
More on Search: A* and Optimization
Constraints and Search
Distributed Algorithms for DCOP: A Graphical-Game-Based Approach
Lecture 3: Environs and Algorithms
X y y = x2 - 3x Solutions of y = x2 - 3x y x –1 5 –2 –3 6 y = x2-3x.
Sudoku.
Presentation transcript:

Minesweeper Solver Marina Maznikova Artificial Intelligence II Fall 2011

2 Agenda 1. The Minesweeper Game 2. Theoretical Background 3. Solving Agents 4. Evaluation 5. Extension 6. Summary

3 1. The Minesweeper Game

4

5 2. Theoretical Background NP-completeness (8-SAT) Solving approaches:  Constraints  Reinforcement learning

6 3. Solving Agents Random agent (RA)

7 3. Solving Agents Random agent (RA) Simple agent (SA)  Only mines remain around a square => mark as mine  All mines around a square are marked => open neighbors

8 3. Solving Agents Greedy agent (GA)  Start with (0, 0)  Search for mine and safe squares  If nothing found Calculate for each square the density of mines on the squares around it For each square, take the maximum of the densities calculated for this If no opened neighbors => ½ Open the square with the minimum “probability” of mine 2/3 1/5

9 3. Solving Agents Constraints agent (CA)  Start with (0, 0)  Consider only the relevant squares  Model the problem as constraints problem Mine square => 1; opened square => 0 Sum of mines around opened squares Number of mines in the game

10 3. Solving Agents Constraints agent (CA)  Backtracking for 3000 results  Calculate how many times each square is mine  Mark mine squares and open safe squares  If no such squares found, open the square with the lowest sum of mines …

11 3. Solving Agents Constraints agent (CA)  Problem: Exponential algorithm Impossible to generate always all the solutions Time

12 3. Solving Agents Constraints agent (CA)  Problem: Exponential algorithm Impossible to generate always all the solutions Time “Simple” constraints agent (SCA)  Start with (0, 0)  Search for mine and safe squares  If nothing found, use constraints

13 4. Evaluation Observed variables  Overall result  Average squares revealed per game  Time Tests ( games)  Agent comparison on standard board  Variation of board size  Variation of mine density

14 4. Evaluation: Standard Game Problem of too many solution possibilities

15 4. Evaluation: Standard Game Backtracking is expensive

16 4. Evaluation: Board Size Better performance on larger and smaller boards Exception: backtracking

17 4. Evaluation: Board Size Larger boards require more time, especially when backtracking is used

18 4. Evaluation: Mine Density The higher the mine density, the worse the performance Greedy strategy is not good for few mines

19 4. Evaluation: Mine Density RA, SA, and GA: More mines require less time CA and SCA: More mines require more time

20 5. Extension Possibility to open 5% of the squares as joker  RA: At the beginning of the game  SA: In case no mine/safe squares are found  GA: In case of two squares with the same mine “probability”  CA and SCA: On start, in case of too many solutions of the problem, and when two squares are “safest”

21 5. Extension: Evaluation Jokers improve the performance … and make unsafe strategies inefficient

22 5. Extension: Evaluation Time increases because of the more moves

23 6. Summary Backtracking is expensive and for many solution possibilities inefficient  Solution: Sets The Greedy strategy is not a good strategy The higher the mine density, the difficult the game Jokers help and make unsafe move strategies inefficient