Feb22010

# As to the remaining distance there are many ways to

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: dered –  Look at adjacent nodes, and add all walkable nodes to the open list •  I.e., ignore walls, water, or other illegal terrain •  For each of these squares, note that their parent node is the starDng node, A State of A* ager the ﬁrst step has completed. All adjacent nodes are part of the open list. The circle with line points to the parent node. The blue outline around the green start node indicates it is in the closed list. –  Remove A from open list, add to closed list •  Open list –  Contains nodes that might fall along the path (or might not) –  A list of nodes that need to be “checked out” •  Closed list –  A list of nodes that no longer need to be considered UC Santa Cruz Computer Science – Game Design Where to go next… •  Now need to determine which node to consider next –  Do not want to consider all nodes, since the number of nodes expands exponenDally with each square moved (bad) •  Want to pick the node that is closest to the desDnaDon, and explore that one ﬁrst •  IntuiDve noDon of “closest” –  Add together: •  The cost we have paid so far to move to a node (“G”) •  An esDmate of the distance to the end point (“H”) UC Santa Cruz Computer Science – Game Design CompuDng the cost •  F=G+H –  Movement cost to get to desDnaDon •  G –  Movement cost to move from start node A to a given node on the grid •  Following the path generated to get there •  Add 10 for horizontal/verDcal move, 14 for diagonal move •  H –  EsDmated movement cost to move from that given node on the grid to the ﬁnal desDnaDon, node B –  Known as the heuris6c •  A guess as to the remaining distance •  There are m...
View Full Document

## This note was uploaded on 11/10/2010 for the course CMPS 101 taught by Professor Tantalo,p during the Fall '08 term at UCSC.

Ask a homework question - tutors are online