diff --git a/rgbAI/lib/func.py b/rgbAI/lib/func.py index 0ffbfc0..575b0c8 100644 --- a/rgbAI/lib/func.py +++ b/rgbAI/lib/func.py @@ -87,7 +87,7 @@ class AIlib: obj.weights[i] -= obj.learningrate * gradient[i]["weight"] # mutate the weights obj.bias[i] -= obj.learningrate * gradient[i]["bias"] - def learn( inputNum:int, targetCost:float, obj, curCost: float=None ): + def learn( inputNum:int, targetCost:float, obj, theta:float, curCost: float=None ): # Calculate the derivative for: # Cost in respect to weights # Cost in respect to biases diff --git a/rgbAI/main.py b/rgbAI/main.py index f58bc28..3573591 100755 --- a/rgbAI/main.py +++ b/rgbAI/main.py @@ -29,7 +29,7 @@ class rgb(object): return cost def learn( self ): - ai.learn( 3, 0.001, self, 0.0001 ) + ai.learn( 3, 0.001, self, 0.001 ) def think( self, inp:np.array ): print("-----Gen " + str(self.generation) + "------")