Dog Brain 1.0 --- Non-Trainz, just a geek moment. :-)

JCitron

Trainzing since 12-2003
I've had an issue with a barking neighbor's dog who spent the morning barking and getting all the dogs in the neighborhood barking including my own. This in turn got me thinking about something I sent to my uncle a retired programmer about a year ago.

For those that have written programs or have used game script, you might appreciate this:

My uncle's response first (in reverse order)

Hmmm ... Sounds like a description of Grommet [My dog]. So there's also a Dog.Laserlight.Chase routine invoked by Dog.Laserlight.Pen.Detect. This must be in version 1.0 as it appears to be inherited from class Cat.

On 6/24/2014 11:55 AM, John Citron wrote:

I’ve come to realize that dogs aren’t dumb or smart. It’s all about their OS level and scripting capabilities. Dogs run what is called Dog Script which controls such functions as sniffing and barking. There are various versions that come out as dogs get older. Puppies come with versions 1.0 to 2.0, depending upon the breed. An advanced dog, coming with version 2.5 or higher is a rarity, so if you ever get your hands on one protect it and treat it well as they can be quite valuable as they can be upgraded as far as version 5.0 which is the maximum that most breeds (models) currently allow.

Having said this, I recently did some further investigating into Dog Script. Like most higher-level scripting languages such as .NET and PowerShell, the command structure is quite complex as it’s very similar to Java, C++, and other higher-level languages as of late. Below is an example of the dog.bark function.

//Dog.Bark function //
// This function is called up by various stimuli the dog receives due to input from his environment. //

// Defining fixed variables…//

Var Bark

// Dog Script requires that fixed variables be defined prior to operation because these are called from a stack of built-in subroutines built into DOGBIOS. Other ad hoc input variables, however, can be defined on the fly as they are not referenced from the built-in hardware libraries. Once the dog is side-tracked or sleeps, these variables are flushed from the stack. Some ad hoc variables, based on their source, can be saved to the NOVRAM. These then are treated as though they are built into the DOGBIOS and are then have to be declared prior to running a routine.


An example script
// Beginning of function.
Begin Main Void Dog.Bark.Cycle ();

// Dogs bark in small groups of 3 to 5 with up to 10 barks as a complete set and then repeat this until the stimuli has been interrupted. Here is a sample routine of a large 10-bark cycle which occurs with small yippy dogs.

{ public static void main(String[] args){ int count = 1; while (count < 10) { Bark("Count is: " + count); count++; } }}
Dog Script also handles Case functions so that the various stimuli can trigger a dog bark routine. The doorbell is a classic example. Once the stimulus is entered, the dog.bark.routine is called and the dog barks until the cycle has ended or is interrupted by recognition or a toy interrupt. A dog, can however, call up the dog.bark.routine again and again while the stimulus appears, disappears, and then reappears.

Here’s an example in pseudo-pseudo-extra-pseudo code:

A stranger appears at the door, press door bell. Dog barks N=10 times in groups of 3. Stranger gets accepted by family. Dog goes off after calling greeting routine and tail.wag.cycle is implemented. Stranger exits to get something from vehicle and enters house again. The dog starts the dog.bark.cycle, the greeting routine again until stranger is accepted. Stranger needs to get something else from vehicle. Dog hears door and then calls the dog.bark.cycle again then followed by the tail.wag.cycle.

etc.
 
So the point is...."that dog's bark after a man-made stimuli...solution for non-barking dog is to remove the man in this equation - therefore no man-made stimuli invented, used etc and dog's live in peace and harmony."
 
I have a solution for you regarding barking dogs. Cut a piece of hosepipe and stick it up the dogs backside.
Now..when the dog barks he has no backpressure and it goes wfffff !!!! whfffffff...only ..see?
 
Ooops - Me thinks John may have let loose "The Dogs of War" - what else does one do on a 4th July? However be sure to include "That no animals (dog's) where harmed" in the production of this post.
 
I have a solution for you regarding barking dogs. Cut a piece of hosepipe and stick it up the dogs backside.
Now..when the dog barks he has no backpressure and it goes wfffff !!!! whfffffff...only ..see?

The thoughts crossed my mind this morning when my neighbor across the street let out the dog that yapped for two hours straight. That's what made me think of this after a year. :)

Ooops - Me thinks John may have let loose "The Dogs of War" - what else does one do on a 4th July? However be sure to include "That no animals (dog's) where harmed" in the production of this post.

:)

No dogs harmed... exactly. :)

My dog is just as bad though. I swear he can hear leaves fart! :)

//Dogs hearing...
//Dog.Hear.Noise declares the function for hearing stimuli, which also triggers the Dog.Bark.Cycle routine. This is an interrupt driven routine, which once started continues until stimuli is stopped, unlike bark routine which is triggered by interaction of some kind. A Dog.Hear.Noise routine will continue in cycles of up to 100 barks, however, this is measured in minutes...

An example script
// Beginning of function.
Begin Main Void Dog.Hear.Noise ();

var t //Declares time length for continuous barking cycle.

This routine triggers Dog.Bark.Cycle noted previously

public static void main() ; {
{
While T>0 Do --t
Call Dog.Bark.Cycle
}
}

... etc.

} }}




John
 
Now this is funny! Image if there was a script for trainz that allowed something like this. I think we would all have a good chuckle seeing it lol.
 
The exception being Pomeranians ... they have no scripting ... they do not understand very much english (asside from a few key words like: "Do you want a num numz biscuit treats") and they only constantly spin counterclockwise nonsensically until they bump their knogen into the kitchen cabinets, and they always follow you around everywhere you go, even if you are going to the lavatory, or shower ... they only want to be with the num numz biscuit treats guy, cause he is the provider of the foodz !
 
Last edited:
I've noticed that individual dogs may have several instances of July 4th runtime behavior........
Class = Dog
Instance = Sheltie

bool july 4
july4 = 0
july4 = 1
If july4=0
{F1 = "Normal_dog_day"} //call the Function//
If july 4 = 1
{F2 = "July 4" //call the function//
{July 4
bool fireworks
fireworks = 0
{F3 = F1} //assign a value to F3//
fireworks = 1
{F3 = "Reaction"
{Bool reaction
reaction = Jamie or Penny or Jack
reaction = Jamie
Jamie = lower tail + hide in basement //call sub-routines
reaction = Penny
Penny = raise tail erect + bark + bark a lot //call sub-routines//
reaction = Jack
Jack = F1}
}
}
}
 
Back
Top