traxaber / cs435-p2

0 stars 0 forks source link

Code Review #8

Open William-Vigo opened 4 years ago

William-Vigo commented 4 years ago

https://github.com/angdav/cs435-p2/blob/7773ebbbc02f04d5968b58217efb4db4635591ad/p6.py#L78

Instead of storing both G and H cost in dictionary you could store F = G + H, at the end of the day you are never comparing to the individual cost function just the total F.

traxaber commented 4 years ago

I agree that it isn't functionally different to separate G and H, but it's more intuitive, especially relative to the algorithm, to keep them separate in this implementation. It's much easier to understand what the heuristic is, when the data is separated as G and H.