I built this project to explore a small but interesting twist on the usual pathfinding problem: what happens when the agent doesn’t have unlimited fuel?
The idea is pretty straightforward. Normally, a pathfinding algorithm such as A* focuses on finding the shortest or most efficient route between two points. But when fuel becomes a constraint, the shortest path isn’t necessarily the route we want. The agent has to consider whether it can actually complete the journey with the fuel it has available.
I built a simple web interface using Flask where the pathfinding process can be interacted with and visualized. Under the hood, the routing logic uses graph-based pathfinding and adds fuel consumption to the decision-making process.
This turned a familiar AI problem into something a little more interesting. Instead of asking only “What is the shortest path?”, the system has to think about “Can I actually get there with the fuel I have?”
The project also leaves room for extending the simulation with things like obstacles, refuelling stations, different fuel consumption rates, and more complex environments.
It was a small project, but I liked how adding one simple constraint—fuel—changes the way a classic pathfinding problem has to be approached.