Skip to content

Froleyks/sokoplan

Repository files navigation

Sokoplan

Encode the generation and solving of a Sokoban level into pddl.

Running

git clone https://github.com/aibasel/downward.git
./sokoPlan.py level.soko_constraint > level.pddl
./downward/fast-downward.py --alias seq-sat-lama-2011 domain.pddl level.pddl
./parse.py level.soko_constraint sas_plan.1
  • sokoPlan.py encodes generation and solving to pddl
  • The plan is decoded by parse.py into a .soko level file and its solution. The correctness of the solution is validated by an external tool.

Example of soko_constraint file

  • First section are the fixed elements.
  • The following sections give the optional locations for the elements WALL, BOX, GOAL and PLAYER in that order. Note that the total number of boxes must equal the total number of goals and that there may only be one player.
####
#  #
#  ###
#*   #
#    #
#   ##
####
; 1
####
#  #
#  ###
#    #
#    #
#???##
####
; WALL 1
####
#  #
#  ###
#    #
#????#
#???##
####
; BOX 1
####
# ?#
#  ###
#    #
#    #
#   ##
####
; GOAL 1
####
#  #
#  ###
#    #
#    #
#???##
####
; PLAYER 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published