Metadata-Version: 2.4
Name: HoST-pytorch
Version: 0.0.44
Summary: Humanoid Standing Up
Project-URL: Homepage, https://pypi.org/project/HoST-pytorch/
Project-URL: Repository, https://github.com/lucidrains/HoST-pytorch
Author-email: Phil Wang <lucidrains@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Phil Wang
        
        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: artificial intelligence,deep learning,humanoids standing,reinforcement learning,reward shaping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: assoc-scan>=0.0.2
Requires-Dist: einops>=0.8.1
Requires-Dist: einx>=0.3.0
Requires-Dist: evolutionary-policy-optimization>=0.0.38
Requires-Dist: hl-gauss-pytorch>=0.1.19
Requires-Dist: jaxtyping
Requires-Dist: pydantic>=2.0
Requires-Dist: torch>=2.5
Requires-Dist: tqdm
Provides-Extra: examples
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

<img src="./rewards.png" width="600px"></img>

## HoST - Pytorch (wip)

Implementation of Humanoid Standing Up, from the paper <a href="https://taohuang13.github.io/humanoid-standingup.github.io/">Learning Humanoid Standing-up Control across Diverse Postures</a> out of Shanghai, in Pytorch

Besides for the set of reward functions, the other contribution is validating [an approach using multiple critics](https://openreview.net/forum?id=rJvY_5OzoI) out of Boston University

## Install

```bash
$ pip install HoST-pytorch
```

## Usage

```python
import torch
from host_pytorch import Agent
from host_pytorch.mock_env import Env, mock_hparams

env = Env()

agent = Agent(
    num_actions = (10, 10, 20),
    actor = dict(
        dims = (env.dim_state, 256, 128),
    ),
    critics = dict(
        dims = (env.dim_state, 256),
    ),
    reward_hparams = mock_hparams()
)

memories = agent(env)

agent.learn(memories)

agent.save('./standing-up-policy.pt', overwrite = True)
```

## Citations

```bibtex
@article{huang2025host,
  title     = {Learning Humanoid Standing-up Control across Diverse Postures},
  author    = {Huang, Tao and Ren, Junli and Wang, Huayi and Wang, Zirui and Ben, Qingwei and Wen, Muning and Chen, Xiao and Li, Jianan and Pang, Jiangmiao},
  journal   = {arXiv preprint arXiv:2502.08378},
  year      = {2025},
}
```

```bibtex
@article{Farebrother2024StopRT,
    title   = {Stop Regressing: Training Value Functions via Classification for Scalable Deep RL},
    author  = {Jesse Farebrother and Jordi Orbay and Quan Ho Vuong and Adrien Ali Taiga and Yevgen Chebotar and Ted Xiao and Alex Irpan and Sergey Levine and Pablo Samuel Castro and Aleksandra Faust and Aviral Kumar and Rishabh Agarwal},
    journal = {ArXiv},
    year   = {2024},
    volume = {abs/2403.03950},
    url    = {https://api.semanticscholar.org/CorpusID:268253088}
}
```

```bibtex
@article{Tao2022LearningTG,
    title  = {Learning to Get Up},
    author = {Tianxin Tao and Matthew Wilson and Ruiyu Gou and Michiel van de Panne},
    journal = {ACM SIGGRAPH 2022 Conference Proceedings},
    year   = {2022},
    url    = {https://api.semanticscholar.org/CorpusID:248496244}
}
```
