-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (30 loc) · 1.17 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from neuralAbalone import NeuralAbalone
#from standardEstimators import StandardEstimators
from gene import Gene
from geneCreator import GeneCreator
from breeder import Breeder
if __name__ == "__main__":
# Learning rate for the model
#LEARNING_RATE = 0.001
# How many steps
#STEPS = 5000
#How many units in each layer? (only if the layer exists obvious..)
#UNITS = [10 , 10, 10]
#confs = Gene( LEARNING_RATE, STEPS, UNITS )
population = 4
nGenerations = 4
creator = GeneCreator()
breeder = Breeder()
generation = breeder.getFirstGeneration( population )
generation = breeder.run( generation , 1 )
for i in range ( 0 , nGenerations ):
print( "\n\n\n########################## GENERATION: " + str(i) + " ##########################")
generation = breeder.getNewGeneration(generation , population)
generation = breeder.run( generation , 1 )
best = breeder.takeBest( generation )
#best.toStr()
print("we reach a loss of: " + str( best.level) )
#nn = NeuralAbalone( confs )
#loss = nn.run()
print( "\n\n\n########################## IN THE END ##########################")
print("we reach a loss of: " + str( best.level) )