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

Domino fit example #225

Merged
merged 9 commits into from
Nov 3, 2024
Merged

Domino fit example #225

merged 9 commits into from
Nov 3, 2024

Conversation

Su2001
Copy link
Contributor

@Su2001 Su2001 commented Sep 30, 2024

Closes #163.

@alcides alcides marked this pull request as draft September 30, 2024 10:10
@alcides
Copy link
Owner

alcides commented Oct 1, 2024

@Su2001 This is not passing the Ruff test. My guess is that you have not installed the pre-commit on your machine.

Furthermore, can you include the Domino example in the run_examples script?

@Su2001 Su2001 marked this pull request as ready for review October 1, 2024 09:18
@Su2001
Copy link
Contributor Author

Su2001 commented Oct 1, 2024

Passed pre-commit and added in run_example

@alcides
Copy link
Owner

alcides commented Oct 1, 2024

Code review:

If you want to have different strategies to solve the problem, you should have each in a different file, as different benchmarks.

Regarding the fitness functions, they are too complex. Try to assess the following:

  • Move part of the work to methods within the Domino classes.
  • Try to use functional programming concepts (you want to fold/reduce over a list of pieces, passing a state of the board. That state dataclass can contain the matrix, as well as the conflicts.
  • The fitness function creates the original board, passes it over to the solution, and extracts the relevant metrics of the final state.

@alcides alcides marked this pull request as draft October 1, 2024 13:50
@GUIpsp
Copy link
Collaborator

GUIpsp commented Oct 1, 2024

Some things seem to not be properly formatted still, you should run pre-commit run --all, or ruff fmt

@Su2001
Copy link
Contributor Author

Su2001 commented Oct 1, 2024

I have run pre-commit run --all, but it found an the error in this file tests/representations/basic_representation_test.py and no more fails are found

@alcides alcides merged commit 48fc9c0 into alcides:main Nov 3, 2024
5 of 7 checks passed
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.

Domino Benchmark
3 participants