Cold Enemy Gaming

We are Cold Enemy


Last Mile Logic in Route Planner AI

Last Mile Logic is the next feature of the Route Planner AI, which has made the whole system feel much more complete. As a game development student, I initially focused on getting people from point A to the correct station and then onto the main transit route. However, the more I worked on the project, the more obvious it became that the route still felt incomplete if I stopped thinking about it at the destination station.

After all, in real life, the journey doesn’t end when the train does.

You still have to get from the station to your final destination.

This final stretch may be short, but it still affects how useful a route feels.

If that final segment is inconvenient enough, it can make the entire journey seem worse than it really is.

This is where Last Mile Logic comes in.

Why does the last mile matter so much?

My experience with the first mile has already taught me that intermodal planning only becomes interesting once you stop pretending that people magically start their trip at a convenient station. The same thing applies at the other end.

A route can look great on paper, especially with fast rail, but if users still have to endure a frustrating final segment, the planner is not solving the whole problem. In a city, perhaps that final part is easy enough to ignore. Outside dense city centres, or when the destination is not directly connected, it becomes much more important.

For me, Last Mile Logic was therefore about properly closing that final gap.

Rather than ending the route with the message ‚You have arrived at the station‘, I wanted Route Planner AI to consider how users can actually complete their journey from there.

This required the addition of intermodal support for the final stretch, with options including:

    • walking
    • bicycle
    • e-scooter

This is when the route planner started to feel less like a station-to-station tool and more like a real travel planning system.


What I started building

The new goal was simple in theory: once the main transit route was known, it would calculate whether the destination should be reached by walking, cycling or using an e-scooter for the final segment.

In practice, Last Mile Logic became another layer of decision-making.

I wasn’t just asking, ‚Can the user get there?‘

I was also asking, ‚What is the smartest way to get there?‘

The answer depends on distance, convenience and, now, weather.

This final point ended up becoming much more important than I had expected.

An e-scooter recommendation only makes sense if the weather is acceptable. Similarly, a bicycle recommendation only makes sense if the route distance and conditions make it worth suggesting. Sometimes, the best answer is simply that the last stretch is short enough to walk and does not require anything more complicated.

So, the last-mile system started to behave less like a fixed feature and more like a small rules engine.

This made the recommendations feel more human.

One thing I added during this phase was a broader set of dynamic recommendation texts.

This may sound like a minor UI detail, but it mattered a lot to me. I did not want Route Planner AI to just dump numbers on the screen. I wanted the evaluation to be self-explanatory and easy to understand.

This involved adding more context-sensitive texts such as:

    • ‚The car is clearly slower than the ICE.‘

    • ‚Take the bike; the distance is too short for the car to be practical.‘

    • ‚This route works best if the final stretch is covered by e-scooter.‘

    • ‚Walking is enough here because the destination is already close.‘

This kind of feedback made the planner feel much less robotic.

As a Game Development student, I care a lot about readable feedback loops. In games, systems are easier to understand when players receive clear, context-aware feedback. I approached Route Planner AI in the same way. Users should not just see a ranking. They should also receive a brief explanation as to why a particular route has been selected.

A simplified version of that logic looked roughly like this:

if (carDuration > iceDuration + 20 * 60) {
  recommendation = "Car is clearly slower than ICE.";
} else if (distanceToDestination < 3000 && bikeAllowed) {
  recommendation = "Take the bike, the distance is too short for the car to make sense.";
} else if (lastMileMode === "escooter") {
  recommendation = "This connection works well with an e-scooter for the final stretch.";
} else {
  recommendation = "Walking is the simplest option for the last segment.";
}

The exact wording is less important than the principle. Route Planner AI should explain its choices in a natural-sounding way.

Settings menu with toggles for the Deutschland-Ticket, a fitness level slider set to "Low," and weather comfort range from 5°C to 24°C.
Adaptive Mobility Parameters.

The weather layer changed everything.

The other major addition in this phase was live weather data.

This ended up being a much better fit for the project than I initially expected because micromobility looks great in ideal conditions but much less attractive when the weather turns bad. If it is raining heavily, icy or very windy, the system should not recommend an e-scooter in the same way as it would on a calm, dry day.

I therefore incorporated live weather data into the decision-making process and introduced a user setting that allows people to specify the weather conditions under which they are willing to use an e-scooter.

This was important because weather tolerance is personal.

Some people are happy to ride an e-scooter in light rain.

Others are fine with a bike unless the wind gets too strong.

Others do not want any micromobility recommendations once the weather drops below their comfort level.

I did not want to create one universal weather rule and assume that it would suit everyone.

So, the settings became more personalised and practical. Rather than only selecting route preferences in a general sense, users can now influence whether these intermodal access segments should be calculated in certain weather conditions.

This did not only affect Last Mile Logic. It also influenced whether the first-mile segment should be considered at all.

This made the whole system feel more realistic.


This made the planner more believable.

I think this was one of the first moments when the Route Planner AI started to feel less theoretical and more realistic.

Before that, it was easy to imagine intermodal segments as an abstract routing trick. However, once weather was incorporated into the system, the recommendations started to resemble how a real person would actually decide.

Because, in reality, nobody thinks like this:

‚An e-scooter is mathematically possible, therefore I should definitely take it.‘

People think more like this:

    • ‚Is the final stretch annoying enough to justify a scooter?‘

    • ‚Is the weather OK for that?‘

    • Would a bike make more sense here?

    • ‘Is this segment so short that walking is easier anyway?’

This is exactly the type of reasoning I wanted the planner to adopt.


The reason I liked this phase is that…

What I liked most about this stage is that Last Mile Logic achieved two things simultaneously.

    1. Firstly, it improved route completeness.

    1. Secondly, it improved route explanation.

The planner no longer stopped too early and started to communicate its decisions more clearly. These two improvements complement each other more than I expected. A route feels much more reliable when it includes the final segment and provides a reasonable explanation for why that segment has been chosen.

This combination made the project feel more mature.

It’s not finished, but it’s definitely more mature.


What still needs to be solved?

This is not the final form of the system.

The weather-based decisions are useful, but they are still heuristic.

The micromobility recommendations are smarter now, but could become more nuanced.

The balance between the first mile, main transit and the last mile still needs to be refined over time.

However, compared to earlier versions, this is a significant step forward.

Now, Route Planner AI is helping users start their trips more effectively.

It is also helping them to finish it better.

And that matters just as much.

Final thought:

If the first mile makes a route possible, then Last Mile Logic is what makes the route feel complete.

That was the biggest lesson of this phase.

Adding bikes and e-scooters for the final segment made the planner more intermodal. Adding weather-aware settings made it more realistic. Adding dynamic recommendation texts made the route easier to understand.

For me, that was a good combination:

More complete routes, more believable decisions and a better explanation of why the planner recommends what it does.

This is precisely the direction in which I want Route Planner AI to continue developing.

Autoren-Avatar
CEG – Cold Enemy Gaming