04.01.2015 Views

A-Star Algorithm

A-Star Algorithm

A-Star Algorithm

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A-star <strong>Algorithm</strong><br />

‣ Use a new metric to decide<br />

which state to explore/expand<br />

‣ Define<br />

– h = heuristic score (same as<br />

always)<br />

– g = number of moves from start it<br />

took to get to current state<br />

– f = g + h<br />

‣ As we explore states and their<br />

successors, assign each state<br />

its f-score and always explore<br />

the state with lowest f-score<br />

g=1,h=2<br />

f=3<br />

g=2,h=1<br />

f=3<br />

Goal<br />

<strong>Star</strong>t<br />

g=1,h=1<br />

f=2<br />

g=2,h=1<br />

f=3<br />

g=3,h=1<br />

f=4<br />

© Copyright 2013 Brent Nash & Mark Redekopp, All Rights Reserved<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!