未加星标

Integrating GTA V into Universe

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
GTA V + Universe

Craig Quiter and Jack Clark January 11, 2017

TheUniverse integration with Grand Theft Auto V , built and maintained by Craig Quiter's DeepDrive project, is now open-source. To use it, you'll just need a purchased copy of GTA V, and then your Universe agent will be able to start driving a car around the streets of a high-fidelity virtual world.

GTA V in Universe gives AI agents access to a rich, 3D world. This video shows the frames fed to the agent (artificially slowed to 8FPS, top left), diagnostics from the agent and environment (bottom left), and a human-friendly free camera view (right). The integration modifies the behavior of people within GTA V to be non-violent.

Getting started

To get started, just start a GTA V server instance. You'll need the universe python library installed (no need to upgrade if you've installed it previously). You can attach an agent by running the following code. As usual, observations are pixels. In addition to keyboard/mouse, the agent can use a simulated joystick:

import gym import universe # register Universe environments into Gym from universe.spaces import joystick_event env = gym.make('gtav.SaneDriving-v0') env.configure(remotes='vnc://$host:$port') # point to the GTA V Universe server observation_n = env.reset() while True: steer = joystick_event.JoystickAxisXEvent(-1) # turn right throttle = joystick_event.JoystickAxisZEvent(-1) # go in reverse # Alternatively, use WASD to steer: ('KeyEvent', 'w', True) action_n = [[steer, throttle] for _ in observation_n] observation_n, reward_n, done_n, info = env.step(action_n) env.render()
Integrating GTA V into Universe
An observation supplied to the agent. DeepDrive

DeepDrive is a platform for creating open self-driving car AI. DeepDrive uses modding frameworks and memory inspection techniques to repurpose GTA V as a self-driving car simulator; it also provides pre-trained self-driving agents and the datasets used to train them. The existing DeepDrive environment and agent are now built on top of Universe.

Work on DeepDrive started before Universe, and so it provides a good contrast for integrations with modern games before and after Universe. The original DeepDrive implementation required a local windows PC and took about a day to fully set up the game and the agent. The new DeepDrive can be set up in about twenty minutes, supports agents on linux or OS X, and is compatible with pre-existing Universe agents (though best results come from using the simulated joystick rather than the more common keyboard/mouse).

Release

Today's release includes:

The source code and AMI for the GTA V environment. A pre-trained driving agent , with Caffe and TensorFlow implementations.

The integration supports selecting the camera offset and field of view. It also includes reward functions for training via reinforcement learning , including collision avoidance, distance from destination, and staying on the road.

The environment

Before Universe, DeepDrive used a DirectX hook for screen capture and required using the C++ interface to Caffe in Windows to write agents. Now the game runs on a Windows virtual machine in the cloud, and communicates with Universe via websockets and VNC. The agent can thus run on Linux or Mac and be written in any ML framework.


Integrating GTA V into Universe
Universe transfers pixels, keyboard, and mouse over VNC and other information over websockets. To support Joystick control of steering and throttle, we send Joystick actions to the environment over websockets. [Image: Craig Quiter]

As mentioned in the Universelaunch post, the client can sustain up to 20 FPS over the public internet.

GTA V gives researchers access to a rich, diverse world for testing and developing AI. Its island setting is almost one fifth the size of Los Angeles, giving access to a broad range of scenarios to test systems. Add to that the 257 different vehicles, 7 types of bicycles, and 14 weather types, and its possible to explore a huge number of permutations using a single simulator.


Integrating GTA V into Universe
GTA V's 49 square-mile island of San Andreas gives researchers the ability to train AI agents across bustling metropolitan areas, winding mountain passes, flat deserts, and freeways.

The environment also enables collecting massive amounts of labelled data: you can use the underlying GTA V engine to collect 2D or 3D bounding boxes and segmentation labels for cars, pedestrians, bicycles, animals, road surface, traffic signs , or any one of GTA V's other 7000+ objects . The environment can also be extended via mods for real-world vehicles , road construction , and even entire cities .

Pre-trained agent

This release includes a baseline agent, trained via imitation learning on 21 hours (about 600,000 images) on the game's AI driving. (The built-in game AI is a good initial target: it performs better than a typical human since it can access internal game state, though it still makes mistakes such as making U-turns on the freeway.) The baseline agent can drive in a variety of different weather conditions, react to traffic, and keep to its lane. This agent is a start, which we invite the community to improve upon!

Other researchers have shown that you can train vision systems in GTA V and use those to classify images in the real world. The Universe GTA V integration makes it easy to try out reinforcement learning techniques on a simulated self-driving system.

The GTA V integration into Universe automatically inherits all of the tooling and semantics that Universe provides for comparability and shareability, and makes it easy to benchmark the performance of agents on GTA V. It can be used standalone, or as yet another environment for a general Universe agent to access. We look forward to supporting more community-contributed environments like this in the future.

Get in touch with the authors of this post: Craig , Jack

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

主题: WindowsLinuxC++Python
分页:12
转载请注明
本文标题:Integrating GTA V into Universe
本站链接:http://www.codesec.net/view/522996.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(48)