Spaces:
Running
Running
Download scripts/openenv_geo/run_env.py from Samunhashed/geo-audit-env: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/Samunhashed/geo-audit-env/resolve/main/scripts/openenv_geo/run_env.py
- Command line
-
hf download hf://spaces/Samunhashed/geo-audit-env/scripts/openenv_geo/run_env.py
-
curl -L -o run_env.py https://huggingface.co/spaces/Samunhashed/geo-audit-env/resolve/main/scripts/openenv_geo/run_env.py
376 Bytes
| from env import GeoEnv | |
| from models import Action | |
| env = GeoEnv() | |
| obs = env.reset() | |
| print("start:", obs) | |
| actions = ["up", "down", "left", "right"] | |
| for step in range(10): | |
| action = Action(move=actions[step % 4]) | |
| obs, reward, done = env.step(action) | |
| print(f"step {step}: {obs.position}, reward={reward}") | |
| if done: | |
| print("reached goal!") | |
| break |