ass="n">next_state</span><span class="p">)]</span><span class="o">.</span><span class="n">todense</span><span class="p">())</span>
        <span class="n">index_current</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">state</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="n">action</span><span class="p">])</span>
        <span class="n">q_current</span> <span cl