Last change
on this file since 10677 was
6152,
checked in by bfarka, 14 years ago
|
added ecj and custom statistics to communicate with the okb services #1441
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | Copyright 2006 by Sean Luke |
---|
3 | Licensed under the Academic Free License version 3.0 |
---|
4 | See the file "LICENSE" for more information |
---|
5 | */ |
---|
6 | |
---|
7 | |
---|
8 | package ec.gp; |
---|
9 | import ec.*; |
---|
10 | |
---|
11 | /* |
---|
12 | * GPNodeSelector.java |
---|
13 | * |
---|
14 | * Created: Tue Oct 12 17:08:10 1999 |
---|
15 | * By: Sean Luke |
---|
16 | */ |
---|
17 | |
---|
18 | /** |
---|
19 | * GPNodeSelector is a Prototype which describes algorithms which |
---|
20 | * select random nodes out of trees, typically marking them for |
---|
21 | * mutation, crossover, or whatnot. GPNodeSelectors can cache information |
---|
22 | * about a tree, as they may receive the pickNode(...) method more than |
---|
23 | * once on a tree. But this should really only be done if it can be |
---|
24 | * done relatively efficiently; it's not all that common. A GPNodeSelector |
---|
25 | * will be called reset() just before it is pressed into service in |
---|
26 | * selecting nodes from a new tree, which gives it the chance to |
---|
27 | * reset caches, etc. |
---|
28 | * |
---|
29 | * @author Sean Luke |
---|
30 | * @version 1.0 |
---|
31 | */ |
---|
32 | |
---|
33 | public interface GPNodeSelector extends Prototype |
---|
34 | { |
---|
35 | /** Picks a node at random from tree and returns it. The tree |
---|
36 | is located in ind, which is located in s.population[subpopulation]. |
---|
37 | This method will be preceded with a call to reset(); |
---|
38 | afterwards, pickNode(...) may be called several times for the |
---|
39 | same tree. |
---|
40 | */ |
---|
41 | |
---|
42 | public abstract GPNode pickNode(final EvolutionState s, |
---|
43 | final int subpopulation, |
---|
44 | final int thread, |
---|
45 | final GPIndividual ind, |
---|
46 | final GPTree tree); |
---|
47 | |
---|
48 | /** Resets the Node Selector before a new series of pickNode() |
---|
49 | if need be. */ |
---|
50 | public abstract void reset(); |
---|
51 | |
---|
52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.