A nice challenge - thank you!
this is my approach... (platformer behavior but can changed to physic behavior)
This balls try to evaluate the perfect jump strength not to collide with the wafes.
They do not calculate but set the jump strength related to their success.
(no ball interaction so far).
(each ball can have different start values)
If you 'connect' the balls you get a more komplex looking object.
demo
http://www.gameus.de/c2/learnjump
source
http://www.gameus.de/c2/learnjump/lrn2jmp.capx
the math of cause can be optimized to optimize the learning graph...
with the 'perfect' math it will result in a type of swarm intelligence