General Sokoban information
From Sokoban Wiki
(→Moves parity) |
m (→Moves parity) |
||
Line 15: | Line 15: | ||
in the above picture, the squares are alternately colored. | in the above picture, the squares are alternately colored. | ||
With every move the player moves to a square of the other color, no matter how the player moves. | With every move the player moves to a square of the other color, no matter how the player moves. | ||
- | This means all darker squares are reached with an odd number of moves and all brighter squares are reached with an even number of moves. | + | This means all darker squares are reached with an odd number of moves and all brighter squares are reached with an even number of moves.<br> |
Since the player start position is fixed for every level the move parity only depends on the end position of the player. | Since the player start position is fixed for every level the move parity only depends on the end position of the player. | ||
Line 24: | Line 24: | ||
The best known move solution contains 601 moves. | The best known move solution contains 601 moves. | ||
- | Since the player starts on a darker square, he must end on a lighter square so that the total number of moves is odd. | + | Since the player starts on a darker square, he must end on a lighter square so that the total number of moves is odd.<br> |
- | Since there is just one such square the player can end on when the level is solved, the last push of a solution having an odd number of moves is known. | + | Since there is just one such square the player can end on when the level is solved, the last push of a solution having an odd number of moves is known.<br> |
Revision as of 21:35, 23 January 2023
Moves parity
The parity of the number of moves of a solution depends on the position of the player when the level has been solved.
Example:
In this level the move parity is always even when the level has been solved, no matter how the player is moved, since the player must always end at the position left to the box.
The reason for this is that the player can only move up, down, left and right:
in the above picture, the squares are alternately colored.
With every move the player moves to a square of the other color, no matter how the player moves.
This means all darker squares are reached with an odd number of moves and all brighter squares are reached with an even number of moves.
Since the player start position is fixed for every level the move parity only depends on the end position of the player.
This information is sometimes useful, since for certain levels it may be helpful to now where the player ended. For example Original level 12:
The best known move solution contains 601 moves.
Since the player starts on a darker square, he must end on a lighter square so that the total number of moves is odd.
Since there is just one such square the player can end on when the level is solved, the last push of a solution having an odd number of moves is known.