Coder Social home page Coder Social logo

naq's Introduction

Implementation of Approximate Smooth Kernel Value Iteration

Repository

  • kernel_vi.py - Approximate Smooth Kernel Value Iteration
  • kernel.py - Kernel definition
  • gridworld_mdp.py - GridWorld domain
  • plot.py - Plot performance metrics of one run
  • plot.R - Plot performance metrics across runs
  • kernel_vi.sh - Generates multiple runs across random seeds

Installation

Requirements: Python, numpy, matplotlib

Usage

Description of parameters is provided in the help message python kernel_vi.py --help

Example on a stochastic cliff walking problem

Value Iteration

  • Value Iteration python kernel_vi.py --plan plans/plan0.txt --random-slide 0.15 --opt-v plans/opt_v0_rew_5_rs_0.15.txt --max-iter 20 --plot metrics.png
  • Approximate Value Iteration with sampled Bellman operator at 10 states python kernel_vi.py --plan plans/plan0.txt --random-slide 0.15 --opt-v plans/opt_v0_rew_5_rs_0.15.txt --max-iter 100 --s 10 --log-steps 10 --plot metrics.png

Kernel Value Iteration

  • Kernel Value Iteration with Neural Tangent Kernel python kernel_vi.py --plan plans/plan0.txt --random-slide 0.15 --opt-v plans/opt_v0_rew_5_rs_0.15.txt --max-iter 20 --kernel --kernel-type ntk --plot metrics.png
  • Approximate Kernel Value Iteration with Neural Tangent Kernel and sampled Bellman operator at one state python kernel_vi.py --plan plans/plan0.txt --random-slide 0.15 --opt-v plans/opt_v0_rew_5_rs_0.15.txt --max-iter 20 --s 1 --kernel --kernel-type ntk --plot metrics.png

Aggregate performance metrics

Generates NUM_RUNS runs of Approximate Smooth Kernel Value Iteration across random seeds. Saves performance metrics across iterations into 'export' directory for each seed.

bash kernel_vi.sh 0 NUM_RUNS

Plot performance metrics across runs

Requirements: R-project, install.packages(c('ggplot2', 'reshape2', 'dplyr'))

Reads 'export' directory from previous step and generates plot.pdf in the current directory Rscript plot.R

References

[1] Smirnova, Elena. On Convergence of Neural asynchronous Q-iteration. EWRL, 2022.

naq's People

Contributors

bandofstraycats avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.