zuzkajelcicova / CS454-Automated_patching_using_GP

4 stars 0 forks source link

Questions regarding my initialization #1

Open bunverdenz opened 5 years ago

bunverdenz commented 5 years ago

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

  1. @zele-git what is your preferred Input and Output type? You will use my result from Loop_population function, so do you think it should ArrayList ?? (Patches is the list of insertion, deletion, replacement)
  2. @zuzkajelcicova @Asdf11x Could you check line 23 and 26? Is there anything that I should convert more? But you can tell me after you finish your part, cuz it will be clearer for you to think. I will just resolve it according to your work.
  3. @zele-git Do you think you will use my Loop_population function after you do GP stuff (Crossingover, mutation) Is my input correct? (ArrayList)

Please check it out. image

bunverdenz commented 5 years ago

Forgot to mention. Please check my file in dev/gp_fitness branch

zuzkajelcicova commented 5 years ago

@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).

zuzkajelcicova commented 5 years ago

@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) . patch

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.) applypatches

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).