   agent.fromJSON(data); // corss your fingers...
        // set epsilon to be much lower for more optimal behavior
        agent.epsilon = 0.05;
        $("#slider").slider('value', agent.epsilon);
        $("#eps").html(agent.epsilon.toFixed(2));
        // kill learning rate to not learn
        agent.alpha = 0;
      });
    }

    function resetAgent() {
      eval($("#agentspec").val())
      agent = new RL.DQNAgent(env, spec);
    }

    var w; // global world object
    var current_interval_id;
    