MCPcopy Create free account
hub / github.com/LeCAR-Lab/model-based-diffusion / get_reward

Method get_reward

mbd/envs/car2d.py:89–93  ·  view source on GitHub ↗
(self, q)

Source from the content-addressed store, hash-verified

87
88 @partial(jax.jit, static_argnums=(0,))
89 def get_reward(self, q):
90 reward = (
91 1.0 - (jnp.clip(jnp.linalg.norm(q[:2] - self.xg[:2]), 0.0, 0.2) / 0.2) ** 2
92 )
93 return reward
94
95 @partial(jax.jit, static_argnums=(0,))
96 def eval_xref_logpd(self, xs):

Callers 1

stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected