15puzzle Wiki Rss Feedhttp://15puzzle.codeplex.com/15puzzle Wiki Rss DescriptionUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=46<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way. The book might interest you.</p>
<p>Real World Functional Programming</p>
<p><a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in Figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in Figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position, as in Figure 3.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346872" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 3</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. The search is performed on a grid that regard the current tile to be moved (15 is the above example) and all the finished rows and columns as obstacles.</p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 10:52:24 GMTUpdated Wiki: Home 20120224105224AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=45<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in Figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in Figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position, as in Figure 3.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346872" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 3</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. The search is performed on a grid that regard the current tile to be moved (15 is the above example) and all the finished rows and columns as obstacles.</p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 10:48:13 GMTUpdated Wiki: Home 20120224104813AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=44<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in Figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in Figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position, as in Figure 3.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346872" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 3</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. The search is performed on a grid that regard the current tile to be moved (15 is the above example) and all the finished rows and columns as obstacles.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 10:32:56 GMTUpdated Wiki: Home 20120224103256AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=43<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in Figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in Figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position, as in Figure 3.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346872" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 3</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. So this search subroutine is widely used throughout the solving process.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 01:03:05 GMTUpdated Wiki: Home 20120224010305AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=42<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. So this search subroutine is widely used throughout the solving process.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 01:01:03 GMTUpdated Wiki: Home 20120224010103AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=41<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tiles are obtained by
a breadth-first search. So this search subroutine is widely used throughout the solving process.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:59:35 GMTUpdated Wiki: Home 20120224125935AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=40<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tile are obtained by
a breadth-first search.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:55:49 GMTUpdated Wiki: Home 20120224125549AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=39<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tile are obtained by
a breadth-first search.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:55:18 GMTUpdated Wiki: Home 20120224125518AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=38<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>How to make a move</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tile are obtained by
a breadth-first search.</p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:54:31 GMTUpdated Wiki: Home 20120224125431AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=37<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, both the path to move the blank and the path to move the tile are obtained by
a breadth-first search. So this search routine is commonly used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:37:55 GMTUpdated Wiki: Home 20120224123755AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=36<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>If we want to move a tile to a farther position (not adjacent to itself), we can do the routine above several times. The tile will move one step at each time. In this program, the path to move the blank is obtained by a breadth-first search.
This search routine is commonly used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:36:29 GMTUpdated Wiki: Home 20120224123629AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=35<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's position in figure 1), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's position in figure 1).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:31:01 GMTUpdated Wiki: Home 20120224123101AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=34<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's previous position), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's previous position).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries for running this program</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:29:39 GMTUpdated Wiki: Home 20120224122939AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=33<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's previous position), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's previous position).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:28:57 GMTUpdated Wiki: Home 20120224122857AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=32<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 1</em></p>
<p><strong>How to move a tile</strong></p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p>For example, as in figure 1 (the screenshot above), if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14, as in figure
2. Once the blank is at the target position (14's previous position), we can simply move the blank to 15, (or say move 15 to the blank, it's the same) then 15 will be at the target position (14's previous position).</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=346864" alt="" width="450" height="500"></p>
<p style="padding-left:180px"><em>Figure 2</em></p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:27:37 GMTUpdated Wiki: Home 20120224122737AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=31<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>How to move a tile to a specified position.</p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p>For example, as in the screenshot above, if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14. Once the blank is at
the target position (14's position), we can simply move the blank to 15, then 15 will be in 14's position.</p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:20:54 GMTUpdated Wiki: Home 20120224122054AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=30<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>How to move a tile to a specified position.</p>
<p>To move a tile to one of its adjacent positions, we can move the blank to that position first, and then move the blank to the position of the tile.</p>
<p>For example, as in the screenshot above, if we want to move 15 to 14's position, we first move the blank to 14's position without moving 15 itself. To do this, we have to go around 15, move the blank along 12, 11, 10, and finally 14. Once the blank is at
the target position (14's position), we can simply move the blank to 15, then 15 will be in 14's position.</p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p><strong>The solving algorithm</strong></p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:18:26 GMTUpdated Wiki: Home 20120224121826AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=29<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p><strong>About the 15-puzzle</strong></p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p><strong>The solving algorithm</strong></p>
<p><strong></strong>Moving a tile to a specific position is done by moving the blank to that position first and then move the target tile to the blank.</p>
<p>In this program, the path to move the blank is obtained by a breadth-first search. This is a common subroutine used by all the moves discussed below.</p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable.</p>
<p>We can determine the solvability before solving the puzzle, see the article below about how to determinate the solvability of the puzzle.</p>
<p><a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p><strong>Steps with illustrations</strong></p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p><strong>Required libraries</strong></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Fri, 24 Feb 2012 00:08:58 GMTUpdated Wiki: Home 20120224120858AUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=28<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>For the math about how to determinate the solvability of the puzzle, see<br>
<a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>The solving algorithm:</p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable. We can determine the solvability before solving the puzzle, see the article above about solvability.</p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Wed, 08 Feb 2012 23:51:16 GMTUpdated Wiki: Home 20120208115116PUpdated Wiki: Homehttp://15puzzle.codeplex.com/wikipage?version=27<div class="wikidoc">
<p><strong>Project Description</strong><br>
This is a fifteen puzzle written in F# with WPF. In the program, you can reset all the tiles, generate random permutation of tiles, and solve the puzzle using the build-in solving algorithm.</p>
<p>The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly
the smaller 8-puzzle.<br>
<a href="http://en.wikipedia.org/wiki/Fifteen_puzzle">http://en.wikipedia.org/wiki/Fifteen_puzzle</a></p>
<p>For the math about how to determinate the solvability of the puzzle, see<br>
<a href="http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html">http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html</a></p>
<p>This is my first F# program after reading the book Real World Functional Programming. After some frustration and struggles, I gradually learned how to write F# code in a functional way.</p>
<p>You might also interest in the book<br>
Real World Functional Programming<br>
<a href="http://msdn.microsoft.com/en-us/library/hh314518.aspx">http://msdn.microsoft.com/en-us/library/hh314518.aspx</a></p>
<p>Screenshot:</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=317944" alt="" width="450" height="500"></p>
<p>The solving algorithm:</p>
<p>There are 3 steps in solving a 15 puzzle.</p>
<p>First, solve the first row and first column.</p>
<p>Then solve the second row and second column.</p>
<p>Finally, the 15 puzzle is reduced into 2 by 2 puzzle, with only 3 tiles not in order. Now we can only move the 3 tiles either clockwise or anticlockwise. Repeat rotating them around in one direction until the 3 tiles reach their right positions, if
the case is solvable. We can determine the solvability before solving the puzzle, see the article above about solvability.</p>
<p>Step 1, solve the first row and first column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340201" alt="" width="320" height="324"></p>
<p>Step 2, solve the second row and second column.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340202" alt="" width="320" height="324"></p>
<p>Step 3, solve the last 3 tiles.</p>
<p><img src="http://download.codeplex.com/Download?ProjectName=15puzzle&DownloadId=340203" alt="" width="320" height="158"></p>
<p>This program is written in Visual Studio 2010 with .NET Framework 4.0. So .NET Framework 4.0 and F# Runtime 2.0 are required for running the program. They can be downloaded via the following links.</p>
<p>.NET Framework 4.0 redistributable package<br>
<a href="http://www.microsoft.com/download/en/details.aspx?id=17718">http://www.microsoft.com/download/en/details.aspx?id=17718</a></p>
<p>Visual Studio 2010 F# Runtime 2.0</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?id=13450">http://www.microsoft.com/download/en/details.aspx?id=13450</a></p>
</div><div class="ClearBoth"></div>lsz0Wed, 08 Feb 2012 23:50:59 GMTUpdated Wiki: Home 20120208115059P