Related to the optimization of the control parameters of physics simulation, I'm trying to form an intuition about the properties of the related fitness function landscapes. It's impossible to accurately visualize the landscapes of high-dimensional biped motor control and planning problems, but here's a simple 2d physics example: throwing a ball in 2d with the angle and speed as the optimized variables, and allowing damped rebounds from the ground so that the ball trajectory is not just a simple parabola. This isn't exactly rocket science, but I wrote the code to as an exercise in interactive visualization in Matlab, which I stopped using while working outside Aalto.
It was my first time I tried to do implement the "up and down the ladder of abstraction", that is, letting the user explore a summary view (the fitness landscape) to browse concrete examples (the ball trajectories). There was some non-intuitive searching for the right places to put the getCursorInfo(), pause() and subplot() commands to prevent the display from freezing - hope this helps if anyone wants to do the same. I also tried to implement the UI using Matlab's linked data, but couldn't get the display refreshed.
Edit 29.1.2013: I was asked why there's peaks where there should be a continuous ridge. It's apparently because of the large timestep that causes a simulation error that varies as a function of how the floor contacts align with the timestep grid. It also depends on how the contact handling is implemented. The Matlab code below uses a smaller timestep and produces a more continuous ridge.
Here's the Matlab code:
%step over all ball launch speed and angle combinations
%simulate the ball trajectory for this launch velocity
%save this trajectory point
%update closest to target
%bounce from floor
if (pos(2)<0 && vel(2)<0)
%store the whole trajectory
%soft threshold for hitting time
%store fitness function value for these params
%plot the fitness surface
%get the handle for querying data cursor info about the fitness
dcm_obj = datacursormode(h)
%plot a trajectory of the ball
%in a loop, keep plotting the ball trajectories
info_struct = getCursorInfo(dcm_obj);
axis([0 4.5 0 3])
%have to pause to let the display refresh