API Reference
This section provides detailed API documentation for all modules.
Quick Links
Core Modules
Game Module - UNO game engine
Cards Module - Card and deck classes
Environment Module - Gymnasium RL environment
Agents Module - Agent implementations
Usage Example
from src.game import UnoGame
from src.state_action_reward import UnoEnv
from src.agents import SB3Agent
# Create environment
env = UnoEnv()
# Load agent
agent = SB3Agent("models/selfplay_champion.zip")
# Play a game
obs = env.reset()
done = False
while not done:
action = agent.select_action(obs, env.get_valid_actions())
obs, reward, done, truncated, info = env.step(action)
print(f"Game result: {'Win' if reward > 0 else 'Loss'}")