Advertisement

GA, quick way to fill chromosome??

Started by June 09, 2003 05:49 PM
12 comments, last by galgo3 21 years, 5 months ago
Is there a quick way to generate and use large chromosomes, in the range of 10,000,000 1''s and 0''s. TIA
This is not really a game AI question is it? I think you''ll have a better chance of an answer to your question if you ask it in the comp.ai.genetic newsgroup.




My Website: ai-junkie.com My Book: AI Techniques for Game Programming

Advertisement
Generate a random 32 bit number (ie: a long).
Memcpy it in to your chromosome.
Increment the pointer in to the chromosome by 32 bits.
Keep doing this.

Cheers,
Will
------------------http://www.nentari.com
quote: Original post by RPGeezus
Generate a random 32 bit number (ie: a long).
Memcpy it in to your chromosome.
Increment the pointer in to the chromosome by 32 bits.
Keep doing this.

Cheers,
Will


That''s basically how I''d do it....a quick RNG could handle the problem pretty easily....





Ferretman

ferretman@gameai.com
www.gameai.com
From the High Mountains of Colorado

Ferretman
ferretman@gameai.com
From the High Mountains of Colorado
GameAI.Com

What''s an RNG?




My Website: ai-junkie.com My Book: AI Techniques for Game Programming

Random Number Generator?
Advertisement
aaaaaahh! Sometimes I can feel so dumb.






My Website: ai-junkie.com My Book: AI Techniques for Game Programming

i was just curious...

what types of problem sets exist that require a chromosome of that length?

i don''t have a terrible amount of experience with genetic algorithms, but anytime i''ve modelled a chromosome that reached a very large size, i''ve always found that there was a better way to solve the problem.
If one were creating filters for images, millions of bits is not at all excessive. 640x480x8bits/pixel = 2,457,600 bits.. Same goes for audio processing. I guess the same would be true if you wanted the GA Lego CAD program to create the Eiffel tower in 3D. :D

That said, the audio problem I''ve used EP for (I''ll say "classifier system" now before I get flamed to heck) has required only 11 states for a 100% solution, and imaging problems can usually be simplified to the nth degree...

Cheers,
Will

------------------http://www.nentari.com
Great link Will.




My Website: ai-junkie.com My Book: AI Techniques for Game Programming

This topic is closed to new replies.

Advertisement