Create a file that contains object *and* movement data that can be imported to Blender
My first option would be to use python to implement your algorithm and run it directly in blender to position the balls directly.

Another option would be to read the first file to create and position the balls then keyframe the positions. Then read the next file using the data to move each corresponding ball to the new location and keyframe. Repeat. You would only need a text file with 3 values per line, these would be absolute coordinates in the first file but could be absolute or distances moved for following files.

Blender has an importer/exporter for MDD files (Lightwaves MotionDesigner format). It is only about 100 lines for the exporter so shouldn't be hard to follow. There is also a mesh cache modifier that can use the MDD file to alter a mesh object. While this format is designed for mesh deformation data per frame, you could define a mesh with a vertex at the location of each sphere, then use dupliverts to place a sphere at the location of each vertex in blender.