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

any objection to making task take a float as opposed to an int? #119

Closed
sanga opened this issue Dec 16, 2013 · 2 comments
Closed

any objection to making task take a float as opposed to an int? #119

sanga opened this issue Dec 16, 2013 · 2 comments

Comments

@sanga
Copy link
Contributor

sanga commented Dec 16, 2013

This would make it a lot easier to make one task very unlikely when you have many tasks (i.e. currently you need to make all the others much more likely, with the proposed change you'd just need top make that one task say "task(0.001)")

I haven't looked at this at all but I suppose this would be a not too difficult change (which I might make a PR for should you agree that it's desired and should you not beat me to it)

@sanga
Copy link
Contributor Author

sanga commented Dec 17, 2013

I had a go at doing this last night and seems to work just fine. By making the tasks attribute a list of the format [(func, weight)] and then doing a weighted random choice from that list rather than having the func be present in the list multiple times to make it more likely to be selected. Sound reasonable? (I'll push a branch when I have a moment to detangle that change from some other work).

@Jahaja
Copy link
Member

Jahaja commented Dec 17, 2013

Sounds like an improvement indeed. A pull request would be much appreciated :)

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

No branches or pull requests

3 participants