Metadata-Version: 2.4
Name: torchrl-agents
Version: 0.3.3
Summary: Object-oriented RL agents based on torchrl.
Project-URL: Homepage, https://github.com/valterschutz/torchrl-agents
Author-email: Valter Schutz <valterschutz@proton.me>
License: Copyright © 2025 Valter Schütz
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: torchrl>=0.8.0
Description-Content-Type: text/markdown

# TorchRL Agents

TorchRL Agents is a Python package that provides object-oriented reinforcement learning (RL) agents built on top of PyTorch and TorchRL.

## Object-Oriented Design

At the core of this package is the `Agent` abstract base class, which defines a structured interface for RL agents. The `Agent` class provides a blueprint that other classes can subclass to implement specific RL algorithms. This design ensures consistency and reusability across different agents.

### Key Features of the `Agent` Class:
- **Abstract Methods**: Enforces the implementation of essential functionalities, such as processing batches and defining policies.
- **Serialization**: Supports saving and loading agent configurations and weights, enabling easy training and deployment.
- **Modularity**: Allows for easy extension and customization by subclassing.

By subclassing the `Agent` class, you can implement various RL algorithms while adhering to a consistent structure.

## Installation
```bash
pip install torchrl-agents
```

## Examples

See [torchrl-examples]() for some examples where agents are trained on benchmark environments.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
