Questions tagged [dqn]

DQN is a multi-layered neural network, added target network and experience replay to Q-learning

206 questions
2
votes
2 answers

gym car racing v0 using DQN

I am currently learning reinforcement learning and wanted to use it on the car racing-v0 environment. I have successfully made it using PPO algorithm and now I want to use a DQN algorithm but when I want to train the model it gives me this…
2
votes
0 answers

DQN with multiple actions taken at same time-step for differents joints for robot control

I am trying to teach a double pendulum fully actuated to perform a swing-up maneuver and keep the position if it reaches it. I previously trained a single pendulum with DQN and it learned the policy well in just a couple of hours of training. Now…
2
votes
0 answers

Neural Network architecture in ReinforcementLearning.jl in julia

In a VBasedPolicy the neural network approximator tries to learn the V values of states. So it's first layer (input layer) should have same number of neurons as the size of state. And I believe it's last (output) layer should have a size of 1, since…
2
votes
1 answer

Keras RL. Reinforce model after its training

I want to train my reinforcement learning model preliminary with gym environment, and then to deploy it in real environment to continue with reinforcement learning in real environment. I am using TF, Keras RL + gym for initial training, the code is…
2
votes
0 answers

Hyperparameter search for lunarlander continuous of openAI gym

I'm trying to solve the LunarLander continuous environment from open AI gym (Solving the LunarLanderContinuous-v2 means getting an average reward of 200 over 100 consecutive trials.) With best reward average possible for 100 straight episodes from…
user309678
  • 23
  • 5
2
votes
1 answer

How to save/load tensorflow 2.3.1 serialized model (DoubleDuelingDQN Agent) with custom arguments?

Following a couple of tutorials and Stackoverflow questions, I managed to get my Double Dueling DQN Agent learning in my custom Environment. Now I am unable to save and load my Agent's network model with its advantage() argument. How do I save &…
parrott
  • 368
  • 4
  • 12
2
votes
2 answers

DQN understanding input and output (layer)

I have a question about the input and output (layer) of a DQN. e.g Two points: P1(x1, y1) and P2(x2, y2) P1 has to walk towards P2 I have the following information: Current position P1 (x/y) Current position P2 (x/y) Distance to P1-P2…
Tailor
  • 193
  • 1
  • 12
2
votes
1 answer

Pytorch DQN, DDQN using .detach() caused very wield loss (increases exponentially) and do not learn at all

Here is my implementation of DQN and DDQN for CartPole-v0 which I think is correct. import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import gym import torch.optim as optim import random import os import…
Yilin L.
  • 75
  • 6
2
votes
1 answer

Stable Baselines: DQN Not performing properly?

I have problem in using DQN for a diagonal line and sin wave as price fluctuation. When the price goes up, there will be a reward and it is colored as green in the chart. When the price goes down and it is tagged as red, the reward goes up. Please…
toksis
  • 139
  • 1
  • 4
  • 14
2
votes
1 answer

How to tune hyperparameters of tf-agents and policies in Tensor Flow?

I have set up a python environment that is wrapped in a tensor flow class to make it a tensor flow environment. Then I set up the learning as per the collab notebooks listed here. Currently, I am using the dqn and REINFORCE agent. The setup works…
user3656142
  • 437
  • 3
  • 14
2
votes
0 answers

How to reduce the episode time in my DQN?

I have modified the cartpole environment from OpenAi so that it starts in the inverted position and has to learn the upswing. I use Google collab to run it because it's way faster than on my laptop. I thought. It´s super slow... I need 40 sec. for…
2
votes
1 answer

Using tensorboard with a DQN algorithm

For reinforcement learning I have read that tensorboard isn't ideal since it gives the input of per episode and/or step. Since in reinforcement learning there are thousands of steps, it doesn't give us an overview of the content. I saw this modified…
mikanim
  • 409
  • 7
  • 21
2
votes
0 answers

Setting Observation Space for 4 array type observations

I'm a beginner for gym RL framework and currently setting up a reinforcement learning environment using the gym. I'm totally confused about how I need to set my observation space. Since my problem is a binary classification problem, I'm don't have…
2
votes
1 answer

Getting the error "AttributeError: 'NoneType' object has no attribute 'shape'" when implementing Atari Breakout

I have made a code to solve Atari Breakout. I am facing a little problem, but I can't say what it is. Here is the code It is a problem with the replay memory. try: next_states = torch.tensor(batch[3], dtype=torch.float32) except: import…
jgauth
  • 195
  • 1
  • 6
  • 14
2
votes
1 answer

In the Tensorflow JS Snake-DQN Example, why does the optimizer being updated not appear to be linked to the online network at all, as suggested?

I considered putting this question in the actual GitHub repo for the project, but it could be a stupid question. Here is the repo: https://github.com/tensorflow/tfjs-examples/tree/master/snake-dqn If you look in the following files and lines, you…
mrpetem
  • 323
  • 1
  • 8
1
2
3
13 14