12-RN
99
license:mit
by
SoonchunhyangUniversity
Other
OTHER
New
99 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
π Quick Startbash
pip install sb3-contrib gymnasium numpyπ Quick Startpython
from sb3_contrib import MaskablePPO
from sb3_contrib.common.wrappers import ActionMasker
import gymnasium as gym
# Load μμ΄μ₯κΈ° environment
env = gym.make("MiniChess-v0") # Environment name kept for compatibility
env = ActionMasker(env, lambda e: e.unwrapped.get_valid_actions())
# Load trained model
model = MaskablePPO.load("model_up.zip")
# Play
obs, info = env.reset()
done = False
while not done:
# Get valid actions
action_masks = env.unwrapped.get_valid_actions()
# Predict with masking
action, _states = model.predict(obs, action_masks=action_masks, deterministic=False)
# Execute action
obs, reward, terminated, truncated, info = env.step(action)
done = terminated or truncated
print(f"Game ended with reward: {{reward}}")Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.