# Deep Reinforcement

Hula has a variety of options when it comes to deep reinforcement.

Using the `Hula.DeepR`module, we can construct a Neural Network.

```python
from hula.DeepR import Net, FeedForwardLayer
from hula.rlutils import sigmoid, softplus, tanh

ExampleNet = Net(
  FeedForwardLayer(2, 16, tanh),
  FeedForwardLayer(16, 6, softplus),
  FeedForwardLayer(6, 1, sigmoid)
)
```

Next, we need to generate a random action to perform on this network's weights.

```python
ExampleNet.randomAct(0.01)
```

Next, we need to score the network based on how well it did. In this case, let's say we want the network to get closer to `0` for an input of `[0, 1]`.

In hula, higher scores are valued and selected over lower scores. So, in cases where a lower score is preferred, you will have to negate it.

```python
output = ExampleNet.activate([0, 1])[0]

ExampleNet.score(-output)
```

That's all there is to it!&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://robert-bassett-coder.gitbook.io/workspace/getting-started-1/deep-reinforcement-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
