Browse files

Update scoring weights

  • Loading branch information...
1 parent ce8fa53 commit fb57e94a039853e34a40586999a1f2c4d071c0d7 @Ttl committed Sep 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/sqrt.py
View
4 examples/sqrt.py
@@ -129,9 +129,9 @@ def _constraint1(f,x,k,**kwargs):
nodes=18
elitism=1#Best circuit is copied straight to next generation
mutation_rate=0.7
-crossover_rate=0.02
+crossover_rate=0.05
fitness_function=[_goalinv,_transient_goal_inv,_transient_goal_inv2]
-fitness_weight=[{'v(n2)':lambda x,**kwargs:(1000 if x>1 else 5000)/kwargs['extra'][0]+10*abs(kwargs['extra'][0]-1),'i(vc)':100,'i(ve)':100,'i(vin)':100},{'v(n2)':2,'i(vc)':30,'i(ve)':30,'i(vin)':30},{'v(n2)':2,'i(vc)':30,'i(ve)':30,'i(vin)':30}]#Current use is weighted very heavily
+fitness_weight=[{'v(n2)':lambda x,**kwargs:(100 if x>1 else 500)/kwargs['extra'][0]+10*abs(kwargs['extra'][0]-1),'i(vc)':50,'i(ve)':50,'i(vin)':50},{'v(n2)':10,'i(vc)':10,'i(ve)':10,'i(vin)':10},{'v(n2)':10,'i(vc)':10,'i(ve)':10,'i(vin)':10}]
extra_value=[(0.8,2.0)]
constraints=[_constraint1,None,None]
constraint_weight=[10000,0,0]

0 comments on commit fb57e94

Please sign in to comment.