Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 2.42 KB

README_ja.md

File metadata and controls

76 lines (55 loc) · 2.42 KB

RLCreature for Unity

スマートフォンで人工生命数十体がリアルタイムに学習可能な深層強化学習

サンプルデモを動かす

0. Unityを用意

  • 2018が推奨
  • ScriptingRuntimeVersionを必ず.NET4.Xにして動かして下さい

1. レポジトリをクローン

  • git clone --recursive https://github.com/dwango/RLCreature.git
  • git-lfsが必要です

2. 依存ライブラリをインストール

3. デモシーンを開く

  • Assets/RLCreature/Sample/RandomCreatures
  • Assets/RLCreature/Sample/DesignedCreatures
  • Assets/RLCreature/Sample/VariousHeights
  • Assets/RLCreature/Sample/Driving
  • Assets/RLCreature/Sample/SimpleHunting

Create Original Creatures

see Assets/RLCreature/Sample/DesignedCreatures/DesignedCreaturesEntryPoint.cs

// Instantiate prefab (see Assets/RLCreature/Sample/DesignedCreatures/CreaturePrefabs)
var centralBody = Instantiate(creaturePrefab);

// Add Sensor and Mouth for food
Sensor.CreateComponent(centralBody, typeof(Food), State.BasicKeys.RelativeFoodPosition, range: 100f);
Mouth.CreateComponent(centralBody, typeof(Food));

// Initialize Brain
var actions = LocomotionAction.EightDirections();
var sequenceMaker = new EvolutionarySequenceMaker(epsilon: 0.1f, minimumCandidates: 30);
var decisionMaker = new ReinforcementDecisionMaker();
var souls = new List<ISoul>() {new GluttonySoul()};

var brain = new Brain(decisionMaker, sequenceMaker);
var agent = Agent.CreateComponent(creatureRootGameObject, brain, new Body(centralBody), actions, souls);

Reference

@inproceedings{ogaki2018,
  author = {Keisuke Ogaki and Masayoshi Nakamura},
  title = {Real-Time Motion Generation for Imaginary Creatures Using Hierarchical Reinforcement Learning},
  booktitle = {ACM SIGGRAPH 2018 Studio},
  year = {2018},
  publisher = {ACM}
}