Hacker News new | past | comments | ask | show | jobs | submit login

Amit describes the differences here [2], but briefly:

- The Wiki pseduocode uses Set data structures for everything. While these are covered in classes, the up-tree concept isn't as heavily described as other trees

- Looking at it now, it looks like the pseudocode is a little more beginner friendly, but "back in mah day" it was not

- Although, RedBlob's pseudocode for obtaining neighboring nodes is clearer than "for each neighbor of current" (Wikipedia pseudocode)

- RedBlob uses Priority Queues and Maps instead of Sets, which connect better to other AI searches / recommendation algorithms. Higher 'priority' recommendations move to root in PQs while nodes in Sets... don't... they just sort of 'exist'

- The Maps make looking up node costs more intuitive than lists (aka "current := the node in openSet having the lowest fScore[] value")

[2] https://www.redblobgames.com/pathfinding/a-star/implementati...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: