In lab 2 we will finish lab 1 and write a new kind of agent program that maintains a state.
(env-moves-so-far env)
(agent-state agent) ;; returns the current state (setf (agent-state agent) <new value>) ;; updates the state to a new value
(run-experiment (generate-environments 3 3 2) (lambda () (make-agent :program #'random-walk-with-state)) #'perf-measure 1000)
This will return the number of experiments performed, and the average performance value.