Metadata-Version: 2.4
Name: phyelds-vmas
Version: 8.11.0
Summary: VMAS integration for phyelds
License: Apache-2.0
Author: Davide Domini
Author-email: davide.domini@unibo.it
Requires-Python: >=3.12,<3.14
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: numpy (>=1.26)
Requires-Dist: phyelds (>=8.0.0,<9.0.0)
Requires-Dist: phyelds-simulator (>=8.0.0,<9.0.0)
Requires-Dist: torch (>=2.0)
Requires-Dist: vmas (==1.5.2)
Project-URL: Homepage, https://github.com/phyelds/phyelds
Project-URL: Repository, https://github.com/phyelds/phyelds
Description-Content-Type: text/markdown

# phyelds-vmas

VMAS integration for [phyelds](https://pypi.org/project/phyelds/).

## Installation

```bash
pip install phyelds-vmas
```

`phyelds-vmas` installs compatible `phyelds` and `phyelds-simulator` releases, and VMAS.

## Usage

```python
from phyelds.simulator import Simulator
from phyelds.simulator.runner import schedule_program_for_all
from phyelds.calculus import aggregate
from phyelds.vmas import VmasEnvironment, action, vmas_runner

@aggregate
def move_right():
    action.send([1, 0])
```

The extension requires `phyelds >=8.0.0,<9.0.0`.

Programs share the typed sensors `observations`, `rewards`, `dones`, `infos` and
`agent`, and the actuator `action`, with the host. Existing string names such as
`sense("observations")` and `store("action", [1, 0])` remain supported. An action
has the meaning assigned by the VMAS scenario (for example a force or a discrete
choice).

Readings and positions select environment 0; `agent` exposes the VMAS agent with
its full batched state. `observations` is a tensor, `rewards` a scalar tensor
(initially zero), `dones` a Python bool (initially false), and `infos` a dictionary
of tensors sliced to environment 0 (initially empty). The runner repeats actions
across all VMAS environments.

Each program must send an action every round. If it has not run yet or sent no
action, `vmas_runner` raises a `ValueError` naming the node before stepping VMAS.

## Release

`phyelds-vmas` follows the same version as `phyelds`. The root semantic-release
workflow calculates the release version, writes it to both package manifests,
and publishes both distributions together.

