The basics of Sokoban level formats for designing your own Sokoban levels

Image for post
Image for post
A somewhat difficult Sokoban level, play in progress.

The “free form” SOK format

       ####
######## ##
# ###
# @$$ ## ..#
# $$ ## ..#
# ####
###########
Image for post
Image for post
      #####
##### #####
# #
# ### ### #
#### # # ####
# # * # #
# $ # *+* #
# # * # #
#### # # ####
# ### ### #
# #
##### #####
#####
Date Created: 2020-06-10  12:16:45                        
Date of Last Change: 2020-06-22 03:30:39 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: These levels are Copyright (c) by Alonso del Arte E-mail: sokoban@mail.com
Original level website: https://github.com/Alonso-del-Arte/ Collection: Illustrative
IllustrativeLevels, "Illustrative #01"    

#####
# ###
# #
# # # #
# # # #
#+$ # #
# #
#######

Author: Alonso del Arte
Email: sokoban@mail.com
Original level website: https://github.com/Alonso-del-Arte/ These levels are copyright (c) by Alonso del Arte and may be freely distributed for non-commercial use. Author's note: Although these are valid Sokoban levels, each with at least one valid solution, the purpose of these levels is to illustrate certain facts about Sokoban, or certain arrangements of initial state in Sokoban levels, or situations that sometimes arise in the course of trying to solve a Sokoban level.

Recording solutions in the SOK format

Best Solution 5/1                        
drruL
Solution 23/9
RdrUUUdddrruuuulLLulDDD
Best Solution 14/4 (YASO 2.142 Optimizer)                        drrULrruulDrdL                                                Optimizer: YASO 2.142                        
Optimizer time: 00:00:00
Optimizer date: 2020-06-10 22:56:58 Optimizer metrics: Pushes, moves

Solution 16/4
drrULdruruulDrdL
Solution/Moves 46/10                        urrdLDlddrUUlluurrrrrddlLDlddrUrUdlddrruruuLuL                                                Solution/Pushes 54/6 (YASO 2.142 Optimizer)                        urrdLulldddrrUlluurrrrrddlLuulllddddrrrrUdlddrruruuLuL                                                Optimizer: YASO 2.142                        
Optimizer time: 00:00:00
Optimizer date: 2020-06-10 14:12:39 Optimizer metrics: Pushes, moves
Solution 50/10 urrdLullddrdrdrrULUUluurrdLulDlldddrRdrddrruruuLuL

The XML-based SLC format

<?xml version="1.0" encoding="ISO-8859-1"?>                       <!DOCTYPE SokobanLevels SYSTEM "SokobanLev.dtd">                       <SokobanLevels>                         
<Title>Seemingly Hard</Title>
<Description>These levels may seem difficult, but they are
actually quite easy if one stops for a little bit to ponder the
puzzle before making the first move. Otherwise it may be necessary
to restart the level to recover from a deadlock situation.
</Description>
<Email>sokoban@mail.com</Email>
</SokobanLevels>
  <LevelCollection Copyright="Alonso del Arte" MaxWidth="32"
MaxHeight="15">
</LevelCollection>
    <Level Id="Hard #1" Width="13" Height="9">
<L> ### ####</L>
<L> # #### #</L>
<L> # $ #</L>
<L> # ### #</L>
<L>## ### ####</L>
<L># @ #</L>
<L># ## # ## #</L>
<L>#.#### #</L>
<L>### ########</L>
</Level>

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store