other neuron types 
Maciej Komosinski's picture

There are various neuron types, many of them
experimental only. To use other neurons, try this syntax:

//0
p:
n:0,d="sin:f0=0.1"

This example creates a sinus generator neuron
(see sin.neuro file in data\ for its source).
It is the same as

function go()
{
NeuroProperties.t = NeuroProperties.t+NeuroProperties.f0+Neuro.weightedInputSum;
Neuro.state = Math.sin(NeuroProperties.t);
}

You can simulate the above genotype and see the signal
generated by the neuron.

Forums: 

What are some of the other neuron types?

I would love it if there were genuine threshold neurons.

Cheers,

Pete

Maciej Komosinski's picture

> What are some of the other neuron types?

Click parameters -> user scripts -> neuro classes report

then see messages window for the current list of neurons.

The well-known ones are N*GTS|@. The rest is
experimental, not documented, and not supported.

> I would love it if there were genuine threshold neurons.

see
http://www.framsticks.com/a/al_simdetail.html

The sigmoid parameter lets you adjust it.
In f1, just put /:50 inside neuron...
in f0, it is 'si' parameter,

n:si=50

I see what you mean, but that is not exactly what I have in mind. I'm
thinking more along the lines of, for example, a neuron that would give an
output if and only if its inputs were greater than 50 and was quiescent
(have zero output)otherwise. The standard neuron with the sigmoid parameter
set to 50 will be quiescent only for a very narrow range of inputs and will
yield a negative output in response to a sufficiently low negative input.

cheers,

Pete

>see
>http://www.framsticks.com/a/al_simdetail.html
>
>The sigmoid parameter lets you adjust it.
>In f1, just put /:50 inside neuron...

The technique below will produce a real threshold neuron out of two currently
supported neurons.
The first neuron will be plus or minus one , the second will be zero or one.
Increase the 1000 if you need a sharper sigmoid and/or must avoid.
In many cases, the sigmoid parameter may be omitted from the second neuron.

[/:1000,*:-t,n1:w1,n2x:w2,...][/:1000,-1:.5,*:.5]

where
n1 = input neoron1 , n2 = input neuron2 and so on
w1 and so on = weights from the respective input neurons
t = the positive threshold the sum of the input(s) must exceed (omit the "-"
for a negative threshold)

Pete Mandik wrote:

> I see what you mean, but that is not exactly what I have in mind. I'm
> thinking more along the lines of, for example, a neuron that would give an
> output if and only if its inputs were greater than 50 and was quiescent
> (have zero output)otherwise. The standard neuron with the sigmoid parameter
> set to 50 will be quiescent only for a very narrow range of inputs and will
> yield a negative output in response to a sufficiently low negative input.
>
> cheers,
>
> Pete
>
> >see
> >http://www.framsticks.com/a/al_simdetail.html
> >
> >The sigmoid parameter lets you adjust it.
> >In f1, just put /:50 inside neuron...

Is a "greater-than" network buildable?

Is it possible, using only standard Framstick neurons, to create a network
with two inputs A and B and a single output that will output a positive
value if and only if A is greater than B and output zero otherwise?

Thanks in advance for any help on this problem.

Cheers,

Pete

Maciej Komosinski's picture

> Is it possible, using only standard Framstick neurons, to create a network
> with two inputs A and B and a single output that will output a positive
> value if and only if A is greater than B and output zero otherwise?
>
> Thanks in advance for any help on this problem.

We created a special neuron especially for you - "Threshold".
It will be available within the next Framsticks release!

Yes, it is possible to achieve with the standard "N" neurons.
This example

X[*:0][*:0][-2:1,-1:-1,/:1000,=:0,!:1]
A B sharp instant
funct. reaction

will give 0 if A=B, 1 if A>B, -1 if AB.

>
>We created a special neuron especially for you - "Threshold".
>It will be available within the next Framsticks release!
>

Excellent. Thanks.

>
>X[*:0][*:0][-2:1,-1:-1,/:1000,=:0,!:1][-1:1,*:1,/:1000,=:0,!:1]
>
>and therefore
>
>-1 becomes 0, after sigmoid is 0
>0 becomes 1, after sigmoid is 1
>1 becomes 2, after sigmoid is 1
>
>so you get 0 if A<=B, 1 if A>B.
>

This is close to what I was looking for. However, If A and B both equal
zero, then the output is one.

I'm hoping to put this circuit into a single sensor food finder that
compares its current perception to a memory and outputs the results of this
comparison to a steering muscle. If there is no sensor activity, or the
sensor is higher than memory (because, for instance, the creature is heading
toward the food), the creature goes straight. If, however, the memory
signal is higher than the sensor (because, for instance, the creature is
moving away from the food) then the creature turns.

Cheers,

Pete

Maciej Komosinski's picture

> I'm hoping to put this circuit into a single sensor food finder that
> compares its current perception to a memory and outputs the results of this
> comparison to a steering muscle. If there is no sensor activity, or the
> sensor is higher than memory (because, for instance, the creature is heading
> toward the food), the creature goes straight. If, however, the memory
> signal is higher than the sensor (because, for instance, the creature is
> moving away from the food) then the creature turns.

It will be easy to design exactly such neurons which
are necessary for experiments, no need to use only
those which are available in the Framsticks distribution.

For example, the Threshold neuron (Thr) is defined by

function go()
{
if (Neuro.weightedInputSum >= NeuroProperties.t)
Neuro.state = NeuroProperties.hi;
else
Neuro.state = NeuroProperties.lo;
}

MacKo

Several questions

What language would this code be written in?
Who writes it?
Where does it reside?
Where is the list of variables/qualities/events/procedures etc...
Al Tyler

Maciej Komosinski wrote:

> > I'm hoping to put this circuit into a single sensor food finder that
> > compares its current perception to a memory and outputs the results of this
> > comparison to a steering muscle. If there is no sensor activity, or the
> > sensor is higher than memory (because, for instance, the creature is heading
> > toward the food), the creature goes straight. If, however, the memory
> > signal is higher than the sensor (because, for instance, the creature is
> > moving away from the food) then the creature turns.
>
> It will be easy to design exactly such neurons which
> are necessary for experiments, no need to use only
> those which are available in the Framsticks distribution.
>
> For example, the Threshold neuron (Thr) is defined by
>
> function go()
> {
> if (Neuro.weightedInputSum >= NeuroProperties.t)
> Neuro.state = NeuroProperties.hi;
> else
> Neuro.state = NeuroProperties.lo;
> }
>
> MacKo

Maciej Komosinski's picture

> What language would this code be written in?

see
http://www.framsticks.com/common/framscript-lang.html

> Where is the list of variables/qualities/events/procedures etc...

see class navigator, it will be helpful (next release)
http://www.framsticks.com/files/navig.png

MacKo

Maciej Komosinski's picture

> What language would this code be written in?

in 2.0 - 'assembler'
in 2.2 - C++/JAVA - like

> Who writes it?

any user

> Where does it reside?

what? neurons definitions in data/*.neuro files

> Where is the list of variables/qualities/events/procedures etc...

we will write some docs when we have time...