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

Function balance_sparse

dm_control/suite/cartpole.py:51–58  ·  view source on GitHub ↗

Returns the sparse reward variant of the Cartpole Balance task.

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

Source from the content-addressed store, hash-verified

49
50@SUITE.add('benchmarking')
51def balance_sparse(time_limit=_DEFAULT_TIME_LIMIT, random=None,
52 environment_kwargs=None):
53 """Returns the sparse reward variant of the Cartpole Balance task."""
54 physics = Physics.from_xml_string(*get_model_and_assets())
55 task = Balance(swing_up=False, sparse=True, random=random)
56 environment_kwargs = environment_kwargs or {}
57 return control.Environment(
58 physics, task, time_limit=time_limit, **environment_kwargs)
59
60
61@SUITE.add('benchmarking')

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…