元のドキュメント
http://julian.togelius.com/mariocompetition2009/index.php
ソースはこっち
https://github.com/miyamotok0105/Mario_AI_Competition2009
かなり昔ですがコンテストに賞金がかかってたようです。2009より最近のには2012などソースがありますが、今回動かすのは2009です。
git clone https://github.com/miyamotok0105/Mario_AI_Competition2009.git
cd Mario_AI_Competition2009
cd classes
この辺りのキーで動かす。
aでファイヤーボール
sでジャンプ
java ch.idsia.scenarios.Play
ハードコーディングされたエージェント
java ch.idsia.ai.agents.ai.ForwardAgent
Evolves a neural-networkを使用したエージェント
java ch.idsia.scenarios.Evolve
学習済みのEvolves a neural-networkを使用したエージェント
java ch.idsia.scenarios.Play evolved.xml
Generation 42 best 4256.0
Saved object to evolved.xml
New Evolve phase with difficulty = 3 started.
Generation 0 best 203.0
Saved object to evolved.xml
Generation 1 best 203.0
Saved object to evolved.xml
Generation 2 best 203.0
Saved object to evolved.xml
Generation 3 best 1988.827880859375
Saved object to evolved.xml
Generation 4 best 1988.827880859375
学習済みのモデルをテストする
java ch.idsia.scenarios.Stats evolved.xml 0
evolved.xml is not a class name; trying to load a wox definition with that name.
Testing controller ch.idsia.ai.agents.ai.TimingAgent@1540e19d with starting seed 0
Level 0 paused 1954.2714 (1295.0748) (min 187.0000 max 4416.0000) (avg time 0.0059)
Level 0 unpaused 1884.6723 (1229.8604) (min 187.0000 max 4416.0000) (avg time 0.0060)
Level 3 paused 960.4513 (711.0572) (min 187.0000 max 3131.0000) (avg time 0.0058)
Level 3 unpaused 867.7268 (558.1026) (min 187.0000 max 2585.9712) (avg time 0.0058)
Level 5 paused 761.8549 (611.3345) (min 171.0000 max 3131.0000) (avg time 0.0062)
Level 5 unpaused 688.5305 (417.8540) (min 171.0000 max 2123.0000) (avg time 0.0056)
Level 10 paused 559.0084 (336.2721) (min 171.0000 max 1756.2860) (avg time 0.0056)
Level 10 unpaused 591.0350 (359.7197) (min 171.0000 max 2108.2000) (avg time 0.0056)
Stats sum: 8267.550514526365
その他
マリオの深層強化学習
https://github.com/aleju/mario-ai