Skip to content

Manipulate solution before saving it as parent #271

Open
@Overdrivr

Description

@Overdrivr

Hi,

Thank you for this wonderful lib. I'm experimenting with PyGAD on a scheduling problem, and I'm facing a bit of difficulty.

My fitness function performs a multi-agent simulation (using python lib "mesa"), takes an input planning and returns a single score.

The challenge I'm facing is that the input (="theoretical") planning (that's provided by PyGad to the fitness function) is not usable 1:1 by the agents. For instance, if the planning tells the agents to do something that's impossible (for instance, starting operation B before operation A was complete), the agent will skip the operation and move to the next doable one.

At this point, the challenge I'm facing is that pygad converges to a solution, but it's really bad, and much worse than a planning generated with basic heuristics.

I have a couple of questions about this :

  • My simulation can return the "real" planning, derived from the input one. I have the intuition that due to the fact that the planning executed by agents is different from the one provided as input solution, this really breaks the optimisation process. I have the hypothesis that if I could modify the selected parent after each generation to edit its gene and replace the theoretical planning by the one actually executed by the agents, this would drastically improve the performance of the convergence. Is this doable ? I saw there's a post parent selection hook, but I'd probably need a pre-parent selection hook do this.
  • I'm a bit new to genetic algorithms, I do have experience using optimizers though (but ones that required gradients to perform, like L-BGFS and the like). On your experience, is GA a likely candidate for the type of problem I'm trying to solve here ? (scheduling problems with constraints and non linearities)

Thanks a lot for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions