Skip to content

Commit 79ea1b8

Browse files
committed
Add notes about weights for Issue #34
1 parent 4ed933e commit 79ea1b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ If you want just the A* search code (not the demo visualization), use code like
4242
// resultWithWeight is an array containing the shortest path taking into account the weight of a node
4343
</script>
4444

45+
A few notes about weight values:
46+
47+
1. A weight of 0 denotes a wall.
48+
2. A weight cannot be negative.
49+
3. A weight *can* contain decmial values.
50+
4551
### Original (slower) implementation
4652

4753
The original version of the algorithm used a list, and was a bit clearer but much slower. It was based off the [original blog post](http://www.briangrinstead.com/blog/astar-search-algorithm-in-javascript). The code is available at: https://github.com/bgrins/javascript-astar/tree/0.0.1/original-implementation.

0 commit comments

Comments
 (0)