Launches an environment viewer. Args: environment_loader: An environment loader (a callable that returns an instance of dm_control.rl.control.Environment), an instance of dm_control.rl.control.Environment. policy: An optional callable corresponding to a policy to execute withi
(environment_loader, policy=None, title='Explorer', width=1024,
height=768)
| 20 | |
| 21 | |
| 22 | def launch(environment_loader, policy=None, title='Explorer', width=1024, |
| 23 | height=768): |
| 24 | """Launches an environment viewer. |
| 25 | |
| 26 | Args: |
| 27 | environment_loader: An environment loader (a callable that returns an |
| 28 | instance of dm_control.rl.control.Environment), an instance of |
| 29 | dm_control.rl.control.Environment. |
| 30 | policy: An optional callable corresponding to a policy to execute within the |
| 31 | environment. It should accept a `TimeStep` and return a numpy array of |
| 32 | actions conforming to the output of `environment.action_spec()`. |
| 33 | title: Application title to be displayed in the title bar. |
| 34 | width: Window width, in pixels. |
| 35 | height: Window height, in pixels. |
| 36 | Raises: |
| 37 | ValueError: When 'environment_loader' argument is set to None. |
| 38 | """ |
| 39 | app = application.Application(title=title, width=width, height=height) |
| 40 | app.launch(environment_loader=environment_loader, policy=policy) |
nothing calls this directly
no test coverage detected
searching dependent graphs…