Game Program 1



  1. In this sliding tile puzzle, you are given a rectangular strip on which is placed three black tiles, followed by a blank space,
    followed by three white tiles:
           Starting position: (B B B O W W W)
    
           Ending position:   (W W W O B B B)
    
    (O is the space)

    The puzzle has two legal moves with associated costs. A tile may move into
    an adjacent empty location. This move has a cost of 1.

    A tile may also hop over one or two other tiles into the empty position.
    This move has a cost that is equal to the number of tiles jumped over.

    The goal is to have all the white tiles to the left of all the black tiles with minimum cost.