Closed Akiira closed 9 years ago
From our discussion with Dr. Bui, we got several ideas for local optimization.
If I missed anything please feel free to add it. Are you partial to any of these? I think the first would be quite effective but will require a good deal of work to get right.
I wrote a very simple local optimization function. It searches a starting neighborhood and slowly expands outward. It actually works fairly well but I'm hoping its not too biased towards the given problem.
So this local optimization works a little too well. It runs way fast by itself then with the genetic algorithm. Try playing around with how often it is called in the simulation loop to see what i mean. This makes me think it might be very biased towards this problem. I don't know if that is bad or good.
So the case that we had so much trouble getting is when all three parameters are 0, so it makes sense that this does such a great job of finding it. Also all the other cases require a guess that is just slightly above the product of the two numbers, which becomes more likely as the ranges on the numbers decrease. I could imagine this being much less effective on a program with more parameters that aren't as directly related to one another and in cases where parameters must be selected from non-overlapping ranges in order to cover an edge or predicate.
We could make this more general by offsetting the parameter found by the median value of the range for each parameter. Or perhaps it would be more like typical local optimization to offset it by the parameter of a source test case instead of creating a new one.
I added these two types of local opt as well. I think it might actually be more useful to use several types of local opt. During the simulations run when it wants to try local opt it could pick one randomly or keeping trying all of them until one works.
As I think about it more the two local opts that don't take an organism are not really local optimizations. They are just a good starting point from which to search. This gives me two ideas.
I want to try at least 1. because I like the idea of having several "dumb" LOs rather than one super good one.
Writing this as a note to myself mostly. Other local opt ideas:
Pushing could be done by taking the current value for a parameter and adding half the distance from the parameter to the bound.
Can you just glance at this branch and make sure there is nothing obviously wrong with. I had been holding off merging into master until you had a chance to look at it. No rush though.
Seems good to me.
Do we want to use it and if so how?