[6152] | 1 | This package contains classes for doing certain kinds of coevolution: |
---|
| 2 | |
---|
| 3 | - 1-population competitive coevolution |
---|
| 4 | - 2-population parallel/parallel-previous competitive coevolution |
---|
| 5 | - N-population parallel/parallel-previous cooperative coevolution |
---|
| 6 | |
---|
| 7 | ECJ does not presently support N-population sequential cooperative coevolution, |
---|
| 8 | but there's no reason it couldn't -- it'd just need a special Breeder and one |
---|
| 9 | or two minor tweaks to the MultiPopCoevolutionaryEvaluator. |
---|
| 10 | |
---|
| 11 | "Parallel" methods are ones in which individuals are tested against other |
---|
| 12 | individuals from the current generation. |
---|
| 13 | |
---|
| 14 | "Sequential" methods are ones in which each subpopulation in turn is tested |
---|
| 15 | against other individuals, then undergoes breeding, before other subpopulations |
---|
| 16 | are tested against it. |
---|
| 17 | |
---|
| 18 | "Parallel-previous" is the term we use to describe coevolutionary methods in |
---|
| 19 | which individuals are tested against the *previous* generations' individuals |
---|
| 20 | rather than the current ones. |
---|
| 21 | |
---|
| 22 | Coevolution is largely defined by the form of evaluation, so this package |
---|
| 23 | contains mostly Evaluators of different kinds. The coevolution system places |
---|
| 24 | each coevolved "population" in a separate ECJ subpopulation. Fitness |
---|
| 25 | assessment in coevolution typically consists of three parts: |
---|
| 26 | |
---|
| 27 | 1. Preprocess the full population (all subpopulations) in some way |
---|
| 28 | 2. Perform various tests on groups of individuals |
---|
| 29 | 3. Postprocess the full population, which gathers all the test |
---|
| 30 | results and assesses fitness on the individuals. |
---|
| 31 | |
---|
| 32 | These three elements are embodied in a Problem form called GroupedProblemForm, |
---|
| 33 | which you are required to use. It shouldn't be surprising to you that |
---|
| 34 | your Problem subclass will need to understand what kind of coevolution it's |
---|
| 35 | being involved in and assess fitness appropriately. The GroupedProblemForm |
---|
| 36 | class is: |
---|
| 37 | |
---|
| 38 | ec.coevolve.GroupedProblemForm |
---|
| 39 | |
---|
| 40 | The evaluate(...) method in GroupedProblemForm is a bit unusual. You are |
---|
| 41 | given an array of individuals to test together -- the particular subpopulations |
---|
| 42 | from which the individuals are drawn depends on the coevolution method. The |
---|
| 43 | subpopulations in question are also provided to you as an array. You are also |
---|
| 44 | provided with an array of booleans indicating WHICH individuals are supposed to |
---|
| 45 | have their fitnesses updated each time. Last, you're given a boolean telling |
---|
| 46 | you whether fitnesses should be (temporarily) updated to reflect victories |
---|
| 47 | won rather than actual scores (as in the case of Single Elimination Tournament). |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | 1 POPULATION COMPETITIVE COEVOLUTION |
---|
| 53 | |
---|
| 54 | Here members of a single subpopulation are tested against one another in some |
---|
| 55 | fashion, often multiple times with multiple "testing partners", before their |
---|
| 56 | fitness is assessed. ECJ's implementation can be found in |
---|
| 57 | |
---|
| 58 | ec.coevolve.CompetitiveEvaluator |
---|
| 59 | |
---|
| 60 | This evaluator has a number of ways that individuals can be tested. First, |
---|
| 61 | there is the issue of competition style: |
---|
| 62 | |
---|
| 63 | - Single Elimination Tournament. Individuals are put into a |
---|
| 64 | single elimination tournament, and "winners" go on to compete |
---|
| 65 | further in the bracket. It's common for single elimination |
---|
| 66 | tournament to be defined such that the degree to which an individual |
---|
| 67 | rises in the tournament is defined as his fitness. You'll need |
---|
| 68 | to set a temporary fitness of individuals immediately during |
---|
| 69 | evaluate(...), rather than waiting for Step 3 above, since this |
---|
| 70 | "fitness" will determine which individual won a competition in the |
---|
| 71 | tournament. Afterwards in postprocessing you can then set the final |
---|
| 72 | fitness of the individual. Single Elimination Tournament requires |
---|
| 73 | that your subpopulation be a power of 2 in size. |
---|
| 74 | |
---|
| 75 | - Round Robin. Every individual is tested exactly once against every |
---|
| 76 | other individual in the subpopulation. |
---|
| 77 | |
---|
| 78 | - K Random Opponents (One Way). Each individual is tested against |
---|
| 79 | exactly K other individuals, chosen at random. |
---|
| 80 | |
---|
| 81 | - K Random Opponents (Two Ways). Each individual is tested against |
---|
| 82 | AT LEAST K other individuals, chosen at random. Here the other |
---|
| 83 | individuals are expected to have their fitnesses updated as well. |
---|
| 84 | In some cases an individual may have one or two more tests than |
---|
| 85 | the others. |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | 2 POPULATION PARALLEL/PARALLEL-PREVIOUS COMPETITIVE COEVOLUTION |
---|
| 92 | |
---|
| 93 | Here two subpopulations are pit against one another. Members from one |
---|
| 94 | subpopulation are tested against members of the other subpopulation. ECJ's |
---|
| 95 | implementation is found in |
---|
| 96 | |
---|
| 97 | ec.coevolve.MultiPopCoevolutionaryEvaluator |
---|
| 98 | |
---|
| 99 | Each individual in a subpopulation will be tested against certain individuals |
---|
| 100 | in the other subpopulation. This class allows you to specify how many of three |
---|
| 101 | kinds of individuals to test against: |
---|
| 102 | |
---|
| 103 | 1. The fittest individuals in the other subpopulation from the |
---|
| 104 | previous generation |
---|
| 105 | |
---|
| 106 | 2. Other individuals from the previous generation, selected via |
---|
| 107 | a selection method which you specify. |
---|
| 108 | |
---|
| 109 | 3. Random individuals from the current generation |
---|
| 110 | |
---|
| 111 | To implement 2-population methods, you'll need to set the number of |
---|
| 112 | subpopulations to 2. You are responsible for computing the fitness of |
---|
| 113 | individuals in competitive form. |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | N POPULATION PARALLEL/PARALLEL-PREVIOUS COOPERATIVE COEVOLUTION |
---|
| 119 | |
---|
| 120 | Here N populations are tested in collaboration with one another. Members from |
---|
| 121 | one subpopulation are tested by grouping them with a member each from the other |
---|
| 122 | subpopulations and assessing their joint fitness. ECJ's implementation is |
---|
| 123 | again |
---|
| 124 | |
---|
| 125 | ec.coevolve.MutltiPopCoevolutionaryEvaluator |
---|
| 126 | |
---|
| 127 | See above for more information about how this class works. To implement |
---|
| 128 | n-population methods, you'll need to set the number of subpopulations to N |
---|
| 129 | as appropriate. You are responsible for computing the fitness of individuals |
---|
| 130 | in some cooperative form. |
---|
| 131 | |
---|
| 132 | |
---|