X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.5 sun4m)
MIME-Version: 1.0
Subject: Re: Avoiding Obstacles to reach a destination
References: <4jn4f2$f45@mirv.unsw.edu.au> <1996Apr3.141311.18059@imada.ou.dk><4jn4f2$f45@mirv.unsw.edu.au> <1996Apr3.141311.18059@imada.ou.dk> <4k6mer$eiv@tribune.concentric.net> <4k9k6v$a79@scratchy.mi.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!iol!tank.news.pipex.net!pipex!dish.news.pipex.net!pipex!tube.news.pipex.net!pipex!lade.news.pipex.net!pipex!news00.sunet.se!sunic!news99.sunet.se!news.uni-c.dk!imada.ou.dk!breese
From: breese@imada.ou.dk (Bjorn Reese)
Message-ID: <1996Apr10.110725.28803@imada.ou.dk>
Sender: news@imada.ou.dk
Nntp-Posting-Host: gounod.imada.ou.dk
Organization: Dept. of Math. & Computer Science, Odense University, Denmark
Date: Wed, 10 Apr 1996 11:07:25 GMT
Lines: 32
Newsgroups: comp.ai.games

Dean Mills wrote:
> 
> :>: The disadvantage of this method is that it easily gets trapped in
> :>: local minima.
> 
> I found, in my implementation using the above technique, it was very easy to
> trap an AI player, such as...

You basicly have two options. Either avoid the local minima, or escape
it trapped.

The former is the preferred option, but it can be somewhat tricky.
One possibility is to use "beacons" -- well-placed attractive
points. Let the object travel from one beacon to the next until its
destination is within sight.

If you choose the latter option, you could try something like this:

  1) Detect a dead-end (if the object doesn't reach its destination
     within a specified time, or if it stays too long in a small
     area)
  2) Pick a random location which is reachable from the current
     location, and go there first.
  3) When you reach the random location, go to the desired location.

There are plenty of other methods for both options though.

-- 
Bjorn Reese                      Email: breese@imada.ou.dk
Odense University, Denmark       URL:   http://www.imada.ou.dk/~breese

"It's getting late in the game to show any pride or shame" - Marillion
