Ignore:
Timestamp:
08/05/23 00:58:45 (10 months ago)
Author:
Maciej Komosinski
Message:

Added comments, formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/base/experiment_niching_abc.py

    r1271 r1272  
    141141            newpop.append(Individual().copyFrom(ind))
    142142
    143         pop_offspring = population+newpop
     143        pop_offspring = population + newpop # this is OK for NSGA2, but TODO verify if this should also be used for NSLC?
    144144        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?)
    146146            self.do_nslc_dissim(pop_offspring)
    147147        elif self.fit == "nsga2":
     
    156156            # saved generation has been completed, start with the next one
    157157            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
    160159        else:
    161160            self.initialize_evolution(self.genformat, initialgenotype)
     
    190189        parser.add_argument("-fit",type= str, default="raw",
    191190                        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")
    194192        parser.add_argument("-normalize",type= str, default= "max",
    195193                            help="What normalization to use for the dissimilarity matrix: max (default}, sum, or none")
Note: See TracChangeset for help on using the changeset viewer.