 Perruchet and Gallego have demonstrated a method for calculating this optimal path using calculus in a different way.They propose that the dog optimizes its behaviour on a moment-to-moment basis, choosing at each moment the path that allows it to maximize its speed of approach to the ball.This requires the dog to be able to accurately estimate its speed on both land and water, but does not rely on the premise that the dog plans the entire route in advance.