Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] Space race patches
Home

Re: [Freeciv-Dev] Space race patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Space race patches
From: Greg Wooledge <wooledge@xxxxxxxxxxx>
Date: Mon, 1 Feb 1999 20:28:34 -0500

Falk Hueffner (falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx) wrote:

>     >> + turns =
>     >> game_turns_between_years(pplayer->spaceship.launch_year, +
>     >> arrival_year) - 1; + crash_probability = 1.0 - +
>     >> pow(spaceship_success_rate(&pplayer->spaceship), 1.0 / turns);

I can't read this code; perhaps it was mangled by the quoting?

>     David> Does this mean the success rate means a per-turn failure
>     David> chance?  That seems a bit harsh and a different again
>     David> meaning to "success chance".
> 
> I interpreted "success chance" as "100% - the chance that the
> space-ship will crash during the whole flight". So I need do know how
> many turns the flight has, and in each turn there is a chance of
> crashing.

Note, however, that you can't simply divide the probability of a total
failure by the number of turns and then check that "partial probability"
each turn.  That doesn't give the same result.

Consider a 100% chance of failure after 2 turns.  If you divide the
100% by 2 turns, you get 50% per turn.  Now, if you check on the
first turn, you have a 50% chance of failure.  But if that check
succeeds, then you check on the second turn, again with a 50% chance
of failure.  So, the total probability of failure this way is only
75%, not the original 100%.

(I don't know whether this is what you were doing, since I can't read
the formula above.)

-- 
Greg Wooledge                    | Distributed.NET http://www.distributed.net/
wooledge@xxxxxxxxxxx             | because a CPU is a terrible thing to waste.
http://www.kellnet.com/wooledge/ |


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