How would you design a routing algorithm for an automated guided vehicle (AGV) to prevent deadlocks in a narrow warehouse aisle for Kpi Solutions?