Skip to content

Solving the 15-Puzzle using IDA* and a pattern database.

Notifications You must be signed in to change notification settings

metalglove/15-Puzzle

Repository files navigation

15-Puzzle

Solves the 15-Puzzle using Iterative Deepening and a Pattern Database with pattern 5-5-5.

5 4 1 0 9 3 14 2 12 7 10 8 11 6 13 15
C:\Users\mario\source\repos\15-Puzzle\PatternDatabaseN4_string.json
Pattern:0,1,2,3,6
Board:0,1,2,3,-1,-1,6,-1,-1,-1,-1,-1,-1,-1,-1,15
Pattern:4,5,8,9,12
Board:-1,-1,-1,-1,4,5,-1,-1,8,9,-1,-1,12,-1,-1,15
Pattern:7,10,11,13,14
Board:-1,-1,-1,-1,-1,-1,-1,7,-1,-1,10,11,-1,13,14,15
...
Explored: 0000002025, Distance: 10, Length: 78, Value: 88
Explored: 0000002026, Distance: 10, Length: 79, Value: 89
Explored: 0000002027, Distance: 10, Length: 80, Value: 90
Explored: 0000002028, Distance: 10, Length: 81, Value: 91
Explored: 0000002029, Distance: 12, Length: 82, Value: 94
Explored: 0000002030, Distance: 8, Length: 82, Value: 90
Explored: 0000002031, Distance: 6, Length: 83, Value: 89
Explored: 0000002032, Distance: 6, Length: 84, Value: 90
Explored: 0000002033, Distance: 8, Length: 84, Value: 92
Explored: 0000002034, Distance: 4, Length: 84, Value: 88
Explored: 0000002035, Distance: 6, Length: 85, Value: 91
Explored: 0000002036, Distance: 2, Length: 85, Value: 87
Hours: 0 Minutes: 0 Seconds: 0 Milliseconds: 125
Puzzle solved.
86 Moves:
Left Up Up Up Right Down Left Down Left Left Down Right Up Up Up Right 
Right Down Left Up Right Down Left Down Left Left Up Up Right Right Down 
Down Left Left Down Right Up Left Up Up Right Right Right Down Left Up 
Right Down Left Down Left Up Up Left Down Down Right Right Right Up Left 
Left Left Down Right Up Left Down Right Up Left Down Right Right Down 
Right Up Up Left Left Left Down Right Down Right Right

About

Solving the 15-Puzzle using IDA* and a pattern database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages