# Tag Info

Accepted

### How should I handle invalid actions (when using REINFORCE)?

Just ignore the invalid moves. For exploration, it is likely that you won't just execute the move with the highest probability, but instead choose moves randomly based on the outputted probability. If ...
• 3,977

### How should I handle invalid actions (when using REINFORCE)?

Usually softmax methods in policy gradient methods using linear function approximation use the following formula to calculate the probability of choosing action $a$. Here, weights are $\theta$, and ...
• 3,557
Accepted

### Can reinforcement learning be used for tasks where only one final reward is received?

RL can be used for cases where you have sparse rewards (i.e. at almost every step all rewards are zero), but, in such a setting, the experience the agent receives during the trajectory does not ...
• 33k

• 9,316
Accepted

### Can the rewards be matrices when using DQN?

Generally speaking, is it better for rewards to be a scalar, or is using matrices okay? Rewards need to be scalar, real values to match to standard theory of Markov decision processes (MDPs) and ...
• 23.1k

### How should I handle invalid actions (when using REINFORCE)?

An experimental paper exist in arxiv about the effect of whether to mask or to give negative rewards to invalid actions. There are some references in this paper which also discuss the effects and the ...
• 143
Accepted

### How should I define the reward function in the case of Connect Four?

The classic working reward scheme for two player zero sum games (i.e. if I win, you lose and vice versa) is simply: +1 for a win 0 for a draw -1 for a loss These rewards should be associated with ...
• 23.1k
Accepted

### Is a reward given at every step or only given when the RL agent fails or succeeds?

In reinforcement learning (RL), an immediate reward value must be returned after each action, along with the next state. This value can be zero though, which will have no direct impact on optimality ...
• 23.1k

### Can rewards be decomposed into components?

I agree with Tomasz that the approach you are describing falls within the field of MORL. For a solid introduction MORL I would recommend the survey by Roijers, D. M., Vamplew, P., Whiteson, S., & ...
Accepted

### How should I handle invalid actions in a grid world?

In a toy environment, this is a choice you can make relatively freely, depending on what you want to achieve with the learning challenge. It may help if you think through what the actual consequences ...
• 23.1k

### How should I design the reward function for racing game (where the goal is to reach finishing line before the opponent)?

Sutton and Barto state, "The reward signal is your way of communicating to the robot [agent] what you want it to achieve, not how you want it achieved." Since you stated that the goal is to reach the ...
• 776

### Counterexamples to the reward hypothesis

I believe that there is no clear answer to your question. It essentially boils down to whether you are a reductionist – whether you believe that quantitative measurements can truly give justice to the ...
• 101
Accepted

### Reinforcement Learning algorithm with rewards dependent both on previous action and current action

The answer to both your concerns is: Add the previous action choice to the state representation. It is all you need to do. It gives the agent the data it needs to learn the association of negative ...
• 23.1k

### How to construct a reward function for a "wait and see" problem

In general, the term of art for this problem is "early classification." Early classification of time series has been extensively studied for minimizing class prediction delay in time-...
• 236
1 vote

### How should I define the reward function to solve the Wumpus game with deep Q-learning?

The reward function belongs the the environment and it is the only way the agent can explore the world given a state. If we want agent to do something specific, we must provide rewards to it in such a ...
• 732
1 vote

### How should I define the reward function to solve the Wumpus game with deep Q-learning?

The reward function is up to you when you set the goals for the agent. If the goal is to score as highly as possible, before ending the game, then use the score. You may want to scale the score down ...
• 23.1k

Only top scored, non community-wiki answers of a minimum length are eligible