This code adjusts the initial conditions and the period to make the y coordinates of the end masses 0 and the x coordinate of the middle mass 0.
Debugging it took a while and provoked this.
This is the one step improvements on each of the 16 new initial configurations, and their RMS errors at the bottom.
This was the result of adjusting the periods of several of the given configurations to improve the periodicity.