metaheuristic optimisations for sudoku puzzles //en.wikipedia.org/wiki/sudoku (2009.03.15) itec809 -...

12
METAHEURISTIC OPTIMISATIONS FOR METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES SUDOKU PUZZLES http://en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Upload: willa-gregory

Post on 04-Jan-2016

246 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

METAHEURISTIC OPTIMISATIONS FOR METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLESSUDOKU PUZZLES

http://en.wikipedia.org/wiki/Sudoku (2009.03.15)

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 2: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

AGENDA

•Introduce Sudoku, Heuristics and Constraints

•Introduce the Three Heuristics and the Rag Doll Framework

•Show some results on the Test Bed

•Explain Results

•Take lots of Questions

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 3: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

Sudoku puzzles are complex problem spaces •6,670x1018 unique boards possible!

•NPComplete – worst case exponential time order.

Heuristics spread out and look for good solutions,•They learn by experience.

•Can they find the best solution?

Two main types:•Evolutionary(eg. Genetic) or

•Swarming(our focus).

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 4: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

•Heuristics learn their idea of the puzzle as they go along.•They randomly change, learn from each other and measure success

with a fitness function.•They find good solutions, but perhaps not the best.

•Our challenge is to find the best without checking everything.

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 5: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

• The fitness Function is the heuristic’s guide to comparing solutions. • They are very solution specific.

• I suggest that the fitness function should be tied to constraints, not the board.• Instead of a maximum of 81, my fitness function goes to 9x9x3x9 = 2187

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 6: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

•I wrote a program to help test my ideas.•I organised the program with Object Orientation.

•I built a text based screen interface and each of the Heuristics in it.•I found the hardest 4 problems known to test with.

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 7: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

• This is a screen shot of the Genetic Algorithm Succeeding on an Impossible!

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 8: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

• This is a screen shot of Particle Swarming Succeeding at an Impossible!

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 9: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

• This is a screen shot of Simulated Annealing Succeeding at an Impossible!

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 10: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

• All the Heuristics worked, even examples with impossibles! • Not predicted by the research.

•Most problems solved within 100 iterations, hard ones as little as 1000.•Came from optimisations from the Rag Doll framework, the Constraints

based Fitness Function and the Greedy Random. •Even better, the Rag Doll worked on Impossibles without the Heuristics!!!

ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 11: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

Questions?ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun

Page 12: METAHEURISTIC OPTIMISATIONS FOR SUDOKU PUZZLES //en.wikipedia.org/wiki/Sudoku (2009.03.15) ITEC809 - Sean McGerty

Thanks!ITEC809 - Sean McGerty 89214617 - Supervisor Mehmet Orgun