anchor.diff:      case ets:lookup(Ets, block) of
           [#block{size=S, y=0, x=_}] ->
               if S >= ?TRACKER_SIZE ->
  -                    {avoid, math:pow(lists:sum(Sensed)/?TRACKER_SIZE, 2)};
  +                    {avoid, case lists:sum(Sensed) of
  +                                0 -> 1;
  +                                ?TRACKER_SIZE -> 0;
  +                                _ -> 0.1
  +                            end};
                  S < ?TRACKER_SIZE ->
  -                    {capture, math:pow(lists:sum(Sensed)/S, 2)}
  +                    {capture, case lists:sum(Sensed) of
  +                                  S -> 1;
  +                                  _ -> 0
  +                              end}
               end
       end.
   
  -simulate_run(G) ->
  +init_local_ets(G) ->
   %    io:format("whole:~n~p~n~n", [G]),
       Ets = ets:new(x, [set]),
       ets:insert(Ets, {delta, 0}),
  
positive.code: 
  reset_tracker(Ets) ->
      ets:insert(Ets,
                 [case ets:lookup(Ets, V) 
                      of [{X, Y, _}] ->
                          {X, Y, #vstate{}}
                  end || V <- [a, b, c, d]]).
  
negative.code:     ets:insert(Ets, [{Name, Vertex, #vstate{}} ||
                          Vertex = #vertex{name=Name} <- Vertices]),
      ets:insert(Ets, {tpos, 0}),
      Ets.
  
  simulate_run(G) ->
      Ets = init_local_ets(G),
      Res = genetica_utils:repeatedly(?NOF_BLOCKS, fun () -> block_run(Ets) end),
      ets:delete(Ets),
      Res.
  
  refit(G) ->
      [{simtype, S}] = ets:lookup(genetica_cognitive_ets, simtype),
      refit(S, G).
  
  refit(random, #ptype{gtype = G, ref = Ref}) ->
      Fitness = gen_fit(G),
      {Ref, Fitness};
  refit(brute, #ptype{gtype = G, ref = Ref}) ->
      case ets:lookup(genetica_cognitive_ets, Ref) of
          [] ->
              Fitness = brute_fit(G),
              {Ref, Fitness};
          [{Ref, Fitness}] ->
              {Ref, Fitness}
      end.
  
  init_global_ets(SimType) ->
      case ets:info(genetica_cognitive_ets) of
          undefined -> ets:new(genetica_cognitive_ets,
                               [set, named_table]);
          _ -> nil
      end,
      ets:insert(genetica_cognitive_ets, {simtype, SimType}),
      ok.
  
  
  genotype_to_phenotype_fn([_, _, _, _, SimType | _]) ->
      init_global_ets(SimType),
      %% Generate fitness fn here?
      fun (G) ->
              Ref = erlang:make_ref(),
              P = #ptype{gtype = G, ref = Ref},
              ets:insert(genetica_cognitive_ets, refit(SimType, P)),
              P
      end.
  
  