[net.bizarre] Cat simulation algorithm--bug fix

slb@drutx.UUCP (Sue Brezden) (09/27/85)

>if they [cats] had a microprogram to control them, it would implement
>the algorithm
>
>	while (alive) do
>	{
>		while (not visible(object)) do
>			walk around in daze;
>		while (visible(object))
>			strike object;
>		if (random() < 0.15)
>			eat object;
>		lick fur;
>		sleep;
>	}

Sorry, not quite.  A slight addition needs to be made here.  This bug
fix implements our cats.  Add after the if statement:

		while (random() < .65)
		{
			meow;
			go(outside);
			meow;
			climb(screen);
			go(inside);
		}
		use(catbox);

-- 

                                     Sue Brezden
                                     
Real World: Room 1B17                Net World: ihnp4!drutx!slb
            AT&T Information Systems
            11900 North Pecos
            Westminster, Co. 80234
            (303)538-3829 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Your god may be dead, but mine aren't.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sean@ukma.UUCP (Sean Casey) (09/29/85)

Wow, think about what our cat simulation will be like after a couple of
years of discussing this!

Sean


-- 

-  Sean Casey                           UUCP:   sean@ukma.UUCP   or
-  Department of Mathematics                    {cbosgd,anlams,hasmed}!ukma!sean
-  University of Kentucky               ARPA:   ukma!sean@ANL-MCS.ARPA

carl@proper.UUCP (Carl Greenberg) (10/03/85)

When we've finally gotten the catsim.c down, let's try and adapt it and we
can re-write the game "hack" for the random unlucky player to have a cat
instead of a dog.  Of course, it might be even better than a little dog if
you train the thing right...  And we'd have to alter the contents of tins
to contain such things as "Nine Lives"..
						Carl Greenberg
"I unpacked it!  I debugged it!  I compiled it!  It's MINE, I tell you!"

dlnash@ut-ngp.UTEXAS (Donald L. Nash) (10/05/85)

*** REPLACE THIS LINE WITH KITTY LITTER ***

All these cat simulation programs are forgetting something very
important.  They all forget to declare the cat!  How do you expect the
cat to work properly if it is not declared.  Therefore, all new cat
simulations should include the following code:

cat(mom,dad)
female mom;
male dad;
{
	/* The rest of the cat simulation goes here. */
}

Some method of determing the behavior of the cat from the values of mom
and dad should also be included.  Since I'm not very knowledgeble about
cats, I won't attempt to do this.  Also, when the cat dies, (ie, when it
exits the    while (alive)    loop), should it call exit()?  If so, what
value should it exit with?

Here are a few new functions which a good simulation should include:

	cough_up(hairball);
	run_from(dog);
	scratch(dog,nose);
	climb(tree);
	get_stuck_in(tree);

Hopefully, a pretty good simulation of a cat will be implemented
somewhere in a few months.

					Don Nash

UUCP:  ...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!dlnash
APRA:  dlnash@ngp.UTEXAS.EDU

mfs@mhuxr.UUCP (Damballah Wedo) (10/06/85)

> Here are a few new functions which a good simulation should include:
> 
> 	cough_up(hairball);
> 	run_from(dog);
> 	scratch(dog,nose);
> 	climb(tree);
> 	get_stuck_in(tree);
> 
> Hopefully, a pretty good simulation of a cat will be implemented
> somewhere in a few months.
> 
> 					Don Nash

Here is another needed cat simulation function:

extern	fed = FALSE;

wakeup_and_feed()
{
	if ( time() >= 6AM && sleeping(human) )
	{
		while ( sleeping(human) )
		{
			jump_on(human);
			sniff(human);
			bite(human, nose);
		}
	}
	while ( awake(human) && ! fed )
	{
		bite(human, ankle);
		bite(human, heel);
		rub_on_leg(human);
		climb(wall);
	}
}
-- 

Marcel-Franck Simon		ihnp4!{mhuxr, hl3b5b}!mfs

	" Papa Loko, ou se' van, ou-a pouse'-n alle'
	  Nou se' papiyon, n-a pote' nouvel bay Agwe' "

sean@ukma.UUCP (Sean Casey) (10/06/85)

I think get_stuck_in_tree should be an error return for getdownfrom(tree).

while (getdownfrom(whereiam) != 0)
	meow;




-- 

-  Sean Casey                           UUCP:  sean@ukma.UUCP   or
-  Department of Mathematics                   {cbosgd,anlams,hasmed}!ukma!sean
-  University of Kentucky               ARPA:  ukma!sean@ANL-MCS.ARPA

carl@proper.UUCP (Carl Greenberg) (10/10/85)

You forgot a few things:
	Remember when your cat just sat there looking at the other feline
	that copied its every move in the window?  Don't forget
		get_stuck_in(mirror);
	And, of course, there are the cats that are like the one my
	girlfriend has that sit in the window for hours without moving
	a muscle:
		freeze_in(window);
	Also, you must remember about the nap() routine:
		if(hunger >= foo)
			get_up(soon);
	and
		if(in_sunlight);
			ignore(hunger);
	(I'm operating on a limited knowledge of C programming, someone
	please correct any errors I made...  Have pity on a beginner.)
						Carl Greenberg

cpr0@bunny.UUCP (C. Rosebrugh) (10/11/85)

> You forgot a few things:
>
> 	And, of course, there are the cats that are like the one my
> 	girlfriend has that sit in the window for hours without moving
> 	a muscle:
> 		freeze_in(window);

Also known as:
                 watch(cat-tv);

    Cheers. CPR

evan@petfe.UUCP (Evan Marcus) (10/15/85)

> I would be most appreciative if someone would publish the collected
> cat simulation algorithm. The one I've built in the garage is complete
> with the exception of the software - all it does now is sit and purr.

And I thought you said you didn't have the software!

--Evan Marcus
-- 
{ucbvax|decvax}!vax135!petsd!petfe!evan
                         ...!pedsgd!pedsga!evan

Allow 6 to 8 weeks for delivery.
Wisconsin residents add 5% sales tax.
Member FSLIC.

lp102911@sjuvax.UUCP (palena) (10/15/85)

In article <347@proper.UUCP> carl@proper.UUCP (Carl Greenberg) writes:
>You forgot a few things:
>	Remember when your cat just sat there looking at the other feline
>	that copied its every move in the window?  Don't forget
>		get_stuck_in(mirror);
>	And, of course, there are the cats that are like the one my
>	girlfriend has that sit in the window for hours without moving
>	a muscle:
>		freeze_in(window);
>	Also, you must remember about the nap() routine:
>		if(hunger >= foo)
>			get_up(soon);
>	and
>		if(in_sunlight);
>			ignore(hunger);
>	(I'm operating on a limited knowledge of C programming, someone
>	please correct any errors I made...  Have pity on a beginner.)
>						Carl Greenberg


             I think these cat routines should be written in Lisp!! 
      After all if a cat isn't well-defined,what is !?

                                 And you think you know computers,

                                        Larry Palena
                                        St. Joseph's Univ.

{ astrovax | allegra | bpa | burdvax } !sjuvax!lp102911