Questions tagged [dqn]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

What threshold should I use to clip DQN gradients?

Does there exist a way to detect when the gradient step has become big and needs to be clipped? Perhaps it can be a function of the reward, learning rate or optimizer function?
user avatar
0 votes
0 answers
9 views

Why is torch DQN updating all state-action values?

I am following the DQN Tutorial from pytorch. If I understand correctly, they update all action values based on the loss and gradients of all actions together there: ...
user avatar
  • 155
0 votes
0 answers
9 views

multidimensional output from a DQN

The output of a DQN gives the Q value of each actions and it is an one dimensional vector. Can we get the output from a DQN as a matrix?
user avatar
  • 1
0 votes
0 answers
57 views

Unexpected keyword argument error in tensorflow-agents replay buffers

Following the tensorflow tutorial on deep reinforcement learning and DQN. Even after setting up the exact same libraries and running the same code, I am getting some error. ...
user avatar
  • 293
2 votes
1 answer
35 views

How to Form the Training Examples for Deep Q Network in Reinforcement Learning?

Trying to pick up basics of reinforcement learning by self-study from some blogs and texts. Forgive me if the question is too basic and different bits that I understand are a bit messy, but even after ...
user avatar
  • 293
0 votes
0 answers
181 views

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 ...
user avatar
  • 1
0 votes
0 answers
24 views

TF Agents DdqnAgent for Continuous Tasks (Non-Episodic Environments)

I would like to use TF Agents in Non-Episodic environments (continuous tasks without a termination state). In such implementations, the agent can continue learning without the need to reset the ...
user avatar
0 votes
0 answers
5 views

How to i represent three lists in one tensor state for a DQN

I am building a DQN for atari game playing, and i have an algorithm that gives me data about objects in each frame, which are represented as three lists, first is the X-coordinate of an object second ...
user avatar
1 vote
1 answer
35 views

Can Online DQN model overfit?

I am new in the area of RL and currently trying to train an online DQN model. Can an online model overfit since its always learning? and how can I tell if that happens?
user avatar
1 vote
1 answer
70 views

Cartpole - Number of layers and neurons - model hyperparameters

Can anyone please suggest me how to arrive to the best optimal values for number of layers, number of neurons parameters of the deep learning model in DDQN algorithm for cartpole problem. As input and ...
user avatar
  • 21
1 vote
1 answer
83 views

In DQN, why not use target network to predict current state Q values?

In DQN, why not use target network to predict current state Q values, and not only next state q values? In doing a basic dq learning algorithm with nn from scratch, with replay memory, and minibatch ...
user avatar
1 vote
0 answers
93 views

DQN CartPole-v1 neural network doesn't optimize

I'm doing my first dnq algorithm, I'm trying to build a dnq agent, and neural network from scratch, but it seems that neural network doesn't optimize, I did 2 hidden layers, with ReLU, and the output ...
user avatar
0 votes
0 answers
67 views

Q values loss per episode and mean absolute error

I am new to deep reinforcement learning! I am following this code for my adaptation problem (doing actions) https://github.com/jaromiru/AI-blog/blob/master/CartPole-DQN.py I am wondering how I can ...
user avatar
2 votes
1 answer
73 views

Dimensionality of the target for DQN agent training

From what I understand, a DQN agent has as many outputs as there are actions (for each state). If we consider a scalar state with 4 actions, that would mean that the DQN would have a 4 dimensional ...
user avatar
  • 21
1 vote
0 answers
145 views

DQN DDQN and 3DQN differences?

I'm doing a course on reinforcement learning, and one of our tasks is to implement an agent on the Lunar lander continuous V2 environment from openAI gym. In order to solve the continuous problem, I ...
user avatar
1 vote
0 answers
10 views

Implementing DQN - Pylessons.com article - Queries [closed]

I have followed the below link to implement DQN Algorithm https://pylessons.com/CartPole-reinforcement-learning/ Can someone explain me: Why do we need to have else condition in act function during ...
user avatar
  • 21
3 votes
2 answers
433 views

How exactly does DQN learn?

I created my custom environment in gym, which is a maze. I use a DQN model with ...
user avatar
  • 31
0 votes
0 answers
29 views

Epochs and other hyperparameters in Deep Q-Networks

