Metadata-Version: 2.1
Name: datadynamics
Version: 0.0.1
Summary: Simulation environment for data collection.
Home-page: https://lfwa.github.io/datadynamics/
License: BSD-3-Clause
Author: Lasse F. Wolff Anthony
Author-email: lfwa@proton.me
Requires-Python: >=3.10,<3.12
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: gymnasium (>=0.27.1,<0.28.0)
Requires-Dist: h5py (>=3.8.0,<4.0.0)
Requires-Dist: matplotlib (>=3.6.3,<4.0.0)
Requires-Dist: networkx[default] (>=3.0,<4.0)
Requires-Dist: numpy (>=1.24.2,<2.0.0)
Requires-Dist: pettingzoo (>=1.22.2,<2.0.0)
Requires-Dist: pillow (>=9.4.0,<10.0.0)
Requires-Dist: pygame (>=2.1.2,<3.0.0)
Requires-Dist: tqdm (>=4.65.0,<5.0.0)
Requires-Dist: vidmaker (>=2.3.0,<3.0.0)
Project-URL: Repository, https://github.com/lfwa/datadynamics
Description-Content-Type: text/markdown

# Datadynamics
[![pypi](https://img.shields.io/pypi/v/datadynamics?label=pypi)](<LINK TO PYPI>)
[![Test Status](https://github.com/lfwa/datadynamics/actions/workflows/test.yml/badge.svg)](https://github.com/lfwa/datadynamics/actions/workflows/test.yml)
[![Documentation Status](https://github.com/lfwa/datadynamics/actions/workflows/documentation.yml/badge.svg)](https://lfwa.github.io/datadynamics/)
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![License](https://img.shields.io/github/license/lfwa/datadynamics)](https://github.com/lfwa/datadynamics/blob/main/LICENSE)

Datadynamics is a Python library and environment for simulating (multi-agent) data collection dynamics. The library is built on top of [PettingZoo](https://github.com/Farama-Foundation/PettingZoo) and is distributed under the [BSD 3-Clause License](LICENSE).

The documentation is available at [lfwa.github.io/datadynamics/](https://lfwa.github.io/datadynamics/).

## Installation
Datadynamics can be installed via PyPI from Python 3.10 and higher:

```console
$ pip install datadynamics
```

Alternatively, you can install from source by downloading the [latest release](https://github.com/lfwa/datadynamics/releases) or by cloning the [GitHub repository](https://github.com/lfwa/datadynamics), navigating into the directory, and installing via [Poetry](https://python-poetry.org/): `poetry install`.

## Usage
Visit the documentation site at [lfwa.github.io/datadynamics/](https://lfwa.github.io/datadynamics/) for full usage guides.

### Quick Start

<p align="center">
    <img src="https://raw.githubusercontent.com/lfwa/datadynamics/main/datadynamics.gif" width="400px"/>
</p>

```python
# See tutorials/collector/wrapper_example.py
from datadynamics.environments import collector_v0
from datadynamics.policies import greedy_policy_v0

env = collector_v0.env(
    n_points=300, n_agents=2, max_collect=[120, 180], render_mode="human"
)
policy = greedy_policy_v0.policy(env=env)
env.reset()
for agent in env.agent_iter():
    observation, reward, termination, truncation, info = env.last()
    action = policy.action(observation, agent)
    env.step(action)
```

