Unrelated to the above, but I have been playing with Flexible Difficulty and Flexible AI quite a bit and I have been supprised how rarely the difficulty is changed. In particular once one civ gets a big lead it seems very hard for any other civ to reduce difficulty. I have guessed this is because the 1 civ in the lead is resulting in a large standard deviation, which means mean - 1.5*SD is very low. I wonder if you have considered using median and
MAD instead of mean and SD. I think that would stop 1 single civ from influencing it so much, but I could be wrong.