# hula.DeepR.RecurrentLayer

`import hula.DeepR.RecurrentLayer`&#x20;

`from hula.DeepR import RecurrentLayer`

## RecurrentLayer( *inputs*, *outputs*, *activation\_func* )

Generated recurrent nodes with the activation function `activation_func` with the size of `inputs` by`outputs`

##

#### RecurrentLayer.activate( *X*  )

Feeds `X` through it's nodes, and returns the output, while updating the recurrent state to the output

#### RecurrentLayer.randomAct( *alpha* )

Generates a random action to apply to its weights, as well as it's recurrent weights, then stores it for scoring later

#### RecurrentLayer.score( *score* )

Applies `score` to the stored actions

#### RecurrentLayer.simplify( *threshold*,   *min\_score* )

Groups together states with `threshold` distance from each other, then only allows states that have a score higher than `min_score` to rejoin the State-Action Tree

#### RecurrentLayer.train( *alpha* )

Applies the best selected actions according to their state's distance from the current state as well as their score, then only applies `alpha` percentage of the action.

####


---

# 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/api-reference/hula.deepr.recurrentlayer.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.
