> For the complete documentation index, see [llms.txt](https://robert-bassett-coder.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://robert-bassett-coder.gitbook.io/workspace/api-reference/hula.deepr.recurrentlayer.md).

# 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.

####
