diff --git a/BNNBot_garage/BNNBot b/BNNBot_garage/BNNBot index 708a288..78a9543 100755 Binary files a/BNNBot_garage/BNNBot and b/BNNBot_garage/BNNBot differ diff --git a/BNNBot_garage/src/hebbian.nim b/BNNBot_garage/src/hebbian.nim index e6d4d01..ca597a0 100644 --- a/BNNBot_garage/src/hebbian.nim +++ b/BNNBot_garage/src/hebbian.nim @@ -1,5 +1,6 @@ import binary_encoding import std/math +import std/random const N_IN* = TOTAL_BITS # 870 @@ -31,7 +32,8 @@ type active*: bool proc initHebbianNet*(): HebbianNet = - discard # zero-init by default + for w in result.W.mitems: + w = rand(0.2) - 0.1 proc forward*(net: HebbianNet, input: BinaryVector): OutputVector = for j in 0..