## According to PLA, a particle takes the path that minimises the action between 2 points but how does the particle know where it'll be in the future?

When you apply Hamilton's principle (to be precise about which principle of stationary action we are talking about), you ultimately get a *differential* equation for the particle's path. That is, even though the principle tells you that the action for the path *as a whole* must be stationary, it also governs each *infinitesimal piece* of the path.

It is not hard to see why. If the particle goes from [math](x_1, t_1)[/math] to [math](x_2, t_2)[/math], and on the way it passes through the point [math](x_i, t_i)[/math], then in order for the entire path from [math](x_1, t_1)[/math] to [math](x_2, t_2)[/math] to have stationary action, it must be true that the two halves of the path: the path from [math](x_1, t_1)[/math] to [math](x_i, t_i)[/math], and the path from [math](x_i, t_i)[/math] to [math](x_2, t_2)[/math], must each individually have stationary action. Otherwise, if one of the two does not have stationary action, the action of the entire path is not stationary with respect to a perturbation that affects only that half.

Now divide up the path into an infinite number of infinitesimal steps (warning: handwavy physicist logic). At each infinitesimal step along the particle's path, the principle of least action imposes a constraint on the particle's next step. If the particle obeys that constraint at each infinitesimal step, it will end up traversing a path with overall stationary action. You could say that the particle only "thinks" an infinitesimal step into the future; it has no idea it is going to end up at [math](x_2, t_2)[/math] until just before it gets there.

Say you have a free particle and it's travelling in a straight line at constant speed (as we know it must). Say it has travelled from [math](x_0, t_0)[/math] to [math](x_0 + v(t - t_0), t)[/math] so far. The particle does not know that it will eventually end up at [math](x_0 + v(t_1 - t_0), t_1)[/math]. However, it can plan out the next infinitesimal step it will take, to determine where it will be at time [math]t + \delta t[/math]. If it goes to the location [math]x_0 + v(t - t_0) + v\,\delta t[/math], the overall path from [math](x_0, t_0)[/math] to [math](x_0 + v(t - t_0) + v\,\delta t, t + \delta t)[/math] can have stationary action. But if the particle were to take an infinitesimal step anywhere else---to [math](x_0 + v(t - t_0) + \delta x)[/math] where [math]\delta x \neq v \,\delta t[/math]---then it will no longer be obeying Hamilton's principle since its path so far will have been from [math](x_0, t_0)[/math] to [math](x_0 + v(t - t_0) + \delta x, t + \delta t)[/math] but its path will not have been the straight one, the path of stationary action. So the particle is forbidden from changing its direction, because as soon as it proceeds an infinitesimal distance in another direction, it begins to violate Hamilton's principle! So Hamilton's principle forces the particle to keep going along the same straight line at the same speed, all the way through. Each piece of the path then has stationary action, which implies that the entire path does.

So that's how the particle ends up obeying Hamilton's principle even though it is not receiving any information from the future about where it end up.

If you then ask *why* the particle should care about Hamilton's principle at all, Feynman also explains that---with the famous *path integral* formulation. But that might be beyond the scope of the question.