Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genetic Algorithms #24

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Genetic Algorithms #24

wants to merge 20 commits into from

Conversation

JietseV
Copy link

@JietseV JietseV commented Nov 30, 2021

This is the pull request of the final project in the STMO course 2021-2022.
Contributors: Jordi Verbruggen and Jietse Verweirder

@MichielStock
Copy link
Owner

Hi Jordi and Jietse,

Your project looks to be in very good shape!

Small remarks:

  • I personally think a heatmap is more clear than a 3d surface plot, but this is personal taste,
  • the first figure is a bit grainy?
  • you might allow me to change the objective?
  • you can leave your code blocks visible. Suppress the docs with a ; at the end
  • in rand_init_pop, by using . or other smart things you can make sure pop is not an Any vector. Concrete types greatly improve performance. For example pop = [ ... ] always yields a concrete type. Fix this for your other functions as well
  • minima_himmelblau => would give the objective here, could easily work for arbitrary 2D functions, no?

solving the Any[] vectors seems to be the only 'critical thing'. Good job!

@FaustSchotte
Copy link

Hi Jordi and Jitse,

I think your project looks really good. I don't have any remarks on the actual coding part of your project.
However, I did spot some typos in your project which are easy to clean up:

  • In the section initial population: I think there is a typo at permutation size. Should "higher change" not be "higher chance"?
  • In the termination criteria section: "Herefore" is used instead of "Therefore"
  • Under Roulette Wheel Selection: you typed "an thus resulting" instead of using "and"
  • Under the crossover section: for "random parings of parents" this should be "pairings", and in the same paragraph "devided" should be "divided"
  • The complete algorithm: "sart" should be "start"

@natclaret
Copy link

https://github.com/natclaret/Ant_Colony_Optimization.jl/blob/master/geneticalgorithms.jl

Awesome notebook! I especially like your interactive parameter sliders / gif element. I also appreciate the paragraph you include after, that explains what we’re seeing in the graphic.

Linked notebook: Sorry, couldn’t get the pull request working right so I saved a local copy of your project, edited it, and put it in my repo – so that's what the link is for.

  • For the most part I fixed some typos. In a very few spots I made subjective changes, like slightly rewording a sentence or changing the boldface. Since that is mostly dependent on someone’s personal taste I only did it if I was convinced that it was a good/helpful change. 😊
  • I did not alter your code at all. Everything looked good to me.

Other remarks / feedback: To be clear, your content is great as is. Obviously I was looking for things to offer feedback on, so some of this is kind of picky stuff. See below:

  • roulette_wheel_selection(population fitness): the formula you give for the function has variable names that don’t seem to exactly match the formula names you use in the function. I suggest you update the formula to match the function or vise versa.
  • “Defining the initial population” section: you say “diversity” must be taken into account. Maybe add another sentence to explain that in more detail. What does it mean for the population to be diverse?
  • “Fitness” section: Is it common that the fitness function can bottleneck the algorithm? Is this a drawback of using GAs or would you say that other comparable optimization techniques would suffer just as much from an inefficient cost function?
  • “The code goes as follows” statements before each function: sometimes you have them italicized and sometimes in normal face. Change them all to a matching style.
  • “Selection” section: The sentence “Note that an individual can be selected more than one time, otherwise the population would not change.” It’s not obvious to me why this is true?
  • “Roulette Wheel Selection”: an image of a Roulette wheel might be helpful here.
  • “Rank selection”: This sentence is confusing – “In rank selection, the fitness values can even be negative, as it is their rank that counts and not their actual value.”. I don’t think it fits well there.
  • “Crossover”: I would leave out “This is a specific case of a N-point Crossover technique” unless you explain what N-point crossover technique means.
  • Maybe add a comment to let the reader know when we’ve stopped talking about various selection techniques and are moving onto another aspect of GAs.
  • “Mutation” section: What is a Gaussian deviate?
  • “Mutation” section: You mention “the change is getting smaller”- changes in what? Is it that the evolution rate is slowing and the offspring population more closely resembles the parent population?
  • “Mutation” section: Before giving the function code, can you mention which of the given mutation strategies you are going to exemplify?

Again, really nice work, Jordy and Jietse! I enjoyed reading it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants