Games

Autosokoban

I created an algorithm to automatically generate sokoban problems of increasing difficulty. Check it out! The first levels are trivial, but somewhere around level 10, perhaps 15, you will find that the puzzles are becoming quite challenging.

Level:  0

Moves:  0

(Use keyboard or click above.)

These levels were generated using random seed 9412088.

Use the following URL to get back to this particular puzzle:

I would like to thank Murase-san, Matsubara-san and Hiraga-san who approached this subject in an academic paper called Automatic Making of Sokoban Problems. In general, my algorithm is fundamentally different than theirs, but the first step (generating rooms) is performed as described in the paper.

By the way, I should warn you that this game is highly addictive. Arm yourself with plenty of coffee and chip music.

Posted Tuesday 24-Jun-2008 18:03

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Anonymous
Tue 8-Jul-2008 02:15
Fun!!!! yay!!
Anonymous
Tue 5-Aug-2008 17:05
Nice & funny
Anonymous
Mon 8-Sep-2008 13:28
I was looking at level 100 and above, and they were pretty mean. I hope I didn't suffocate your web server with generating them!

How fast is the solving algorithm, and how does it compare to that in the original paper which inspired you, and how quickly can it (your own algorithm) solve f.ex the typical level 100's on a given system?
lft
Linus Åkesson
Tue 16-Sep-2008 22:02
I was looking at level 100 and above, and they were pretty mean. I hope I didn't suffocate your web server with generating them!

How fast is the solving algorithm, and how does it compare to that in the original paper which inspired you, and how quickly can it (your own algorithm) solve f.ex the typical level 100's on a given system?

No problem. =)

The solution is a bi-product of the puzzle generation algorithm, so it would take no additional time.
Anonymous
Fri 1-May-2009 00:45
hey!

very nice job! i love this game. levels are getting more and more tricky, but you never know if the next one is easy or not. :) is there any way to install the programm on a cell phone? how complex is the algorithm to generate the levels?
lft
Linus Åkesson
Mon 4-May-2009 20:10
hey!

very nice job! i love this game. levels are getting more and more tricky, but you never know if the next one is easy or not. :) is there any way to install the programm on a cell phone? how complex is the algorithm to generate the levels?

Thanks! The algorithm needs a lot of RAM, so it's probably not feasible for a midlet. Some day, when I get the time, I'll publish the source code and a description of the algorithm.
Anonymous
Thu 7-May-2009 19:43

lft wrote:

hey!

very nice job! i love this game. levels are getting more and more tricky, but you never know if the next one is easy or not. :) is there any way to install the programm on a cell phone? how complex is the algorithm to generate the levels?

Thanks! The algorithm needs a lot of RAM, so it's probably not feasible for a midlet. Some day, when I get the time, I'll publish the source code and a description of the algorithm.

Oh, super! I am very much interested in the source code. To avoid the RAM-problem, one could split the programm into a "level-creator", that calculates for example level 1 to 100 of a seed und saves it in a small file, which could be read by the second program running on the cell-phone.

Greetings, the anonymous writer =)
Anonymous
Sun 25-Jul-2010 04:01
Totally amazing. You should port it to Android/iPhone. Don't know how much memory you need, but newer devices have a lot available. Alternatively, publish the source ;)

However for the life of me I can't solve
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=6

Bug, or am I just not doing it right?
Anonymous
Sun 25-Jul-2010 13:41
Try that one, that's easy :P
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1329696099&level=100
Anonymous
Sun 25-Jul-2010 14:17
Totally amazing. You should port it to Android/iPhone. Don't know how much memory you need, but newer devices have a lot available. Alternatively, publish the source ;)

However for the life of me I can't solve
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=6

Bug, or am I just not doing it right?

I think this one is realy hard. I was to give up. But there is a soluten. First step is to push the bolder up to you up, then open the way down. Then you can do the rest.
Anonymous
Thu 19-Aug-2010 22:31
i do believe http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=768 is impossible...
Anonymous
Thu 19-Aug-2010 22:37
i do believe http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=768 is impossible...

