Removed the use of Receptors
This commit is contained in:
parent
19f929606a
commit
619ced6505
@ -212,7 +212,7 @@ namespace NanoBrain {
|
|||||||
|
|
||||||
// Synapses
|
// Synapses
|
||||||
|
|
||||||
if (this.currentNucleus is not Receptor) { //} && this.currentNucleus is not ClusterReceptor) {
|
//if (this.currentNucleus is not Receptor) { //} && this.currentNucleus is not ClusterReceptor) {
|
||||||
showSynapses = EditorGUILayout.BeginFoldoutHeaderGroup(showSynapses, "Synapses");
|
showSynapses = EditorGUILayout.BeginFoldoutHeaderGroup(showSynapses, "Synapses");
|
||||||
if (showSynapses) {
|
if (showSynapses) {
|
||||||
if (this.currentNucleus is Neuron neuron2) {
|
if (this.currentNucleus is Neuron neuron2) {
|
||||||
@ -320,7 +320,7 @@ namespace NanoBrain {
|
|||||||
anythingChanged |= AddSynapse(this.prefab, this.currentNucleus);
|
anythingChanged |= AddSynapse(this.prefab, this.currentNucleus);
|
||||||
}
|
}
|
||||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Activation
|
// Activation
|
||||||
|
|
||||||
@ -410,9 +410,9 @@ namespace NanoBrain {
|
|||||||
case Nucleus.Type.Cluster:
|
case Nucleus.Type.Cluster:
|
||||||
AddClusterInput(nucleus);
|
AddClusterInput(nucleus);
|
||||||
break;
|
break;
|
||||||
case Nucleus.Type.Receptor:
|
// case Nucleus.Type.Receptor:
|
||||||
AddReceptorInput(nucleus);
|
// AddReceptorInput(nucleus);
|
||||||
break;
|
// break;
|
||||||
// case Nucleus.Type.ClusterReceptor:
|
// case Nucleus.Type.ClusterReceptor:
|
||||||
// AddClusterReceptorInput(nucleus);
|
// AddClusterReceptorInput(nucleus);
|
||||||
// break;
|
// break;
|
||||||
@ -446,12 +446,12 @@ namespace NanoBrain {
|
|||||||
subclusterInstance.defaultOutput.AddReceiver(nucleus);
|
subclusterInstance.defaultOutput.AddReceiver(nucleus);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void AddReceptorInput(Nucleus nucleus) {
|
// protected virtual void AddReceptorInput(Nucleus nucleus) {
|
||||||
Receptor newReceptor = new(this.prefab, "New Receptor");
|
// Receptor newReceptor = new(this.prefab, "New Receptor");
|
||||||
newReceptor.AddReceiver(nucleus);
|
// newReceptor.AddReceiver(nucleus);
|
||||||
this.currentNucleus = newReceptor;
|
// this.currentNucleus = newReceptor;
|
||||||
BuildLayers();
|
// BuildLayers();
|
||||||
}
|
// }
|
||||||
|
|
||||||
// protected virtual void AddClusterReceptorInput(Nucleus nucleus) {
|
// protected virtual void AddClusterReceptorInput(Nucleus nucleus) {
|
||||||
// ClusterPickerWindow.ShowPicker(prefab => OnClusterReceptorPicked(nucleus, prefab), "Select Cluster");
|
// ClusterPickerWindow.ShowPicker(prefab => OnClusterReceptorPicked(nucleus, prefab), "Select Cluster");
|
||||||
|
|||||||
@ -490,7 +490,7 @@ namespace NanoBrain {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expandArray == false || nucleus is not IReceptor) {
|
if (expandArray == false) {// || nucleus is not IReceptor) {
|
||||||
// put name below nucleus
|
// put name below nucleus
|
||||||
Vector3 labelPos = position - Vector3.down * (size + 5); // below neuron
|
Vector3 labelPos = position - Vector3.down * (size + 5); // below neuron
|
||||||
style.alignment = TextAnchor.UpperCenter;
|
style.alignment = TextAnchor.UpperCenter;
|
||||||
@ -574,7 +574,7 @@ namespace NanoBrain {
|
|||||||
|
|
||||||
private void HandleClicked(Nucleus nucleus) {
|
private void HandleClicked(Nucleus nucleus) {
|
||||||
if (nucleus == this.currentNucleus) {
|
if (nucleus == this.currentNucleus) {
|
||||||
if (nucleus is Receptor) // || nucleus is ClusterReceptor)
|
if (nucleus is Cluster) //is Receptor) // || nucleus is ClusterReceptor)
|
||||||
expandArray = !expandArray;
|
expandArray = !expandArray;
|
||||||
else
|
else
|
||||||
expandArray = false;
|
expandArray = false;
|
||||||
|
|||||||
@ -557,7 +557,7 @@ namespace NanoBrain {
|
|||||||
else {
|
else {
|
||||||
string nucleusName0 = nucleusName + ": 0";
|
string nucleusName0 = nucleusName + ": 0";
|
||||||
foreach (Nucleus nucleus in this.clusterNuclei) {
|
foreach (Nucleus nucleus in this.clusterNuclei) {
|
||||||
if (nucleus is IReceptor receptor) {
|
if (nucleus is Cluster) { //IReceptor receptor) {
|
||||||
if (nucleus.name == nucleusName | nucleus.name == nucleusName0)
|
if (nucleus.name == nucleusName | nucleus.name == nucleusName0)
|
||||||
return nucleus;
|
return nucleus;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
/*
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NanoBrain {
|
namespace NanoBrain {
|
||||||
@ -47,7 +48,7 @@ namespace NanoBrain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class IReceptorHelpers {
|
public static class IReceptorHelpers {
|
||||||
/*
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implementation for the NanoBrain::IReceptor::AddReceptorElement which can be used for all implementations of IReceptor
|
/// Implementation for the NanoBrain::IReceptor::AddReceptorElement which can be used for all implementations of IReceptor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -119,6 +120,7 @@ namespace NanoBrain {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
@ -54,7 +54,7 @@ public abstract class Nucleus {
|
|||||||
Neuron,
|
Neuron,
|
||||||
MemoryCell,
|
MemoryCell,
|
||||||
Cluster,
|
Cluster,
|
||||||
Receptor,
|
//Receptor,
|
||||||
//ClusterReceptor,
|
//ClusterReceptor,
|
||||||
//ClusterArray,
|
//ClusterArray,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
/*
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
#if UNITY_MATHEMATICS
|
#if UNITY_MATHEMATICS
|
||||||
using Unity.Mathematics;
|
using Unity.Mathematics;
|
||||||
@ -55,7 +56,7 @@ namespace NanoBrain {
|
|||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
[SerializeReference]
|
[SerializeReference]
|
||||||
private NucleusArray _array;
|
private NucleusArray _array;
|
||||||
public NucleusArray array {
|
public NucleusArray array {
|
||||||
@ -78,7 +79,7 @@ namespace NanoBrain {
|
|||||||
public virtual void AddArrayReceiver(Nucleus receiverToAdd, float weight = 1) {
|
public virtual void AddArrayReceiver(Nucleus receiverToAdd, float weight = 1) {
|
||||||
IReceptorHelpers.AddArrayReceiver(this, receiverToAdd, weight);
|
IReceptorHelpers.AddArrayReceiver(this, receiverToAdd, weight);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
public override void UpdateStateIsolated() {
|
public override void UpdateStateIsolated() {
|
||||||
this.outputValue = this.bias;
|
this.outputValue = this.bias;
|
||||||
@ -116,4 +117,5 @@ namespace NanoBrain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
Loading…
x
Reference in New Issue
Block a user