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

(To be discussed) (Idea) feature: multi dimensional reward #225

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

YuriCat
Copy link
Contributor

@YuriCat YuriCat commented Nov 18, 2021

Do we delete OUTCOME, or use OUTCOME as the first dimension of REWARD if it is defined?

@ikki407
Copy link
Member

ikki407 commented Nov 22, 2021

My first impression was that this change could be closer to the implementation of general reinforcement learning. Also, it can be a simple code 👍
However, I think a user must pay attention to the first dimension of multi-reward is the outcome. How can we set gamma
in games with no outcome? like gamma: [1, 0.99]?

@YuriCat
Copy link
Contributor Author

YuriCat commented Nov 22, 2021

Yes, gamm: [1, 0.99] will work.
Warnings for over length need to be added.

@@ -208,7 +208,7 @@ def compose_losses(outputs, log_selected_policies, total_advantages, targets, ba
entropy = dist.Categorical(logits=outputs['policy']).entropy().mul(tmasks.sum(-1))
losses['ent'] = entropy.sum()

base_loss = losses['p'] + losses.get('r', 0)
base_loss = losses['p'] + losses.get('v', 0)
Copy link
Member

Choose a reason for hiding this comment

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

wow, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants