“Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war” Code-Antworten

Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war

14 if node_successor is on the CLOSED list but the existing one is as good 
   or better then discard this successor and continue
Cherry berry

Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war

Get the square on the open list which has the lowest score. Let’s call this square S.
Remove S from the open list and add S to the closed list.
For each square T in S’s walkable adjacent tiles:
If T is in the closed list: Ignore it.
If T is not in the open list: Add it and compute its score.
If T is already in the open list: Check if the F score is lower when we use the current generated path to get there. If it is, update its score and update its parent as well.
Cherry berry

Ähnliche Antworten wie “Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war”

Fragen ähnlich wie “Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war”

Weitere verwandte Antworten zu “Was zu tun ist, wenn der Knoten bereits in einem* Algorithmus in der Nähe war” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen