anchor.diff:  foldzip([], _, Acc) -> Acc;
   foldzip(_, [], Acc) -> Acc;
   foldzip([HA|TA], [HB|TB], Acc) ->
  -    foldzip(TA, TB, Acc + dot(HA,HB)).
  +    foldzip(TA, TB, Acc + dot(HA, HB)).
   
   dot(X, X) -> 1;
   dot(_, _) -> -1.
  
positive.code: -spec mutation(solution(), sim_params()) -> solution().
  mutation(Solution, SP) ->
      lists:map(fun(X) ->
          case random:uniform() < SP#sim_params.mutation_rate of
              true -> fnot(X);
              _ -> X
          end
      end, Solution).
  
  %% internal functions
  
  
negative.code: energy(Solution) ->
      L = length(Solution),
      Cs = [foldzip(drop(Solution, K), Solution)
            || K <- lists:seq(1, L-1)],
      E = lists:foldl(fun (X, Acc) -> X*X + Acc end, 0, Cs),
      L*L*0.5/E.
  
  
  -spec recombination(solution(), solution(), sim_params()) ->
                             {solution(), solution()}.
  recombination(S1, S2, _SP) ->
      Zipped = [recombination_features(F1, F2) || {F1, F2} <- lists:zip(S1, S2)],
      lists:unzip(Zipped).
  
  %% @doc Chooses a random order between the two initial features.
  -spec recombination_features(float(), float()) -> {float(), float()}.
  