forked from s444420/AL-2020
Zaktualizuj 'route-planning.md'
This commit is contained in:
parent
ebc1bcbddd
commit
d7a13e144d
@ -59,9 +59,7 @@ for(var i = 0; i < neighbors.length; i++){
|
|||||||
addToOpenSet(openSet, neighbor);
|
addToOpenSet(openSet, neighbor);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
- Po przypisaniu kosztu do sąsiada dodajemy jego odległość do celu:
|
- Po przypisaniu kosztu do sąsiada dodajemy jego odległość do celu:<br>`neighbor.heuristic = getDistance(neighbor, goalField);`,
|
||||||
|
|
||||||
`neighbor.heuristic = getDistance(neighbor, goalField);`,
|
|
||||||
|
|
||||||
- ??????????: `neighbor.f = neighbor.gScore + neighbor.heuristic;`
|
- ??????????: `neighbor.f = neighbor.gScore + neighbor.heuristic;`
|
||||||
- oraz jego poprzednika: `neighbor.previous = current;`
|
- oraz jego poprzednika: `neighbor.previous = current;`
|
||||||
|
Loading…
Reference in New Issue
Block a user