Answers.Body: <p>A very vague question. What's the objective?</p>
  
  <p>Reinforcement Learning (RL) typically uses the Markov Decision Process framework, which is a sequential decision making framework. In this framework, actions influence the state transitions. In other words, RL deals with controlling (via actions) a Markov chain. The objective in RL is figure out how to take actions in an optimal (in some sense) way!</p>
  
  <p>If, in the application you mentioned, the actions don't influence the state transitions and the objective is to predict states, RL is not required. It's just a regression/ time-series problem.   </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T09:41:48.630Z
Answers.Text: I guess one thing that also might be useful to OP is that you could have an MDP where you take an action that does 'nothing' - i.e. taking action $a$ in state $s$ will just transition the agent trivially back into state $s$ with probability 1 and receiving reward 0.
Answers.UserDisplayName: David
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T10:55:22.167Z
Answers.Text: @math_pile thanks, please see question update.
Answers.UserDisplayName: blue-sky
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T11:09:22.630Z
Answers.Text: @blue-sky in your edit your understanding of $\epsilon$-greedy is the wrong way around, with probability 0.9 the agent would take the greedy option (the action that maxes the Q value) and with probability 0.1 act randomly.
Answers.UserDisplayName: David
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T15:34:38.947Z
Answers.Text: @blue-sky: $\epsilon-$ greedy is as David pointed out. Coming back to your question, it is still not clear what your objective is. From what I understand, you don't need RL. If there are actions, and the actions might or might not affect the state, then perhaps Bandits framework might be useful (https://en.wikipedia.org/wiki/Multi-armed_bandit)
Answers.UserDisplayName: math_phile
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T02:42:53.013Z
Answers.LastActivityDate: 2020-05-12T02:42:53.013Z
Answers.UserDisplayName: math_phile
Answers.Body: <p>It seems to me that you are confusing two things, <strong>State of the agent</strong> and <strong>State of the environment</strong>.</p>
  <p>Think about a robot learning to walk on a rugged terrain.
  The actions of the robots don't change the terrain at all ! The robot can include in his own state, part of the environment state, the topology of the terrain in front of him for instance.</p>
  <p>In an MDP,  an agent may or may not modify the environment state, in your case, if we make the assumption that you don't manipulate the market, you can consider that you don't modify the environment state.</p>
  <p>Your issue might be in the way you designed your agent, relying only on a part of the state environment, and not really having any state of his own, such as a portfolio for instance.</p>
  <p>If you're only interested in the way the state environment changes, then the above answer is right, the RL framework may not be a good fit.</p>
  <p>Finally, you don't have to model explicitly the environment, that's the beauty of model free RL ! Q-learning, that you mentioned, is model-free.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-18T09:39:15.673Z
Answers.LastActivityDate: 2022-09-18T09:39:15.673Z
Answers.UserDisplayName: nathan raynal
Body: <p>For some environments taking an action may not update the environment state. For example, a trading RL agent may take an action to buy shares s. The state at time t which is the time of investing is represented as the interval of 5 previous prices of s. At t+1 the share price has changed but it may not be as a result of the action taken. Does this affect RL learning, if so how ? Is it required that state is updated as a result of taking actions for agent learning to occur ?</p>
  
  <p>In gaming environments it is clear how actions affect the environment. Can some rules of RL breakdown if no "noticeable" environment change takes place as a result of actions ?</p>
  
  <p>Update:</p>
  
  <p>"actions influence the state transitions", is my understanding correct:
  If transitioning to a new state is governed by epsilon greedy and epsilon is set to .1 then with .1 probability the agent will choose an action from the q table which has max reward reward for the given state. Otherwise the agent randomly chooses and performs an action then updates the q table with discounted reward received from the environment for the given action.</p>
  
  <p>I've not explicitly modeled an MDP and just defined the environment and let the agent determine best actions over multiple episodes of choosing either a random action or the best action for the given state, the selection is governed by epsilon greedy.</p>
  
  <p>But perhaps I've not understood something fundamental in RL. I'm ignoring MDP in large part as I'm not modeling the environment explicitly. I don't set the probabilities of moving from each state to other states.</p>
  
