action given a state and updates the policy, in our case represented by a neural network, to maximize the expected reward. Using a temporal-difference calculation, it can take into consideration a sequence of steps that leads to the final state, represented by finishing all cards in your hand. The maximal reward is given once the player is the first one to reach the final state.

The typical Q-learning algorithm represents a function $Q$:

$$Q:SxA \rightarrow \mathbb{R}$$

where $S$ is the state, in our case represented by the 28 values composed by the 17 cards at hand and the 11 cards at the board. The actions, $A$, are expressed using the 200 discrete values for all the possible actions.

To update the Q-values, the algorithm uses the following update function:

$$Q'(s_t, a_t)= Q(s,a) + \alpha  \times \left (  TD \right )$$

where $t$ is the current step, $\alpha$ is a pre-defined learning rate and $TD$ is the temporal-difference function, calculated as:

$$%TD =r_t \times \gamma \times maxQ\left (s__{t+1, a_t}  \right ) - maxQ\left (s__{t1, a_t}  \right )
TD=r_t \times \gamma \times maxQ \left ( s_{t+1}, a_t \right ) - maxQ \left ( s_t, a_t \right )$$

where $r_t$ is the obtained 