      w.tick();
      }
      draw();
      updateStats();
      
      flott += 1;
      for(i=0; i<w.agents.length; i++) {
        var rew = w.agents[i].last_reward;
        if(!smooth_reward[i]) { smooth_reward[i] = 0; }
        smooth_reward[i] = smooth_reward[i] * 0.999 + rew * 0.001;
        if(flott === 50) {
          // record smooth reward
          if(smooth_reward_history[i].length >= nflot) {
            smooth_reward_history[i] = smooth_reward_history[i].slice(1);
          }
          smooth_