Tags: <reinforcement-learning>
Title: Is it required that taking an action updates the state?
UserDisplayName: blue-sky
ThreadText: # Is it required that taking an action updates the state?
  
  (Asked by: username_0 on 2020-05-11)
  
  For some environments taking an action may not update the environment state. For example, a trading RL agent may take an action to buy shares s. The state at time t which is the time of investing is represented as the interval of 5 previous prices of s. At t+1 the share price has changed but it may not be as a result of the action taken. Does this affect RL learning, if so how ? Is it required that state is updated as a result of taking actions for agent learning to occur ?
  
  In gaming environments it is clear how actions affect the environment. Can some rules of RL breakdown if no "noticeable" environment change takes place as a result of actions ?
  
  Update:
  
  "actions influence the state transitions", is my understanding correct:
  If transitioning to a new state is governed by epsilon greedy and epsilon is set to .1 then with .1 probability the agent will choose an action from the q table which has max reward reward for the given state. Otherwise the agent randomly chooses and performs an action then updates the q table with discounted reward received from the environment for the given action.
  
  I've not explicitly modeled an MDP and just defined the environment and let the agent determine best actions over multiple episodes of choosing either a random action or the best action for the given state, the selection is governed by epsilon greedy.
  
  But perhaps I've not understood something fundamental in RL. I'm ignoring MDP in large part as I'm not modeling the environment explicitly. I don't set the probabilities of moving from each state to other states.
  
  **Tags:** reinforcement-learning
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-05-12. Score: 1 | Accepted answer
  
  A very vague question. What's the objective?
  
  Reinforcement Learning (RL) typically uses the Markov Decision Process framework, which is a sequential decision making framework. In this framework, actions influence the state transitions. In other words, RL deals with controlling (via actions) a Markov chain. The objective in RL is figure out how to take actions in an optimal (in some sense) way!
  
  If, in the application you mentioned, the actions don't influence the state transitions and the objective is to predict states, RL is not required. It's just a regression/ time-series problem.
  
  > **Comments:**
  > **username_2**: I guess one thing that also might be useful to OP is that you could have an MDP where you take an action that does 'nothing' - i.e. taking action $a$ in state $s$ will just transition the agent trivially back into state $s$ with probability 1 and receiving reward 0.  
  > **username_0**: @math_pile thanks, please see question update.  
  > **username_2**: @blue-sky in your edit your understanding of $\epsilon$-greedy is the wrong way around, with probability 0.9 the agent would take the greedy option (the action that maxes the Q value) and with probability 0.1 act randomly.  
  > **username_1**: @blue-sky: $\epsilon-$ greedy is as David pointed out. Coming back to your question, it is still not clear what your objective is. From what I understand, you don't need RL. If there are actions, and the actions might or might not affect the state, then perhaps Bandits framework might be useful (https://en.wikipedia.org/wiki/Multi-armed_bandit)  
  
  ---
  
  ### Answer by username_3 on 2022-09-18. Score: 0
  
  It seems to me that you are confusing two things, **State of the agent** and **State of the environment**.
  
  Think about a robot learning to walk on a rugged terrain.
  The actions of the robots don't change the terrain at all ! The robot can include in his own state, part of the environment state, the topology of the terrain in front of him for instance.
  
  In an MDP, an agent may or may not modify the environment state, in your case, if we make the assumption that you don't manipulate the market, you can consider that you don't modify the environment state.
  
  Your issue might be in the way you designed your agent, relying only on a part of the state environment, and not really having any state of his own, such as a portfolio for instance.
  
  If you're only interested in the way the state environment changes, then the above answer is right, the RL framework may not be a good fit.
  
  Finally, you don't have to model explicitly the environment, that's the beauty of model free RL ! Q-learning, that you mentioned, is model-free.
  
  
  ---
  
  