Giter Club home page Giter Club logo

agx-r / rnnrl-agent Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 46 KB

This is a script that implements a Recurrent Neural Network (RNN) with reinforcement learning in C# for computer games developed in Unity. The script allows you to configure inputs and outputs, and it stores the weights in text files. The RNNRLAgent class provides the core functionality for the RNN-based agent.

License: MIT License

C# 100.00%
machine-learning recurrent-neural-networks reinforcement-learning unity

rnnrl-agent's Introduction

Recurrent Neural Network with Reinforcement Learning Agent for Unity

This is a script that implements a Recurrent Neural Network (RNN) with reinforcement learning in C# for computer games developed in Unity. The script allows you to configure inputs and outputs, and it stores the weights in text files.

The RNNRLAgent class provides the core functionality for the RNN-based agent. It includes methods for forward propagation, backward propagation, and saving/loading weights. The class is designed to be integrated into Unity projects for creating intelligent bots or agents that can learn and make decisions based on the game environment.

API

API Documentation

Features

  • RNN architecture with configurable input size, hidden size, and output size.
  • Forward propagation to compute output based on input vector.
  • Backward propagation to update weights based on target output.
  • Saving and loading weights from text files.
  • Integration with Unity for game development.

Usage

  1. Copy the RNNRLAgent.cs script into your Unity project.

  2. Create an instance of the RNNRLAgent class in your bot or agent script, and configure the input size, hidden size, and output size.

  3. Use the ForwardPropagation method to compute the output of the agent based on the input vector.

  4. Make decisions based on the output vector to control the behavior of your bot or agent.

  5. Provide feedback to the agent using a scoring logic, and call the BackwardPropagation method to update the weights and reinforce learning.

  6. Use the SaveWeights and LoadWeights methods to store and retrieve weights from text files, if needed.

Examples

Sentiment Analysis Agent

Player Movement

License

This script is licensed under the MIT License.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Authors

rnnrl-agent's People

Contributors

agx-r avatar lunariastardrop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lunariastardrop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.