Skip to content
Snippets Groups Projects
Select Git revision
  • ee48f34bbde6c1d6ed875d9f2eef4af67dfa8147
  • master default protected
2 results

datalog

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    unf_vi_gridworld_stepwise.py 733 B
    # 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.ex01.agent import train
    from irlc.gridworld.demo_agents.hidden_agents import ValueIterationAgent3
    from irlc import interactive
    
    def q1_vi(env):
        agent = ValueIterationAgent3(env, epsilon=0, gamma=1, only_update_current=True)
        env, agent = interactive(env, agent)
        env.reset()
        train(env, agent, num_episodes=100)
        env.close()
    
    if __name__ == "__main__":
        env = BookGridEnvironment(render_mode='human', living_reward=-0.05, print_states=False)
        q1_vi(env)