AlphaGO provides us with possibility and imagination that AI one day can do almost things in the future, for example translation, writing, driving and even write high efficiency code, coders will lost their jobs if companies hire AI robots to write code for them.
Let’s back to reality, reinforcement learning algorithm-Monte Carlo Search Tree plays an important role in AlphaGo, reinforcement learning is powerful in interactive environment, especially in scenes for example driving and video games. For those who want to apply RL algorithms to video games environment, the crucial task he should to complete is to create a game simulator, it is a hard work and a waste of time for researchers who aren’t familiar with game development.
Universe , a useful Python library developed by OpenAI, saves you from the time-consuming and costing game development. Based on docker images, it provides Python APIs to coders to develop theirs own reinforcement learning agents to play their famous games. Sounds interesting, here, I have installed universe on my Mac, its APIs are simple and elegant, the following is a example, its environment is a flash game called DuskDriv developed by Kongregate.
# coding: utf-8
import universe # register the universe environments
env = gym.make('flashgames.DuskDrive-v0')
env.configure(remotes=1) # automatically creates a local docker container
observation_n = env.reset()
action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here
observation_n, reward_n, done_n, info = env.step(action_n)
You can I add your strategies in the above code. The output of the above code is
So, you don’t need to create a simulator now, there are 1000+ games available for you on universe’s environment. what you should do is to buy a powerful graphic cards and write your code! Have fun!