Skip to content

Commit

Permalink
Corrected the Cooperative coevolution example, Stopped the CMA-Plotti…
Browse files Browse the repository at this point in the history
…ng example to output data, and removed the empty Competitive example.
  • Loading branch information
fmder committed Feb 5, 2013
1 parent 98df40e commit 3dee963
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions doc/examples/coev_coop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ The first step is to create a bunch of species that will evolve in our
population.

.. literalinclude:: /code/examples/coev/coev_coop_evol.py
:lines: 72-74
:lines: 75

Cooperative coevolution works by sending the best individual of each species
(called representative) to help in the evaluation of the individuals of the
other species. Since the individuals are not yet evaluated we select randomly
the individuals that will be in the set of representatives.

.. literalinclude:: /code/examples/coev/coev_coop_evol.py
:lines: 77
:lines: 79

The evaluation function takes a list of individuals to be evaluated including
the representatives of the other species and possibly some other arguments.
Expand All @@ -42,11 +42,11 @@ usual, something like this ::

The evolution can now begin.

.. literalinclude:: /code/examples/coev_coop_evol.py
:lines: 66-68,85-97,103-105,111-113
.. literalinclude:: /code/examples/coev/coev_coop_evol.py
:lines: 87-99,105-107,115

The last lines evolve each species once before sharing their representatives.
The common parts of an evolutionary algorithm all present, variation,
The common parts of an evolutionary algorithm are all present, variation,
evaluation and selection occurs for each species. The species index is simply
a unique number identifying each species, it can be used to keep independent
statistics on each new species added.
Expand Down
1 change: 0 additions & 1 deletion doc/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Genetic Algorithm (GA)
ga_onemax
ga_onemax_short
ga_knapsack
coev_comp
coev_coop

Genetic Programming (GP)
Expand Down
2 changes: 1 addition & 1 deletion examples/es/cmaes_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ def main(verbose=True):
plt.show()

if __name__ == "__main__":
main()
main(False)

0 comments on commit 3dee963

Please sign in to comment.