To learn the encoder \(h\) , we optimize a contrastive loss on encodings of the current and future states along the same trajectory. We use the InfoNCE Loss [1]},
\(\mathcal {L}_{q} = \log \frac{\exp (q^T W k)}{ \exp \left(\sum _{i=0}^{K} \exp (q^T W k_{i}) \right)}\) 
