mnemoli / NornBrainSim

Simulator of a Norn brain from the Cyberlife game Creatures 2
5 stars 1 forks source link

Dendrite wiring: spread and fanout #2

Closed danielmewes closed 9 months ago

danielmewes commented 12 months ago

Hi, very cool project! Code looks nice and readable too. I wish I had found this repo earlier!

This is not so much an issue as a question: Have you been able to figure out how the spread values ("Flat", "Normal", "Saw", "waS" in the Genetics Kit) and the fanout parameter work? I see that this part is not currently implemented, unless I just missed it?

I've been trying to understand it with some experiments in C1, but haven't been able to get a clear result.

My original goal was to make a fully-connected lobe, but I haven't been able to do it. It seems that the initial wiring is heavily location-based, in the sense that it is informed by where in the X, Y coordinate space within the lobe a neuron sits. I assume that Flat, Normal, Saw and waS influence in which direction the initial dendrites spread in the source lobe? But I'm not sure how exactly.

It gets especially confusing when the dimensions and aspect ratios of the source and destination are different... We know of course that with Flat and fanout 0, each neuron wires to the matching neuron index in the source, regardless of their shape (,as long as both lobes have the same total number of neurons?). But when fanout is involved, the shapes of the lobes appear to start mattering?

mnemoli commented 10 months ago

Hey! Thanks for taking an interest in this project, always glad to see others who are still checking out these games!

I think the intention of the spread is that it influences the dendrite connections here: https://github.com/mnemoli/NornBrainSim/blob/a5e8d273aa2b096021011c41a50f288a820b48e6/Assets/Core/Genes/Builders/DendriteBuilder.cs#L20 This random selection should be skewed to a normal distribution for Normal, more towards lower values for Saw, and more towards greater values for waS. When I tried it ingame it didn't seem to make a difference and I never implemented it here, but that should be how it works.

Re the fully connected lobe and dimensions of the lobes, check out my old post here: https://www.creaturescaves.com/forum.php?view=12&thread=7095 C1 seemed quite 'broken' in that regard when I was playing with it!

danielmewes commented 9 months ago

Thank you for the link! I had noticed the incomplete utilization of the concept lobe as well... But wasn't sure if dendrite migration might still be able to tap into the extra neurons...

danielmewes commented 9 months ago

Closing issue as I don't believe there's any action right now.

danielmewes commented 9 months ago

By the way, my understanding is that ConASH and DecASH are not observable as chemicals because their half life is 0. So they are emitted and have an effect on the brain within the same tick, and then immediately decay back to 0.

I'm not sure how to verify that, but that has been my understanding of why these chemicals are not observable in standard norns.