Git Product home page Git Product logo

mirrorrl's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mirrorrl's Issues

bug

MirrorRL/rl_tools.py

Lines 56 to 68 in 086a736

def _rollout(self, render=False):
# Generates SARSA type transitions until episode's end
obs = self.env.reset()
act = self.policy(obs)
done = False
while not done:
if render:
self.env.render()
nobs, rwd, done, terminal = self.env.step(act)
nact = self.policy(obs)
yield obs, act, rwd, done, terminal, nobs, nact
obs = nobs
act = nact

I think is actually nact = self.policy(nobs). Do you agree?

unclear code part

new_neurone.f[0].bias.data = -torch.mean(new_neurone.f[0].weight @ features.t(), dim=1).detach() # I DONT UNDERSTAND; could be related to paper?

I agree, it is not clear to me this line of the code, not sure if it is in the paper.

SARSA or Fitted-Q iteration or DQN or LSTD

with torch.no_grad():
newqsp = cascade_qfunc.forward_from_old_cascade_features(nobs_feat).gather(dim=1, index=nact)
q_target = rwd + gamma * (nobs_q + newqsp) * not_terminal
data_loader = DataLoader(TensorDataset(obs_feat, act, obs_q, q_target), batch_size=batch_size, shuffle=True, drop_last=True)

It seems like this piece of code corresponds more to SARSA method as we use next actions in the trajectory in order to compute new target q-value. Do we have reasons to use SARSA as a way to fit approximation of Q?

Should we try other approaches such as Fitted Q iteration, LSTD or DQN? Do you know what to choose in which situation?

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.