Weekly Updates
Well, I had a couple of (small, but meaningful) wins this past week. I have created initial implemenations for some of the operators: mutation, crossover, and scoring! At the moment, there is a lot of planning complete, but also a lot of coding to do. This upcoming week, my focus is completing the second, and potentially third implementations of each operator. For some clarification...this is what I mean with initial, second, and third implemenations: start small; each implementation of the operators works for say, one 'individual' (an object with an array of polygons, a score, and a bitmap image) or the use of hardcoded values. Below are images of each operator implemented within a Windows Form, an explanation of my work, my progress, and next steps...
Crossover: Taking two 'individuals' [think of them as parents] to create a new 'individual' [think of this as the child]. The function does this by taking fifty percent of each parents' polygons and create a new 'individual' [the child]. Observe the image below...the picture box on the left is parentA, the picture box in the middle is parentB, and the picture box on the right is the child. The next implementation will involve a population of 'individuals' and selecting two [parent] 'individuals' at random, still taking fifty percent of each parents' polygons. The final implementation will again have a population and [parent] 'individuals' selected at random, but a parameter will be added to determine the number of polygons each [parent] 'individual' gives to the new 'individual' [the child].
Mutation: Currently mutation is the following: taking an 'individual' and replacing a singular polygon. That's kind of it, honestly. The next
implementation will involve a population of 'individuals', in which an 'individual' will be selected at random, and a parameter will be used to
determine the number of polygons to mutate. Observe the image below...the picture box on the left is the original 'individual' and the mutated
image is on the right.
Scoring: The idea of scoring is to be able to find the best solution. For my genetic algorithm, scoring is done by calculating the difference of Red,
Green, Blue (RGB) values between the target image, and the image to score. The current implemenation is (very very) simple: two squares, a red and a blue.
I calculated the score, which is 510, |255-0|+|0-0|+|0-255| = 510.
Observe the image below. I will be testing the scoring function with more colors as well as using images of two colors...more to follow in the coming weeks.
scoring function: (|targetRED-toScoreRED|+|targetGREEN-toScoreGREEN|+|targetBLUE-toScoreBLUE|)
Stay tuned...!
Alright...! This past week was all about working on my 'Individual' data structure a bit more (by a bit more, I mean having to add another class to my project unexpectedly since Random [the class to randomly geneate numbers] was not functioning as I needed it to - but that is fixed!). Last week was all about Human Computer Interaction (HCI)... so, I have been working on my user interface, making changes and adjusting features to have a more user-friendly interface. This is still in the works currently. The focus for this upcoming week is coding the operators for my genetic algorithm: scoring, selection, crossover, mutation. As I mentioned last week, each operator will be its own C# project, meaning I will be desiging forms for testing each operator, as well as coding the operator itself. Next week, I will have more updates on my progress about operators and have a working (and user-friendly) interface. Also...here's an image of the 'Individual' data structure...
Stay tuned...!
Update from this last week...my data structures are coded and are working well! Late last week, I met with Dr. Meyer to discuss the topic of genetic algorithms. We talked about each operator that takes place while running the algorithm (population initialization, scoring, selection, crossover, and mutation) and how I can approach them to achieve my goal: developing an application to build an image from overlapping polygons to resemble an original image. As a result of that meeting, I have a strong understanding and much more confidence about my project as a whole, than I did before. Takeaways...see each operator of the algorithm as its own project. Next steps...create a C# project for each operator - this includes a form and functions. At this time I do not have any images to show, hopefully next week I will have plenty of polygon images to show off! Stay tuned...!
Well, this past week was a bit overwhelming, but we're making progress. Currently, I am able to draw triangles on the screen..and colors are blending! From Mini Sessions in class and meeting with Dr. McVey, I have received great feedback about where I am at with my project, as well as the many (and I mean MANY) ideas and decisions I need to think about and make.I have started to plan out the various components of my program and code. This includes data structures, values to hard code for my initial implementation of the genetic algorithm. Thus far, I have all of my planning completed, it is now just a matter of getting to work (although I am a bit nervous). This upcoming week, I hope to be a bit further with coding and design. Stay tuned...!
Finishing up week 2...heading into week 3! This past week, I did quite a bit of reading and research on genetic algorithms. I also found some code and resources for C# implemenations of genetic algorithms and how to draw polygons and blend colors/transparencies of overlapping polygons. Next step...think about the user interface and prepare for Mini Sessions in class this week. Stay tuned...!
Welcome to my first blog post of the semester! Projects were handed out early last week. We are now in week 2 - trying to get websites up and running. Where I am currently at: if you’re reading this, then you know my website is live! I am in the process of researching genetic algorithms and will continue to research about shapes, colors, and how to blend colors in C#. Stay tuned...!