← Back to Articles

Video game auto-follow and the vehicle steering problem

The horse auto-follow mechanic in Assassin's Creed as a practical illustration of path following, graph search, and the autonomy stack in mobile robotics.

The Assassin's Creed series by Ubisoft includes a mechanic called horse auto-follow. When the character is mounted, there is the option to follow the roads or paths in the game. The effect is simple: the character follows the trail with their horse, camel, or creature to a destination without the player having to keep steering across the map. If no destination is selected, the mount wanders and, at each crossroads, the player can choose whether to follow the left or right path.

In AC Shadows, this feature had disappeared at launch. The game displayed the ideal route on the map, but the mount no longer followed the road automatically. Ubisoft later reintroduced it in a patch, likely in response to player feedback.

How it works

The mount does not enter auto-follow mode in any situation. For the mechanic to activate, the character must already be relatively close to a road or game path. If the player is too far from these roads — in the middle of an open field or crossing vegetation — the feature returns an error indicating it is unavailable.

When conditions are favorable, the behavior is quite elegant. The mount first makes an approach curve to reach the nearest road. Once on the road network, it then follows the path automatically, leading the character along the game's road network to the marked goal.

If the game allowed activating this feature at any point on the map, it would first need to find an optimal path between the horse's current position and the road network, avoiding trees, stones, buildings, and terrain features. That would already be a complete autonomy problem on its own.

Horse auto-follow in Assassin's Creed Shadows. The white curve on the ground is the road spline the mount is tracking.
Horse auto-follow in Assassin's Creed Shadows. The white curve on the ground is the road spline the mount is tracking.

Even with this simplification, some limitations in the mount's behavior are still observable. Sometimes, on approach to the road, the horse navigates around obstacles in a somewhat odd way or ends up stuck against a lateral obstacle. On other occasions, already following the path, it can widen its trajectory too much on tighter bends and, if the bend is sharp enough, end up blocked by a scenery element. These deviations are quite revealing about the structure of the underlying algorithm.

Technical description

Roads in the game are modeled as a network, that is, an undirected graph where intersections function as nodes. Each edge is modeled by splines that capture the shape of the road. This representation is important because it allows the path to be modeled mathematically and, crucially, allows projecting the character's position onto the different curves.

To solve the displacement, the system must handle path finding. In unstructured environments, algorithms such as RRT* would be needed to create and solve a network — something that does not exist in the game. On the structured road network, graph search algorithms such as A* are used. Since the player does not start on the road, the system computes the projection of the current position onto the nearest spline. This is an optimization problem that needs to be fast and unambiguous, which is why the feature is limited by proximity.

Once the path is defined, using the dynamic model of the character and its turning constraints, a path following algorithm executes. It sends commands to the mount — essentially accelerate and steer — to keep it as close to the road as possible.

Path following for a steering-wheel vehicle. The controller minimizes deviations in lateral position and heading from the nominal path. From <a href='https://www.researchgate.net/publication/348556688_Motion_Control_of_a_4WS4WD_Path-Following_Vehicle_Dynamics-Based_Steering_and_Driving_Models'>this paper</a>.
Path following for a steering-wheel vehicle. The controller minimizes deviations in lateral position and heading from the nominal path. From this paper.

Because the system has limits and the algorithm must be tuned to adapt to the character model and road curvature, following problems appear. If the bend is too aggressive, the control system cannot converge in time to avoid collision with lateral elements. In AC Shadows, some adjustments are visible and the mount's speed is also adjusted to handle tighter bends.

Assisted navigation also operates when no goal is marked on the map. The game simply follows the road, choosing an arbitrary path that the player can adjust at intersections. This can be called assisted driving: the player handles path finding while the control algorithm handles steering the mount.

Conclusion

This example is useful because it shows in practice the same layers that compose the autonomy stack for most mobile robotics vehicles operating in at least partially structured environments.

In the end, it is the same arrangement applied to today's autonomous cars. They operate in what can be called a semi-structured system: there is a road network that gives the nominal direction, which is well-structured on its own, but the algorithm must constantly deal with traffic, construction, and other agents (vehicles, pedestrians).

It is the kind of detail that goes unnoticed for most, but for those who work with robotics, it turns the simple crossing of a digital map into a practical demonstration of control and navigation.