# How can a neuron be simulated?

**URL:** <https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378>\
**Category:** Science!\
**Created:** [March 21, 2024, 1:46am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378 "2024-03-21T01:46:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhyyrylainen](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/hhyyrylainen/32/32_2.png) [@hhyyrylainen](https://community.revolutionarygamesstudio.com/u/hhyyrylainen)\
**Post date:** [March 21, 2024, 1:46am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/1 "2024-03-21T01:46:03Z")

</div>

> Can functional neurons be replicated in a computer simulation? How about in real life in different forms? What are the implications, if this is possible, for AI?

NOTE: This post was originally by another user

---

<div class="post-metadata">

**Author:** ![hhyyrylainen](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/hhyyrylainen/32/32_2.png) [@hhyyrylainen](https://community.revolutionarygamesstudio.com/u/hhyyrylainen)\
**Post date:** [March 21, 2024, 7:47am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/2 "2024-03-21T07:47:11Z")

</div>

So who wants to tell Chat-GPT that it is impossible for it to exist?  
Just kidding, but I wanted to joke about this a bit as this is _the_ approach that the modern wave of AI technologies all use. So this is obviously possible and anyone following any of the recent AI news should know this. Well at least if they read more in-depth articles than just clickbait that doesn’t mention any of the technical details.

Here’s the Wikipedia page on neural network simulations:

> **[Neural network (machine learning)](https://en.wikipedia.org/wiki/Neural_network_(machine_learning))**
>
> In machine learning, a neural network (also artificial neural network or neural net, abbreviated ANN or NN) is a model inspired by the neuronal organization found in the biological neural networks in animal brains.
> An ANN is made of connected units or nodes called artificial neurons, which loosely model the neurons in a brain. These are connected by edges, which model the synapses in a brain. An artificial neuron receives signals from connected neurons, then processes them and sends a signal t...

---

<div class="post-metadata">

**Author:** ![willow](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/willow/32/15176_2.png) [@willow](https://community.revolutionarygamesstudio.com/u/willow)\
**Post date:** [March 21, 2024, 7:20pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/3 "2024-03-21T19:20:26Z")

</div>

there’s also the Artificial Life Engine (ALiEn), which has functional neurons that are individual cells, but they are 2D and can only interact with their neighbor cells.

---

<div class="post-metadata">

**Author:** ![fralegend015](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/fralegend015/32/11835_2.png) [@fralegend015](https://community.revolutionarygamesstudio.com/u/fralegend015)\
**Post date:** [March 21, 2024, 7:55pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/4 "2024-03-21T19:55:18Z")

</div>

Do you have a link to it?

---

<div class="post-metadata">

**Author:** ![TheForumGameMaster](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/theforumgamemaster/32/14212_2.png) [@TheForumGameMaster](https://community.revolutionarygamesstudio.com/u/TheForumGameMaster)\
**Post date:** [March 21, 2024, 8:02pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/5 "2024-03-21T20:02:41Z")

</div>

Just how CPU-intensive is a neural network?

---

<div class="post-metadata">

**Author:** ![Topcode](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/topcode/32/9828_2.png) [@Topcode](https://community.revolutionarygamesstudio.com/u/Topcode)\
**Post date:** [March 22, 2024, 2:29am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/6 "2024-03-22T02:29:05Z")

</div>

depends. It could be simple enough to run on a raspberry pi zero, or complicated enough to need the Frontier supercomputer’s entire resources.

---

<div class="post-metadata">

**Author:** ![hhyyrylainen](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/hhyyrylainen/32/32_2.png) [@hhyyrylainen](https://community.revolutionarygamesstudio.com/u/hhyyrylainen)\
**Post date:** [March 22, 2024, 7:22am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/7 "2024-03-22T07:22:43Z")

</div>

All of the best AI neural networks require GPU computing power and a bunch of GPU RAM to run effectively. Only really simple neural networks can run on a CPU.

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 8:38am UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/8 "2025-01-04T08:38:10Z")

</div>

So to be clear this absolutely could not be implemented into the game for 1 simple reason:  
CPU intensive.( You could actually do some neural network training on a CPU but even a reasonably fast CPU (3Ghz) will take a lot of time to train a three layers network with 10000 neuron each layer I have ruined a demo with 3 layers (10000,10000,600) and it took around 13s to do a pack of 1000 training token which is very little compared to it’s size.  
But a reasonable number of neuron around 100 hundred structured like 10 for sensory input 20 for memory and 20 for input and some 50 could be for processing or cyclic work (work each month or each day) could achieve a good complexity handling while still be stimulated frequently like 10 or so should be manageable for a decent CPU. however it should be noted that the model of 100 is not actually a learning model as the neurons will learn through a an evolutionary process rather than simple back propagation technic ( this looks a little bit like real life however a truly learning will need 1 of two options:  
1- the same principal just adding more neuron and unlocking a type of neuron that could change the weight between other neurons: very costy  
2- a normal Neuron network ( uses a back propagation technic) equipped with an algorithm that judge the organism Action and tell the neural network how to adjust it’s weight( loss function)

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 12:21pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/9 "2025-01-04T12:21:28Z")

</div>

Are we sure we need to simulate neurons to have the creatures feel “realistic”?

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 9:29pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/10 "2025-01-04T21:29:07Z")

</div>

No, you can make an algorithm that mimic real behavior, and to make a real stimulation is costy beyond belief, so this the best it could get however a good algorithm could make for a very good approximation, I mean what evolution make through hundred of yours could be written in some lines of code, like a a predator is very big pressure then we could make the spiecy have a very high alterness to colors or the patterns of that predators effectively stimulating thousands of years of evolution

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 9:34pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/11 "2025-01-04T21:34:56Z")

</div>

There is only so much wiggle room when you consider that those limited-in-count neurons will need to work on the strangest creatures to evolve.

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 9:54pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/12 "2025-01-04T21:54:13Z")

</div>

well, depending on what you really wish to see we might as well not use neurons, however if you want a basic calculation then here it comes for you:  
Let’s say you’re creatures have N sensory inputs and have M possible output and have 1 layer of internal neurons with width equal to (N+M)/2 (the bigger the animal the bigger it’s brain or something like this?)  
So the total calculations will be of complexity O( M^2 + N^2) so you will want M and N to be reasonably little (less or equal to a 1000(preferably)and no more then 5000 no matter what)  
I think with n=1000 and m=1000 we could stimulate 10 at max ,  
However, real game situation, m will be around 50 at most 100 and the input might around 300 at most 500  
However the internal neurons will be up to ( how much intelligent our spiecy is) but we could cupped at 1000 so the final calculations (worst case scenario):  
500X1000+1000X100= 6\*10^5 operation, well I don’t know how old PC’s CPU performance are but a reasonable assumption would be 1 GHz at least:  
So we could technically speaking stimulate 1666 creatures in a second but the problem always remain with the frame rate (you don’t want to wait 1 s second to just move a little bit) so the question remains about the stimulation frequency

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 9:59pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/13 "2025-01-04T21:59:22Z")

</div>

If we are aiming at 60 fps being the “regular framerate”, we could afford simulating some 27 creatures, going off your results.

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 10:04pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/14 "2025-01-04T22:04:47Z")

</div>

Well I think your calculations assume that each stimulation will happen in a frame but we should match the gamer pace I mean there is no human capable of reacting in 1/60s we might as well update it to be once every 0.1 second which will lead as to 6X27=162 creatures  
if we say that the most that could be shown in 1 screen is 50 creature, then we will have ample of time for the learning process and for the loss function to be calculated.

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 10:08pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/15 "2025-01-04T22:08:14Z")

</div>

Remember that there are other processes going on other than creature brains working in the game at a moment.

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 10:20pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/16 "2025-01-04T22:20:28Z")

</div>

Well if you want a realistic thing then , I have calculated with 500 input neurons , but I think all the variables in the game then it might be at best 200(this obvious an over estimation I mean we have only lol ke 6 or 7 compounds to keep track of as well as 3 atmospheric variables and light,temperature, pressure and we will add the running metabolism operations and the atp\_level then we will have maybe 30 variable if we add 170 for the run variables ( other organisms and environmental hazard and resources) I think 200 is still an overestimation more over the output neurons where calculated to be in 100 but if we consider the possibility outputs then maybe 4 for movements and 6 for special operations like sprinting or engulfing and that’s it so it become 10 or at max 20 and this will significant enhance our ability to stimulate them

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 10:24pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/17 "2025-01-04T22:24:08Z")

</div>

Right, but how will these networks will be generated/adjusted? Making autoevo do that will surely highly extend the duration of it’s calculations…

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 10:33pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/18 "2025-01-04T22:33:01Z")

