Spaces:
Paused
Paused
Download src/embodiment/environment.py from ThomasHeisig/Brain-5D-Space: direct link, hf CLI and curl.
- Browser
- Download file 892 Bytes
-
https://huggingface.co/spaces/ThomasHeisig/Brain-5D-Space/resolve/main/src/embodiment/environment.py
- Command line
-
hf download hf://spaces/ThomasHeisig/Brain-5D-Space/src/embodiment/environment.py
-
curl -L -o environment.py https://huggingface.co/spaces/ThomasHeisig/Brain-5D-Space/resolve/main/src/embodiment/environment.py
892 Bytes
| """Environment contracts for embodied Brain-5D experiments.""" | |
| from __future__ import annotations | |
| from typing import Protocol, runtime_checkable | |
| from .models import ActionCommand, EnvironmentKind, EnvironmentObservation | |
| class EnvironmentAdapter(Protocol): | |
| """Reset/step contract shared by simulation, physical, and digital worlds.""" | |
| def environment_id(self) -> str: | |
| """Return a stable environment identifier.""" | |
| ... | |
| def kind(self) -> EnvironmentKind: | |
| """Return the environment category.""" | |
| ... | |
| def reset(self, seed: int | None = None) -> EnvironmentObservation: | |
| """Start a new episode and return its initial observation.""" | |
| ... | |
| def step(self, action: ActionCommand) -> EnvironmentObservation: | |
| """Advance the environment by applying one action.""" | |
| ... | |