Skip to content

How to initial population with a specified solution #50

Description

@yasser9372

Hi.
I want to add an specific solution in first population.
for example in this population:

# Define population.
indv_template = BinaryIndividual(ranges=[(-2, 2), (-2, 2)], eps=0.001)
population = Population(indv_template=indv_template, size=50).init()

i want to add a solution like [-1, 1] in first population.
I tried this but i got error:

def init(self, chromsome=None, solution=None):

how can i do this??
thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions