From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29256 invoked by alias); 18 Aug 2004 03:00:05 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 29221 invoked from network); 18 Aug 2004 03:00:01 -0000 Received: from unknown (HELO av6-1-sn2.hy.skanova.net) (81.228.8.106) by sourceware.org with SMTP; 18 Aug 2004 03:00:01 -0000 Received: by av6-1-sn2.hy.skanova.net (Postfix, from userid 502) id 50F8037E4A; Wed, 18 Aug 2004 05:00:01 +0200 (CEST) Received: from smtp2-1-sn2.hy.skanova.net (smtp2-1-sn2.hy.skanova.net [81.228.8.177]) by av6-1-sn2.hy.skanova.net (Postfix) with ESMTP id 3A96A37E43; Wed, 18 Aug 2004 05:00:01 +0200 (CEST) Received: from [212.181.162.155] (h155n1fls24o1048.bredband.comhem.se [212.181.162.155]) by smtp2-1-sn2.hy.skanova.net (Postfix) with ESMTP id A5F1A37E42; Wed, 18 Aug 2004 05:00:00 +0200 (CEST) X-Sender: u22611592@m1.226.comhem.se Message-Id: In-Reply-To: <4122A750.6070006@phy.cmich.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 18 Aug 2004 04:59:00 -0000 To: Eric McDonald From: Hans Ronne Subject: Re: Major bug and what to do about it (long) Cc: xconq7@sources.redhat.com X-SW-Source: 2004/txt/msg00945.txt.bz2 >But, this is where we differ, I think. The shell has to land somewhere, >and it is possible that _no_ unit sits where it lands. Of course. And it is also possible that the target unit is entrenched, protected by other units or the terrain, or takes evasive action. One could also argue, as you do, that larger units are easier to hit etc. I do understand the "Unit target area" scheme that you are proposing, or at least I think so. You would calculate how much of the total area is covered, and then use that to distribute hit-chances between the units and the empty area. However, I think this may be both too simplistic and too complicated. Too simplistic because many factors affect the hit chance (some are mentioned above) and the unit size in terrain is just one of them, not necessarily the most important one. Too complicated for reasons that have to do with the underlying statistics. Perhaps I should elaborate on the latter, because it is an important point to clear up. I see random firing of a gun into a terrain area as a statistical process in two space dimesions (we need not consider time here). The key aspect of this process is that the position of each hit is independent of both previous and coming hits. This means that a given unit (or subarea) has a fixed probability of being hit with each shot. This probability may depend on the unit's size, its protection, the terrain and many other factors. The probability may be anything from 0% to 100%. Now, as I see it, all these factors (including the unit's size) are already weighed into the hit-chance table and its various modifier tables such as uu_protection etc. I certainly assign a larger hit chance against units that are big targets when I design a game. So if the hit-chance for artillery against infantry is 20% it means that an infantry unit which sits in a standard terrain cell (no terrain modifiers) has a 20% chance of being hit each time a piece of artillery fires into that cell. This probability, and this is the key point in my argument, is not affected by the presence of other units in the cell (or - in the case of failed fire-at actions - their absence). Nor is it affected by the sizes of these other units or the total area covered by all units. The only size that matters is the size of our own unit, which is already weighed into the hit-chance table. We can therefore forget about these other units, which are statistically independent of our unit, in the hit-chance calculation. The only exception is if one of them has a protection property that affects our unit. So, to answer your question, if we have 5 units in the cell, and the artillery has a 1% hit-chance against each one of them, the probability that no unit at all will be hit is (1 - 0.01) ^ 5, or 95.1%. If we have 2 units in the cell and the hit-chance against each one is 98% the probability that no unit will be hit is (1 - 0.98) ^ 2, or 0.04%. A small but still non-zero number. I would expect the combined hit-chance to equal 100% only if the hit-chance against at least one of the units is 100%, in which case it will always be 100%. So how do we translate this into a combat resolution algorithm that makes sense? I would favour a Monte Carlo approach, where the dice is rolled once for each unit in the stack, using its own individual hit-chance. This dice rolling should stop, however, once a unit has been hit. The reason for this is that if we know that the shell hit one position, it cannot also hit a completely different postion. Sort of like the collapse of the wave function in quantum mechanics, if you see what I mean. Furthermore, it is important that the dice rolling is done in a random order, since we would otherwise favour hits of units at the top of the stack, particularly when each unit has a high hit-chance. I hope this clarified my views. Hans