Skip to content
Snippets Groups Projects
lecture_11_sarsa.py 593 B
Newer Older
  • Learn to ignore specific revisions
  • tuhe's avatar
    tuhe committed
    # This file may not be shared/redistributed without permission. Please read copyright notice in the git repo. If this file contains other copyright notices disregard this text.
    from irlc.gridworld.gridworld_environments import BookGridEnvironment
    from irlc.lectures.lec10.lecture_10_mc_q_estimation import keyboard_play
    
    tuhe's avatar
    tuhe committed
    from irlc.lectures.lec11.sarsa_nstep_delay import SarsaDelayNAgent
    
    tuhe's avatar
    tuhe committed
    
    if __name__ == "__main__":
        env = BookGridEnvironment(render_mode='human')
        agent = SarsaDelayNAgent(env, gamma=0.95, epsilon=0.1, alpha=.96, n=1)
        keyboard_play(env, agent, method_label="Sarsa")