The search space

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:

Figure 6: State transition matrix with QLData (Q-value, reward, probability)

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 ...

Get Scala Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.