From 7a51c76f3f8cabfc2f81cf8a6ad0663c48039e75 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 17 Oct 2020 18:10:28 +0200 Subject: [PATCH] Tweaked the network --- rgbAI/main.py | 4 ++-- rgbAI/trained_data/2020-10-17_x8.txt | 31 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 rgbAI/trained_data/2020-10-17_x8.txt diff --git a/rgbAI/main.py b/rgbAI/main.py index df1e859..f38329c 100755 --- a/rgbAI/main.py +++ b/rgbAI/main.py @@ -7,11 +7,11 @@ class rgb(object): if( not loadedWeights or not loadedBias ): # if one is null (None) then just generate new ones print("Generating weights and biases...") - self.weights = [ ai.genRandomMatrix(3, 4), ai.genRandomMatrix(4, 4), ai.genRandomMatrix(4, 3) ] # array of matrices of weights + self.weights = [ ai.genRandomMatrix(3, 8), ai.genRandomMatrix(8, 8), ai.genRandomMatrix(8, 3) ] # array of matrices of weights # 3 input neurons -> 4 hidden neurons -> 4 hidden neurons -> 3 output neurons # Generate the biases - self.bias = [ ai.genRandomMatrix(1, 4), ai.genRandomMatrix(1, 4), ai.genRandomMatrix(1, 3) ] + self.bias = [ ai.genRandomMatrix(1, 8), ai.genRandomMatrix(1, 8), ai.genRandomMatrix(1, 3) ] # This doesn't look very good, but it works so... self.learningrate = 0.01 # the learning rate of this ai diff --git a/rgbAI/trained_data/2020-10-17_x8.txt b/rgbAI/trained_data/2020-10-17_x8.txt new file mode 100644 index 0000000..a08b8f0 --- /dev/null +++ b/rgbAI/trained_data/2020-10-17_x8.txt @@ -0,0 +1,31 @@ +[array([[ 0.663472 , 0.41281858, 0.35432133, 0.51654697, 0.30128169, + 0.61125425, 0.12824416, 0.57022693], + [-0.1193642 , 0.50021089, 0.68033888, 0.26198098, 0.31728985, + 0.45811986, 0.09201576, -0.09319653], + [-0.01187079, 0.52099344, 0.45390005, -0.03015151, 0.46498277, + 0.51502126, 0.63804829, 0.53824189]]), array([[ 0.18016866, 0.60791937, -0.20404823, 0.08990399, -0.05033332, + -0.08225963, 0.29963505, -0.27815606], + [ 0.18449808, 0.43927444, -0.04845178, 0.53328341, 0.64420625, + 0.04104459, -0.1278976 , 0.03197009], + [-0.15315493, -0.10153356, 0.6552515 , 0.19490518, -0.05890817, + -0.11421504, 0.06989618, -0.08307894], + [-0.09135586, 0.30840721, 0.48576483, 0.67942472, 0.2884017 , + 0.12948688, 0.74335114, 0.66117525], + [ 0.04180339, 0.09855898, -0.08983036, 0.68314281, 0.08859078, + -0.06552509, 0.69546397, 0.68314475], + [-0.29351704, 0.10465032, -0.16743309, 0.04157213, 0.56913974, + 0.43671001, 0.48578339, 0.37119113], + [ 0.22142061, 0.25642174, 0.24134435, 0.17945595, -0.20885076, + 0.34099268, 0.34027114, 0.35100756], + [ 0.67421573, -0.08107495, 0.4159875 , 0.00387256, 0.62741103, + -0.06146188, -0.08875579, 0.53884883]]), array([[ 0.02608 , -0.22600872, -0.11118185], + [-0.42425855, -0.03368622, -0.37062865], + [-0.60155648, 0.19081541, -0.87045635], + [ 0.30039832, -0.19428933, -0.13106259], + [-0.12102695, 0.11154671, -1.0141122 ], + [-0.33021794, 0.03743937, -0.51887829], + [-0.65143524, 0.0893009 , -0.92525977], + [-0.05812958, 0.57310427, -0.3258051 ]])] +[array([[ 0.09468388, 0.64740844, 0.20607014, -0.03533906, -0.1799001 , + 0.32695011, 0.17449872, 0.56778777]]), array([[ 0.62824449, 0.22028708, 0.27071181, -0.03390911, 0.39744529, + 0.25055866, 0.11580678, -0.19667358]]), array([[-0.43758743, -0.02608798, -0.63211097]])]