forked from benjamin22-314/evolving-simple-organisms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adhoc_tests.py
27 lines (21 loc) · 839 Bytes
/
adhoc_tests.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
from random import random
import numpy as np
from organism import Organism
from run import settings
# print(np.dot(np.random.uniform(-1, 1, (5, 4)), [1, 2, 3, 4]))
a, b = [2,3]
print(a)
print(b)
print((8 in []))
organisms = []
for i in range(0, 5):
wih_init = np.random.uniform(-1, 1, (settings['hnodes'], settings['inodes'])) # mlp weights (input -> hidden)
who_init = np.random.uniform(-1, 1, (settings['onodes'], settings['hnodes'])) # mlp weights (hidden -> output)
organisms.append(Organism(settings, wih_init, who_init, name='gen[x]-org['+str(i)+']'))
print(organisms[0])
print(organisms[0].name == organisms[0].name)
print(organisms[0].name == organisms[1].name)
print(organisms[0] is organisms[0])
print(organisms[0] is organisms[1])
print(organisms[0] == organisms[0])
print(organisms[0] == organisms[1])