Metadata-Version: 2.4
Name: sb3-soft
Version: 0.1.0
Summary: Soft Q-target reinforcement learning algorithms for Stable-Baselines3
Project-URL: Homepage, https://github.com/miki-yuasa/sb3-soft
Project-URL: Repository, https://github.com/miki-yuasa/sb3-soft
Project-URL: Issues, https://github.com/miki-yuasa/sb3-soft/issues
Author: Mikihisa Yuasa
License: MIT License
        
        Copyright (c) 2026 Mikihisa Yuasa 湯淺幹久
        
        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
Keywords: reinforcement-learning,sac,sql,stable-baselines3
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: stable-baselines3>=2.5.0
Description-Content-Type: text/markdown

# sb3-soft
Reinforcement learning algorithms for soft Q targets compatible with Stable-Baselines3.
Currently only discrete action spaces are supported.

The implemented algorithms are:
- Soft Q-Learning (SQL),
- Stable Discrete Soft Actor-Critic (SDSAC).


## Installation
You can install the package from PyPI:

```bash
pip install sb3-soft
# or using uv
uv add sb3-soft
```

You can also install directly from GitHub:

```bash
pip install git+https://github.com/miki-yuasa/sb3-soft.git
# or using uv
uv add git+https://github.com/miki-yuasa/sb3-soft.git
```

## Usage

```python
from sb3_soft import SQL

# Create the environment
env = ...

# Create the model
model = SQL("MlpPolicy", env, ...)

# Train the model
model.learn(total_timesteps=10000)

# Save the model
model.save("sql_model")

# Load the model
model = SQL.load("sql_model")
```

## Publishing to PyPI (uv)

1. Bump the version in `pyproject.toml`.
2. Build distributions:

```bash
uv build
```

3. (Optional) Publish to TestPyPI first:

```bash
export UV_PUBLISH_URL="https://test.pypi.org/legacy/"
export UV_PUBLISH_TOKEN="<testpypi-token>"
uv publish
unset UV_PUBLISH_URL
```

4. Publish to PyPI:

```bash
export UV_PUBLISH_TOKEN="<pypi-token>"
uv publish
```

You can also pass the token directly with `uv publish --token <token>`.