anchor.diff:                    Pid ! {main_pid, NN}
                   end, lists:concat(Neurons)),            % connect InputLayer to NN process
     NN;
  -create_neural_network(_, _) ->
  +create_neural_network(_, _, _) ->
     io:format("Not enought layers.~n"), fail.
   
   neural_network(InputLayer, OutputLayer, BiasNeurons, Token) -> % Network process event loop
  
positive.code:                   Pid ! {fire, Self, 1.0, Token} 
                  end, Outputs),
    {1.0, []};
  fire_neuron(Inputs, [], _, Main, Token) ->
    % -- 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) when Pid == Main ->
    % -- input layer
    Self = self(),
    Output = receive {fire, Pid, In, Token} -> In end,
  
negative.code: compute_neurons([_L]) -> 0;
  compute_neurons([L1, L2 | Ls]) -> (L1 + 1) * L2 + compute_neurons([L2 | Ls]).
  
  random_weigths(N) -> [rand:uniform() * 0.5 - 0.25 || _ <- lists:seq(1, N)].
  % random_weigths(N) -> lists:seq(1, N).
  
  random_shuffle(L) ->
  