Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!travelers.mail.cornell.edu!news.tc.cornell.edu!news.cac.psu.edu!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!usc!sdd.hp.com!night.primate.wisc.edu!aplcenmp!aplexus.jhuapl.edu!jsl
From: jsl@aplexus.jhuapl.edu (Jon Lindberg)
Subject: Re: Influence Mapping
Message-ID: <D8u35u.6uB@aplcenmp.apl.jhu.edu>
Keywords: Map analysis mesh analysis
Sender: usenet@aplcenmp.apl.jhu.edu
Nntp-Posting-Host: aplexus.jhuapl.edu
Organization: JHU/APL
References: <znr800776873k@leotech.mv.com> <3ph1mp$19og@news.gate.net>
Date: Fri, 19 May 1995 16:29:54 GMT
Lines: 53

>:      The algorithm boils down to:
>
>: 1)   Assign each map location one of three values:
>:      a)  If it's empty, assign 0;
>:      b)  If it's occupied by a friendly unit, assign a positive value.
>:      c)  If it's occupied by an enemy unit, assign a negative value.
>
>: 2)   Make a new copy of the map with each location receiving its old
>:      value modified by the six hexes surrounding it:
>:      a)  Increase by one for each adjacent hex containing a positive
>:          value.
>:      b)  Decrease by one for each adjacent hex containing a negative
>:          value.
>
>: 3)   Copy the new map back into the old map.
>
>: 4)   Repeat steps 2) and 3) an arbitrary number of times.
>
>:                                  * * *

Steve Woodcock writes:
>  Question:  Perhaps I'm just being slow tonight, but what is gained
>by repeating Steps 2/3 an 'arbitrary' number of times?  Having built
>the map in Steps 1-3, why repeat it?

	If you repeat steps 2 and 3 some number of times, your map
will eventually settle into a steady state where the values in the
map don't change.  At this point you have propagated the influence
of each unit across the entire map, and have a clear picture of who
controls each square and exactly how much they control it.  If you
don't repeat the process, you will not see effects such as borders
between areas influenced by different groups of units (which would
show up as zero or near zero values), and you will not see the
complete effect of groups of units.

	I'd have to get out my old EE textbooks to recall the
details but this method is one that is used for computing the
influence of electromagnetic fields in a plane.  I believe that
it is generally used for a wide variety of types of field analysis,
so there should be reference materials available on the
algorithm at any technical library - details such as the effects
of computing with 4-adjacency or 8-adjancency, or how to know when
to stop iterating.  I don't recall what the formal name of this
type of algorithm is, but the name mesh analysis comes to mind.

					Jon

-- 
LINDBERG,JON STERLING
Johns Hopkins University/Applied Physics Laboratory (F2C)
Johns Hopkins Road
Laurel, MD  20723
jsl@aplpy.jhuapl.edu
