Giter Site home page Giter Site logo

knightofluna / sokoban-solver Goto Github PK

View Code? Open in Web Editor NEW
49.0 2.0 15.0 77 KB

推箱子解决方案 sokoban AI solver

Home Page: https://github.com/KnightofLuna/sokoban-solver

Python 100.00%
search-algorithm sokoban-solver sokoban-game ai mechine-learning

sokoban-solver's People

Contributors

knightofluna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sokoban-solver's Issues

算法优化

你好 请问可以改进死锁和剪枝的优化吗,稍微复杂的情况,5min都出不来结果,其他solve可以1min内出结果

该solver实现的heuristic function不是admissible heuristic function

即,如README描述,设定为“到目当前状态为止,所有箱子按顺序排列的位置和所有目的地按顺序排列的位置,两两间的manhatten distance总和”是可能大于真实需要步数的(从README中,A*算法在level1中不能得到最优解RurrddddlDRuuuuLLLrdRDrddlLdllUUdR也可以说明此问题)。
提供两个简单的admissible heuristic function的想法:

  1. 对每个箱子,寻找距离其与最近的目标的曼哈顿距离,求和;
  2. 对每个箱子和每个目标,使用曼哈顿距离构造代价矩阵,并使用Kuhn–Munkres算法求解得到最优匹配总开销;
  3. 1或2中的方法,但增加人物和任一/最远(的未到位)箱子的曼哈顿距离 - 1。

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.