0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

OpenAI Gymのインベーダーゲームをやってみる

Posted at

使ったリポジトリ

実行

git clone https://github.com/tensorpack/tensorpack.git
cd example/A3C-Gym

train-atari.pyに下記のコードを追加しパスを通す

import sys
sys.path.append("../../")

学習済みモデルをインストール

!wget http://models.tensorpack.com/OpenAIGym/SpaceInvaders-v0.tfmodel

テストする

!python ./train-atari.py --task dump_video --load SpaceInvaders-v0.tfmodel --env SpaceInvaders-v0 --output SpaceInvaders-v0 --episode 3

--task dump_video 動画を保存する
--load ~~ 使用する学習済みモデル
--env ~~ 使用するゲーム 今回の場合はスペースインベーダー
--output ~~ 動画を保存するディレクトリ(実行前にそのディレクトリが存在するとエラーとなる)

結果

ezgif-2-6a86a49e54aa.gif

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?