Is there a Sokoban level with such conditions

1.4k Views Asked by At

First of all, let me explain what Sokoban is. It is a logic game created in Japan and it literally means "warehouse keeper". It is a type of transport puzzle, in which the player pushes boxes or crates around in a warehouse, trying to get them to storage locations. More about the rules can be found on Wikipedia.

I'm wondering is there a sokoban level (map, room, call it however you want) such that, no matter which moves the player chose, there will always be at least one movable box.

My research

Usually, there are a notation for describing sokoban levels. Walls are represented as (#) symbol, free spaces are white spaces (), player is (@) and ($) represents boxes. Target fields are represented as (.). Here is an example level

#####
#@$.#
#####

This is the simplest possible sokoban level. Solution is just one move to the right and the only box will be placed at the only target field. You can see example levels on many Sokoban simulators on the internet.

Of course, there are impossible levels, like this one

######
#@$#.#
#    #
######

The box is in the corner and there is no way the player can move it from the corner in the target field. Therefore, this level is considered impossible. It actually turned out to be very hard to determine if arbitrary level is possible or not. But, because there are finitely many states, it can be theoretically checked using brute-force methods.

Now, back to my question. We saw that there are solvable, but also impossible levels. My question is: can we construct a possible level such that, no matter what player do (playing arbitrary moves: up, left, right, down), it cannot place all boxes in such positions that there is no movable boxes left.

What does a movable box mean? A movable box is a box which can be theoretically moved by a player in some sequence of moves. For example, both of these two boxes are movable

#####
#@$.#
##$##
 #.#
 ###

But, only one box in the following level is movable

#####
#@$.#
### #
  #$#
  #.#
  ###

The down box will never be in a corner, but player cannot reach it, so it is considered unmovable. Here is another example

######
#@   #
# #. #
# $$ #
# .# #
#    #
######

Both boxes are unmovable. They are not in any corner, but there is no way playter can move any of them.

My attempts

At first, I though such level doesn't exist. My opinion was that any level, after some sequence of moves, will no more contain movable boxes. However, I tried to prove it, but it turned out to be harder than I though. Now I actually think that such level can be constructed and I'm interested in how that level would look like.

Here is few attempts I made to construct such level (I'm not drawing target fields, just because they are not important)

  $    
 # ### 
 # @$ $
 #$# # 
$  $$# 
 ### # 
    $  

This is not a good what I'm looking for. In this level, player can, for example, move left and then down and one of the blocks will become unmovable. I think, in order to construct such level, there must exist a loop player must follow. I mean, probably, the only way such level may exist is to contain blocks in such order that player can at any point in time move exactly one block. Movement of that block will prevent access to previous blocks, but open new path leading to another block, etc. It should be done in a loop: player move one block, then there's only one free path, at the end of the path there is exactly one block, after moving that block, previous path is now closed and new path is open, etc, until it reaches the beginning.

I'm really not sure if such level even exists, but I think it would be very interesting to try to construct it, or ot prove that it doesn't exist.

Why?

What does this question have to do with math? Who will ever find the answer to this question useful?

I don't think the answer necessarily need to be useful. On the other hand, there are many open math problems involving Sokoban game as the main concept, so I think if someone succeed to prove or disprove that such level exists, then it will maybe solve some other Sokoban problems. There are many articles written about Sokoban math problems and similar concepts involving Sokoban, so I think it really can be useful to have some deeper understanding of how this concept works.

If you don't think this question is useful, then please avoid it. If you have free time to spend, then you can play with this question, otherwise, please move on. There are tons of new question, so if you don't think this question may be useful, then just don't answer it. Very simple.

Thank you ina dvance to anyone who decide to help.