<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70258429">src/mlpack/methods/ne/tasks.hpp</a>:</p>
<pre style='color:#555'>&gt; +      double theta_dot = mlpack::math::Random(-1.5, 1.5);
&gt; +
&gt; +      for (ssize_t step=0; step&lt;num_step; ++step) {
&gt; +        // Convert input into range [0, 1]
&gt; +        std::vector&lt;double&gt; inputs = {(x + 2.4) / 4.8,
&gt; +                                      (x_dot + 0.75) / 1.5,  // ??
&gt; +                                      (theta + theta_limit) / 0.41,
&gt; +                                      (theta_dot + 1.0) / 2.0,
&gt; +                                      1};  // TODO: use arma::mat for input.
&gt; +        genome.Activate(inputs);
&gt; +        std::vector&lt;double&gt; output;
&gt; +        genome.Output(output);
&gt; +
&gt; +        double action = output[0];
&gt; +        if (output[0] &lt; 0.5) {
&gt; +          action = -1;
</pre>
<p>Action should be the index of the neuron with highest probability. If we just use one neuron it's 0 or 1.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/686/files/1fe7d730fd88cbaf7019e8936face4c6ddcb0577..ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70258429">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFFt-ixCGccp2b7qr6x_mHFm4D6gnks5qUkesgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPCH57Z6GJ1mexLL-mvc2RMuIBmtks5qUkesgaJpZM4IwJa6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/686/files/1fe7d730fd88cbaf7019e8936face4c6ddcb0577..ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70258429"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>