Giter VIP home page Giter VIP logo

Comments (4)

xudafeng avatar xudafeng commented on May 30, 2024

@myst729 是可以设置斜角的,diagonal关闭就好了

from astar.

myst729 avatar myst729 commented on May 30, 2024

设置如下,一直没变过
image

往返路线长度是不一样的
image image

另一个例子(根据你的实现,斜走和直走增加的G都是 1)
image image

同样的端点,往返路线可以不同,但长度不应该不一样,斜走部分的实现应该是有问题的。

from astar.

myst729 avatar myst729 commented on May 30, 2024

Matrix.prototype.rightDown 实现错了

image

from astar.

myst729 avatar myst729 commented on May 30, 2024

neighbors 获取是这个算法的一部分。除了正方形网格,类似下面这样的地图
image

还有更复杂的正多边形镶嵌
image

甚至不规则多边形镶嵌,差异都是在对 neighbor 的计算和处理上。这个应该是算法的可配置部分,建议还是不要放到算法外部吧。(不过我也只实现了正方形网格,懒……)

from astar.

Related Issues (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.