2
$\begingroup$

I am using the following library: https://github.com/vishnugh/evo-NEAT

which seems to be a pretty simple NEAT-implementation. Therefore I am using the following Config:

package com.evo.NEAT.com.evo.NEAT.config;

/**
 * Created by vishnughosh on 01/03/17.
 */
public class NEAT_Config {

    public static final int INPUTS = 11;
    public static final int OUTPUTS = 2;
    public static final int HIDDEN_NODES = 100;
    public static final int POPULATION =300;

    public static final float COMPATIBILITY_THRESHOLD = Float.MAX_VALUE;
    public static final float EXCESS_COEFFICENT = 1;
    public static final float DISJOINT_COEFFICENT = 1;
    public static final float WEIGHT_COEFFICENT = 5;

    public static final float STALE_SPECIES = 2;


    public static final float STEPS = 0.1f;
    public static final float PERTURB_CHANCE = 0.9f;
    public static final float WEIGHT_CHANCE = 0.5f;
    public static final float WEIGHT_MUTATION_CHANCE = 0.5f;
    public static final float NODE_MUTATION_CHANCE = 0.1f;
    public static final float CONNECTION_MUTATION_CHANCE = 0.1f;
    public static final float BIAS_CONNECTION_MUTATION_CHANCE = 0.1f;
    public static final float DISABLE_MUTATION_CHANCE = 0.1f;
    public static final float ENABLE_MUTATION_CHANCE = 0.2f ;
    public static final float CROSSOVER_CHANCE = 0.1f;

    public static final int STALE_POOL = 10;
}

However, there are way too much species (about 60). I do not know how to reduce this number, given the fact that the COMPATIBILITY_THRESHOLD is already maximized.

So what's my fault?

Note: I am not using: http://nn.cs.utexas.edu/keyword?stanley:ec02 since this algorithm seems not to work in a changing environment (where fitness can vary hardly)

$\endgroup$
1
$\begingroup$

Your species count will increase as the chance of mutation increases. This is because in every generation, so many genes will be mutated that they have little resemblance of each other, and the distance function doesn't factor in historical markings / innovation numbers.

Try lowering the mutation rates.

Below is the distance function from here page 110

$$\delta = \frac{c_1E}{N} + \frac{c_2D}{N} + c_3 \cdot \overline{W}. $$

If your fitness vary a lot, try ranking the fitnesses in each specie and setting the survival chance based on its rank.

If you mean a large action space by changing environment, you can set the number of output nodes to the total number of actions, and rank each action, best to worst, then pick the best available action for the state.

$\endgroup$
0
$\begingroup$

If the compatibility distances are coming out to be > float.max that tells me something may be wrong with that calculation, I would suggest setting break points and debugging that code, I usually have my threshold set 5-10 and can noticeably tell when a change in species size when i move the threshold to something like 10

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.