You are here

More Progess and I'm Really Liking Python

Week7 (Jul 22 – July 26, 2013):

Monday: Read through the Pyevolve tutorial to get a better understanding of the code we are using for genetic programming, looked into how to write code for a logarithmic function into the pyevolve_ex18a_gp.py source code, and had a meeting with Charles and Thomas about writing a log function and looking at source code to find evaluation function in GPopulation file, and evolve function in GSimpleGA. http://physics.nmt.edu/~raymond/software/python_notes/paper002.html helped me to use log in source code, however now I’m not seeing decimals in my leaves so I’m going to mention this to Charles tomorrow.

Tuesday: In pyevolve_ex18a_gp.py, my mentor increased the max_depth from four to six in the main_run function, setGenerations from 50 to 100, setPopulationSize from 80 to 100. This was performed to test whether or not a tree could be produced that would have decimals as its leaves; it was successful. After the ‘print best’ line (which was the last line of code for the original file pyevolve_ex18_gp.py), Charles wrote some code for me to implement so as to print the best to a file. Also, Charles wrote code so as to plot target and evaluated data (in Pylab) as time series and against each other and to print figure function to output figure to file. After implementing code from Charles, a tree was output but without decimals in the leaves and some errors occurred. I attempted to trouble shoot afterwards.

Wednesday: Made another run with the code and finally got a tree with decimals, and later received code from Charles to iterate through the sil_regression_values_1999.txt rows to find maximums, minimums, and norm values. I applied new code (with changes to setGenerations from 100 to 10 and setPopulationSize from 1000 to 10 to test code quickly) that Charles wrote on paper and on the interpreter to fit where he suggested on the script. The new script created and saved target evaluation time series and target vs. evaluation Pylab images based on sil_regression_values_1999.txt data.

Thursday: Made another run of pyevolve_ex18a_gp.py with setGenerations from 10 to 100, setPopulationSize from 10 to 100 and viewed outputs. Later, made another run of pyevolve_ex18a_gp.py with setPopulationSize from 1000 to 2000, imported Selectors from Pyevolve so as to implement ga.selector.set(Selectors.GRouletteWheel). This last run produced leaves with no decimals.

Friday: I showed Charles what the code was producing and he was pleased by the result. He mentioned that it was getting closer to what he was expecting and I was surprised by his reaction. I kind of had a feeling that it was looking good (based on some of background research I had to read) but I wasn’t sure until Charles said so. Eventually we moved on and made more changes to the code and got different output. There were quite a few changes perforrmed and we are getting closer to the desired result. I may not be coming up with the fabrication ideas but at least when I do implement them, I am applying what I have learned by making the right changes when it doesn’t work.