Skip to content

Commit 9eec529

Browse files
author
Lukas Molzberger
committed
refactored activation weight computation
1 parent 9d71070 commit 9eec529

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/main/java/network/aika/neuron/activation/Activation.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -437,20 +437,12 @@ public State computeValueAndWeight(SearchNode sn) throws RecursiveDepthExceededE
437437
netUB += x;
438438
}
439439

440-
double actValue = n.getActivationFunction().f(net);
441-
double actUBValue = n.getActivationFunction().f(netUB);
442-
443-
double w = Math.min(-ss.getNegRecSum(), net);
444-
445-
// Compute only the recurrent part is above the threshold.
446-
double newWeight = getNextDecision(currentOption, sn) == SELECTED ? Math.max(0.0, w) : 0.0; // TODO: Prüfen!
447-
448440
return new State(
449-
actValue,
450-
actUBValue,
441+
n.getActivationFunction().f(net),
442+
n.getActivationFunction().f(netUB),
451443
net,
452444
net > 0.0 ? (fired != null ? fired : 0) + (getType() == EXCITATORY ? 1 : 0) : null,
453-
newWeight
445+
Math.max(0.0, Math.min(-ss.getNegRecSum(), net))
454446
);
455447
}
456448

0 commit comments

Comments
 (0)