Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!news.sesqui.net!imci2!news.internetMCI.com!newsfeed.internetmci.com!in1.uu.net!nwnews.wa.com!nwfocus.wa.com!nmb-news!not-for-mail
From: Tony Schroeder <tony.schroeder@netmanage.com>
Subject: Re: Avoiding Other Units While Pathfinding
Message-ID: <NEWTNews.830275983.1341.tonys@tonys.bellevue.netmanage.com>
Date: Tue, 23 Apr 96 09:09:12 PDT
References: <4jn4f2$f45@mirv.unsw.edu.au> <4l3ptm$5ne@news2.cais.com> <3179a326.130110839@news.accessnv.com> <4le4ee$qia@news2.cais.com>  <4lfi7h$689@reuter.cse.ogi.edu>
X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Lines: 84


In Article<4lfi7h$689@reuter.cse.ogi.edu>, <wesson@church.cse.ogi.edu> writes:
> Path: nmb-news!psinntp!psinntp!psinntp!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!reuter.cse.ogi.edu!church!wesson
> From: wesson@church.cse.ogi.edu (Richard Wesson)
> Newsgroups: comp.ai.games
> Subject: Re: Avoiding Other Units While Pathfinding
> Date: 22 Apr 1996 09:06:57 GMT
> Organization: Oregon Graduate Institute (OGI), Portland, Oregon
> Lines: 62
> Message-ID: <4lfi7h$689@reuter.cse.ogi.edu>
> References: <4jn4f2$f45@mirv.unsw.edu.au> <4l3ptm$5ne@news2.cais.com> <3179a326.130110839@news.accessnv.com> <4le4ee$qia@news2.cais.com>
> NNTP-Posting-Host: cse.ogi.edu
> 
> [on getting peasant blockages resolved]
> In article <4le4ee$qia@news2.cais.com>,
> Steve Pavlina <spavlina@pacificnet.net> wrote:
> [...]
> -One solution is to get some of the outer peasants on one side to back
> -up, then move the squatter on that side, and let the other side
> -proceed.  This can be difficult to implement with a large number of
> -peasants (which the computer players in WC2 are prone to produce),
> -since there is a great deal of coordination that must occur.  I.e. you
> -must identify which side of the blockage a peasant is on, and whether
> -he should back up or proceed through the pass.  This problem is bound
> -to recur.
> -
> -It may also be possible to prevent this from happening.  I.e. you can
> -search ahead a little and see if the next few steps will create a
> -blockage.
> -
> -Preventing the terrain from allowing this type of problem is not a
> -good general solution if you wish to include a scenario editor.
> -
> -Any ideas for a good solution to this problem?
> -
> --- Steve
> -
> 
> I don't know why you can't just get the peasants to move out
> of the way.  Keep all peasants ranked by priority.  Try-to move 
> them in order of descending priority.  A peasant who is blocked 
> will 'tell' an unmoved blocker to get out of the way.
> If the blocker cannot move, mark him, and have him tell somebody
> unmarked to get out of his way, and so on.  If/when you will find
> somebody who can get out of the way, then walk back up the
> chain of marked peasants, moving them all as they were told to 
> move.  If you can't find anybody who is capable of moving away
> for you (either by getting somebody else to move first or just
> moving directly himself) then return that you can't move.  But this
> way, at least one peasant always makes progress.
> 
> Worst case:
> XXXXXXXXXXX
> 135-><-642    (numbers = priority of peasants)
> XXXXXXXXXXX
> That case would be inefficient, but at least not a permanent
> blockage.
> 
> Keep all your units organized in a consistent way for determining
> who gets priority when moving/unblocking.  Randomly reassigned
> priorities will result in do-si-do's in narrow corridors.  I
> would suggest that military units always get priority over peasants,
> and gold/lumber carrying peasants get priority over unburdened
> peasants.  Other than that, perhaps age before beauty?
> 
> But the Warcraft programmers didn't seem to implement much pathfinding
> anyhow.  The ships seem especially feebleminded in this respect.  Oh
> well.  C&C was refreshingly good that way, except for harvesters
> locking horns on bridges now and then.
> 
> 
> -- Richard Wesson
> (wesson@cse.ogi.edu)
> 
> 
> In what way do you mean that Military gets priortity over peasants/peons? In 
several aspects I would see it the other way because the workers give you the 
ability to build troops. I have destroyed the computer by pulling a peon 
warfare tactic. Basically I go into an area with peasants and that is all I 
will kill unless I have a large group. Then I will use two or three military 
units as guards to protect the troops that go for the workers. It works well, 
not only they have to build new peasants, but they are losing production. But 
please expand on your statement.

Cpt. Picard



