anchor.diff:                    N ! {fire, Self, Output, Token}
                   end, Outputs),
     {Output, [Output]};
  -fire_neuron(Inputs, Outputs, _, _, Token) ->
  +fire_neuron(Inputs, Outputs, _, _, Token, Activation) ->
     % -- hidden layer neuron
     Self = self(),
     Input = [receive {fire, Pid, In, Token} -> {Weight * In, In} end || {Pid, Weight} <- Inputs],
  -  Output = activation(sum_tuples(Input)),
  +  Output = activation(Activation, sum_tuples(Input)),
     lists:foreach(fun(Pid) ->
                     Pid ! {fire, Self, Output, Token}
                   end, Outputs),
  
positive.code:   Weights = random_weigths(compute_neurons(Layers)),
    create_neural_network(Layers, Weights).
  
  create_neural_network(Layers, Weights) when length(Layers) > 1 ->
    Neurons = [[run_neuron() || _ <- lists:seq(1, InLayer)] || InLayer <- modify_layers(Layers)],
    full_mesh_connect(Neurons, Weights),
    NN = spawn_link(ann, neural_network, [
                      tl(hd(Neurons)),                                          % InputLayer
  
negative.code:                   Pid ! {fire, Self, 1.0, Token} 
                  end, Outputs),
    {1.0, []};
  fire_neuron(Inputs, [], _, Main, Token, _Activation) ->
    % -- output neuron
    Self = self(),
    Input = [receive {fire, Pid, In, Token} -> {Weight * In, In} end || {Pid, Weight} <- Inputs],
    Output = output_activation(sum_tuples(Input)),
    Main ! {output, Self, Output, Token},
    {Output, snd(Input)};
  fire_neuron([{Pid, _}], Outputs, _, Main, Token, _Activation) when Pid == Main ->
    % -- input layer
    Self = self(),
    Output = receive {fire, Pid, In, Token} -> In end,
  