--- license: mit library_name: stable-baselines3 pipeline_tag: reinforcement-learning tags: - reinforcement-learning - stable-baselines3 - soft-actor-critic - sac - robotics - continuous-control - gymnasium - mujoco - reacher-v5 --- # SAC Agent for Reacher-v5 🎯 This repository contains a trained **Soft Actor-Critic** agent for the Gymnasium `Reacher-v5` environment. The agent controls a two-joint robotic manipulator and was trained using Stable-Baselines3, Gymnasium and MuJoCo. [View the complete project on GitHub](https://github.com/M-Stasiak/TSwR_project) ## Usage Clone the complete project from GitHub and install the required dependencies: ```bash git clone https://github.com/M-Stasiak/TSwR_project.git cd TSwR_project pip install -r requirements.txt ``` ### Option 1: Manual download [Download the trained SAC model](sac_reacher_final.zip) and place it in the `trained_models` directory. ### Option 2: Download with `huggingface_hub` Install the Hugging Face client: ```bash pip install huggingface_hub ``` Download the model directly into the required directory: ```python from huggingface_hub import hf_hub_download model_path = hf_hub_download( repo_id="M-Stasiak/sac-reacher-v5", filename="sac_reacher_final.zip", local_dir="trained_models", ) print(f"Model downloaded to: {model_path}") ``` Then select the RL controller in `main.py` and run: ```bash python main.py ``` The GitHub repository contains the custom environment wrapper, observation processing and simulation code required to run the trained model. ## Model details - **Algorithm:** Soft Actor-Critic - **Environment:** `Reacher-v5` - **Framework:** Stable-Baselines3 - **Policy:** `MlpPolicy` - **Network architecture:** `[256, 256, 256]` - **Training timesteps:** `2,000,000` - **Observation size:** `10` - **Action size:** `2` ## Evaluation results The final evaluation was performed over 1000 episodes. | Metric | Result | | ----------------------- | -----: | | Success rate | 97.2% | | Average number of steps | 48.341 | ## 📜 License This model is released under the **MIT License**. See the [LICENSE](LICENSE) file for details.