LISv2

simasan1017 edited this page Sep 16, 2016 · 14 revisions

LIS (Life in Silico) ver2

LIS (Life In Silico) is a framework that makes intelligent agents live in a virtual environment.
LIS version 2 uses Unity Game Engine for the virtual environment and OpenAI Gym for the learning agent framework.

screenshot

Algorithm

Lisv2algorithm

Algorithm Reference

Requirements

  • python 2.7

Install

Ubuntu

Install Unity experimental-build version:

wget http://download.unity3d.com/download_unity/linux/unity-editor-installer-5.3.4f1+20160317.sh
sudo sh unity-editor-installer-5.3.4f1+20160317.sh

# run Unity
./unity-editor-5.3.4f1/Editor/Unity

# if background is pink, install:
sudo apt-get install lib32stdc++6 -y

install python modules:

pip install -r python-agent/requirements.txt

Mac

Install Unity.

install python modules:

pip install -r python-agent/requirements.txt

Windows

Building simulator on Windows10 (Japanese)

Quick Start

download data:

./fetch.sh

Open unity-sample-environment with Unity and load Scenes/Sample.

2016-09-13 10 27 53

Press Start Button.

2016-09-13 10 28 14

Next, run python module as a client.This will take a few minutes for loading caffe model.

cd gym_client/examples/agents
PYTHONPATH=../../ python Lis_dqn.py

You can watch reward history:

cd gym_client/examples/agents
python plot_reward_log.py

screenshot

This graph is a "sample" scene result. It takes about 6 hours on GPU Machine.

Sample scene result movie

SampleLikesAndDislikes scene result movie

Examples

See the examples directory

  • Run examples/agents/Lis_random.py to run an simple random agent
  • Run examples/agents/Lis_dqn.py to run an Deep Q-Network agent

System Configuration

  • Client: python module(gym)
  • Server: Unity
  • Communication: Socket (WebSocket over TCP) using MessagePack

2016-04-09 4 14 49

Tips

Simulate faster

Select "SceneController" in Hierarchy tab and change "Time Scale".

2016-04-23 15 52 03

This will make simulation more faster, but it will be slow gui response.

Module Reference

  • MessagePack for Unity

    • Copyright (C) 2011-2012 Kazuki Oikawa, Kazunari Kida
    • Apache License, Version 2.0
    • Assets/Packages/msgpack-unity
  • websocket-sharp

    • Copyright (c) 2010-2016 sta.blockhead
    • The MIT License (MIT)
    • Assets/Packages/websocket-sharp
  • websocket-client

    • Copyright (C) 2010 Hiroki Ohtani(liris)
    • LGPL License
  • gym

    • Copyright (c) 2016 OpenAI (http://openai.com)
    • The MIT License (MIT)
    • LIS-ver2/gym_client/gym

License

Notice

If you created intelligent agents, please let me know about it to "masayoshi_nakamura@dwango.co.jp". We will make showcase varied intelligent agents.