Description of problem
I cannot find a way of connecting individual neurons together on a large scale.
The closest I got was to fill one of the 8 neuron groups at which point an exception was generated when synapse.connect tried to exceed the number of declared neurons in the group.
Minimal code to reproduce problem
It is not that sort of problem I only need to know it can be done and how
What you have already tried
looking at the tutorial and the example code. AI is helpful and without it I would have not got this far.
As disclaimer I do not know what I let myself in for I am not a neurobiologist and spent most of my time writing Assembler and a bit of C to run on my own hardware.
This has been a fora into current programming and a successful attempt to keep my brain alive. All I wanted to do was connect up a few neurons and poke the worm with a virtual stick and see what happens.
I now realise that what I am attempting is not the norm and most large applications are content with random connections but my source data demands specific named neurons, [‘I1L’, ‘I1R’], in specific groups, “touch” to be connected with, at this point, any old synapse.connection in some group.
As a hint to where I have arrived at the following selection of the terminal output .
`
First required neurons:
BAGL
PHAR
VC01
len required _neurons 302
First synaptic_connections:
[‘I1L’, ‘I1R’]
[‘I1L’, ‘I2L’]
[‘I1L’, ‘I2R’]
len synaptic_connections_length 133127
neuron groups:
touch: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘touch’),
chemoreceptor: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘chemoreceptor’),
thermosensory: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘thermosensory’),
taste: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘taste’),
motor: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘motor’),
hemoreceptor: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘hemoreceptor’),
food: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘food’),
intermediate: NeuronGroup(clock=Clock(dt=100. * usecond, name=‘defaultclock’), when=start, order=0, name=‘intermediate’),
Dictionary neuron_name_to_index length: 303
headers [‘neuron key’, ‘neuron_index’, ‘neuron_type’, ‘neuron index in type’]
ALML (0, ‘touch’, 0)
ADLR (1, ‘touch’, 1)
PLNR (2, ‘touch’, 2)
PVM (3, ‘touch’, 3)
PLNL (4, ‘touch’, 4)
ADLL (5, ‘touch’, 5)
Create synapses based on the connections
for pre, post in synaptic_connections:
pre_group = neuron_groups[neuron_name_to_index[pre][1]] # Get the neuron group
post_group = neuron_groups[neuron_name_to_index[post][1]] # Get the neuron group
#print('pre_group ',pre_group)
#print('post_group ',post_group)
pre_i = [neuron_name_to_index[pre][2]]
post_j = [neuron_name_to_index[pre][2]]
synapse = Synapses(pre_group, post_group,
'''
w : 1
dapre/dt = -apre/taupre : 1 (clock-driven)
dapost/dt = -apost/taupost : 1 (clock-driven)
''',
on_pre='''
v_post += w
apre += Apre
w = clip(w + apost, 0, wmax)
''',
on_post='''
apost += Apost
w = clip(w + apre, 0, wmax)
''', method='linear')
synapse.connect(i=pre_i, j=post_j)
synapses.append(synapse)
`