Giter Site home page Giter Site logo

reinforcement_learning_tutorial's Introduction

reinforcement_learning_tutorial

implement some algorithms using frozen lake from gymnastics

2023.07.08

Currently only using 'FrozenLake-v1'

Working files:

  1. policyIteration2.py
  2. valueIteration.py
  3. Q_learning.py

Experiment_1:

An experiment is designed to compare the performances of the agent’s performance under three different policies: policy iteration optimal policy, value iteration optimal policy and a random policy, checking the efficiency of two optimal policy search methods.

Experiment_1 Result:

Policies are tested in lakes with 16 states (a 4x4 grid) and 64 states (a 8x8 grid), and the experiment results are in Table 1 and Table 2.

In the 4x4 size lake, policy iteration achieved a success rate of 73.5%, while value iteration achieved a slightly higher success rate of 74.1%. This suggests that both methods are relatively effective in this smaller environment.

In the larger 8x8 size lake, both policy iteration and value iteration experienced a decline in success rates. Policy iteration achieved a success rate of 59.9%, while value iteration achieved a slightly higher success rate of 60.6%. This indicates that the performance of both methods decreased in the larger environment.

In comparison to the policy-based methods, the agent that randomly chose actions had significantly lower success rates. In the 4x4 size lake, the random agent achieved a success rate of 1.4%, and in the 8x8 size lake, it only achieved a success rate of 0.1%. This demonstrates the importance of employing structured policies, such as policy iteration and value iteration, to achieve higher success rates.

In summary, the experiment shows that policy iteration and value iteration outperform random action selection in both the 4x4 and 8x8 size lakes, although their effectiveness decreases in the larger environment.

Alt Text

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.