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

Generate terminals by shuffling fomulas #24

Closed
soulne4ny opened this issue Nov 16, 2012 · 4 comments
Closed

Generate terminals by shuffling fomulas #24

soulne4ny opened this issue Nov 16, 2012 · 4 comments

Comments

@soulne4ny
Copy link
Collaborator

Background

Currently we drop terminals randomly. And even if we find good weights [#13], it might still be hard to play.

Proposal

  • Create a queue of next terminals.
  • When the queue lacks terminals,
    • choose 3 final compound formulas from the registry,
    • randomly shuffle their terminals
    • and add to the queue.
  • Show next 3 elements.

This will guarantee that the stuff on the board has a good chance to produce compounds.

Derived from #13 & #18.

soulne4ny added a commit that referenced this issue Nov 16, 2012
@soulne4ny
Copy link
Collaborator Author

$ git push -f origin i24
Counting objects: 23, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (12/12), 2.34 KiB, done.
Total 12 (delta 2), reused 9 (delta 0)
To git@github.com:yarcat/chemistry-lines.git
 + 10bd751...d41bece i24 -> i24 (forced update)

@soulne4ny
Copy link
Collaborator Author

This feels nicer that random, specially with --min-elements. However it looks like we should try to remove compounds manually.

@ghost ghost assigned soulne4ny Nov 19, 2012
@soulne4ny
Copy link
Collaborator Author

Yar, please, review it.

@yarcat
Copy link
Owner

yarcat commented Nov 20, 2012

Generally looks good, please address two comments that I've left there. The second one is definitely optional, and can be implemented later (or even never implemented).

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

No branches or pull requests

2 participants