Answers.Body: <p>You might be mixing the definitions of a <strong>step</strong> and an <strong>episode</strong>, which is composed of many steps, at least in <a href="http://www.incompleteideas.net/book/RLbook2020.pdf" rel="nofollow noreferrer">reinforcement learning</a>.</p>
  <p>In a sliding puzzle problem, where the goal is to move the tiles such that an initial configuration becomes another configuration, each move (or action) would be a step in the episode. Each game would be an episode. Games can be considered independent of each other unless e.g. the board configuration of the next game depends on something that happened in the previous game. This would be in the context of RL.</p>
  <p>However, it seems to me that you took the definitions of episodic/sequential problems from the AIMA book (or some other source that is based on this book). For completeness, here's excerpt from the book that defines these problems</p>
  <blockquote>
  <p><strong>Episodic</strong> vs. <strong>sequential</strong>: In an episodic task environment, the agent’s experience is divided into atomic episodes. In each episode the agent receives a percept and then performs a single action. Crucially, the next episode does not depend on the actions taken in previous episodes. Many classification tasks are episodic. For example, an agent that has to spot defective parts on an assembly line bases each decision on the current part, regardless of previous decisions; moreover, the current decision doesn’t affect whether the next part is defective. In sequential environments, on the other hand, the current decision could affect all future decisions. Chess and taxi driving are sequential: in both cases, short-term actions can have long-term consequences. Episodic environments are much simpler than sequential environments because the agent does not need to think ahead.</p>
  </blockquote>
  <p>Now, this definition of episodic problem does not seem to be consistent with the usage of an episodic problem in RL, which is just a problem that doesn't go on forever, but ends after a finite number of steps. Chess and the sliding puzzle problems could be formulated as episodic problems <strong>in RL</strong>.</p>
  <p>However, chess is not episodic according to Norvig and Russell's book because your action at time step <span class="math-container">$t$</span> affects your future actions and states.</p>
  <p>You're probably not familiar with bandit problems, but it seems to me that AIMA's definition of episodic problems matches the definition of a bandit problem, which is a simple instance of the full RL problem, which is also called <strong>sequential decision making</strong> problem, because this is a problem where you take actions in sequence.</p>
  <blockquote>
  <p>Why is the sliding puzzle problem episodic?</p>
  </blockquote>
  <p>At this point, you should have understood that there can be more than one definition of a term. According to the common usage of the terms &quot;episode&quot; and &quot;episodic tasks&quot; in RL, the sliding puzzle problem would be episodic. I also think it would be a sequential problem according to the AIMA book because your current action can indeed affect the actions you take in the future, unless e.g. you don't care about the number of moves you make before ending the game.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T17:29:00.663Z
Answers.Text: Thank you for the reply. My professor also told me that the definitions are not strict and can be interpreted differently. These classifications are there to help pick a technique to solve it. I was mostly confused because going only by the AIMA book the touring Romania problem in chapter 3 should be sequential, but it is said to be episodic.
Answers.UserDisplayName: numq
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T19:22:41.777Z
Answers.Text: @numq According to AIMA, sequential means that your current actions may affect the future actions, while in episodic tasks your current action does not affect the next action. I am not sure which problem the Romania problem is, but if you're referring to the problem of finding the shortest path in a Romanian map, if I remember correctly, then I think whether it's sequential or episodic (still using the AIMA definitions) depends on your actual goal (i.e. problem definition).
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T19:23:02.313Z
Answers.Text: But let's say that you want to go from one start state to a goal state. Then your current action may affect your next action, especially in a directed graph, where you may not be able to go back. Let's say you take some action $a$ in state $s$, which leads you to state $s'$, from which you cannot go out, then your action $a$ determined the actions you can now take in $s'$. This seems to me that it would be a sequential problem.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-24T19:27:25.627Z
Answers.Text: So, basically, if there's dependence between the present and the future, then it's sequential, if there's no such dependency, it's episodic. Again, I'm using the AIMA definitions here. In RL, we care about problems where the present affects the future (so that's the default) and they are called sequential problems too, but in RL you also have episodes, which is something different to what AIMA refers to, which seems to be a step (in RL)
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-14T22:47:30.620Z
Answers.LastActivityDate: 2023-01-14T23:01:41.267Z
Answers.LastEditDate: 2023-01-14T23:01:41.267Z
Answers.UserDisplayName: nbro
Body: <p>Why is the sliding puzzle problem episodic and not sequential?</p>
  <p>From what I understand, an environment is episodic if each episode is independent and doesn't affect past or future episodes. The actions in the next episode don't depend on the actions in past episodes. In other words, current actions/decisions have no effect on future decisions.</p>
  <p>For example, an agent that looks at radiology images to determine if there is a sickness is an example of an episodic environment. One image has nothing to do with the next.</p>
  <p>However, in a sequential environment, an agent requires memory of past actions to determine the next best actions and current actions affect future decisions e.g chess</p>
  <p>But I think the sliding puzzle can be considered a sequential environment because the agent must make a series of actions (moving tiles) in a specific order to reach the goal state (the solved puzzle). The agent's decision at each step is based on the current state of the puzzle, and the agent's actions affect the state of the puzzle for subsequent steps. These episodes aren't independent, they directly affect each other.</p>
  <p>But if we say the sliding puzzle problem is episodic because each puzzle can be seen as one episode, then can't I say the same about chess? Or a crossword puzzle? Or any sequential problem then? One chess match doesn't affect another, and looking at it like that chess would be episodic in that sense (which seems wrong, right?). So why are chess and crossword puzzles sequential but the sliding puzzle is episodic?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-14T22:10:40.753Z
