[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

142.0. "wts wrs thn btng nt n pl nd fnd" by SPRITE::OSMAN () Mon Jul 29 1985 19:38

Years ago, I wrote a program on TOPS20 called WORM.  It asked you how many
worms you'd like, and then the number of worms you specified would infest
your screen.

Unfortunately, the worms were quite adaptable to several types of screens
(vt05, vt52, vt100).

Fortunately, they stayed on the surface phosphur, and could not venture
inside, or jump out onto your desk or lap.

Unfortunately, I've lost the source to my own hack.

Fortunately, this notes file is read by many.  Could someone perhaps
send me a copy of the source ?

Thanks. /Eric
T.RTitleUserPersonal
Name
DateLines
142.1R2ME2::GILBERTTue Jul 30 1985 21:5310
Hmmm.  I wrote something similar as a test for ANIMOD, a package of routines
for doing minimal-screen updating (yes, Stan, it's in the toolshed).

I believe that WORM is included in the ANIMOD stuff in the STC, but, if not,
then you can grab WORM.MAR and WORM.EXE from HARE::SYS$PUBLIC: (while the
supply lasts).  Just run it, and specify from 1 to 100 worms.  The first
person to discover the major, but random and subtle difference in behaviour
it sometimes exhibits wins a cookie!

					- Gilbert
142.2ALIEN::POSTPISCHILWed Jul 31 1985 21:136
Re .1:

Are you referring to the fact that the worms do not cross over each other?


				-- edp
142.3R2ME2::GILBERTThu Aug 01 1985 02:582
re .-1
Do you mean that sometimes they cross over each other and sometimes they don't?
142.4BEING::POSTPISCHILThu Aug 01 1985 12:517
Re .3:

I haven't seen them cross over each other yet.  I noticed they sometimes vary
in length, but I do not know if there is any rule they following in doing this.


				-- edp
142.5SPRITE::OSMANThu Aug 01 1985 13:1424
I've tried the program, and it works fairly well.

However, mine was "better" due to a bit of vector work I did.

I originally observed in my program that the worms varied in length.

I realized that the reason was that they folded over themselves at
backstrainingly sharp angles.

So I modifed the program so that worms tried not to turn too sharply.
You might considering enhancing yours in this manner.

More specifically, if a worm is travelling north, I try to give it
only three choices (in the king's move world), namely continue north,
head northwest, or head northeast.

This allows the worms to look a bit more like worms.

Another feature of my program was the choice by the user of whether worms
should leave trails behind, or whether an initial field of dots should be
supplied for the worms to eat.  These features were both visually interesting
and a fairly good visual test of the random number generator !

/Eric
142.6ALIEN::POSTPISCHILThu Aug 01 1985 15:0612
Re .5:

> I originally observed in my program that the worms varied in length.
>
> I realized that the reason was that they folded over themselves at
> backstrainingly sharp angles.

The varying lengths in Gilbert's program are not due to worms retracing their
paths.  The phenomenon appears to be deliberate. 


				-- edp
142.7MARRHQ::RMURPHYThu Aug 01 1985 15:573
re: .1
Maggots?
	-Rick
142.8R2ME2::GILBERTThu Aug 01 1985 17:5711
re: .1
	Responses 2 and 5 are close to finding the "major, but subtle
	difference in behaviour that occurs at random".

re: .7
	Sorry, that's major and random, but not very subtle.

Hint:	Roughly half the time it behaves one way, half the time the other.

	It's will be very noticable, after watching for just a couple seconds,
	ONCE you learn how to observe.
142.9ALIEN::POSTPISCHILFri Aug 02 1985 21:4114
I must modify my statement about the worms not crossing over each other.
More specifically, they seem to never move onto a position already occupied;
they can cross each other diagonally:

		b  a
		 ba
		 ab
		a  b.

Also, the lengths not only decrease below the value specified by the user, but
also grow on occasion.  But I still seem to be missing something.


				-- edp
142.10R2ME2::GILBERTSun Aug 04 1985 02:364
Oops.  On V4.0 systems, the worms weren't very random.  You could try asking
for 3 worms of length 10 in the old image, or grab the more recent copy of
the image for something a bit more random.  You see, the program adjusts
its random number generator (occasionally) by adding in @#EXE$GQ_SYSTIME.