Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Looking for help with AI::Genetic and classroom scheduling

by fizbin (Chaplain)
on Feb 21, 2005 at 15:57 UTC ( #433087=note: print w/ replies, xml ) Need Help??


in reply to Re: Looking for help with AI::Genetic and classroom scheduling
in thread Looking for help with AI::Genetic and classroom scheduling

This is what I get for going a weekend without reading all of perlmonks - I miss out on discussions like this.

Note that another way to deal with the problem of disallowed configurations is to narrow the search space to exclude them by having the individuals in your population be things that generate an acceptable layout, rather than being a layout directly.

For example, instead of a listvector gene sequence based on slots, you could do a rangevector gene based on available courses - these genes would then represent priority values for the courses. In the scoring phase, you'd use the gene values to sort the courses and you'd then fill in the slots one after another, each time using the highest priority acceptable course.

Well that explanation was clear as mud. Let me attempt to code it up and I'll post a reply - the code is probably clearer.

Update: This approach won't work immediately, because of the perl bug described in 433559. There's a way to patch AI::Genetic to work around the perl bug, but I don't think that there's any way to work around it short of tweaking AI::Genetic. (It's a one-line patch, though)

-- @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/


Comment on Re^2: Looking for help with AI::Genetic and classroom scheduling
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-07-30 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (239 votes), past polls