</div>

You want how the all thing will happen then I don’t know the auto-evo is the hardest part other then that I think 20. To 30 organism could be stimulated at once with relative ease, the auto- evo part is more like a correction to the loss function , in real life even the loss function is a neuron network ( I mean even when you feel pain or pleasure you still using your neurons) so I thought of the same Idea maybe we could make a miniature neuron network for this but this will be updated during the auto-evo it’s size should be N inputs and M outputs so it will run significantly faster then the main Neuron network ( if the main one takes 1s this will take only 0.01s for comparations) and it will stimulate dopamine and pain for the creatures

---

<div class="post-metadata">

**Author:** ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)\
**Post date:** [January 4, 2025, 10:37pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/19 "2025-01-04T22:37:53Z")

</div>

So you say every NN should be duplicated for the autoevo process?

---

<div class="post-metadata">

**Author:** ![handy](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/h/b5a626/32.png) [@handy](https://community.revolutionarygamesstudio.com/u/handy)\
**Post date:** [January 4, 2025, 10:46pm UTC](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378/20 "2025-01-04T22:46:08Z")

</div>

I don’t understand your question but I’ll clarify something any change to the main Neuron network during the run with will not carry over to the auto-evo ( this is the things that are learnt by the creature during it’s life time) but each spiesy have a starting NN configuration that could be changed during the Auto-evo, so each spiesy will have 2 NN models but each of the stimulated creatures will have 2 NN which will work during the run

[Next page](https://community.revolutionarygamesstudio.com/t/how-can-a-neuron-be-simulated/7378.md?page=2)
