Added pyeo. Some changes needed to be made for include files and the like

in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess])

eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone.
This commit is contained in:
maartenkeijzer 2003-01-05 16:31:50 +00:00
commit 131e0e033d
40 changed files with 2300 additions and 18 deletions

View file

@ -0,0 +1,25 @@
from maxone import *
import unittest
class TestSGA(unittest.TestCase):
def test(self):
evaluate = EvalFunc()
init = Init(20)
mutate = Mutate()
xover = Crossover()
pop = Pop(50, init)
for indy in pop: evaluate(indy)
select = eoDetTournamentSelect(3);
cont = eoGenContinue(20);
sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont);
sga(pop)
print pop.best()
if __name__=='__main__':
unittest.main()