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

How is the number of totalBits, required, computed? #42

Closed
MattWolf74 opened this issue Oct 21, 2018 · 5 comments
Closed

How is the number of totalBits, required, computed? #42

MattWolf74 opened this issue Oct 21, 2018 · 5 comments
Labels

Comments

@MattWolf74
Copy link

Using GeneticSharp, I started working on some optimizations in order to lower the computational power, required. For that purpose I try to lower the totalBits but it does not seem apparent how the required number bits is computed given

  • precision
  • of input variable and possible variable range.

Can someone please comment on how the total number bits, required, are computed. Ideally I want to set the totalBits parameter as function of chosen precision and value range.

Thanks

@giacomelli
Copy link
Owner

giacomelli commented Oct 22, 2018

The four arguments of FloatingPointChromosome's constructor are:

  1. The minimum values of numbers inside the chromosome.
  2. The maximum values of numbers inside the chromosome.
  3. The total bits used to represent each number. For example, if your maximum value is 998, so 10 bits is what you need.

GeneticSharp will warn you if you try to use a total bits that cannot hold a number inside your floating point chromosome.

  1. The number of fraction (scale or decimal) part of the number.

@MattWolf74
Copy link
Author

MattWolf74 commented Oct 22, 2018 via email

@giacomelli
Copy link
Owner

It means the maximum number that a chromosome can represent (solution).

@MattWolf74
Copy link
Author

MattWolf74 commented Oct 22, 2018 via email

@giacomelli
Copy link
Owner

Correct.

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

No branches or pull requests

2 participants