![]() |
Nano Brain for Unity v0.1
|
A MemoryCell stored its value for one update.
When the input for a Memory Cell changes, it will output the previous value
Public Types | |
| enum | CombinatorType { Sum , Product } |
| The type of combinators. More... | |
| enum | ActivationType { Linear , Power , Sqrt , Reciprocal , Tanh , Binary , Normalized , Custom } |
| The type of. | |
| enum | Type { None , Neuron , MemoryCell , Cluster } |
| Function to clone a nucleus to a Cluster prefab. More... | |
Public Member Functions | |
| MemoryCell (Cluster parent, string name) | |
| override Nucleus | ShallowCloneTo (Cluster newParent) |
| override void | UpdateStateIsolated () |
| override void | UpdateNuclei () |
| Update the state and recursively all Nuclei receiving data from this Nucleus. | |
| Synapse | AddSynapse (Neuron sendingNucleus, float weight=1) |
| Add a new synapse to this nuclues. | |
| Synapse | GetSynapse (Nucleus sender) |
| Find a synapse. | |
| void | RemoveSynapse (Nucleus sendingNucleus) |
| Remove a synapse from a Nucleus. | |
| virtual void | SetBias (Vector3 inputValue) |
| Set the bias, recalculate the output and update all Nuclei receiving from this Nucleus. | |
| AnimationCurve | GenerateCurve () |
| void | SleepCheck () |
| float3 | CombinatorSum () |
| Vector3 | CombinatorSum () |
| float3 | CombinatorProduct () |
| Vector3 | CombinatorProduct () |
| Vector3 | CombinatorMax () |
| virtual void | AddReceiver (Nucleus receiverToAdd, float weight=1) |
| virtual void | RemoveReceiver (Nucleus receiverToRemove) |
| virtual void | ProcessStimulus (Vector3 inputValue) |
| Process an external stimulus. | |
Static Public Member Functions | |
| static void | Delete (Nucleus nucleus) |
Public Attributes | |
| bool | staticMemory = false |
| Vector3 | bias = Vector3.zero |
| Create a new Neuron in a Cluster Prefab. | |
| CombinatorType | combinator = CombinatorType.Sum |
| The type of combinator used for this Neuron. | |
| ActivationType | _curvePreset |
| AnimationCurve | curve |
| float | curveMax = 1.0f |
| Action | WhenFiring |
| bool | persistOutput = false |
| float | lastUpdate = 0 |
| Toggle for printing debugging trace data. | |
| readonly float | timeToSleep = 1f |
| string | name |
| The name of the Nucleus. | |
| Cluster | parent |
| The cluster prefab in which the nucleus is located. | |
Protected Member Functions | |
| virtual void | CloneFields (Neuron clone) |
| void | CheckSleepingSynapses () |
| float3 | ActivatorLinear (float3 input) |
| Vector3 | ActivatorLinear (Vector3 input) |
| float3 | ActivatorSqrt (float3 input) |
| Vector3 | ActivatorSqrt (Vector3 input) |
| float3 | ActivatorPower (float3 input) |
| Vector3 | ActivatorPower (Vector3 input) |
| float3 | ActivatorReciprocal (float3 input) |
| Vector3 | ActivatorReciprocal (Vector3 input) |
| float3 | ActivatorTanh (float3 input) |
| float3 | ActivatorBinary (float3 input) |
| float3 | ActivatorNormalized (float3 input) |
| float3 | ActivatorCustom (float3 input) |
| Vector3 | ActivatorCustom (Vector3 input) |
Protected Attributes | |
| float3 | _outputValue |
| Vector3 | _outputValue |
Properties | |
| override bool | isSleeping [get] |
| List< Synapse > | synapses [get] |
| The synapses of the nucleus. | |
| ActivationType | curvePreset [get, set] |
| virtual float3 | outputValue [get, set] |
| virtual Vector3 | outputValue [get, set] |
| float | outputMagnitude [get] |
| float | outputSqrMagnitude [get] |
| bool | isFiring [get] |
| Func< float3 > | Combinator [get] |
| Func< Vector3 > | Combinator [get] |
| Func< float3, float3 > | Activator [get] |
| Func< Vector3, Vector3 > | Activator [get] |
| virtual List< Nucleus > | receivers [get, set] |
|
inherited |
|
inherited |
Function to clone a nucleus to a Cluster prefab.
| prefab |
The types of Nucleus
|
virtual |
Update the state and recursively all Nuclei receiving data from this Nucleus.
Reimplemented from NanoBrain.Nucleus.
Add a new synapse to this nuclues.
| sendingNucleus | The nucleus from which the signals may originate |
| weight | The weight applied to the input. Default value = 1 |
This will add a new input to this nucleus with the given weight.
Find a synapse.
| sender | The sender of the input to the Synapse |
|
inherited |
Remove a synapse from a Nucleus.
| sendingNucleus | Remote the synapse connecting to this Nucleus |
|
virtualinherited |
Set the bias, recalculate the output and update all Nuclei receiving from this Nucleus.
| inputValue |
|
virtualinherited |
Process an external stimulus.
| inputValue | The value of the stimulus |
| thingId | The id of the thing causing the stimulus |
| thingName | The name of the thing causing the stimulus |
|
inherited |
Create a new Neuron in a Cluster Prefab.
| prefab | The Cluster Preafb in which the new Neuron should be created |
| name | The name of the new Neuron |
The bias
The bias which a value which is always added to the combined value of the neuron It does not have a synapse and therefore no weight of source nucleus
|
inherited |
The cluster prefab in which the nucleus is located.
The cluster instance in which the nucleus is located