Changeset 1272 for framspy/evolalg/base
- Timestamp:
- 08/05/23 00:58:45 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/base/experiment_niching_abc.py
r1271 r1272 141 141 newpop.append(Individual().copyFrom(ind)) 142 142 143 pop_offspring = population +newpop143 pop_offspring = population + newpop # this is OK for NSGA2, but TODO verify if this should also be used for NSLC? 144 144 print(len(pop_offspring)) 145 if self.fit == "nslc": 145 if self.fit == "nslc": # TODO should NSLC be also equipped with a novelty archive? (with an admittance threshold?) 146 146 self.do_nslc_dissim(pop_offspring) 147 147 elif self.fit == "nsga2": … … 156 156 # saved generation has been completed, start with the next one 157 157 self.current_generation += 1 158 print("...Resuming from saved state: population size = %d, hof size = %d, stats size = %d, archive size = %d, generation = %d/%d" % (len(self.population_structures.population), len(self.hof), 159 len(self.stats), (len(self.population_structures.archive)), self.current_generation, generations)) # self.current_generation (and g) are 0-based, parsed_args.generations is 1-based 158 print("...Resuming from saved state: population size = %d, hof size = %d, stats size = %d, archive size = %d, generation = %d/%d" % (len(self.population_structures.population), len(self.hof), len(self.stats), (len(self.population_structures.archive)), self.current_generation, generations)) # self.current_generation (and g) are 0-based, parsed_args.generations is 1-based 160 159 else: 161 160 self.initialize_evolution(self.genformat, initialgenotype) … … 190 189 parser.add_argument("-fit",type= str, default="raw", 191 190 help="Fitness type, availible types: niching, novelty, knn_niching (local), knn_novelty (local), nsga2, nslc and raw (default)") 192 parser.add_argument("-archive",type= int, default=50, 193 help="Maximum archive size") 191 parser.add_argument("-archive",type= int, default=50, help="Maximum archive size") 194 192 parser.add_argument("-normalize",type= str, default= "max", 195 193 help="What normalization to use for the dissimilarity matrix: max (default}, sum, or none")
Note: See TracChangeset
for help on using the changeset viewer.