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

Additional parameters in original Go code? #15

Open
wackazong opened this issue Dec 14, 2017 · 1 comment
Open

Additional parameters in original Go code? #15

wackazong opened this issue Dec 14, 2017 · 1 comment

Comments

@wackazong
Copy link

Hey, could you give me a hint as to where to find your additional paramters in the original code? I am looking for these:

Stop shape optimization after 30 failures
Start every iteration with 200 random shapes

I cannot find them in the go code, they seem to be constant numbers somewhere. Would be glad for a hint. Thanks!

@ondras
Copy link
Owner

ondras commented Dec 15, 2017

I think this might be the line: https://github.com/fogleman/primitive/blob/master/primitive/model.go#L120

These get passed down to https://github.com/fogleman/primitive/blob/master/primitive/worker.go#L56, where age is the number of optimization failures and n corresponds to the number of randomly tried shapes. The original code goes even further, trying the whole process m times and picking the best shape among all optimized shapes.

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

2 participants