BFS and recharge moved to agentwithmap