Spaces:
Sleeping
Sleeping
Download debug_run.py from ascentftw/ATC-RL-Environment: direct link, hf CLI and curl.
- Browser
- Download file 594 Bytes
-
https://huggingface.co/spaces/ascentftw/ATC-RL-Environment/resolve/main/debug_run.py
- Command line
-
hf download hf://spaces/ascentftw/ATC-RL-Environment/debug_run.py
-
curl -L -o debug_run.py https://huggingface.co/spaces/ascentftw/ATC-RL-Environment/resolve/main/debug_run.py
594 Bytes
| from rl_env.environment import ATCEnv | |
| from rl_env.models import ATCAction | |
| env = ATCEnv() | |
| obs, _ = env.reset(task="single_approach") | |
| print("Initial observation:", obs) | |
| # Realistic safe sequence | |
| commands = [ | |
| "ATC VECTOR RL001 90", # turn east toward the runway | |
| "ATC ALTITUDE RL001 4000", # descend to 4000 ft | |
| "ATC SPEED RL001 210", # set speed to 210 kt | |
| "ATC LAND RL001 RWY_1" # request landing | |
| ] | |
| action = ATCAction(commands=commands) | |
| obs, reward, done, _, info = env.step(action) | |
| print("After step:", obs, "reward:", reward, "done:", done) | |