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

use the Binary/Gray encoding methods replace Decimal #3

Open
weixing1531 opened this issue Jun 18, 2019 · 2 comments
Open

use the Binary/Gray encoding methods replace Decimal #3

weixing1531 opened this issue Jun 18, 2019 · 2 comments

Comments

@weixing1531
Copy link

weixing1531 commented Jun 18, 2019

https://github.com/weixing1531/pikaia/tree/Binary
I wrote a subclass named pikaia_binary_class.
In the class, I change the definition of array gn.
integer(IB),dimension(me%n),intent(out) :: gn
operate the array gn in subroutine cross,mutate,encode,decode with using fortran's BIT INTRINSIC PROCEDURES ,then save memory and increase speed.

@weixing1531 weixing1531 changed the title use the Binary encode method replace Decimal use the Binary/Gray encode methods replace Decimal Jun 20, 2019
@weixing1531 weixing1531 changed the title use the Binary/Gray encode methods replace Decimal use the Binary/Gray encoding methods replace Decimal Jun 21, 2019
@ivan-pi
Copy link

ivan-pi commented Sep 25, 2020

Do you have some measurements how much improvement it is?

My (limited) understanding is that for most problems the time is dominated by the function evaluations and not really the genetic algorithm part.

Maybe a proper bitset class could simplify the encode/decode steps.

@weixing1531
Copy link
Author

weixing1531 commented Sep 26, 2020 via email

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