Coder Social home page Coder Social logo

cs8803rl_hw7's Introduction

CS8803RL_hw7

Homework 7 Problem Messing with Rewards

We saw in the lesson that regardless of the potential-based shaping function given, the optimal policy will remain unchanged. The purpose of choosing a particular shaping function, however, is to try to speed learning. In this question, we will explore how to pick a potential-based shaping function to speed up the convergence of policy iteration (PI).

Consider the following MDP: MDP 1

int numStates = 2;

int numActions = 2;

double[][][] probabilitiesOfTransitions = {{{1.0,0.0},{0.0,1.0}},{{0.0,1.0},{0.0,1.0}}}

double[][][] rewards ={{{1.0,0.0},{0.0,4.0}},{{0.0,0.0},{0.0,0.0}}}

double gamma = 0.6666666667;

#Expected Output 4.0, 0.0

Your goal is to develop a potential function Φ defined on each state so that shaping the reward function using Φ will cause PI to converge in as few iterations as possible starting from a 0-initialized value function. Your goal should be to make it converge in one PI iteration.

Convert format:

echo "{{{0.0,0.55,0.45,0.0},{0.0,0.0,0.0,1.0}},{{0.0,1.0,0.0,0.0},{0.0,1.0,0.0,0.0}},{{0.0,0.0,1.0,0.0},{0.0,0.0,1.0,0.0}},{{0.0,0.0,0.0,1.0},{0.0,0.0,0.0,1.0}}}" | sed 's/{/[/g' | sed 's/}/]/g'

cs8803rl_hw7's People

Contributors

nickrobinson avatar

Watchers

James Cloos avatar Isaac Waweru 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.