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

Modified example/wedding.py and related files to maximize happiness #784

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aralsea
Copy link

@aralsea aralsea commented Nov 2, 2024

This PR is a simple fix in example/wedding.py. Since the objective function is defined as happiness, it makes more sense to use maximize rather than minimize.

@CLAassistant
Copy link

CLAassistant commented Nov 2, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pchtsp
Copy link
Collaborator

pchtsp commented Nov 2, 2024

I think you then have to change the returned value of the happiness function, to keep it working as before. For exmple by multiplying by minus 1 or making the inverse of the value

@aralsea aralsea changed the title Modified example/wedding.py to maximize happiness Modified example/wedding.py and related files to maximize happiness Nov 4, 2024
@aralsea
Copy link
Author

aralsea commented Nov 4, 2024

@pchtsp Thank you for your quick feedback!
Based on the code code content, I initially thought that the definition of the happiness function seems to have been chosen somewhat arbitrarily, so I didn't make the inverse. If you think an adjustment would improve the function’s consistency, I’d be happy to make the change.

@aralsea
Copy link
Author

aralsea commented Nov 4, 2024

In addition, I also added similar changes to related files that I initially missed.

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.

3 participants