Answers.Body: <h3>Initial state</h3>
  <p><em>How things are at first</em>.</p>
  <p>In your particular example, it would be where your <code>k</code> knights are placed on the board initially. Your problem doesn't precisely state this, so you could either place them at the bottom or at random.</p>
  <h3>Goal state</h3>
  <p>The board with the <code>k</code> knights placed on the target squares.</p>
  <h3>State transition function</h3>
  <p><em>A function that takes <strong>actions</strong> (bound presumably by rules) and returns a new state</em>.</p>
  <p>In the <code>k</code> knight problem, the legal actions are moving parallel and in L shape movements, after which the knight will be in a new position and the board in a new state.</p>
  <h3>State space</h3>
  <p><em>The set of <strong>all</strong> states reachable from the initial state by any sequence of actions</em>.</p>
  <p>So, in the case of the <code>k</code> knight problem, your state space would start at the top with your <em>initial state</em> followed down by each individual movement of the <code>k</code> knights and the resulting new state. A graph where <em>lines are actions</em> and <em>nodes are new states</em> or a table are common representations of state space.</p>
  <hr />
  <h3>Reference</h3>
  <p><a href="http://aima.cs.berkeley.edu/" rel="nofollow noreferrer">Artificial Intelligence: A Modern Approach</a>, by S. Russell and P. Norvig.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T19:11:39.370Z
Answers.LastActivityDate: 2017-01-10T19:03:31.103Z
Answers.LastEditDate: 2020-06-17T09:57:20.710Z
Answers.UserDisplayName: Keno
Body: <p>I'm studying for my AI final exam, and I'm stuck in the state space representation. I understand initial and goal states, but what I don't understand is the state space and state transition function. Can someone explain what are they with examples?</p>
  <p>For example, one of the questions was this on my previous exam:</p>
  <blockquote>
  <p>Given <span class="math-container">$k$</span> knights on an infinite (in all directions) chessboard and <code>k</code> selected squares of the board. Our task to move the knights to these selected squares obeying the following simple rules:</p>
  <ul>
  <li>All knights move parallel, following their movement rule (L-shape jump)</li>
  <li>No knights can move to a square on which a knight stood anytime before</li>
  </ul>
  <p>Give the state space of the problem, the starting and goal states, and the state transition function!</p>
  </blockquote>
  
Tags: <terminology><definitions><search><state-spaces><transition-model>
Title: What are the state space and the state transition function in AI?
UserDisplayName: İsmail Uysal
ThreadText: # What are the state space and the state transition function in AI?
  
  (Asked by: username_0 on 2017-01-06)
  
  I'm studying for my AI final exam, and I'm stuck in the state space representation. I understand initial and goal states, but what I don't understand is the state space and state transition function. Can someone explain what are they with examples?
  
  For example, one of the questions was this on my previous exam:
  
  > Given $k$ knights on an infinite (in all directions) chessboard and `k` selected squares of the board. Our task to move the knights to these selected squares obeying the following simple rules:
  >
  > * All knights move parallel, following their movement rule (L-shape jump)
  > * No knights can move to a square on which a knight stood anytime before
  >
  > Give the state space of the problem, the starting and goal states, and the state transition function!
  
  **Tags:** terminology, definitions, search, state-spaces, transition-model
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-06. Score: 7 | Accepted answer
  
  ### Initial state
  
  *How things are at first*.
  
  In your particular example, it would be where your `k` knights are placed on the board initially. Your problem doesn't precisely state this, so you could either place them at the bottom or at random.
  
  ### Goal state
  
  The board with the `k` knights placed on the target squares.
  
  ### State transition function
  
  *A function that takes **actions** (bound presumably by rules) and returns a new state*.
  
  In the `k` knight problem, the legal actions are moving parallel and in L shape movements, after which the knight will be in a new position and the board in a new state.
  
  ### State space
  
  *The set of **all** states reachable from the initial state by any sequence of actions*.
  
  So, in the case of the `k` knight problem, your state space would start at the top with your *initial state* followed down by each individual movement of the `k` knights and the resulting new state. A graph where *lines are actions* and *nodes are new states* or a table are common representations of state space.
  
  ---
  
  ### Reference
  
  [Artificial Intelligence: A Modern Approach](http://aima.cs.berkeley.edu/), by S. Russell and P. Norvig.
  
  
  ---
  
  