• Re: A Tile Moving Puzzle

    From Carl G.@21:1/5 to HenHanna on Sat Sep 28 11:22:18 2024
    On 9/27/2024 9:56 PM, HenHanna wrote:
    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.



    #
    .##
    .##
    ...#

    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
    It's certainly solvable with Python. A depth-first search (DFS) is one
    way. It might be more difficult using a language that does not support recursive calls (like FORTRAN IV), but one can use a stack instead. I
    believe I used a version of Basic to confirm my "best" solution, but I
    can't find the source code. I found some easier puzzles in my files.
    Below is one that takes less than ten moves. It's not hard to solve
    without a computer.

    ####
    ...#
    ...#
    ...#

    #...
    #...
    #...
    ####

    --
    Carl G.


    --
    This email has been checked for viruses by AVG antivirus software.
    www.avg.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From IlanMayer@21:1/5 to Carl G. on Sun Sep 29 21:36:52 2024
    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.

    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER
    SPOILER

    Solution in 18 moves

    X...
    XX.
    XX.
    ..X
    (2, 2) -> (3, 4)
    X...
    .X.
    XXX
    ..X
    (3, 3) -> (2, 4)
    X...
    .XX
    X.X
    ..X
    (2, 3) -> (3, 3)
    X...
    ..X
    XXX
    ..X
    (3, 4) -> (4, 3)
    X...
    ..X
    XX.
    .XX
    (4, 4) -> (2, 3)
    X...
    .XX
    XX.
    .X.
    (3, 3) -> (2, 2)
    X...
    XXX
    X..
    .X.
    (2, 3) -> (2, 1)
    X...
    XX.X
    X..
    .X.
    (2, 2) -> (3, 1)
    X...
    X..X
    XX..
    .X.
    (2, 1) -> (4, 2)
    X...
    ..X
    XX..
    XX.
    (4, 3) -> (4, 1)
    X...
    ..X
    XX..
    XX..
    (4, 2) -> (2, 1)
    X...
    X..X
    XX..
    X...
    (3, 1) -> (2, 2)
    X...
    XX.X
    X..
    X...
    (2, 1) -> (1, 2)
    XX..
    X.X
    X..
    X...
    (1, 1) -> (2, 3)
    X..
    XXX
    X..
    X...
    (2, 2) -> (1, 3)
    XX.
    .XX
    X..
    X...
    (1, 2) -> (1, 4)
    .XX
    .XX
    X..
    X...
    (1, 3) -> (2, 2)
    ..X
    XXX
    X..
    X...
    (2, 4) -> (3, 3)
    ..X
    XX.
    XX.
    X...

    Please reply to ilanlmayer at gmail dot com

    __/\__
    \ /
    __/\\ //\__ Ilan Mayer
    \ /
    /__ __\ Toronto, Canada
    /__ __\
    ||

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carl G.@21:1/5 to All on Thu Sep 26 14:47:07 2024
    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.

    --
    Carl G.

    --
    This email has been checked for viruses by AVG antivirus software.
    www.avg.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From HenHanna@21:1/5 to Carl G. on Sat Sep 28 04:56:45 2024
    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.



    #
    .##
    .##
    ...#

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)