The search space is the container responsible for any sequence of states. The QLSpace class defines the search space (States x Actions) for the Q-learning algorithm, as shown in the following figure:
The search space can be provided by the end user with a list of states and actions, or automatically created by providing the number of states by taking the following parameters:
- States: The sequence of all possible states defined in the Q-learning search space
- goalIds: A list of identifiers of states that are goals
Now let us see the implementation ...