The charge is part of the state
transcript
A robot carries parcels in a warehouse. It has a limited battery for each trip. Some stations have a charger for it.
An aisle uses charge equal to its length. Charging takes a fixed time. It fills the battery completely.
The battery holds ten units. Two aisles leave two units. The third aisle needs four.
Charge at station one, and it arrives in seventeen. Charge only when needed, and it is stranded.
The state holds the station. It also holds the charge left. The two together decide the future.
Run Dijkstra on pairs of place and charge. Use a heap ordered by time. The first time the goal leaves the heap is the answer.
In the interview, say what the state is. Say why a station is not enough. And say how big the state space is.
The states are stations times charge levels. That is small when charges are small. So the search is fast enough.
Put the charge in the state. Then run Dijkstra. Full breakdown in the lecture.