Skip to content

The population length of the algorithms.Population is not constant #43

@drvinceknight

Description

@drvinceknight

@GitToby noticed this:

It is possible for the population size to both increase and decrease.

The increase would happen only once and is essentially due to the self mutations (as opposed to the standard GA where all new entrants in to a population are from crossover). The decrease happens because this line: https://github.com/Axelrod-Python/axelrod-dojo/blob/master/src/axelrod_dojo/algorithms/genetic_algorithm.py#L109 should in fact be:

size_left = self.size - len(self.population)

I think that no matter what we should fix the decrease. (And add tests about the population size). My student is going to take a look at the performance of various variants (are the self mutations helpful?) and then we could potentially take a look at modifying the algorithm and/or adding a few more variants (in which case we need to document that the algorithm has these self mutations which for some choice of parameters can mean the first generation increases the population size).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions