Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Re: Re (tilly) 1: Baseball line up (best rotation)

by aijin (Monk)
on May 17, 2001 at 22:39 UTC ( #81331=note: print w/replies, xml ) Need Help??

in reply to Re: Re (tilly) 1: Baseball line up (best rotation)
in thread Baseball line up (best rotation)

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.


Addendum: I just realized the page didn't actually link to the code.

  • Comment on Re: Re: Re (tilly) 1: Baseball line up (best rotation)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81331]
[Happy-the-monk]: Good morning monks!

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-04-25 07:00 GMT
Find Nodes?
    Voting Booth?