ViZDoom is a Doom-based AI research platform for reinforcement learning from raw visual information. It allows developing AI bots that play Doom using only the screen buffer. ViZDoom is primarily intended for research in machine visual learning, and deep reinforcement learning, in particular.
Currently, the documentation consists of:
ViZDoom API is reinforcement learning friendly (suitable also for learning from demonstration, apprenticeship learning or apprenticeship via inverse reinforcement learning, etc.).
from vizdoom import * import random, time game = DoomGame() game.load_config("../config/basic.cfg") game.init() shoot = [0,0,1] left = [1,0,0] right = [0,1,0] episodes = 10 for i in range(episodes): game.new_episode() while not game.is_episode_finished(): state = game.get_state() img = state.image_buffer misc = state.game_variables action = random.choice([shoot, left, right]) # A random agent reward = game.make_action(action) time.sleep(0.02) # Just to make it slower print("Total reward: " + str(game.get_total_reward()))
Measured on Intel Core i7-4790k(4x4Ghz).