[ase-users] Some question about Genetic Algorithm
Steen Lysgaard
stly at dtu.dk
Mon Mar 19 11:23:04 CET 2018
Hi Dianwei,
________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of Dianwei Hou via ase-users <ase-users at listserv.fysik.dtu.dk>
Sent: Sunday, March 18, 2018 9:23:16 PM
To: ase-users at listserv.fysik.dtu.dk
Subject: [ase-users] Some question about Genetic Algorithm
Hi,
I do some test about genetic algorithm examples on ase website and have some questions.
I assume you a referring to the tutorial on optimization of particles on a substrate: https://wiki.fysik.dtu.dk/ase/tutorials/ga/ga_optimize.html
This example application of the GA does not employ generations it only keeps a pool of structure/candidates in the population. After a candidate has been evaluated it is added to the population (if it is fit enough) before selection of parents for the next candidate is performed.
Firstly, for some parameters,I am not sure.
population_size = 20: the number of structures in each generation.
n_to_test = 100: maximum number of generations allowed for the simulation.
Is that right?
The population_size is the number of candidates kept in the population at all times, and all the candidates in the population are considered when selecting parents for a new candidate. n_to_test is the number of candidates to evaluate before the script terminates.
Second, I put the code in a file and submit the job. When it finished, does it finish calculation of one generation or one hundred generations. If it finished one generation, is it generated new structures for the second generation and stored new structures in database. So if I want to continue to optimization the second generation structures, I will to submit the job again.
It performs n_to_test number of evaluations. If want to continue you resubmit to perform another n_to_test evaluations evolving the population further. The candidates are created on the fly (in the get_new_individual function call) before the evaluation takes place.
If you want to employ generations in your GA optimization, which is traditional, but not necessarily optimal in a parallel computing environment, you can do so by deferring the pop.update() call until after the for loop that selects parents and creates offspring. For an example see https://wiki.fysik.dtu.dk/ase/tutorials/ga/ga_fcc_alloys.html#run-the-algorithm
Best regards,
Steen
Thank you very much!
Best regards,
Dianwei Hou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180319/18ed8504/attachment.html>
More information about the ase-users
mailing list