(PR#10203) Greedy CM algorithm

"Jason Short" <[email protected]> Fri, 12 Nov 2004 22:18:17 -0800
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10203 >

> [bhudson - Thu Oct 14 18:52:59 2004]:
> 
> > > Also, can you send a patch that does not include the old cm code,
> and
> > > that makes the necessary changes to the rest of the code
> > > (auto_arrange_workers)?
> 
> Here's the most minimal patch: it changes only cm.c and leaves the API
> untouched.
> I went through and cleaned up the comments and a couple violations of
> the coding standards.

I read over the new code.  In the process I edited it: fixing style,
adding more comments, replacing loops with iterators, etc.  Pretty much
all changes are cosmetic.

I can't say I entirely understand it.  But then the current code is even
worse.  It does seem pretty clear that the B&B algorithm will be a lot
less bug-prone than the current method.  So unless anyone objects I will
commit this patch (Benoit, make more changes to it if you want).

For S2_0 this is too much of a change, even though it's surely easier to
debug than the DP algorithm.  So we still want bug fixes for the current
system.

jason
cm_branch_bound2.diff (text/x-patch, 119.7 KB) - not displayed