Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2004:
[freeciv-ai] (PR#10203) Greedy CM algorithm
Home

[freeciv-ai] (PR#10203) Greedy CM algorithm

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [freeciv-ai] (PR#10203) Greedy CM algorithm
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Oct 2004 19:52:14 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10203 >

Bugfix.  It's now consistently faster, and always correct.  In over 50 games, 
the BB code takes 
75% of the time of the DP code, pretty much on every query.

Incidentally, it has revealed that the old dynamic programming code actually 
has a bug when 
you disband a unit in a city: the cache doesn't get cleared, so it ends up 
returning a result for 
the city still having the unit.  The branch-and-bound code doesn't cache 
anything, so it 
doesn't suffer from that.

Attachment: cm_branch_bound.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]