Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site sdcrdcf.UUCP
Path: utzoo!linus!philabs!sdcsvax!sdcrdcf!lwall
From: lwall@sdcrdcf.UUCP
Newsgroups: net.games
Subject: Re: warp questions
Message-ID: <333@sdcrdcf.UUCP>
Date: Thu, 16-Jun-83 09:56:52 EDT
Article-I.D.: sdcrdcf.333
Posted: Thu Jun 16 09:56:52 1983
Date-Received: Sun, 19-Jun-83 04:23:41 EDT
References: <376@sbcs.UUCP> <327@sdcrdcf.UUCP>
Reply-To: lwall@sdcrdcf.UUCP (Larry Wall)
Organization: System Development Corporation--a Burroughs Company
Lines: 26

My faithful minion, Jon Biggar (A Warp Wizard), almost had it right.
"diff" is indeed the raw difficulty of the wave, taking into account the
number, average energy, intelligence, and general nastiness of each type
of enemy, as well as some fudges for super-dense or super-sparse universes.
It is supposed to reflect the normative amount of time necessary to clean
things up.  Think of par in golf.

It is not divided by time to get the efficiency rating, however.  The following
does the calculation:

    effectscore = ((double)curscore / possiblescore) *
	atan2(power, (double) timer - 9999.0) / pi_over_2;

where
    effectscore   => efficiency rating
    power         => "diff"
    timer         => number of time units taken + 10000
    curscore      => how many points you got this round
    possiblescore => how many points you coulda got

The atan2 divided by pi over 2 is very nice in that it yields .5 for two equal
arguments, and asymptotically approaches 1 for large power:timer ratios,
and 0 for small power:timer ratios, and is symmetrical to boot.

					Larry Wall
					(The Warp Wizard)