An introduction to pathfinding