The state space is composed of all the possible combinations of values of the state variables that define our problem. For the case of the taxi example, these variables are as follows:
- The current position is defined on the basis of rows and column numbers. These account for 5 rows x 5 columns = 25 cells (positions).
- Four destinations: Marked with R (red; the color it shows in the accompanying Jupyter notebook), B (blue), Y (yellow) and G (green).
- Five possible passenger locations with regard to the taxi:
- Pickup/drop-off in any of the four locations
- Plus one for the passenger inside in any of the remaining cells (+1)
Hence, we have a total of 25 x 4 x 5 = 500 possible states. The following represents one of them:
+---------+ ...