Bienvenue sur le site de Jean-Marc

Sokosol game

Personal version of the Sokoban game

Origin

The Sokoban game was created by japanese Hiroyuki Imabashi. Th company Thinking Rabbit issued the 50 original levels and still has the rights on these levels.

Principle

A house keeper must put boxes at defined places, and can only push them one by one to achieve his job.
While the goal is to place all the boxes, it should be done with the minimum of moves.
It is also possible to try to do it with the minimum of pushes, which is not necessarily compatible with the minimum of moves.

Le solver

Interested in this game which deserves the name of puzzle, I wanted to write a program allowing to automatically solve the levels.
I choosed to make an exhaustive search, despite I knew that beyond a certain size, or a certain complexity, my computer will not be able to reach the solution.
Therefore, I put some means in the program to limit searching or stop it properly so that it will not get frozen.
Today, among the 21389 levels that I found on the internet and could implement in the format compatible with my program (without a collection of 10000 levels I did not like to import due to the size of these levels), about 3000 have been solved, and this number is still progressing, slowly, but surely (I am not doing only that).
I must precise that the solver is only searching for the optimal number of moves, which means that it is possible to find a solution with less pushes.

Despite this program runs under Windows and Linux, I only use it under Linux, for speed reasons.
That is because I made tests that showed Linux version, compiled from the same Object Pascal code written with Lazarus/FPC, is about four times faster than Windows version.
Now, using FpGUI, also compiled with FPC, allows to divise significantly the execution time again. A Delphi version gave almost the same results as Lazarus under Windows.
I will not try a C or C++ version that will not give better results but make the code much less readable.

The game

Of course, to make a solver, I had to program a version of the game.
So, I decided to share this personal version.
This version is not willing to be concurrential to those already available on the internet. I give it for free download, together with a number of levels, in a compatible format, known as free of rights.
I must say that I did not create levels myself, and I give the author names for the levels.
I found some identical levels from two authors, I use only one name, arbitrarily, without any mean for choosing the right one.

A simple help is attached to the game, to give details on additional functionalities.

A table of the results found with the use of the solver is available.

The versions

Sokosol (Windows) was downloaded times
Sokosol (Linux) was downloaded times