      });
      setInterval(function(){
        series[0].data = getFlotRewards();
        plot.setData(series);
        plot.draw();
      }, 100);
    }
    function getFlotRewards() {
      // zip rewards into flot data
      var res = [];
      for(var i=0,n=smooth_reward_history.length;i<n;i++) {
        res.push([i, smooth_reward_history[i]]);
      }
      return res;
    }

    var steps_per_tick = 1;
    var sid = -1;
    var action, state;
    var smooth_reward_history = [];
    var smooth_reward 