Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cat simulation algorithm--bug fix

11 views
Skip to first unread message

Sue Brezden

unread,
Sep 27, 1985, 11:30:33 AM9/27/85
to
>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 Casey

unread,
Sep 28, 1985, 11:21:56 PM9/28/85
to

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

Sean


--

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

Carl Greenberg

unread,
Oct 2, 1985, 7:03:52 PM10/2/85
to
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!"

Donald L. Nash

unread,
Oct 4, 1985, 5:32:08 PM10/4/85
to

*** 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: dln...@ngp.UTEXAS.EDU

Damballah Wedo

unread,
Oct 5, 1985, 7:15:11 PM10/5/85
to
> 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 Casey

unread,
Oct 6, 1985, 4:33:58 PM10/6/85
to

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

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

Carl Greenberg

unread,
Oct 9, 1985, 7:05:54 PM10/9/85
to
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

C. Rosebrugh

unread,
Oct 11, 1985, 11:07:34 AM10/11/85
to
> 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

Not Sid Vicious

unread,
Oct 14, 1985, 9:06:44 PM10/14/85
to
<*munch*>

When the cat simulation algorithm has been completed, could somebody *please*
post the final version? I'd like to run it in the background (will this be
possible?) on the terminal in my office, as we have a lot of mice here this
fall. (If this won't run in the background, I'd like whatever advice is
available on this unusual subject.)

Helen Anne

{ucbvax,ihnp4,cbosgd,hplabs,decwrl,unisoft,fortune,sun}!dual!hav

"J. Frank Parnell."
"Ott . . . Otto."
"Do you ever feel as if your mind had started to erode?"

Evan Marcus

unread,
Oct 15, 1985, 1:09:20 PM10/15/85
to
> 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.

palena

unread,
Oct 15, 1985, 2:11:42 PM10/15/85
to


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

0 new messages