Code Monkey home page Code Monkey logo

sokoban-solver's Introduction

Sokoban Game Solver & Solution Previewer

This is a web wrapper, playable sokoban game, editor and visualiser for sokoban solving, using Python through Web Assembly. All client side

Live application - https://dangarfield.github.io/sokoban-solver/

Sokoban Solver

I wanted to help my 4 year get through some of the push the box levelss on his little camera and I couldn't, so I adapted this and added an additional presentation format.

All of the hard work relates to https://github.com/KnightofLuna/sokoban-solver.

Installation

Usage

  • You can edit the initial levels in levels.txt, adding more levels, solutions are grids as appropriate
  • Click any cell to cycle between floor, wall, block, target and player. There are interim states (target-block, target-player) that are ommtted fr the sake of simplicity in setting. You can always edit the level files (space = floor, # = wall, B = block, . = target, & = player, X = block on target, % = player on target)
  • New grids can be added and existing grids overwritten by saving. All saved grids are stored in your browser's localStorage
  • Play the game with WASD or ArrowKeys, press Escape of space to restart from the saved map
  • Click Solve to solve the game and interate through the solution with Prev and Next buttons - Solutions are cached, but some solves take a long timeß

Algorithms

  • See KnightOfLuna's explanation here - https://github.com/KnightofLuna/sokoban-solver
  • Summary - Graph is solved through one of 4 methods, Breadth First Search, Depth First Search, Uniform Cost Search and A* Search. The default method for solving is A* Search, configurable in main.js

sokoban-solver's People

Contributors

dangarfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sokoban-solver's Issues

Microphone permission?

Hmm, so like, why does the website wanna use my mic? And when I allow the permission, the whole "solver loading..." problem fix itself. What's the deal with that? But whenever I block the microphone permission it will stuck at "solver loading..." again.

"Solver loading..." endless

Hi Dan,
I just found your code. When I upload it to my Apache web server, the browser shows a loading status for the 'Solve' button as 'Solver loading'. On your demo website, however, it just shows 'Solve'. Locally on my computer, I experience the same behavior, also with Apache. I suspect there might be something else I need to configure. Is it ensured that the website automatically detects Python or via the loaded scripts, or do I need to set something up?
I'm just curious to get it up and running.
Merry Christmas, Tino. 😊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.