T.R | Title | User | Personal Name | Date | Lines |
---|
677.1 | Off the top of my head. | SNDCSL::SMITH | William P.N. (WOOKIE::) Smith | Fri Jan 29 1988 09:24 | 7 |
| Just skew the random algorythm so that you will 'tend' towards your
goal (pick one of 5 movements from your current position randomly,
up/down/left/right/towards_the_goal), or alternate between random
and goal_seeking.
Willie
|
677.2 | Already did | FOO::BHAVNANI | Must be the compiler... | Sat Jan 30 1988 00:24 | 2 |
| I already tried that - it produces very predictable paths.
/ravi
|
677.3 | | SNDCSL::SMITH | William P.N. (WOOKIE::) Smith | Sat Jan 30 1988 09:31 | 22 |
| Exactly how did you do it, and how often do you use the goal_seeking
algorythm? Try something like:
Choose goal_seeking algorythm 1/10 of the time. Not every 10th
time, but randomly 1/10th of the time. ie:
Pick random integer between 1 and 10.
If (number is 1) then
{ use goal_seeking algorythm. }
Else
{ use random path algorythm. }
You probably want to play with the numbers some (pick goal_seeking
one percent of the time?) or do some other things (choose north/south/
east/west/continue_in_previous_direction/use_goal_seeking/use_goal_
avoidance/turn_left/turn_right) in various randomly chosen
combinations.
What are you using for your random number generator?
Willie
|
677.4 | | ZZZZ::MORONEY | -- swapped out -- | Sat Jan 30 1988 14:34 | 5 |
| You may want to try a maze-generating algorithm, then "solve" the maze, and
that's your path. There are mazes that will have only one path between any 2
points in the maze, that may be the type you'd want.
-Mike
|
677.5 | | PLDVAX::ZARLENGA | Lost the will to compromise | Sun Jan 31 1988 13:49 | 15 |
|
.4>You may want to try a maze-generating algorithm, then "solve" the maze, and
.4>that's your path.
Beat me to it! That's what I was just going to suggest.
These kind of maze generators are simple and relatively fast
if coded properly. I wrote one in C for a PC version of MONSTA
that made the maze (22*66) in a hair over 1 second.
As an aside, it appears the method mentioned by WOOKIE::SMITH
should not be predictable. If your goal position is fixed, double
check your code.
-mike z
|