Commit 0394a073 authored by Antoine Roux's avatar Antoine Roux
Browse files

few minor changes

parent 1cc8c5ce
......@@ -487,10 +487,11 @@ if MODE == "PLAY" :
# plt.show()
if MODE == "GENETIC" :
nbrOfIndividuals = 30
nbrOfIndividuals = 20
nbrOfGenerations = 15
nbrOfEvaluations = 100
initValue = 30
nbrOfEvaluations = 10
initValue = 10
selectionRate = 0.2
myGeneration = Generation(nbrOfIndividuals, initValue)
generationCounter = 0
......@@ -498,12 +499,13 @@ if MODE == "GENETIC" :
generationCounter += 1
print(generationCounter)
if generationCounter < 5 :
selectionRate = 0.5
elif generationCounter < 10:
selectionRate = 0.35
else :
selectionRate = 0.2
# if generationCounter < 5 :
# selectionRate = 0.5
# elif generationCounter < 10:
# selectionRate = 0.35
# else :
# selectionRate = 0.2
myGeneration.evaluate(nbrOfEvaluations)
indexes = myGeneration.select(selectionRate, 0)
print(indexes)
......
......@@ -203,10 +203,10 @@ arrayGrid3 = [[4, 0, 0, 0],
[128, 32, 2, 0]]
# MODE = "PLAY"
MODE = "PLAY"
# MODE = "TEST"
MODE = "AI"
MODE = "MULTI_AI"
# MODE = "MULTI_AI"
##############################################
def evaluateGrid(givenGrid) :
......
No preview for this file type
16 9 19 22
14 12 24 8
26 24 18 20
13 27 3 24
18 16 22 17
5 7 19 16
21 15 16 21
16 14 13 13
22 6 22 20
9 19 27 17
17 5 12 12
13 19 15 15
8 2 8 22
14 11 26 18
16 19 16 5
17 10 14 12
20 30 29 29
22 4 10 0
28 17 0 12
8 3 22 24
19 17 20 18
5 7 16 14
12 16 9 28
18 5 20 9
11 20 5 21
13 4 22 17
7 13 23 25
12 5 23 9
16 1 16 15
13 8 28 24
19 9 21 5
22 11 0 3
19 18 15 23
19 8 16 8
16 22 13 14
15 8 20 19
24 21 29 27
13 17 18 5
21 9 2 16
6 15 26 25
19 13 22 25
22 25 16 7
4 24 27 4
19 20 16 25
18 7 2 18
17 13 23 17
4 28 26 16
22 14 18 14
1 3 0 30
15 14 25 13
13 30 12 5
12 10 28 22
12 10 21 16
7 2 23 5
25 23 25 13
11 26 1 23
15 20 11 2
21 1 13 2
11 13 1 14
6 2 1 10
20 11 19 16
8 10 22 25
18 8 14 17
22 6 13 3
14 12 17 18
7 1 16 2
7 25 12 27
15 8 14 16
22 0 13 26
23 21 12 7
17 29 29 5
4 11 15 10
21 9 18 29
21 22 25 11
28 26 12 27
16 29 6 25
14 10 9 14
9 19 28 14
14 17 20 10
25 5 9 14
14 16 14 10
14 1 14 2
9 19 6 20
10 5 7 13
25 22 23 18
3 13 16 27
17 7 7 30
22 2 26 3
29 12 29 25
5 30 26 11
15 1 4 20
4 27 30 27
17 27 18 29
18 3 13 11
18 14 11 20
13 2 25 21
7 7 8 24
11 7 20 7
10 27 12 16
13 9 21 19
9 16 3 12
12 6 27 12
6 14 23 23
5 8 18 0
15 8 8 19
17 13 19 9
11 21 26 14
4 9 16 5
13 19 3 14
5 30 29 5
9 25 19 16
28 0 19 25
19 20 13 16
4 21 22 16
13 16 13 23
25 1 22 14
14 25 8 30
14 3 17 23
9 12 23 28
19 2 28 19
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment