Obviously the simplest way to get the neuron groups define is to have a sequence inbetween the neuron data that the code can break apart and discern.
For example, it might be in the pattern of "//Pop+Val1-Val2+2.4.3.5.20+3.5.1.6.16+etc.//" for defining one neuron grouping.
At the beginning of a run, the groups are divided into a string array by Grps=Genes:explode("//").
Then, it looks at the first grouping in that array by Grp=Grps[G,string]:explode("+") (Where G is a persisted variable for looping through old school), and derives the cap value for the number of neurons to run through with Pop=Grp[1,string]:toNumber() and the values to use with a quick loop from Inputs[Val1,number] to Inputs[Val2,number] (All inputs need to be broken down to numbers, especially ones from the initial sensory inputs) to create the initial Vals array. To summarise:Although, if the Pop and Vals data is stored with the neurons, it means we need to take the player-set arrangement and insert it into the neuron gene data, so perhaps better to hold it in a separate array, with just "Pop+Val1-Val2" in each entry and then have the neurons be one big clump, with Neurons the string and then Neur being the array resulting from Neurons:explode("+"), just removing the neuron data as it goes through until the chip runs out of groups or neurons.
- Grp=Grps[G,string]:explode("+")
- The data for the group in question, G is persisted
- Pop=Grp[1,string]:toNumber()
- The number of neurons, persisted for the loop between neurons
- Vals=(Array from loop between entry Val1 to Val2 in Inputs)
- The initial Vals array from the Inputs numerical array
- Neur=Grp:remove(1) Neur:remove(1)
- The neuron data array used for the neuron loop


1Likes
LinkBack URL
About LinkBacks






Reply With Quote










Bookmarks