potential solutions do infinite circular loop in braincells
@@ -47,6 +47,8 @@
47
47
* OUT = Sigmoid ( IN1Val*IN1Weight + IN2Val*IN2Weight + IN3Val*IN3Weight + ... )
48
48
* Sigmoid will accept numbers from negative infinity up until positive infinity, and as such the weights of all Synapses need not be clamped. Sigmoid will always output a value between zero and one.
49
49
*
50
* Functionally, outputs will be determined from the Activators. Activators request their inputs to calculate, which in turn request their inputs to calculate, until all values have been determined.
51
*
50
52
* Note that any cells which would be disconnected from the heart should be automatically removed from the DNA string
51
53
*
52
54
* --
@@ -56,6 +58,15 @@
56
58
* - Mutating existing DNA strings
57
59
*/
58
60
61
/**
62
* Potential issues:
63
*
64
* Infinite circular connections in braincells.
65
* Solutions:
66
* - Don't allow braincells to connect to braincells (would fix, but is undesirable as it limits brain complexity)
67
* - use value 0 when the last cell of a circle is detected. e.g.: A B and C are a loop. A requests input from B, which requests input from C, which requests input from A. A would complete the circle and start a loop, so instead 0 is returned.
68
*/
69
59
70
function sigmoid(z)
60
71
{
61
72
return 1 / (1 + Math.exp(-z));
@@ -47,6 +47,8 @@47
* OUT = Sigmoid ( IN1Val*IN1Weight + IN2Val*IN2Weight + IN3Val*IN3Weight + ... )47
* OUT = Sigmoid ( IN1Val*IN1Weight + IN2Val*IN2Weight + IN3Val*IN3Weight + ... )48
* Sigmoid will accept numbers from negative infinity up until positive infinity, and as such the weights of all Synapses need not be clamped. Sigmoid will always output a value between zero and one.48
* Sigmoid will accept numbers from negative infinity up until positive infinity, and as such the weights of all Synapses need not be clamped. Sigmoid will always output a value between zero and one.49
* 49
* 50
* Functionally, outputs will be determined from the Activators. Activators request their inputs to calculate, which in turn request their inputs to calculate, until all values have been determined.51
* 50
* Note that any cells which would be disconnected from the heart should be automatically removed from the DNA string52
* Note that any cells which would be disconnected from the heart should be automatically removed from the DNA string51
* 53
* 52
* --54
* --@@ -56,6 +58,15 @@56
* - Mutating existing DNA strings58
* - Mutating existing DNA strings57
*/59
*/58
60
61
/**62
* Potential issues:63
* 64
* Infinite circular connections in braincells.65
* Solutions:66
* - Don't allow braincells to connect to braincells (would fix, but is undesirable as it limits brain complexity)67
* - use value 0 when the last cell of a circle is detected. e.g.: A B and C are a loop. A requests input from B, which requests input from C, which requests input from A. A would complete the circle and start a loop, so instead 0 is returned.68
*/69
59
function sigmoid(z) 70
function sigmoid(z) 60
{71
{61
return 1 / (1 + Math.exp(-z));72
return 1 / (1 + Math.exp(-z));