Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Neat!

My StarCraft-playing bot uses a similar approach for fast pathfinding. The similarity is that we're both trying to use a better heuristic than straight-line distance. In the case of my bot, it's done by breaking the map into roughly-convex regions, then precalculating the distance from the center of those regions to every other tile by flood-filling. That lets units outside the region use (distance to boundary of goal region + straight-line distance from boundary to goal tile) as a pretty good heuristic.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: