> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> 強化学習の実験をトラッキングし、エピソード動画を記録するために、W&B を Farama Gymnasium と統合します。

# Farama Gymnasium

[Farama Gymnasium](https://gymnasium.farama.org/#) を使用している場合、`gymnasium.wrappers.Monitor` によって生成された環境の動画を自動的にログします。[`wandb.init()`](/ja/models/ref/python/functions/init) の `monitor_gym` キーワード引数を `True` に設定するだけです。

gymnasium とのインテグレーションは非常に軽量です。`gymnasium` からログされる[動画ファイル名を確認し](https://github.com/wandb/wandb/blob/c5fe3d56b155655980611d32ef09df35cd336872/wandb/integration/gym/__init__.py#LL69C67-L69C67)、その名前をそのまま使用します。一致するものが見つからない場合は `"videos"` を使用します。より細かく制御したい場合は、いつでも手動で[動画をログする](/ja/models/track/log/media/)こともできます。

Gymnasium を CleanRL ライブラリと組み合わせて使用する方法について詳しくは、この[レポート](https://wandb.ai/raph-test/cleanrltest/reports/Mario-Bros-but-with-AI-Gymnasium-and-CleanRL---Vmlldzo0NTcxNTcw)をご覧ください。

<Frame>
  <img src="https://mintcdn.com/wb-21fd5541/mVjDwbx0mC8gYx-b/images/integrations/gymnasium.png?fit=max&auto=format&n=mVjDwbx0mC8gYx-b&q=85&s=411a0cd5e0b82ba043062e185cea2259" alt="Gymnasium RL 環境" width="2132" height="1124" data-path="images/integrations/gymnasium.png" />
</Frame>
