anchor.diff:              {N, qlearn_add(OldOut, Output, Qmax, OMove, Olen, Explore)}
       end,
       {CN,CQ} = NewQmax = qlearn_max(AggregatedActionQualities),   
  -    TrainingRec=#egTicTacQlSample{sin=list_to_binary(Input), nos=PreviousSampleCount+1, qos=CQ/CN, aaq=AggregatedActionQualities},
  +    TrainingRec=#egTicTacQlSample{input=list_to_binary(Input), nos=PreviousSampleCount+1, nmax=CN, qmax=CQ/CN, aaq=AggregatedActionQualities},
       imem_meta:write(Table, TrainingRec),
       NewQmax.
   
  
positive.code: -define(QL_TRAIN_OPTS, [{record_name, egTicTacQlSample}, {type, set}]).        
  -define(QL_OUTPUT_UNSAMPLED, 0.001).        % Value emitted as output for unsampled move in Export
  
  -record(egTicTacQlSample,   { sin= <<>> :: binary() % binstr key of normalized position (Board)
                              , nos=1     :: number() % number of samples (1...)
                              , qos=1     :: number() % score of sample (-1..+1)
                              , aaq=[]    :: list()   % aggregated action qualities
                              }).
  
  -define(egTicTacQlSample,   [ binstr
                              , number
                              , number
                              , list
                              ]).
  % rd(egTicTacQlSample, {sin, nos, qos, aaq}).
  
  -record(state,  { bid        :: egBotId()       % bot id (= module name)
                  , tid        :: egGameTypeId()  % game type id
  
negative.code:         , pick/4
          , play_bot_impl/11
          , train_game/8
          , qlearn_max/1
          ]).
  
  -safe([state, stop, resume, explore, flatten, qlearn_max, pick, play_bot_impl]).
  
  game_types(egambo_tictac) -> all;
  game_types(_) -> [].
  