The beauty of Camsoft is that any sort of custom routine is easy to do.
That said, the closest empty spot is always going to be where you just took the tool from. If you needed to get tricky you could look at all empty spots and find the empty spot closest to your next tool and preposition the tool changer while you're still cutting.
Large changers from the era of the one pictured often ran only one direction. Rebuilding the unit for both directions could save a ton of tool change time.