har har just kidding its solvable just really strange :B
Anonymous
Sat 16-Oct-2010 21:39
Nice Generator :-)
I found
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=768
really easy, but for
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=6
I needed several tries.
Anonymous
Sat 18-Jun-2011 16:47
Totally amazing. You should port it to Android/iPhone. Don't know how much memory you need, but newer devices have a lot available. Alternatively, publish the source ;)

However for the life of me I can't solve
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=6

Bug, or am I just not doing it right?

It's possible. I solved it in 17 moves. A lot of manipulation, however.
Anonymous
Mon 22-Aug-2011 16:23
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1015619909&level=10

does this problem have a solution?
Anonymous
Thu 10-Nov-2011 16:40
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1015619909&level=10

does this problem have a solution?

Yes, I've found a solution in 19 turns.
Anonymous
Mon 9-Jan-2012 04:56
http://www.linusakesson.net/games/autosokoban/?v=1&seed=752450309&level=15 is killing me!
Anonymous
Fri 13-Jan-2012 03:32
http://www.linusakesson.net/games/autosokoban/?v=1&seed=752450309&level=15 is killing me!

Oh! I solved it!
Anonymous
Wed 29-Feb-2012 06:18
Looks like it eventually runs out of levels at level 2147483647.
(I don't know much about the language you programmed it in, but is there a reason that the level counter is signed? However, that would just delay the problem...)
Anonymous
Mon 19-Mar-2012 14:59
Running in Firefox 10.0.2 gives a very unproportional playing field.
Anonymous
Thu 17-May-2012 22:01
Easy peasy lemon squeezy

--
Xyz_39808
Anonymous
Wed 23-May-2012 15:16
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1481526154&level=22
Anonymous
Thu 12-Jul-2012 13:28
This one is nice. After thinking it was quite impossible, it then took me nearly an hour to solve :-D

http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=1768
Anonymous
Mon 13-Aug-2012 21:04
These algorithms are not perfect of course, and occasionally they generate these super-simple level 1000-puzzles:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=810975398&level=1000
Anonymous
Fri 31-Aug-2012 01:01
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1252821180&level=9
lft
Linus Åkesson
Fri 31-Aug-2012 19:37
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1252821180&level=9

Good find! The best levels are counter-intuitive like that.
Anonymous
Fri 7-Dec-2012 00:00
Very interesting stuff.

I have tried many levels here and all of the levels mentioned above by others, they all seem a bit on the easy side.

I wish it can generate really difficult levels.
I do mean, super difficult levels.
Anonymous
Mon 16-Sep-2013 18:32
level 13, 770569946 impossible?
Anonymous
Fri 27-Sep-2013 02:12
Totally amazing. You should port it to Android/iPhone. Don't know how much memory you need, but newer devices have a lot available. Alternatively, publish the source ;)

However for the life of me I can't solve
http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=6

Bug, or am I just not doing it right?
I've done it in about a minute. It's not impossible. Start by pushing higher the one that's above you at the start position, and then one point higher the one below you.

I'm interested in the generation algorithm too. :)
Anonymous
Tue 5-Nov-2013 02:19
level 13, 770569946 impossible?

It is possible and is in fact pretty easy.

Here's the LURD solution:
LLLulDulldRddllluluRRRurDlllddrrdrrruLdllulluurrurrrdLDDrdLuLLLrrruuulldRDrdLurUruL
Anonymous
Sat 30-Nov-2013 04:38
Would it be ok if I took two or three levels generated by this program and uploaded them to a certain freeware game similar to Chip's Challenge? You and your wonderful sokoban generator would recieve the credit for creating the levels, and additionally I would provide a link to the generator here so others could enjoy it. (If it is not ok, then I will not upload any levels from here.)
lft
Linus Åkesson
Sat 30-Nov-2013 16:06
Would it be ok if I took two or three levels generated by this program and uploaded them to a certain freeware game similar to Chip's Challenge? You and your wonderful sokoban generator would recieve the credit for creating the levels, and additionally I would provide a link to the generator here so others could enjoy it. (If it is not ok, then I will not upload any levels from here.)

Sure, go ahead!
Anonymous
Sat 30-Nov-2013 23:49
Thanks! The game which I am uploading them to can be found by searching 'escape spacebar' (not posting a link so as to avoid direct advertisement.)

The bug where the tiles end up twice as tall as they are wide on Firefox 10 is apparent for me as well. I'm not sure why it appears like that, but the game is still playable.
Anonymous
Wed 18-Jun-2014 10:02
I thought this one was tough, but it might just be that my mind is tired right now...
http://www.linusakesson.net/games/autosokoban/?v=1&seed=295316096&level=8
I got stuck in one way of thinking and didn't see all the possibilities.
Anonymous
Sat 21-Jun-2014 04:23
Okay, I'm stuck on this one.
http://www.linusakesson.net/games/autosokoban/?v=1&seed=295316096&level=26
Can anyone else solve it?
Anonymous
Sat 21-Jun-2014 09:47
Here's a good one:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1181759978&level=2811y
Anonymous
Sat 5-Jul-2014 23:49
Here's a good one:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1181759978&level=2811y

I think it's a good one, because it was actually easier than #26! :)
Anonymous
Fri 1-Aug-2014 17:57
Hey,
First of all, congratulations! You have done an amazing job! It looks fantastic!
Well, I have a project to create a random map creator for sokoban, but I'm having a lot of trouble to do it. I've already looked for the academic paper you talked about, but unfortunately I wasn't able to find it. I would appreciate a lot if you could give me a hand with it.
Thanks a lot
Anonymous
Thu 7-Aug-2014 10:50
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1093093105&level=12yy
Enjoy. (It's impossible.)
Anonymous
Tue 11-Nov-2014 18:25
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1093093105&level=12yy
Enjoy. (It's impossible.)
Not impossible. 21 moves. Nice puzzle
Anonymous
Fri 21-Nov-2014 14:00
Looks like it eventually runs out of levels at level 2147483647.
(I don't know much about the language you programmed it in, but is there a reason that the level counter is signed? However, that would just delay the problem...)

It's some sort of overflow I'd say as 2147483647 = 0b01111111111111111111111111111111 (so one zero and 31 one's)
mporshnev
Max Porshnev
Wed 17-Dec-2014 13:46
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1093093105&level=12yy
Enjoy. (It's impossible.)
Not impossible. 21 moves. Nice puzzle
Spoiler: 4←1↓2←1→2↓2→1↑1←1↑1←1↓1↑1←1↑2←1↓1→1←3↑5→1↓1↑1←2↓3←1↓1←2↑1↓3→1↓1←
Anonymous
Fri 19-Dec-2014 21:11
amazing
Anonymous
Sat 14-Mar-2015 01:06
i do believe http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=768 is impossible...

Solved. 40 moves. Probably can do less. Took 30 seconds.
Anonymous
Sat 14-Mar-2015 01:47
i do believe http://www.linusakesson.net/games/autosokoban/?v=1&seed=722222541&level=768 is impossible...

Solved. 40 moves. Probably can do less. Took 30 seconds.

I was all excited about solving 768 but I can't solve this one:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=123456789&level=1000
Is it solvable?
mporshnev
Max Porshnev
Tue 17-Mar-2015 18:33
http://www.linusakesson.net/games/autosokoban/?v=1&seed=123456789&level=1000
Is it solvable?
Of course, it is solvable. Spoiler: https://drive.google.com/file/d/0B8dVHtu9r5i-YUpQdXF1anFhZ00/view?usp=sharing , but that's definitely not the shortest way. :-)
Anonymous
Wed 8-Jul-2015 17:25
On 2009 you posted "when I got time, I'll publish the source code". I hope 6 years later you can have spare time to share you knowledge with us! :)
Anonymous
Tue 25-Aug-2015 01:12
This one seems impossible:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1278908319&level=4
lft
Linus Åkesson
Tue 8-Sep-2015 17:52
This one seems impossible:
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1278908319&level=4

Not at all. But it's a nice find!
Anonymous
Wed 9-Sep-2015 01:16
Ah. Yes. You are right! Why didn't I see that...
Anonymous
Fri 5-Feb-2016 14:25
Addictive: yes
Anonymous
Fri 12-Feb-2016 00:32
Truly amazing :) So, any chance that you will publish the algorithm someday ?
Anonymous
Tue 22-Mar-2016 23:56
Can I use the generated levels is a app that will have extra packs that the user will buy it? The credits I will cite you page. Thanks
lft
Linus Åkesson
Wed 30-Mar-2016 00:41
Can I use the generated levels is a app that will have extra packs that the user will buy it? The credits I will cite you page. Thanks

Hi! I saw your mail about this; sorry for not replying sooner. Yes, you can use levels that you got from my level generator. But don't hook up the app directly to the online generator, because that would increase my bandwidth requirements. Include a credit and a link to my page somewhere.

The same permission is hereby granted to anybody else who wants to do the same.
Anonymous
Fri 6-May-2016 07:01
On 2009 you posted "when I got time, I'll publish the source code". I hope 6 years later you can have spare time to share you knowledge with us! :)
Yeah I am working on a similar problem and would be curious how you did this.
Anonymous
Sun 11-Sep-2016 13:10
That puzzle generator is amazing! Would be great if you could contribute generator and solver code to Simon Tatham's portable puzzle collection, so that it could be played anywhere. Actually, there is an implementation of Sokoban there in unfinished puzzles on git, but it lacks a good generation code.
Anonymous
Sat 3-Dec-2016 22:19
Very cool and addictive, would love to see the source! I may need to listen to the Zelda theme, but for the life of me, I can't figure this one out: http://www.linusakesson.net/games/autosokoban/?v=1&seed=2084139227&level=10

Linus, your site is my new homepage!

Cheers,

falk
Anonymous
Sat 3-Dec-2016 22:47
Very cool and addictive, would love to see the source! I may need to listen to the Zelda theme, but for the life of me, I can't figure this one out: http://www.linusakesson.net/games/autosokoban/?v=1&seed=2084139227&level=10

Linus, your site is my new homepage!

Cheers,

falk

nm, got it with the help of my wife. For an engineer, I really suck at puzzles!
ADent
Mikael Johansson
Sat 22-Apr-2017 02:52
Cool stubled on this just now!

My first "app" was a J2ME-midlet originally made for the SE T610. It was Sokoban, with the feature of "in-app-purchase" ;) Beeing able to download new level-sets from my webserver that kept the levels as strings in MySQL. The midlet sent max size of it's screen to the server and only got levels that fit. It worked very well on most j2me enabled phones i tried it on, even the low end ones. It can still be downloaded:

http://adent.dyndns.org/wap/apps/Sokoban/index.wml

But the level download feature does not work right now, shall try to fix it server side some time.

When everything kind-of-like worked the project was'nt fun any more... And also, lack of freely available levels...

It would be cool to finish it up some time.
Anonymous
Mon 24-Apr-2017 21:18
I dare you, solve this one
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1329696099&level=20
Anonymous
Thu 1-Jun-2017 01:34
I dare you, solve this one
http://www.linusakesson.net/games/autosokoban/?v=1&seed=1329696099&level=20

The level is actually not as difficult as you think.
Using the upper path as a one-way sliding door makes it easy.

To make it more interesting, you can actually eliminate the upper path as a one-way sliding door by adding a wall.
Like this:

#####-----
##--###---
#@--$-####
##-##----#
-#.*.-.$-#
-##$-$-$.#
--#-.$.-##
--#######-

Still relatively easy.
Anonymous
Mon 12-Jun-2017 13:04
How is the difficulty of the levels determined?
jc99
Joe Care
Thu 15-Jun-2017 04:05
On 2009 you posted "when I got time, I'll publish the source code". I hope 6 years later you can have spare time to share you knowledge with us! :)
Hi, Sokoban is still sooooooo addictive ...
Now it's 2017 how about the source code now ?
Or at least tell us more about your solution.
The first part I think is a base-room that you modify with several templates.
Anonymous
Tue 25-Jul-2017 23:16
I can't seem to figure out the level

http://www.linusakesson.net/games/autosokoban/?v=1&seed=1221090344&level=18

I got it almost solved, but I can't finish it, I always get the last two crates in a position where I can only push one of them into their place
Anonymous
Tue 25-Jul-2017 23:24
I can't seem to figure out the level

http://www.linusakesson.net/games/autosokoban/?v=1&seed=1221090344&level=18

I got it almost solved, but I can't finish it, I always get the last two crates in a position where I can only push one of them into their place

Okay, just as I had posted this comment I finally solved that level (in 33 moves). It's still pretty tricky.