Laurent_R has the key I think. When brute force takes a few seconds, or some tolerable time, thinking over the method may not be worth it, but when brute force makes you wait too long, it needs to be at least helped along, if not abandoned for a better method. In this case, not knowing how you constructed your player value function, can you think of a way to prune out the players that you can't conceive of being in a winning team? If not obvious up front, you could get your code to do something like:
- calculate the best possible team score, and discard players that can't deliver at least a substantial fraction of that total
- tag players that are consistently below their team and/or position average (or higher percentile), and favour them less in subsequent selections
- start by building sub teams and sort them by costs and values, then you can try assembling them in a second stage
- if your value function incorporates combinations of players (i.e. some players with some characteristics play better/worse when on a team with other players with other certain characteristics) genetics may be your best option to arrive at a good solution, if not provably optimal, in a satisfactory time
--
I'd like to be able to assign to an luser
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|