![]() |
Nano Brain for Unity v0.1
|
Basic IReceptor to receive external input.
Public Types | |
| enum | CombinatorType { Sum , Product , Max } |
| The type of combinators. More... | |
| enum | CurvePresets { Linear , Power , Sqrt , Reciprocal , Custom } |
| The type of. | |
| enum | Type { None , Neuron , MemoryCell , Cluster , Receptor , ClusterReceptor } |
| The types of Nucleus. | |
Public Member Functions | |
| Receptor (Cluster parent, string name) | |
| Create a new Receptor in a Cluster instance. | |
| Receptor (ClusterPrefab prefab, string name) | |
| Create a new Receptor in a Cluster Prefab. | |
| string | GetName () |
| Get the name of the receptor. | |
| override Nucleus | ShallowCloneTo (Cluster parent) |
| Function to make a partial clone of this nucleus. | |
| override Nucleus | Clone (ClusterPrefab prefab) |
| Function to clone a nucleus to a Cluster prefab. | |
| void | AddReceptorElement (ClusterPrefab prefab) |
| Extends the nucleiArray with an additional element. | |
| void | RemoveReceptorElement () |
| Removes the last element from the nucleiArray. | |
| virtual void | AddArrayReceiver (Nucleus receiverToAdd, float weight=1) |
| Add a receiver for this receptor array. | |
| override void | UpdateStateIsolated () |
| override void | UpdateNuclei () |
| Update the state and recursively all Nuclei receiving data from this Nucleus. | |
| override void | UpdateNuclei () |
| Update the state and recursively all Nuclei receiving data from this Nucleus. | |
| override void | ProcessStimulus (Vector3 inputValue, int thingId=0, string thingName=null) |
| Process an external stimulus. | |
| AnimationCurve | GenerateCurve () |
| float3 | CombinatorSum () |
| Vector3 | CombinatorSum () |
| float3 | CombinatorProduct () |
| Vector3 | CombinatorProduct () |
| float3 | CombinatorMax () |
| Vector3 | CombinatorMax () |
| virtual void | AddReceiver (Nucleus receiverToAdd, float weight=1) |
| virtual void | RemoveReceiver (Nucleus receiverToRemove) |
| void | ProcessStimulusDirect (Vector3 inputValue, int thingId=0, string thingName=null) |
| 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. | |
Static Public Member Functions | |
| static void | Delete (Nucleus nucleus) |
Public Attributes | |
| CombinatorType | combinator = CombinatorType.Sum |
| The type of combinator used for this Neuron. | |
| CurvePresets | _curvePreset |
| AnimationCurve | curve |
| float | curveMax = 1.0f |
| Action | WhenFiring |
| int | stale = 1000 |
| readonly int | staleValueForSleep = 20 |
| string | name |
| The name of the Nucleus. | |
| ClusterPrefab | clusterPrefab |
| The cluster prefab in which the nucleus is located. | |
| Cluster | parent |
| The cluster instance in which the nucleus is located. | |
| bool | trace = false |
| Toggle for printing debugging trace data. | |
| Vector3 | bias = Vector3.zero |
| The bias of the nucleus. | |
Protected Member Functions | |
| virtual void | CloneFields (Neuron clone) |
| 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 | ActivatorCustom (float3 input) |
| Vector3 | ActivatorCustom (Vector3 input) |
Protected Attributes | |
| float3 | _outputValue |
| Vector3 | _outputValue |
Properties | |
| NucleusArray | array [set] |
| Nucleus[] | nucleiArray [get, set] |
| The array of nuclei used to track multiple things sending stimuli. | |
| CurvePresets | curvePreset [get, set] |
| virtual float3 | outputValue [get, set] |
| virtual Vector3 | outputValue [get, set] |
| float | outputMagnitude [get] |
| float | outputSqrMagnitude [get] |
| bool | isFiring [get] |
| virtual bool | isSleeping [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] |
| List< Synapse > | synapses [get] |
| The synapses of the nucleus. | |
|
inherited |
| NanoBrain.Receptor.Receptor | ( | Cluster | parent, |
| string | name | ||
| ) |
Create a new Receptor in a Cluster instance.
| parent | The Cluster in which the Receptor is created |
| name | The name of the new Receptor |
| NanoBrain.Receptor.Receptor | ( | ClusterPrefab | prefab, |
| string | name | ||
| ) |
Create a new Receptor in a Cluster Prefab.
| prefab | The Cluster Prefab in which the Receptor is created |
| name | The name of the new Receptor |
| string NanoBrain.Receptor.GetName | ( | ) |
Function to make a partial clone of this nucleus.
| parent | The cluster in which the cloned nucleus should be placed |
| override Nucleus NanoBrain.Receptor.Clone | ( | ClusterPrefab | prefab | ) |
Function to clone a nucleus to a Cluster prefab.
| prefab |
| void NanoBrain.Receptor.AddReceptorElement | ( | ClusterPrefab | prefab | ) |
Extends the nucleiArray with an additional element.
| prefab | A prefab of the nucleus to add? |
Implements NanoBrain.IReceptor.
| void NanoBrain.Receptor.RemoveReceptorElement | ( | ) |
Removes the last element from the nucleiArray.
Implements NanoBrain.IReceptor.
|
virtual |
Add a receiver for this receptor array.
| receiverToAdd | The receiving Nucleus |
| weight | The initial weight to use for the synapses |
This function will add a synapse to the receiver for each element in the nucleiArray.
Implements NanoBrain.IReceptor.
|
virtual |
Update the state and recursively all Nuclei receiving data from this Nucleus.
Reimplemented from NanoBrain.Nucleus.
|
virtual |
Update the state and recursively all Nuclei receiving data from this Nucleus.
Reimplemented from NanoBrain.Nucleus.
|
virtual |
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 |
Reimplemented from NanoBrain.Neuron.
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 |
|
inherited |
The bias of the nucleus.
The bias which a value which is always added to the combined value of the nucleus It does not have a synapse and therefore no weight of source nucleus
|
getset |
The array of nuclei used to track multiple things sending stimuli.
The size of the array determines the maximum number of things which can be distinguished
Implements NanoBrain.IReceptor.