Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

keep_elitism only works whencrossover_type==None #132

Open
Labels
bugSomething isn't working
@mxflknbrg

Description

@mxflknbrg

With PyGAD 2.18.0 thekeep_elitism=1 paramter was introduced. Apparently this only works when no crossover operation is selected. This is a strange behavior, because in my understanding Selection(e.g. Elitism) and Crossover build on each other. A normal (simplified) generation cycle should therefore look something like this:

  1. Init
  2. Evaluate fitness
  3. Selection (e.g. steady-state, rank, elitism)
  4. Crossover (e.g. one-point, uniform)
  5. Mutation (e.g. random, swap)
  6. -> 2.

To summarize, I would expect the elitism parameter to allow some of the best parents to pass unchanged into the next generation. This is not the case, and therefor the fitness value didn't converge.
Compare the lines 1348 - 1373 of the pygad.py file

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp