HOME BLOG ABOUT ME

## BLOG

Weekly Updates

### Week 13: Running the algorithm

##### 4.26.26

Last blog post before Capstone Weekend! Alright, let's talk about my progress from this last week...This past week has been a bit stressful. I have been working on wrapping up my user-interface (since I decided to add some parameters/features). Most importantly, Dr. McVey, Dr. Meyer, and I discussed ways to optimize the algorithm. Here is a video of progress on a run of the algorithm:

Stay tuned...!

### Week 11: In the home stretch

##### 4.12.26

We are close to the finish line! It has been an exciting week. I am currently running test cases for my algorithm. Testing allows me to 'see' the algorithm run (with small test cases, of course), including my operators: scoring, mutation, crossover to see that they're are working properly. By 'see', I mean be able to click through the pictures. My next steps are to finalize my user interface, continue testing my algorithm, and work on implementing my algorithm for my interface. Stay tuned...!

### Week 10: More functions and Updates!

##### 4.5.26

During this last week's capstone meeting, Dr. McVey, Dr. Meyer, and I discussed final details about my algorithm and user interface. Some of the details include the following...Let me take a step back real quick ~ a requirement of my application is to allow the user to interact with the algorithm (through the user interface)...therefore, we finalized what parameters to include in the application and how they will be used. We also discussed about the operators for my algorithm: selection, scoring, mutation, and crossover. Currently, I am still working on my final (and functional) methods of crossover - this method allows the crossover point [indicating where parentA crossover stops and parentB crossover begins] to be a randomly generated number. Stay tuned...!

### Week 9: Writing and testing functions

##### 3.29.26

Alright, we're back! This last week started off at a slower pace, but there was progress made. I reviewed my progress and the remainder of my to do list. Progress made: sorting is very close to being finished! (Scoring is the progress of comparing the Red, Green, and Blue [RGB] values of each pixel of a given image against a target image; Scoring allows the algorithm to rank 'Individuals' by their closeness to the target image.) What is left to do is decide how many pixels will be compared. Next, mutation and crossover are still in the works - what I mean with that is I am working on improving and my functions. Lastly, I will be getting started on my selection process. Once my operators are complete, selection is half-way complete. Stay tuned...!

### Week 8: Spring BREAK!

##### 3.22.26

This past week was Spring Break...not many updates at the moment! Stay tuned...!

### Week 7:

##### 3.15.26

This week is Spring Break! Before leaving for break, let's go through where I am at with my project and what I have left to do! Last week's blog entry was very exciting! This week might not be as much...sorry! For the algorithm, I am getting closer and closer to completing my testing for the following operators: crossover, mutation, and scoring. Testing now includes creating a population (code: an array of 'Individuals'; english: a collection of images with triangles)...this allows me to test my functions for any given 'Individual'. Scoring...well it is quite a bit of math. Soon I will be add more test cases to see how well my method for scoring is working. What I have left: I will continue to test and improve my operators to prepare it for my final algorithm. Within the next couple of weeks I will finalize my user interface (finally). I have decided to wait since I am indecisive... that's not true. I have decided to wait since I come up with new features and I don't want create new forms each time.

That is it for now - Stay tuned...!

### Week 6: Code, code, and more code and testing

##### 3.8.26

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

### Week 5: Design, Code, and Implement

##### 3.1.26

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

### Week 4: Time to (continue writing more) code!

##### 2.22.26

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

### Week 3: Let's draw!

##### 2.15.26

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

### Week 2: Research, research, and more research!

##### 2.8.26

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

### Week 1: Here we go...!

##### 2.3.26

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