The Artificial Intelligence era has started only a while ago and it is drastically augmenting and amplifying our lives But in this sphere of development, the developers have had a big problem to test their AI.
This is where great minds like Elon Musk step in and create adroit and efficient resources to test the Intelligence that we create. His vision and aspiration led to the start of OpenAI, a free open source library and a company specializing in research. They create toolkits for Deep Learning developers like us to deploy models and make AI play games. This helps us to analyze the power of the intelligence by simulating game environments.
OpenAI provides enthusiasts with 2 toolkits to work with
Gym - Toolkit for comparing and developing deep reinforcement learning algorithms...
Universe - A collection of gym environments to train and measure an AI's general intelligence...
Today we are going to write a simple script in python to help build a model that plays Dusk-Drive. The model will train itself and become better and better as we allow it to train. This is the code:-
import gym 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() while True: action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here observation_n, reward_n, done_n, info = env.step(action_n) env.render()
If you try to run your model , it will creash along the bylanes but will gradually improve over time. The console will Print certain statistics that will help you measure your AI's general Intellegence. This is a great tool for harnessing the power of AI , and I will surely keep you posted ...
Comments
Post a Comment