Holodeck is a high-fidelity simulator for reinforcement learning built on top of Unreal Engine 4.
pip install holodeck
(requires >= Python 3.5)
See Installation for complete instructions (including Docker).
Holodeck's interface is similar to OpenAI's Gym.
We try and provide a batteries included approach to let you jump right into using Holodeck, with minimalfiddling required.
To demonstrate, here is a quick example using the DefaultWorlds
package:
import holodeck
# Load the environment. This environment contains a UAV in a city.
env = holodeck.make("UrbanCity-MaxDistance")
# You must call `.reset()` on a newly created environment before ticking/stepping it
env.reset()
# The UAV takes 3 torques and a thrust as a command.
command = [0, 0, 0, 100]
for i in range(30):
state, reward, terminal, info = env.step(command)
state
: dict of sensor name to the sensor's value (nparray).reward
: the reward received from the previous actionterminal
: indicates whether the current state is a terminal state.info
: contains additional environment specific information.If you want to access the data of a specific sensor, import sensors andretrieving the correct value from the state dictionary:
print(state["LocationSensor"])
Holodeck supports multi-agent environments.
Calls to step
only provide an action for the main agent, and then tick the simulation.
act
provides a persistent action for a specific agent, and does not tick the simulation. After anaction has been provided, tick
will advance the simulation forward. The action is persisted until another call to act
provides a different action.
import holodeck
import numpy as np
env = holodeck.make("CyberPunkCity-Follow")
env.reset()
# Provide an action for each agent
env.act('uav0', np.array([0, 0, 0, 100]))
env.act('nav0', np.array([0, 0, 0]))
# Advance the simulation
for i in range(300):
# The action provided above is repeated
states = env.tick()
You can access the reward, terminal and location for a multi agent environment as follows:
task = states["uav0"]["FollowTask"]
reward = task[0]
terminal = task[1]
location = states["uav0"]["LocationSensor"]
(uav0
comes from the scenario configuration file)
Holodeck can run headless with GPU accelerated rendering. See Using Holodeck Headless
@misc{HolodeckPCCL,
Author = {Joshua Greaves and Max Robinson and Nick Walton and Mitchell Mortensen and Robert Pottorff and Connor Christopherson and Derek Hancock and Jayden Milne and David Wingate},
Title = {Holodeck: A High Fidelity Simulator},
Year = {2018},
}
Holodeck is a project of BYU's Perception, Cognition and Control Lab (https://pcc.cs.byu.edu/).
http://www.securityinnovation.com/holodeck/index.shtml Security Innovation公司的Holodeck软件是一款专业的故障植入和模拟的工具软件。它可模拟磁盘故障、内存故障、网络故障、注册表故障、和过程故障,并且可增加自定义的故障。同时,该软件还可支持动态调整网络的上行或下行带宽,以及磁盘和内存的空间等。