Removed the use of Receptors

This commit is contained in:
Pascal Serrarens 2026-04-17 16:52:37 +02:00
parent 19f929606a
commit 619ced6505
6 changed files with 25 additions and 21 deletions

View File

@ -212,7 +212,7 @@ namespace NanoBrain {
// 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");
if (showSynapses) {
if (this.currentNucleus is Neuron neuron2) {
@ -320,7 +320,7 @@ namespace NanoBrain {
anythingChanged |= AddSynapse(this.prefab, this.currentNucleus);
}
EditorGUILayout.EndFoldoutHeaderGroup();
}
//}
// Activation
@ -410,9 +410,9 @@ namespace NanoBrain {
case Nucleus.Type.Cluster:
AddClusterInput(nucleus);
break;
case Nucleus.Type.Receptor:
AddReceptorInput(nucleus);
break;
// case Nucleus.Type.Receptor:
// AddReceptorInput(nucleus);
// break;
// case Nucleus.Type.ClusterReceptor:
// AddClusterReceptorInput(nucleus);
// break;
@ -446,12 +446,12 @@ namespace NanoBrain {
subclusterInstance.defaultOutput.AddReceiver(nucleus);
}
protected virtual void AddReceptorInput(Nucleus nucleus) {
Receptor newReceptor = new(this.prefab, "New Receptor");
newReceptor.AddReceiver(nucleus);
this.currentNucleus = newReceptor;
BuildLayers();
}
// protected virtual void AddReceptorInput(Nucleus nucleus) {
// Receptor newReceptor = new(this.prefab, "New Receptor");
// newReceptor.AddReceiver(nucleus);
// this.currentNucleus = newReceptor;
// BuildLayers();
// }
// protected virtual void AddClusterReceptorInput(Nucleus nucleus) {
// ClusterPickerWindow.ShowPicker(prefab => OnClusterReceptorPicked(nucleus, prefab), "Select Cluster");

View File

@ -490,7 +490,7 @@ namespace NanoBrain {
}
}
if (expandArray == false || nucleus is not IReceptor) {
if (expandArray == false) {// || nucleus is not IReceptor) {
// put name below nucleus
Vector3 labelPos = position - Vector3.down * (size + 5); // below neuron
style.alignment = TextAnchor.UpperCenter;
@ -574,7 +574,7 @@ namespace NanoBrain {
private void HandleClicked(Nucleus nucleus) {
if (nucleus == this.currentNucleus) {
if (nucleus is Receptor) // || nucleus is ClusterReceptor)
if (nucleus is Cluster) //is Receptor) // || nucleus is ClusterReceptor)
expandArray = !expandArray;
else
expandArray = false;

View File

@ -557,7 +557,7 @@ namespace NanoBrain {
else {
string nucleusName0 = nucleusName + ": 0";
foreach (Nucleus nucleus in this.clusterNuclei) {
if (nucleus is IReceptor receptor) {
if (nucleus is Cluster) { //IReceptor receptor) {
if (nucleus.name == nucleusName | nucleus.name == nucleusName0)
return nucleus;
}

View File

@ -1,3 +1,4 @@
/*
using UnityEngine;
namespace NanoBrain {
@ -47,7 +48,7 @@ namespace NanoBrain {
}
public static class IReceptorHelpers {
/*
/// <summary>
/// Implementation for the NanoBrain::IReceptor::AddReceptorElement which can be used for all implementations of IReceptor
/// </summary>
@ -119,6 +120,7 @@ namespace NanoBrain {
}
*/
}
}
}
*/

View File

@ -54,7 +54,7 @@ public abstract class Nucleus {
Neuron,
MemoryCell,
Cluster,
Receptor,
//Receptor,
//ClusterReceptor,
//ClusterArray,
}

View File

@ -1,3 +1,4 @@
/*
using UnityEngine;
#if UNITY_MATHEMATICS
using Unity.Mathematics;
@ -55,7 +56,7 @@ namespace NanoBrain {
return clone;
}
/*
[SerializeReference]
private NucleusArray _array;
public NucleusArray array {
@ -78,7 +79,7 @@ namespace NanoBrain {
public virtual void AddArrayReceiver(Nucleus receiverToAdd, float weight = 1) {
IReceptorHelpers.AddArrayReceiver(this, receiverToAdd, weight);
}
*/
public override void UpdateStateIsolated() {
this.outputValue = this.bias;
@ -116,4 +117,5 @@ namespace NanoBrain {
}
}
}
}
*/