(PR#10203) Greedy CM algorithm
"Benoit Hudson" <bh-0/DuvcfrMH9wGe/[email protected]>
| Newsgroups | gmane.games.freeciv.ai |
|---|---|
| Message-ID | <[email protected]> |
<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.
cm_branch_bound.diff
(application/octet-stream, 161.7 KB) - not displayed