I was wondering about hyperparameters used in Deep Q-Networks. Considering the use of replay memory and target network, together with the epsilon-greedy policy, are the number of epochs different of 1 ...
user avatar
  • 13
1 vote
1 answer
2k views

DQN with decaying epsilon

I'm new to reinforcement learning. I'm studying DQN with decaying epsilon. I came across such example: EPISODES = 91 GAMMA = 0.2 EPSILON_DECAY = 0.999 MIN_EPSILON = 0.01 MAX_EPSILON = 1 My questions ...
user avatar
  • 113
1 vote
0 answers
38 views

In a double Deep Q network what would happen if we switch the roles of both networks

We normally use the online network for action selection and the target network for evaluation , would there be a difference if we switched the roles? Because in the case Of Double Q learning, we ...
user avatar
1 vote
0 answers
124 views

Prioritized Experience Replay - which version is correct?

After reading a lot of stuff, I'm still not sure how to calculate the priorities for Prioritized Experience Replay (PER). Example code taken from here ...
user avatar
  • 13
0 votes
1 answer
211 views

Is this a valid stability concern/improvement for DQN/DDQN reinforcement training?

As you all know, DQN or DDQN are known for "unstable training". Let's use the well known "CartPole". The agent has to balance the stick and gets a reward of +1 per frame. You can reach the 195 ...
user avatar
  • 13
1 vote
1 answer
134 views

how do deep Q network deal with varying input size?

I am conducting research with multiply agents in an environment. The main concept of my methodology is a centralized control system, which means we take the positions, as well as other information, of ...
user avatar
0 votes
1 answer
47 views

Reinforcement (Q) learning: does it learn while in production?