Comments.Text: By sliding puzzle, can you confirm you're referring to [this](https://en.wikipedia.org/wiki/15_puzzle)? Can you please provide the source that defines an "episodic problem" like you defined? Is this from the AIMA book?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-24T17:24:09.263Z
Comments.Text: That is what I am referring to, although an eight instead of fifteen one. It was said to be an episodic problem according to my university lecture materials which uses the AIMA book
Comments.UserDisplayName: numq
Tags: <definitions><environment><episodes>
Title: Why is the sliding puzzle problem episodic?
UserDisplayName: numq
ThreadText: # Why is the sliding puzzle problem episodic?
  
  (Asked by: username_0 on 2023-01-12)
  
  Why is the sliding puzzle problem episodic and not sequential?
  
  From what I understand, an environment is episodic if each episode is independent and doesn't affect past or future episodes. The actions in the next episode don't depend on the actions in past episodes. In other words, current actions/decisions have no effect on future decisions.
  
  For example, an agent that looks at radiology images to determine if there is a sickness is an example of an episodic environment. One image has nothing to do with the next.
  
  However, in a sequential environment, an agent requires memory of past actions to determine the next best actions and current actions affect future decisions e.g chess
  
  But I think the sliding puzzle can be considered a sequential environment because the agent must make a series of actions (moving tiles) in a specific order to reach the goal state (the solved puzzle). The agent's decision at each step is based on the current state of the puzzle, and the agent's actions affect the state of the puzzle for subsequent steps. These episodes aren't independent, they directly affect each other.
  
  But if we say the sliding puzzle problem is episodic because each puzzle can be seen as one episode, then can't I say the same about chess? Or a crossword puzzle? Or any sequential problem then? One chess match doesn't affect another, and looking at it like that chess would be episodic in that sense (which seems wrong, right?). So why are chess and crossword puzzles sequential but the sliding puzzle is episodic?
  
  **Tags:** definitions, environment, episodes
  > **Comments:**
  > **username_1**: By sliding puzzle, can you confirm you're referring to [this](https://en.wikipedia.org/wiki/15_puzzle)? Can you please provide the source that defines an "episodic problem" like you defined? Is this from the AIMA book?  
  > **username_0**: That is what I am referring to, although an eight instead of fifteen one. It was said to be an episodic problem according to my university lecture materials which uses the AIMA book  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-01-14. Score: 1
  
  You might be mixing the definitions of a **step** and an **episode**, which is composed of many steps, at least in [reinforcement learning](http://www.incompleteideas.net/book/RLbook2020.pdf).
  
  In a sliding puzzle problem, where the goal is to move the tiles such that an initial configuration becomes another configuration, each move (or action) would be a step in the episode. Each game would be an episode. Games can be considered independent of each other unless e.g. the board configuration of the next game depends on something that happened in the previous game. This would be in the context of RL.
  
  However, it seems to me that you took the definitions of episodic/sequential problems from the AIMA book (or some other source that is based on this book). For completeness, here's excerpt from the book that defines these problems
  
  > **Episodic** vs. **sequential**: In an episodic task environment, the agent’s experience is divided into atomic episodes. In each episode the agent receives a percept and then performs a single action. Crucially, the next episode does not depend on the actions taken in previous episodes. Many classification tasks are episodic. For example, an agent that has to spot defective parts on an assembly line bases each decision on the current part, regardless of previous decisions; moreover, the current decision doesn’t affect whether the next part is defective. In sequential environments, on the other hand, the current decision could affect all future decisions. Chess and taxi driving are sequential: in both cases, short-term actions can have long-term consequences. Episodic environments are much simpler than sequential environments because the agent does not need to think ahead.
  
  Now, this definition of episodic problem does not seem to be consistent with the usage of an episodic problem in RL, which is just a problem that doesn't go on forever, but ends after a finite number of steps. Chess and the sliding puzzle problems could be formulated as episodic problems **in RL**.
  
  However, chess is not episodic according to Norvig and Russell's book because your action at time step $t$ affects your future actions and states.
  
  You're probably not familiar with bandit problems, but it seems to me that AIMA's definition of episodic problems matches the definition of a bandit problem, which is a simple instance of the full RL problem, which is also called **sequential decision making** problem, because this is a problem where you take actions in sequence.
  
  > Why is the sliding puzzle problem episodic?
  
  At this point, you should have understood that there can be more than one definition of a term. According to the common usage of the terms "episode" and "episodic tasks" in RL, the sliding puzzle problem would be episodic. I also think it would be a sequential problem according to the AIMA book because your current action can indeed affect the actions you take in the future, unless e.g. you don't care about the number of moves you make before ending the game.
  
  > **Comments:**
  > **username_0**: Thank you for the reply. My professor also told me that the definitions are not strict and can be interpreted differently. These classifications are there to help pick a technique to solve it. I was mostly confused because going only by the AIMA book the touring Romania problem in chapter 3 should be sequential, but it is said to be episodic.  
  > **username_1**: @numq According to AIMA, sequential means that your current actions may affect the future actions, while in episodic tasks your current action does not affect the next action. I am not sure which problem the Romania problem is, but if you're referring to the problem of finding the shortest path in a Romanian map, if I remember correctly, then I think whether it's sequential or episodic (still using the AIMA definitions) depends on your actual goal (i.e. problem definition).  
  > **username_1**: But let's say that you want to go from one start state to a goal state. Then your current action may affect your next action, especially in a directed graph, where you may not be able to go back. Let's say you take some action $a$ in state $s$, which leads you to state $s'$, from which you cannot go out, then your action $a$ determined the actions you can now take in $s'$. This seems to me that it would be a sequential problem.  
  > **username_1**: So, basically, if there's dependence between the present and the future, then it's sequential, if there's no such dependency, it's episodic. Again, I'm using the AIMA definitions here. In RL, we care about problems where the present affects the future (so that's the default) and they are called sequential problems too, but in RL you also have episodes, which is something different to what AIMA refers to, which seems to be a step (in RL)  
  
  ---
  
  