Since you don't seem to be able to see beyond a pissing contest between my heuristic and my heuristic stuck in a loop, I'll try to make the point another way.

All you are doing at the moment is comparing relative numbers for whichever heuristics you decide to test. And on a miniscule sample of possible datasets. But that gives you no basis upon which to draw any meaningful conclusions.

But in either case, the best solution you have found could be abysmally bad.

So what is the point in being able to say that heuristic A converges on an abysmally bad solution 0.1 seconds more quickly than heuristic B?

For a heuristic to be useful (or even just vaguely meaningful), you have to be able to say something to the effect of: "This heuristic will find the optimal (or one of the top ten most optimal) solution in 90% of cases".

Until you have some way of determining that kind of baseline, comparing trivial modifications of a single heuristic, or two wildly different heuristics, serves little purpose. And you cannot form a baseline without either an exhaustive search or some sound mathematical way of determining or estimating the optimal solution.

If you're really bent on pursuing an algorithm for solving the original problem, then lookup the literature on Linear Programming with particular attention to 'longest path' and 'critical path' analysis in a network. These have known solutions that will guarentee to find an optimal solution faster than a brute force search. Though probably not if coded in Perl.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^7: Challenge: Letter Power by BrowserUk
in thread Challenge: Letter Power by Tanktalus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.