Examples Index
3DBall
The 3DBall environment features an agent that is trying to balance a ball on-top of itself. The agent can rotate itself and receives a reward every step until the ball falls.
Num Agents |
1 |
Observation Space |
DictSpace({‘Position_X_-500,00_500,00_Y_-500,00_500,00_Z_-500,00_500,00_Other_Relative’: BoxSpace(-500.0,500.0,shape=(3,)), ‘Rotation_Pitch_-180,00_180,00_Yaw_-180,00_180,00_Roll_-180,00_180,00’: BoxSpace(-180.0,180.0,shape=(3,)), ‘Velocity_X_-20,00_20,00_Y_-20,00_20,00_Z_-20,00_20,00_Other’: BoxSpace(-20.0,20.0,shape=(3,)) }) |
Action Space |
DictSpace({‘Rotation Actuator’: BoxSpace(-10.0,10.0,shape=(2,))}) |
Num Vectorized Copies |
3 |
Basic
The Basic environment features an agent that can move in the X-dimension and receives a small reward for going five steps in one direction and a bigger reward for going in the opposite direction.
Num Agents |
1 |
Observation Space |
DictSpace({‘Position_X_-500,00_500,00’: BoxSpace(-500.0,500.0,)}) |
Action Space |
DictSpace({‘Teleport Actuator’: DiscreteSpace(3)})) |
Num Vectorized Copies |
2 |
BallShooter
The BallShooter environment features a rotating turret that learns to aim and shoot at randomly moving targets. The agent can rotate in either direction, and detects the targets by using a cone shaped ray-cast.
To build the BallShooter environment from scratch, you can follow the guide available at Building Ball Shooter
Num Agents |
1 |
Observation Space |
DictSpace({‘Ray_Num_10_Deg_120,00_Max_4096,00_ECC_WorldStatic_Tags_Target’: make_ray_cast_space(10,1,4096)}) |
Action Space |
DictSpace({‘BallShooter’: DiscreteSpace(2), ‘DiscreteRotationActuator’: DiscreteSpace(3) }) |
Num Vectorized Copies |
Not Supported |
MazeSolver
The MazeSolver environment features a static maze that the agent learns to solve as fast as possible. The agent observers the environment using raycasts, moves by teleporting in 2 dimensions and is given a reward for getting closer to the goal.
To build the MazeSolver environment from scratch, you can follow the guide available at Building Maze Solver
Num Agents |
1 |
Observation Space |
DictSpace({‘Ray_Num_8_Deg_360,00_Max_4096,00_ECC_WorldStatic’: make_ray_cast_space(num_rays=8,num_categories=0,max_dist=4096)}) |
Action Space |
DictSpace({‘MovementInput_XY_-10,00_10,00’: BoxSpace([-10.0,-10.0],[10.0,10.0])}) |
Num Vectorized Copies |
16 |
Tag
The Tag environment features a 3v1 game of tag, where one agent(the runner) has to run away from the other agents which are trying to collide with it. The agents move using forward, left and right movement input, and observe the environment with a combination of ray-casts and global position data.
To build the Tag environment from scratch, you can follow the guide available at Building Tag
Num Agents |
4 |
Observation Space (Tagger) |
DictSpace({ ‘Ray_Num_36_Deg_360,00_Max_2048,00_ECC_WorldStatic_Tags_Runner_Tagger’: make_ray_cast_space(num_rays=36,num_categories=2,max_dist=2048), ‘RunnerSensor’: BoxSpace(-50000.0,50000.0,shape=(4,)), ‘TeammateSensor 1’: BoxSpace(-50000.0,50000.0,shape=(4,)), ‘TeammateSensor 2’: BoxSpace(-50000.0,50000.0,shape=(4,)) }) |
Observation Space (Runner) |
DictSpace({‘Ray_Num_36_Deg_360,00_Max_2048,00_ECC_WorldStatic_Tags_Runner_Tagger’: make_ray_cast_space(36,2,2048)}) |
Action Space |
DictSpace({‘MovementInput_X_0,00_1,00’: BoxSpace(0.0,1.0), ‘MovementInput_Y_-1,00_1,00’: BoxSpace(-1.0,1.0)}) |
Num Vectorized Copies |
2 |
RaceTrack
The RaceTrack environment features cars trained to follow a spline track. Cars can observe their absolute position as well as their velocity, and take action using inputs to a vehicle controller.
Num Agents |
1 |
Observation Space |
DictSpace({‘PositionObserver’: BoxSpace(-100000.0, 100000.0, shape=(6,)), ‘VelocityObserver’: BoxSpace(-100000.0, 100000.0, shape=(4,)) }) |
Action Space |
DictSpace({‘VehicleController’: BoxSpace(-1.0, 1.0, shape=(2,))}) |
Num Vectorized Copies |
16 |
Pong
The Pong environment features two agents playing a collaborative game of pong. The agents receive a reward every step as long as the ball has not hit the wall behind either agent. The game ends when the ball hits the wall behind either agent.
Num Agents |
2 |
Observation Space |
DictSpace({‘Camera_SCS_SceneColorHDR_RTF_RGBA8_R_W16_H16’: make_camera_space(16,16,num_channels=1)}) |
Action Space |
DictSpace({‘Teleport_Y_50,00’: DiscreteSpace(3)}) |
Num Vectorized Copies |
2 |