google-deepmind / google-deepmind/acme
Qestion about updating the agent
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 553
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have some silly questions about updating the agent. I know the general framework of training is as follow:
```
while True:
# Make an initial observation.
step = environment.reset()
actor.observe_first(step.observation)
while not step.last():
# Evaluate the policy and take a step in the environment.
action = actor.select_action(step.observation)
step = environment.step(action)
# Make an observation and update the actor.
actor.observe(action, next_step=step)
actor.update()
```
And this `actor.update` is used to update the agent. But I want to run the whole episode, and then at the end of the episode, I use my customized reward to update the agent network. The framework is like:
```
while True:
# Make an initial observation.
step = environment.reset()
actor.observe_first(step.observation)
while not step.last():
# Evaluate the policy and take a step in the environment.
action = actor.select_action(step.observation)
step = environment.step(action)
# Make an observation
actor.observe(action, next_step=step)
#compute my customized reward
#update agent network
```
Then what should I do? I am new to this field and I would appreciate it if someone can help me!
Contributor guide
Assessment
This issue has not been assessed yet.