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

ga_instance.continue() after pygad.load() #123

Closed
Labels
enhancementNew feature or request
@FeBe95

Description

@FeBe95

Suggestion:

I created a GA with pygad where the fitness function needs a lot of time to calculate (several minutes per fitness calculation). When I am manually stopping it by hittingCtrl+C I let the code continue and save the current state withga_instance.save("file"). When I start another run I load the last state withga_instance.load("file") and callga_instance.run() to continue with the current population. It would be neat to be able to continue the calculations without loosingga_instance.solutions etc., so when I callplot_fitness() my old data is still there. Currently withga_instance.run() everything gets reset to[].

Sample Code:

try:ga_instance=pygad.load("file")ga_instance.continue()exceptFileNotFoundError:ga_instance=pygad.GA([...])ga_instance.run()ga_instance.save("file")ga_instance.plot_fitness()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp