Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 100:20:18 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,508 |
On Thu, 26 Sep 2024 21:47:07 +0000, Carl G. wrote:
The goal of tile-moving puzzles are to change one pattern into another
by moving square tiles (or other markers) around on a grid. When a tile
is moved, it must be moved to an empty cell where at least two of its
edges will touch the edges of orthogonally adjacent tiles.
Below is a puzzle on a 4 by 4 grid (view with a fixed-width font). "#"
represents a tile and " " represents an empty cell.
From pattern:
#
##
##
#
To pattern:
#
##
##
#
Each move can be recorded as four numbers. The first two numbers are the
coordinates of the moved tile's starting location (row number and column
number). The second two numbers are the coordinates of the tile's ending
location. For example, (2,2-3,4) means move the tile at (2,2) to (3,4),
and when applied this puzzle's initial state would result in:
#
#
###
#
The moves required for the sample puzzle is less than 20.
It's certainly solvable with Python. A depth-first search (DFS) is one#
.##
.##
...#
i see... Went from the above to below:
#
..#
.##O ------- where O is the move- destination
...#
This is easier to represent than Dudeney's 6 coins puzzle.
i wonder if it's possible to solve this with a Python program that does
DFS
The goal of tile-moving puzzles are to change one pattern into another
by moving square tiles (or other markers) around on a grid. When a tile
is moved, it must be moved to an empty cell where at least two of its
edges will touch the edges of orthogonally adjacent tiles.
Below is a puzzle on a 4 by 4 grid (view with a fixed-width font). "#" represents a tile and " " represents an empty cell.
From pattern:
#
##
##
#
To pattern:
#
##
##
#
Each move can be recorded as four numbers. The first two numbers are the coordinates of the moved tile's starting location (row number and column number). The second two numbers are the coordinates of the tile's ending location. For example, (2,2-3,4) means move the tile at (2,2) to (3,4),
and when applied this puzzle's initial state would result in:
#
#
###
#
The moves required for the sample puzzle is less than 20.
The goal of tile-moving puzzles are to change one pattern into another
by moving square tiles (or other markers) around on a grid. When a tile
is moved, it must be moved to an empty cell where at least two of its
edges will touch the edges of orthogonally adjacent tiles.
Below is a puzzle on a 4 by 4 grid (view with a fixed-width font). "#" represents a tile and " " represents an empty cell.
From pattern:
#
##
##
#
To pattern:
#
##
##
#
Each move can be recorded as four numbers. The first two numbers are the coordinates of the moved tile's starting location (row number and column number). The second two numbers are the coordinates of the tile's ending location. For example, (2,2-3,4) means move the tile at (2,2) to (3,4),
and when applied this puzzle's initial state would result in:
#
#
###
#
The moves required for the sample puzzle is less than 20.
#
.##
.##
...#
#
..#
.##O ------- where O is the move- destination
...#