CoolFace
Apppublic

huggsook/connect-ai-Humanoid-v5

sourceHugging Faceupdated 26d agoView on Hugging Face
0likes
App README

huggsook/connect-ai/Humanoid-v5

<p align="center"> <img src="https://img.shields.io/badge/Environment-Gymnasium%20Humanoid--v5-00f0ff?style=for-the-badge&logo=openai" alt="Env"> <img src="https://img.shields.io/badge/Algorithm-PPO%20(Proximal%20Policy%20Optimization)-a855f7?style=for-the-badge" alt="PPO"> <img src="https://img.shields.io/badge/Framework-Stable--Baselines3-10b981?style=for-the-badge" alt="SB3"> <img src="https://img.shields.io/badge/Visualization-Three.js%203D%20Studio-f59e0b?style=for-the-badge" alt="3D"> </p>


๐ŸŽฌ Agent Simulation & Training Preview

<div align="center"> <video src="https://huggingface.co/huggsook/connect-ai-Humanoid-v5/resolve/main/humanoid_preview.mp4" width="100%" autoplay loop muted playsinline controls> Your browser does not support the video tag. </video> <p><em>๐ŸŽฅ 3D Humanoid-v5 PPO Bipedal Locomotion & Dynamic Balance Simulation</em></p> </div>


๐Ÿ“Œ Project Overview

`huggsook/connect-ai/Humanoid-v5`๋Š” Gymnasium์˜ ๊ณ ๋‚œ๋„ 3D ๋‹ค๊ด€์ ˆ ๋ณดํ–‰ ๋กœ๋ด‡ ํ™˜๊ฒฝ์ธ `Humanoid-v5`์—์„œ PPO(Proximal Policy Optimization) ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ†ตํ•ด 17๊ฐœ ๊ด€์ ˆ ๋ชจํ„ฐ๋ฅผ ์ œ์–ดํ•˜์—ฌ ์•ˆ์ •์ ์ธ ์ง๋ฆฝ ๋ณดํ–‰(Bipedal Locomotion)์„ ํ•™์Šตํ•œ ๊ฐ•ํ™”ํ•™์Šต ํ”„๋กœ์ ํŠธ์ž…๋‹ˆ๋‹ค.

โœจ Key Features

  • โ€”3D Real-time Physics Simulator: Three.js ๊ธฐ๋ฐ˜ 17-DoF ๋กœ๋ด‡ ๊ด€์ ˆ ๋ชจํ„ฐ, CoM(๋ฌด๊ฒŒ ์ค‘์‹ฌ์ ) ์ถ”์ , ๋ฐœ ์ง€๋ฉด ์ ‘์ด‰๋ ฅ ๋ฐ ์™ธ๋ž€(๋ฐ€๊ธฐ/๋ฐ”๋žŒ) ์‹œ๋ฎฌ๋ ˆ์ด์…˜
  • โ€”Full Process Visualization: ์‹ค์‹œ๊ฐ„ ์—ํ”ผ์†Œ๋“œ ๋ณด์ƒ(Reward) ๊ณก์„ , 10-Ep ์ด๋™ ํ‰๊ท ์„ , Critic Value Loss & Actor Policy Loss, ์ •์ฑ… ์—”ํŠธ๋กœํ”ผ ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง
  • โ€”Neural Network Activation Inspector: 376๊ฐœ ๊ฐ๊ฐ ๊ด€์ธก ์ž…๋ ฅ โž” ์€๋‹‰์ธต โž” 17๊ฐœ ๊ด€์ ˆ ํ† ํฌ ์ถœ๋ ฅ ์‹ ํ˜ธ ์‹ค์‹œ๊ฐ„ ์‹œ๊ฐํ™”
  • โ€”One-Click Package Export: ํ•™์Šต๋œ ๊ฐ€์ค‘์น˜, ์ •๊ทœํ™” ํ†ต๊ณ„, CSV ๋กœ๊ทธ, 3D ๋ทฐํฌํŠธ ์Šคํฌ๋ฆฐ์ƒท ์ผ๊ด„ ZIP ์••์ถ• ๋‹ค์šด๋กœ๋“œ ์ง€์›

โš™๏ธ Hyperparameters & Training Setup

ParameterValueDescription
EnvironmentHumanoid-v53D Physics Bipedal Robot (17 Actions, 376 Observations)
AlgorithmPPO (MlpPolicy)Actor-Critic with Generalized Advantage Estimation
Learning Rate3e-4Adam optimizer with linear/constant schedule
Total Timesteps100,000Steps trained
Batch Size64Mini-batch size for surrogate loss
n_steps2048Rollout buffer steps per update
n_epochs10Optimization epochs per update
Gamma ($\gamma$)0.99Discount factor
GAE Lambda ($\lambda$)0.95Generalized Advantage Estimation factor
Clip Range ($\epsilon$)0.2PPO surrogate objective clipping parameter
Entropy Coef0.0Exploration bonus coefficient
NormalizationVecNormalizeObservation & Reward normalization enabled

๐Ÿš€ How to Load and Evaluate in Python

\\\`python import gymnasium as gym from stablebaselines3 import PPO from stablebaselines3.common.vec_env import DummyVecEnv, VecNormalize

1. Create Humanoid Environment

def makeenv(): return gym.make("Humanoid-v5", rendermode="human")

env = DummyVecEnv([make_env])

env = VecNormalize.load("models/vec_normalize.pkl", env)

2. Load Model from Hugging Face Hub

model = PPO.load("ppo_humanoid.zip", env=env)

3. Test & Render

obs = env.reset()

for _ in range(1000):

action, _states = model.predict(obs, deterministic=True)

obs, rewards, dones, info = env.step(action)

if dones:

obs = env.reset()

\\\`


๐Ÿ“ฆ Repository Structure

\\\ . โ”œโ”€โ”€ README.md # Hugging Face Model Card & Overview โ”œโ”€โ”€ humanoid_preview.mp4 # Agent Walk Simulation Video โ”œโ”€โ”€ index.html # Interactive 3D Web Studio (Spaces Ready) โ”œโ”€โ”€ styles.css # Dark Cyberpunk Glassmorphism UI โ”œโ”€โ”€ models/ โ”‚ โ”œโ”€โ”€ ppo_humanoid_weights.json # Actor-Critic Network Weights โ”‚ โ””โ”€โ”€ vec_normalize_stats.json # Env Normalization Parameters โ”œโ”€โ”€ logs/ โ”‚ โ””โ”€โ”€ training_metrics.csv # Full Training Trajectory (Reward/Loss) โ””โ”€โ”€ js/ โ”œโ”€โ”€ humanoid_sim.js # 3D Kinematics & Physics Engine โ”œโ”€โ”€ charts_manager.js # Chart.js Live Analytics Manager โ”œโ”€โ”€ training_engine.js # PPO Forward & Neural Inspector โ””โ”€โ”€ export_manager.js # JSZip Package Exporter \\\


<p align="center"> <b>Developed by <a href="https://huggingface.co/huggsook">@huggsook</a> with Connect-AI Studio</b> </p>