Yağız Selek
All projects

A* Grid Pathfinding · Case study

Separating path search from movement.

A Unity grid experiment in which search, tile state and agent movement are separate components.

Represent the problem

GridManager and Node represent the search space. Walkable and blocked tiles have visible states, so it is easier to distinguish a pathfinding issue from an incorrect obstacle or grid setup.

Choose which node to explore

The search skips blocked neighbours and uses Manhattan distance as its heuristic. The candidate comparison uses the lower heuristic as a tie-break when scores match. Parent links are used to reconstruct the route.

Keep route generation independent

PathFinder returns a route for AgentMover to follow. I would move the goal check after the full candidate selection and test single-candidate and blocked-route cases before relying on this exercise as a production pathfinder.

References

Implementation evidence

  • A* on a tile grid

    Separates grid, node, search and movement. Uses Manhattan distance, excludes blocked tiles and reconstructs the route from parent links.