Critique my approach: Why is this code not optimized?

I’m new to Genetic Algorithms and to programming on the whole.

Been testing my knowledge using Javascript (as it’s easy to learn) and did the following code;

http://ift.tt/2eOf8lc

I’ve tweaked the values and played around a bit, but I find that it works well will shorter strings, while longer strings seem to not work.

I’ve also noticed, that in longer strings after 500+ generations (approximately), the fittest chromosome in the generation seems to remain stagnant.

I’m not sure if I did something wrong, or maybe my algorithm needs tweaking.

can anyone advise me on ways to improve this.

Thanks

submitted by /u/naseeha
[link] [comments]

from Artificial Intelligence http://ift.tt/2eOf9pg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s