Giter Site home page Giter Site logo

pathfind's People

Contributors

jj101k avatar

Watchers

 avatar

pathfind's Issues

Drop x/y

Relating to path nodes or positioned nodes: drop the directly introspectible position.

Larger sizes are unexpectedly likely to fail

For 1000 this is a 100% failure rate, and it reliably fails in 1ms - far less than it takes to succeed on smaller maps.

I don't see why this would happen disproportionately.

Some off-path nodes are no longer marked

Not sure what happened here, but the image now has "dandruff" in the form of white nodes inside the pathing area. While this might be nothing, it might be an indication of a real problem

Drop backwards checks if possible?

I don't remember exactly what this was, but it was something about walking backwards through nodes to get their total cost or something.

Add an explicit zero test

Having a test with no obstructions and opposite corner points will produce a stable performance test

Try actual LS maps?

This is currently using completely random noise, which is computationally tough in its own way but not representative of the target scenario

Replace cost sort with plain min

            let route = possible_routes.sort((a, b) => a.getCost(this.gridMap) - b.getCost(this.gridMap))[0]

That's not what should be done, we just want the smallest one. It still needs to examine all of them but it should be O(n) not O(n log n)

Get 250x running fast

Oh hey, past me. Just think how times change.

At 250x250 this takes something like 400ms to do produce a path of length ~800. In other words, ~500us per path step, although it doesn't work out as a constant number. At the time when this TODO was first added, it might have taken 1000ms, I don't really know.

While an actual Laser Squad map is only 50x100 (so 5,000 nodes not 62,500), demonstrating that this is at all viable means showing a low cost on modern hardware for a high workload. In 400ms there's time to do >1bn operations on modern hardware, ridiculously expensive.

Implement true 4-bit mode

Use a grid of 4-bit values. At the moment this uses objects with some approximation of 4-bit storage but should really use a contiguous sequence of bytes.

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.