MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / swingup_sparse

Function swingup_sparse

dm_control/suite/cartpole.py:73–80  ·  view source on GitHub ↗

Returns the sparse reward variant of the Cartpole Swing-Up task.

(time_limit=_DEFAULT_TIME_LIMIT, random=None,
                   environment_kwargs=None)

Source from the content-addressed store, hash-verified

71
72@SUITE.add('benchmarking')
73def swingup_sparse(time_limit=_DEFAULT_TIME_LIMIT, random=None,
74 environment_kwargs=None):
75 """Returns the sparse reward variant of the Cartpole Swing-Up task."""
76 physics = Physics.from_xml_string(*get_model_and_assets())
77 task = Balance(swing_up=True, sparse=True, random=random)
78 environment_kwargs = environment_kwargs or {}
79 return control.Environment(
80 physics, task, time_limit=time_limit, **environment_kwargs)
81
82
83@SUITE.add()

Callers

nothing calls this directly

Calls 3

get_model_and_assetsFunction · 0.70
BalanceClass · 0.70
from_xml_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…