Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(cxy): add averaged-dqn policy #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feature(cxy): add averaged-dqn policy #683

wants to merge 1 commit into from

Conversation

Mossforest
Copy link
Collaborator

Description

Adding new policy: averaged-dqn and part of ensemble-dqn.

Related Issue

TODO

  • Ensemble-dqn: specified q-learning net needed
  • Experiments debugging needed

Check List

  • merge the latest version source branch/repo, and resolve all the conflicts
  • pass style check
  • pass all the tests

@PaParaZz1 PaParaZz1 added the algo Add new algorithm or improve old one label Jul 10, 2023
@@ -53,3 +53,5 @@

# new-type policy
from .ppof import PPOFPolicy

from .averaged_dqn import AveragedDQNPolicy, EnsembleDQNPolicy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to the old-type policy part

class AveragedDQNPolicy(DQNPolicy):
"""
Overview:
Policy class of Averaged_DQN algorithm.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't add underline here


# use model_wrapper for specialized demands of different modes
self._target_model_list = copy.deepcopy(self._prime_model_list)
if 'target_update_freq' in self._cfg.learn:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only use one type target update here



def _state_dict_learn(self) -> Dict[str, Any]:
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

polish indent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algo Add new algorithm or improve old one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants