Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] Re: MORT
Home

[Freeciv-Dev] Re: MORT

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: MORT
From: Reinier Post <rp@xxxxxxxxxx>
Date: Wed, 7 Jun 2000 19:43:40 +0200

> Whether or not the code is absolutely horrible, I
> suspect it pre-dates the widespread availability of
> FPU hardware.  I really doubt that the code saves any
> time over 
>
> const double MORTD=(double)(MORT-1)/MORT;
> return (int)((double)b*exp(MORTD,d));
> 
> on any machine with a FPU

It's terrific, in the sense that it works great, but it's
also practically impossible to understand.

From the Changelog (June/July, 1998) it's clear that a lot of experimental
tuning went into it before the release.  And this includes tuning for
performance - apparently some of these optimizations were only added
when the code turned out to be too slow without them.  An irreproducible
mess of heuristic madness, in the best AI coding traditions.

-- 
Reinier



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