I have a question for which I could not find the answer to it: While training reinforcement learning (using DQN), I get a model for the best reward for the next action. Now, if I deploy this model (i....
user avatar
1 vote
1 answer
108 views

How do I build a DQN which selects the correct objects in an environment based on the environment state?

I have an environment with 4 objects in it. All of these objects can either be selected or not selected. So the actions taken by my DQN should look like - ...
user avatar
3 votes
1 answer
114 views

Is it possible to solve Rubik's cube using DQN?

I'm trying to solve Rubik's cube using deep learning and I came across with DQN, so I decided to give it a try. I developed all the code and started training but I got this results: Loss goes up and ...
user avatar
1 vote
2 answers
47 views

Free a bit of RAM space

Here is Colab Notebook After 1500 episodes if batch_size=256, the RAM crashed. With Colab, I have the equivalent of 25.5 gigs of RAM. Is it normal? Or I don't have ...
user avatar
  • 31
1 vote
1 answer
86 views

TF2.0 DQN has a loss of 0?

I am having a hard time understanding why my loss is constantly a zero when using DQN. I'm trying to use the gym environment to play the game ...
user avatar
  • 111
2 votes
1 answer
250 views

Representation of state space, action space and reward system for RL porblem

I am trying to solve the problem of an agent dynamically discovering(start with no information about the environment) the environment and to explore as much of the environment as possible without ...
user avatar
1 vote
0 answers
108 views

Q-learning, state transition, immediate rewards (trading logic)

I've been thinking about how to correctly calculate rewards for several weeks now. Here is a grid example: ...
user avatar
0 votes
1 answer
533 views

When should the last action be included in the state in reinforcement learning?

I am having some confusion as to whether the action should be included as part of the state input to an agent in a reinforcement learning setting (state-action pair). As from my observation, this is ...
user avatar
2 votes
1 answer
531 views

Would Deep Q Learning work for a finite horizon problem?

I want to apply Deep Q Learning to a problem, which has a clear finite horizon definition, like: $$V(s) = \mathbb{E}[r_1 + r_2]$$ Since the horizon is finite, I do not use reward discounting. My ...
user avatar
1 vote
1 answer
172 views

Having a reward structure which gives high positive rewards compared to the negative rewards

I am training an RL agent using PPO algorithm for a control problem. The objective of the agent is to maintain temperature in a room. It is an episodic task with episode length of 9 hrs and step size(...
user avatar
  • 515
0 votes
1 answer
91 views

How to handle differences between training and deploying of an RL agent

Hi I am training an RL agent for a control problem. The objective of the agent is to maintain temperature in a zone. It is an episodic task with episode length of 10 hrs and actions being taken every ...
user avatar
  • 515
1 vote
1 answer
650 views

Different results every time I train a reinforcement learning agent

I am training an RL agent for a control problem using PPO algorithm. I am using stable-baselines library for it. The objective of an agent is to maintain a temperature of 24 deg in a zone and it ...
user avatar
  • 515
3 votes
1 answer
4k views

Evaluating a trained Reinforcement Learning Agent?

I am new to reinforcement learning agent training. I have read about PPO algorithm and used stable baselines library to train an agent using PPO. So my question here is how do I evaluate a trained RL ...
user avatar
  • 515
1 vote
1 answer
3k views

Policy Gradient with continuous action space

How to apply reinforce/policy-gradient algorithms for continuous action space. I have learnt that one of the advantages of policy gradients is , it is applicable for continuous action space. One way I ...
user avatar
  • 515
2 votes
1 answer
563 views

Deep reinforcement learning on changing data sizes

I have a game that I want to build a model that will learn to play the game. Yet, the environment output is two lists that represent the location and number of soldiers of the user and Opponent. The ...
user avatar
3 votes
2 answers
3k views

Agent always takes a same action in DQN - Reinforcement Learning

I have trained an RL agent using DQN algorithm. After 20000 episodes my rewards are converged. Now when I test this agent, the agent is always taking the same action , irrespective of state. I find ...
user avatar
  • 515
1 vote
2 answers
554 views

How to calculate Temperature variable in softmax(boltzmann) exploration

Hi I am developing a reinforcement learning agent for a continous state/discrete action space. I am trying to use boltmzann/softmax exploration as action selection strategy. My action space is of size ...
user avatar
  • 515
1 vote
0 answers
333 views

Reducing the training time of an RL agent

I am trying to develop an rl agent using DQN algorithm.During training, the agent interacts with environment which is a simulated one.Each episode takes around 10 mins to run. This way if want my ...
user avatar
  • 515
1 vote
1 answer
141 views

How to formulate reward of an rl agent with two objectives

I have started learning reinforcement learning and trying to apply it for my use case. I am developing an rl agent which can maintain temperature at a particular value, and minimize the energy ...
user avatar
  • 515
1 vote
1 answer
87 views

Is DQN limited to working with only image frames?

I have few questions about Deep Q Network. Does DQN only accept image frames as input? I have never hear (read) a paperwork where it doesn't use image frames. If the first is a No, then does image ...
user avatar
  • 13
1 vote
0 answers
93 views

How can I improve the performance of my DQN?

I created a deep Q network to play snake. The code works fine, except for the fact that performance doesn't really improve over the training cycle. At the end, it's pretty much indistinguishable from ...
user avatar
0 votes
1 answer
65 views

Deep Q-Learning for physical quantity: q-values distribution not as expected

Setting I am trying to learn a specific physical quantity (radiance) inside a 3D scene with Deep Q-Learning. Just to give a quick overview, my agent shoots rays inside the scene: the reward is the ...
user avatar
  • 264
1 vote
0 answers
56 views

DQNs for huge or continuous state spaces [closed]

Have there been occasions where DQN failed to deal with huge state spaces? Can you point out a research paper regarding it?
user avatar
  • 11
3 votes
1 answer
1k views

Difference between Dueling DQN and Double DQN?

I have read some articles, but still can not figure out the difference between the Dueling DQN and Double DQN? What exactly is the difference between them? Also, Does Dueling DQN need to be built on ...
user avatar
  • 2,505
0 votes
0 answers
433 views

How to train DDQN model in reinforcement learning?

I was reading through some RL code but couldn't understand one small bit. here is the code: ...
user avatar
  • 101
0 votes
1 answer
420 views

How does DQN solve Open AI Cartpole - v0?

Context I am confused about how a DQN is supposed to solve the cart pole problem since the rewards are so dense. I have been using pytorch example. I am aware of some solutions, but I have issue with ...
user avatar
  • 103
0 votes
1 answer
1k views

Q-Learning experience replay: how to feed the neural network?

I'm trying to replicate the DQN Atari experiment. Actually my DQN isn't performing well; checking another one's codes, I saw something about experience replay which I don't understand. First, when you ...
user avatar