Staredit Network

Staredit Network -> UMS Assistance -> Junkyard Dog Non-Randomization
Report, edit, etc...Posted by Mp)3 on 2005-01-19 at 00:37:49
Lately, I've noticed that Junkyard Dog can't exactly be random. It's occured to me once, but I could never pin down the concept. Is there anyone (particularly those in high places) that understands and can explain the concept? Thanks.
Report, edit, etc...Posted by DT_Battlekruser on 2005-01-19 at 00:55:43
Huh, why couldn't Junkyard Dog be random?

You could
set x to random real between 0 and x map max
set y to random real between 0 and y map max
order unit to (x,y)

Seems simple to me.
Report, edit, etc...Posted by chuiu on 2005-01-19 at 01:30:48
What do you mean, Mp)3?
Report, edit, etc...Posted by notnuclearrabbit on 2005-01-19 at 04:54:09
[center]I've noticed the same thing, and I too have not been able to find out why it does that. Most of the time, I see the unit go down-right, down, left, up, up. it's really weird... also, switches aren't really random. I made a 'dice' and I had 5 switches that were randomized. I kept getting 1's, even though the triggers were right.[/center]
Report, edit, etc...Posted by chuiu on 2005-01-19 at 10:46:32
Oh well that's to be expected. You can't completely randomize anything with a computer. I have noticed sometimes switches land on the same things many times in a row and junk yard dawg does have a pattern of movement, but it's random enough for what we, as map makers, have to do.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-19 at 16:38:23
QUOTE(Chu @ Jan 19 2005, 09:46 AM)
Oh well that's to be expected.  You can't completely randomize anything with a computer.  I have noticed sometimes switches land on the same things many times in a row and junk yard dawg does have a pattern of movement, but it's random enough for what we, as map makers, have to do.
[right][snapback]128027[/snapback][/right]


Yeah but if you test it out many many times then it will equal out pretty close.

I've ran a test with random triggers and let it calculate over a thousand times and adding each result to a leaderboard. It was pretty close.

Mp)3 i think that it isn't 'random' because we don't know the specifics about the AI script. Like where the unit is ordered to move may relate to units and terrain around him. How far he is from the location, or where he is on the map. (i don't know)

Ever notice how when you use junkyard dog on alot of units they tend to group up around the edges of the map and go around that. Because of that my guess would be that for the most part the units are issued to attack at a specific angle at random intervals of time. If they were on the right edge of the map and they were ordered to attack at a 30degree angle then theres no where to go so they would go up instead. This is all pure hypothesis
Report, edit, etc...Posted by chuiu on 2005-01-19 at 16:43:28
Yeah, that's why I said it was random enough.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-19 at 16:45:02
Well any random event will commonly resemble a pattern every once in a while. You made it out like it is a flaw in the system.
Report, edit, etc...Posted by MapUnprotector on 2005-01-19 at 18:06:04
Nothing on computers can be truely random, its all pseudorandom, I read about this once in magazine and online, most use like complex algorithms which start out with a seed number to produce random numbers, but they also have chaotic random and other stuff that uses quantum theory, like the deteorioration of some radioactive element. Also one article talked about using radio waves in the air.
Report, edit, etc...Posted by chuiu on 2005-01-19 at 18:17:28
Microsoft uses a number based off the time between the date their first OS was made to the current date as a seed then works from there. So it's always different. Oh yeah, that number is also made from the time of the day.
Report, edit, etc...Posted by MapUnprotector on 2005-01-19 at 18:31:39
QUOTE(Chu @ Jan 19 2005, 07:17 PM)
Microsoft uses a number based off the time between the date their first OS was made to the current date as a seed then works from there.  So it's always different.  Oh yeah, that number is also made from the time of the day.
[right][snapback]128223[/snapback][/right]


I read about how people found out the seeds such as the time and date and started stealing stuff, and how it happened to Netscape
Report, edit, etc...Posted by Tuxedo Templar on 2005-01-19 at 20:11:05
K.

One way to counter edge crawlers (my arbitrary name for them) with junkyard units is to prevent them from reaching the very outer edges (like 4-5 grid squares). Re-junkyard them after you move them away (however you plan to do it) and they'll stay reasonably evened out.
Report, edit, etc...Posted by Mp)3 on 2005-01-20 at 01:27:00
QUOTE((U)Bolt_Head @ Jan 19 2005, 04:38 PM)
Yeah but if you test it out many many times then it will equal out pretty close.

I've ran a test with random triggers and let it calculate over a thousand times and adding each result to a leaderboard.  It was pretty close.

Mp)3  i think that it isn't 'random' because we don't know the specifics about the AI script.  Like where the unit is ordered to move may relate to units and terrain around him.  How far he is from the location, or where he is on the map.  (i don't know)

Ever notice how when you use junkyard dog on alot of units they tend to group up around the edges of the map and go around that.  Because of that my guess would be that for the most part the units are issued to attack at a specific angle at random intervals of time.  If they were on the right edge of the map and they were ordered to attack at a 30degree angle then theres no where to go so they would go up instead.  This is all pure hypothesis
[right][snapback]128140[/snapback][/right]


This is what I thought too. I ran a few tests to see if this would would work by placing a marine in the middle of a "spiral" maze and see if it would escape on it's own. Because theoretically, if a unit moves in exact intervals dependant of its sorroundings, it could eventually get out. However, I ran the test multiple times, and amazingly, almost exactly 50% of the time, the marine got out. I began to do the same tests at different times, say preferably about 4 hours later. I did this because also, theoretically, the randomization of a computer is usually based on the time. However, the results were nearly the same. Eventually I made variations on the terrain, changing it to counter-clockwise, making the radiuses (radii?) larger or smaller, even adding miniscule flaws in a part of the maze. Unfortunately, I was only lucky the first time in finding a pattern once. The variations failed miserably.


Randomization done by a computer (obviously) isn't exactly "Random". As you have all pointed out, it is basically a flaw within the system itself. Regrettably, I didn't get exactly what I was looking for. I was seeing if someone had actually found a pattern within the Junkyard Dog AI Script, either dealing with movement, timing, or plain choreography. I believe Bolt (Like almost always) was closest in getting to where I was heading with the question. Thanks a lot for taking the time to answer my question.
Next Page (1)