Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Re (tilly) 1: Baseball line up (best rotation)by aijin (Monk) |
on May 17, 2001 at 22:39 UTC ( [id://81331]=note: print w/replies, xml ) | Need Help?? |
Just to supplement Masem's reply...
First, you might consider doing a crossover in addition to a mutation to ensure that you properly explore the line-up space. You'll need to do a partially matched crossover (PMX) to ensure that you don't duplicate the team members. You could do a mutation as suggested by Masem either on each lineup or on each member of a lineup 1-5% of the time. Secondly you could experiment with various types of selection algorithms for determining who breeds and who dies. Masem suggested the Percentage model, but there's also the Roulette and Tournament models. Third, it would be really neat to take your top lineup from one run and stick it into a new run of the GA to see how it fares. Check out Genetic Algorithms with Perl for more guidance and inspiration. Enjoy! Addendum: I just realized the page didn't actually link to the code.
In Section
Seekers of Perl Wisdom
|
|