anchor.diff:  %%% Callbacks
   %%%===================================================================
   
  --spec init(Args :: term()) -> {ok, State :: #state{}} |
  -                              {ok, State :: #state{}, timeout() | hibernate} |
  +-spec init(Args :: term()) -> {ok, State :: state()} |
  +                              {ok, State :: state(), timeout() | hibernate} |
                                 {stop, Reason :: term()} | ignore.
   init([Supervisor, Interaction, SP, Cf]) ->
       mas_misc_util:seed_random(),
  
positive.code: -define(CLOSING_TIMEOUT, 2000).
  -define(AGENT_THRESHOLD, 2). %% TODO this should be user-configurable and use case dependent
  
  -type agent() :: mas:agent().
  -type sim_params() :: mas:sim_params().
  -type arenas() :: mas_conc_supervisor:arenas().
  
negative.code: 
  -spec handle_call(Request :: term(),
                    From :: {pid(), Tag :: term()},
                    State :: state()) ->
                           {reply, Reply :: term(), NewState :: state()} |
                           {reply, Reply :: term(), NewState :: state(),
                            timeout() | hibernate} |
                           {noreply, NewState :: state()} |
                           {noreply, NewState :: state(),
                            timeout() | hibernate} |
                           {stop, Reason :: term(), Reply :: term(),
                            NewState :: state()} |
                           {stop, Reason :: term(), NewState :: state()}.
  
  handle_call({arenas, Arenas}, _From, St = #state{config = Cf}) ->
      {reply, ok, St#state{arenas = Arenas}, Cf#config.arena_timeout}.
  
  -spec handle_cast(Request :: term(), State :: state()) ->
                           {noreply, NewState :: state()} |
                           {noreply, cleaning, timeout() | hibernate} |
                           {noreply, NewState :: state(), timeout() | hibernate}|
                           {stop, Reason :: term(), NewState :: state()}.
  handle_cast({interact, Pid, _Agent}, cleaning) ->
      Pid ! {response, the_end},
      {noreply, cleaning, ?CLOSING_TIMEOUT};
  