# State-Action Trimming

In the previous sections we established how to initialize and activate a Neural Network, and how to train that Network using Deep Reinforcement.

But Hula wouldn't be Hula if it weren't experimental!

Saving every singe state and action will bog down the program and take up memory. There are a variety of other solutions to this problem, but Hula has brought it's own to the table.

State-Action Trimming will combine actions with close states and cut out actions that led to bad results.

Using the previous example,

```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)
)
```

Using the command`Net.simplify(threshold, min_score)` we can do State-Action Trimming.

```python
ExampleNet.simplify(2, 0.1)
```


---

# 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/state-action-trimming-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.
