diff --git a/lib/__pycache__/func.cpython-38.pyc b/lib/__pycache__/func.cpython-38.pyc new file mode 100644 index 0000000..f29ca80 Binary files /dev/null and b/lib/__pycache__/func.cpython-38.pyc differ diff --git a/lib/func.py b/lib/func.py index 00b67d6..3d1c1d2 100644 --- a/lib/func.py +++ b/lib/func.py @@ -3,5 +3,8 @@ import numpy as np def sigmoid(x): return 1/(1 + np.exp(-x)) -def correctFunc(rgb): - return ( rgb[0], rgb[1], rgb[2] ) +def correctFunc(rgb): # generates the correct answer for the AI + return ( rgb[2], rgb[1], rgb[0] ) # basically invert the rgb values + +def genRandomMatrix( x:int, y:int ): + return np.random.rand(x, y) diff --git a/main.py b/main.py index 4265cc3..f20d8f0 100755 --- a/main.py +++ b/main.py @@ -1 +1,17 @@ #!/usr/bin/env python + +from lib.func import * + +class rgb(object): + def __init__(self): + self.weights = 1 + + def think(self, inputMatrix): + print("thonk: " + str( sigmoid(self.weights) )) + +def init(): # init func + bot = rgb() + + bot.think(1) + +init()