Presentation is loading. Please wait.

Presentation is loading. Please wait.

Paint-By-Numbers Puzzle Chanwit Suebsureekul CS491B Spring 2006 Chanwit Suebsureekul CS491B Spring 2006.

Similar presentations


Presentation on theme: "Paint-By-Numbers Puzzle Chanwit Suebsureekul CS491B Spring 2006 Chanwit Suebsureekul CS491B Spring 2006."— Presentation transcript:

1 Paint-By-Numbers Puzzle Chanwit Suebsureekul CS491B Spring 2006 Chanwit Suebsureekul CS491B Spring 2006

2 Chanwit Suebsureekul - California State University, Los Angeles - PBN 2 Introduction The black cells are hiding Find them! Use numbers as clues

3 Chanwit Suebsureekul - California State University, Los Angeles - PBN 3 The Rule contiguous blockEach number represents the number of contiguous black cells, called a block at leastThere must be “at least” one space between blocks same sequenceThe blocks are in the same sequence as the numbers

4 Chanwit Suebsureekul - California State University, Los Angeles - PBN 4 Motivation Mario’s Picross Can we make the computer think

5 Chanwit Suebsureekul - California State University, Los Angeles - PBN 5 Objective Puzzle Solver Game Puzzle Editor –Edit by numbers –Edit by painting

6 Chanwit Suebsureekul - California State University, Los Angeles - PBN 6 Technology J2SE 5.0 Java Advanced Imaging (JAI) Javagram

7 Chanwit Suebsureekul - California State University, Los Angeles - PBN 7 JAI Advance Image Processing Support standard image file formats –BMP, GIF, JPEG, PNG, TIFF, etc. Original 64x64 Resized 20x20 GrayscaleMonochrome

8 Chanwit Suebsureekul - California State University, Los Angeles - PBN 8 Javagram Created by Steven Simpson Solve a puzzle one line at a time LineSolver class –FastLineSolver –CompleteLineSolver

9 Chanwit Suebsureekul - California State University, Los Angeles - PBN 9 FastLineSolver Use the “Pushing Technique” –Push to the left –Push to the right –Look for the overlap

10 Chanwit Suebsureekul - California State University, Los Angeles - PBN 10 FastLineSolver Example Push

11 Chanwit Suebsureekul - California State University, Los Angeles - PBN 11 CompleteLineSolver Try all possibilities Look for the overlap

12 Chanwit Suebsureekul - California State University, Los Angeles - PBN 12 CompleteLineSolver Example

13 Chanwit Suebsureekul - California State University, Los Angeles - PBN 13 FastLineSolver VS CompleteLineSolver FastLineSolver is much faster CompleteLineSolver guarantees the best result

14 Chanwit Suebsureekul - California State University, Los Angeles - PBN 14 Example FastLineSolverCompleteLineSolver

15 Chanwit Suebsureekul - California State University, Los Angeles - PBN 15 Javagram Deficiency (1) A conflict

16 Chanwit Suebsureekul - California State University, Los Angeles - PBN 16 Javagram Deficiency (2) Multiple solutions

17 Chanwit Suebsureekul - California State University, Los Angeles - PBN 17 Javagram Deficiency (3) Not enough clue

18 Chanwit Suebsureekul - California State University, Los Angeles - PBN 18 Recursive Guessing Main Program Recursive Guessing Javagram Puzzle Solution

19 Chanwit Suebsureekul - California State University, Los Angeles - PBN 19 Guessing Technique Pick a random unsolved cell Make a guess Continue solving puzzle –If conflict, rollback and change the guessed cell (wrong guess) –If not conflict, find the solution (right guess) Still have to rollback and try another path

20 Chanwit Suebsureekul - California State University, Los Angeles - PBN 20 Why Recursive?

21 Chanwit Suebsureekul - California State University, Los Angeles - PBN 21 Demo

22 Chanwit Suebsureekul - California State University, Los Angeles - PBN 22 Summary Paint by Numbers puzzle JAI Javagram –FastLineSolver –CompleteLineSolver Recursive Guessing Technique


Download ppt "Paint-By-Numbers Puzzle Chanwit Suebsureekul CS491B Spring 2006 Chanwit Suebsureekul CS491B Spring 2006."

Similar presentations


Ads by Google