Spaces:
Sleeping
Sleeping
Download agent/__init__.py from Dhaerya/Traffic-Control: direct link, hf CLI and curl.
- Browser
- Download file 503 Bytes
-
https://huggingface.co/spaces/Dhaerya/Traffic-Control/resolve/main/agent/__init__.py
- Command line
-
hf download hf://spaces/Dhaerya/Traffic-Control/agent/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Dhaerya/Traffic-Control/resolve/main/agent/__init__.py
503 Bytes
| """ | |
| Agent package. | |
| Provides: | |
| BaseAgent — abstract interface | |
| QLearningAgent — tabular Q-learning (NumPy only) | |
| DQNAgent — Deep Q-Network (PyTorch, GPU-accelerated) | |
| """ | |
| from .base_agent import BaseAgent | |
| from .q_learning_agent import QLearningAgent | |
| # DQN requires PyTorch | |
| try: | |
| from .dqn_agent import DQNAgent | |
| DQN_AVAILABLE = True | |
| except ImportError: | |
| DQN_AVAILABLE = False | |
| DQNAgent = None # type: ignore | |
| __all__ = ["BaseAgent", "QLearningAgent", "DQNAgent"] | |