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

feat: More domain examples #635

Merged
merged 3 commits into from Aug 1, 2021
Merged

feat: More domain examples #635

merged 3 commits into from Aug 1, 2021

Conversation

jiriminarcik
Copy link
Contributor

Description

Contains two new example domains:examples/molecules and examples/logic-circuit-domain.

Implementation strategy and design decisions

These examples exhibit higher complexity in both the number of degrees of freedom and objectives/constraints. Below is a comparison to most of the remaining examples (see caffeine, glutamine, full-adder and half-adder in the top right part of the diagram).
Screenshot 2021-07-25 at 21 19 43

Note that it may take several resamples to obtain a nice local minimum, especially for the more intricate substance programs. Below is an example of an optimization run during which the current optimizer get stuck in undesirable local minima for many optimization steps.
Screenshot 2021-07-25 at 21 14 06

Examples with steps to reproduce them

Molecules

Run: npx roger watch molecules/glutamine.sub molecules/molecules-basic.sty molecules/molecules.dsl

For more complicated example try molecules/caffeine.sub.

Alternative styles:
molecules/molecules.sty
molecules/molecules-elegant.sty

Logic gates

Run: npx roger watch logic-circuit-domain/half-adder.sub logic-circuit-domain/distinctive-shape.sty logic-circuit-domain/logic-gates.dsl

For more complicated example try logic-circuit-domain/full-adder.sub.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally using yarn test
  • I ran yarn docs and there were no errors when generating the HTML site
  • My code follows the style guidelines of this project (e.g.: no ESLint warnings)

@codecov
Copy link

codecov bot commented Aug 1, 2021

Codecov Report

Merging #635 (678dff7) into main (5cac9bc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #635   +/-   ##
=======================================
  Coverage   65.03%   65.03%           
=======================================
  Files          41       41           
  Lines        6721     6721           
  Branches     1286     1286           
=======================================
  Hits         4371     4371           
  Misses       2342     2342           
  Partials        8        8           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cac9bc...678dff7. Read the comment docs.

@kai-qu
Copy link
Contributor

kai-qu commented Aug 1, 2021

LGTM! Awesome examples! I added them to this page: https://github.com/penrose/penrose/wiki/Example-diagrams

I do see that it takes quite a few resamples to reach a decent local minimum, as you reported. These could be good test examples for any improved solver. (e.g. This is the most # of pairwise repels I've seen in any example.)

I might also ask more questions about your Style programs later, for the domain expert study.

@kai-qu kai-qu merged commit c0a0c3f into main Aug 1, 2021
@kai-qu kai-qu deleted the more-domain-examples branch August 1, 2021 19:45
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

3 participants