jj101k / pathfind Goto Github PK
View Code? Open in Web Editor NEWAn attempt to produce a simple, low-memory, low-cost pathfinding algorithm. For fun.
License: BSD 2-Clause "Simplified" License
An attempt to produce a simple, low-memory, low-cost pathfinding algorithm. For fun.
License: BSD 2-Clause "Simplified" License
WebAssembly will be closer to the expected code, and may run faster.
Relating to path nodes or positioned nodes: drop the directly introspectible position.
At the moment, the build action is:
../wabt/build/wat2wasm core.wat -o core.wasm
It should at least be an NPM thing
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.
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
I don't remember exactly what this was, but it was something about walking backwards through nodes to get their total cost or something.
Example error at 400:
RuntimeError: index out of bounds index.js line 823 > WebAssembly.Module:566:1
It should not do that
Having a test with no obstructions and opposite corner points will produce a stable performance test
The numbers are only useful when debugging the direction numbers
This is currently using completely random noise, which is computationally tough in its own way but not representative of the target scenario
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)
The display just freezes anyway
This is to communicate what the colours mean
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.
They used to default to black or grey, are now white.
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.
They're just white on white
The big problem here is dynamic storage
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.