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

Mutation prob and multi variate function #2

Open
aloukkal opened this issue May 23, 2018 · 0 comments
Open

Mutation prob and multi variate function #2

aloukkal opened this issue May 23, 2018 · 0 comments

Comments

@aloukkal
Copy link

Hello Haris,

First of all thank you very much for sharing this work. I have a question regarding mutation prob. You wrote if mutation_prob < 1 but as random.random() outputs values between 0 and 1, should we make it less than 1 ? and I have a question regarding multi variate objective function, how would you define the solutions and the mutation ? i did it this way:

def mutation(solution):
    mutation_prob = random.random()
    if mutation_prob <0.5:
        solution = [min_x+(max_x-min_x)*random.random(), min_x+(max_x-min_x)*random.random()]
    return solution

solution=[[min_x+(max_x-min_x)*random.random(),min_x+(max_x-min_x)*random.random()]  for i in range(0,pop_size)]

thanks

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

No branches or pull requests

1 participant