MCPcopy Index your code
hub / github.com/pytorch/tutorials / td_estimate

Method td_estimate

intermediate_source/mario_rl_tutorial.py:500–504  ·  view source on GitHub ↗
(self, state, action)

Source from the content-addressed store, hash-verified

498 self.gamma = 0.9
499
500 def td_estimate(self, state, action):
501 current_Q = self.net(state, model="online")[
502 np.arange(0, self.batch_size), action
503 ] # Q_online(s,a)
504 return current_Q
505
506 @torch.no_grad()
507 def td_target(self, reward, next_state, done):

Callers 1

learnMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected