Open bunverdenz opened 5 years ago
Forgot to mention. Please check my file in dev/gp_fitness
branch
@bunverdenz I will have a look at everything later today and reply asap. I also modified a few things in my part that will most likely relate to your code (will update it soon).
@bunverdenz this is the current Patch object I created. So one individual in the population is defined as List of Patch (we might though wrap all the modifications directly in the Patch object, and thus one Patch object will be directly one individual) .
However, we are not collecting all ASTs at once as you are doing - we want to avoid it. If we had e.g. 40 ASTs we want to evaluate, they just take storage and we do not need them at once. As we talked last time: 1) We loop through the population 2) Take an individual 3) Apply patches of this individual to our original AST 4) Convert it to JAVA 5) Try to compile and run it 6) If the code compiled and tests were executed, evaluate the fitness 7) Repeat steps 1-6 until we have tested every individual in the population
Below is an example of applying patches of an individual to AST (you might just call this method on every individual in your part while looping, and I will take care of applying the modifications on the tree. This way, we will also prevent from being able to call insert/replace/delete from anywhere.)
As a result, you might expect either an .xml or already .java file being available, so you would try to compile, test, and evaluate it (I will think about it in detail).
My part is actually after Line 29 in GP_Fitness.java. Before that part I just used your function, and we can revise it later But I have questions about my part
Loop_population
function, so do you think it should ArrayListLoop_population
function after you do GP stuff (Crossingover, mutation) Is my input correct? (ArrayListPlease check it out.