Simplyfying

This commit is contained in:
Pascal Serrarens 2026-01-29 12:31:23 +01:00
parent d754457a14
commit b60fc19d96

View File

@ -12,8 +12,8 @@ public class MemoryCell : Neuron {
// Returns the memorized value weighted by time // Returns the memorized value weighted by time
// return lastValue * (current time - last time) // return lastValue * (current time - last time)
[SerializeField] // [SerializeField]
public bool deltaValue = false; // public bool deltaValue = false;
#endregion Parameters #endregion Parameters
@ -46,12 +46,12 @@ public class MemoryCell : Neuron {
public override void UpdateResult(Vector3 result) { public override void UpdateResult(Vector3 result) {
// output value is the previous value // output value is the previous value
if (this.deltaValue) { // if (this.deltaValue) {
float deltaTime = Time.time - this._memorizedTime; // float deltaTime = Time.time - this._memorizedTime;
this._outputValue = this._memorizedValue * deltaTime; // this._outputValue = this._memorizedValue * deltaTime;
} // }
else //else
this._outputValue = this._memorizedValue; this.outputValue = this._memorizedValue;
// Store the result for the next time // Store the result for the next time
this._memorizedValue = result; this._memorizedValue = result;