Showing posts with label positive reinforcement. Show all posts
Showing posts with label positive reinforcement. Show all posts

Wednesday, January 18, 2017

The Cookie Trap

If you have spent much time around dogs, you’ve probably seen a dog that responds only when the owner holds a treat in their hand. It usually happens when someone has taken an obedience class or two, but doesn’t continue practicing at home. The dog is eager and willing to work for the owner—if treats are visible. Otherwise? Phhht… the dog has more interesting things to do! 
Dogs prefer to work
for something of value

As a result, some people throw the baby out with the bath and refuse to use any treats at all in training. However, just like people, dogs prefer to work for something of value.  How many people would return to a job, day after day, without ever receiving payment? Our currency is money, but dogs intrinsically understand the value of food, which can be dispensed in small amounts and immediately after the desired “work” is done. If you have a dog, you feed him anyway; why not make him work for it? Rewards can be special treats mixed in with regular dog food. 

Keep reading to learn a trainer’s secrets to have an obedient dog without always having a cookie in hand.

Start with the Basics

Often, the first step in teaching a dog a new skill is to lure him: for example, by placing a cookie over his nose, and gradually pushing it back towards his ears, you can encourage him to ‘sit’ and reward him with the cookie.  The next step is to repeat this action so the dog anticipates the behavior. 

Fading the Lure

Once the dog is anticipating the behavior (usually within 5-10 repetitions), only pretend like you have a cookie in hand and quickly lure him into the sit.  If he sits, congratulations!  Immediately reward him with a cookie from the other hand or a nearby treat bag.  He will learn he doesn’t need to see the treat in order to be rewarded.   He should be just as willing to perform for an imaginary cookie, because he knows he will still get rewarded.

* If he doesn’t sit and just looks confused, lure him again for a few repetitions before trying again with an imaginary cookie.  

* If he loses interest, it’s best to put the cookies away and try again when he is hungrier.  Do not bribe him with a cookie at this point!  This is one of the situations where dogs learn to control their owners: “Hmmm, if I don’t sit, she will get out a treat!”  If you are having difficulty at this step, I encourage you to find a dog trainer who can help you recognize a dog that is truly confused vs. a dog that is not interested or trying to get his own way.  


Fading rewards

When the dog is consistently performing the cue using an imaginary cookie, it is time to start fading out the rewards.  One way is by having the dog perform several actions in a row for a single treat.  You can perhaps have the dog do a ‘sit’ for a cookie, then a ‘down’ with a cookie, then another ‘sit’ and a ‘down’ before offering a cookie.  Notice you don’t take away the treats all at once.  Your dog should understand he will still be getting treats, but you decide how often they appear.  

It is equally important when fading rewards that you aren’t consistent in delivery: if you decide to reward after every other command, and then every third command, the dog will quickly figure out the tactic and will lack motivation to work.  But if you reward the dog randomly, say, on the 2nd, 3rd, 5th, 8th, 9th, and 10th tries, he will work harder because he doesn’t know if this will be the one that earns his cookie.

The jackpot is another method to fade rewards, especially useful when performing multiple commands.  A jackpot is a series of small treats delivered one after the other, just like a jackpot of coins coming out of a winning slot machine.  It is more meaningful to a dog to have several small treats offered one at a time, than to have one large treat or multiple small treats delivered at one time.    So if you have your dog sit, then down, then sit again, you can reward him with verbal praise and petting while also delivering a jackpot of cookies, one at a time.

Hoss was a dog that would happily work
just for love and attention.
Once your dog understands the commands, your dog’s favorite activities can be substituted in place of cookies. I encourage owners to switch around rewards with their dogs.  What are your dog’s favorite activities?  Does he like being petted on his neck, having his tummy rubbed, chasing a tennis ball or tugging with a tug toy?  When your dog approaches for petting, have him ‘sit’ or ‘down’ before rewarding him with scratches.  When it is dinnertime, have him ‘sit-stay’ until you are ready to put his dish on the floor and let him eat.  There’s no need to offer a cookie: his reward is his supper.  When he wants to go for a walk, have him sit and stay while you put on his leash, then have him sit at the door threshold before giving him an enthusiastic “Free!” to let him go through the door.  He certainly doesn’t need a cookie for going on a walk with you. The walk itself is the reward.

My own dogs are watching intently to see
if they will get a treat this time!
The final method of fading rewards is a process that involves pairing praise with cookies.  It is crucial that the praise starts before you offer the cookies.  The dog’s mind will start to link cookies with praise, and over time, the dog will recognize praise as a reward by itself.   This is the nirvana that everyone seeks: the dog that worships you, does what you ask gladly, and seeks only for your approval.  Most people don’t realize that it can take years to cultivate this, and is a result of careful training where the owner consistently praises the dog before providing cookies.  Note that this process can take a long time to develop, and the mental link will disintegrate if praise is never again followed by a reward.  As a result, good trainers continue to occasionally use cookies, always paired with praise, to help strengthen that mental link.

As you can see, training with cookies does not mean you will need to rely on them for every command for the rest of the dog’s life.  Once your dog understands the basics of a behavior, you should stop using the cookie as a lure.  It is helpful to continue to reward the dog randomly throughout his life, but rewards can vary from praise, jackpots, and real-life rewards.
-->

Monday, October 27, 2014

Basic Dog Training: Discipline, treats, or both?

What Methods Should I Use to Train My Dog?

Recently I was asked by a client the best way to start training a new dog.  He had trained a dog years ago using leash corrections, but his wife wanted him to use positive reinforcement training.  He was hesitant to use treats with his dog, as he didn't want his dog getting spoiled and fat, but his wife didn't want him using a choke collar or strong leash corrections.  He asked what I would recommend.

I could certainly relate to this dilemma!  When I started training my 95-lb. Giant schnauzer, Atlas, I was taught to use treats occasionally to reward good behavior. When correcting bad behavior, I was taught to tug on the collar or grunt a guttural-sounding "uh-uh." In terms of behavioral psychology, the treats are considered a reinforcement because they increase the likelihood that a behavior will occur in the future.  Likewise, the collar correction and "No" are considered punishment, because they decrease the likelihood of that behavior happening in the future. Punishment can be either a mild correction, like a tug on the collar, or a much harder correction, like a beating or a powerful electric shock.  In this article I refer to mild corrections, but  since "punishment" has such bad connotations in some people's minds, I will refer to it as "discipline."  

(For the sake of simplicity I'm not covering the positive and negative quadrants of reinforcement and punishment.)

Giant schnauzer smiling and sitting
"But he KNOWS how to sit!"
Let's start with a common example: when Atlas was heeling and didn't sit, I would jerk on the leash or tap him on the butt.  He learned to sit most of the time, but I still had to provide corrections every once in a while.  Sometimes I rewarded him with a treat if he sat nicely, but the reward didn't seem to help him sit more**.  If I didn't correct him the first time he didn't sit, it was guaranteed the next time he wouldn't sit.  Initially I thought he was being stubborn, or trying to see what he could get away with, so I escalated with a more firm tap or harder jerk on the leash. This is one of the dangers of punishment: if it is mild and doesn't stop the behavior completely, training escalates with harsher punishments.  If it is harsh enough to stop the behavior completely, then it might be considered abuse. 

Over time, the more I worked with him and disciplined him, I realized that Atlas really resented my demands and did not want to sit for me.  In addition, I wondered if he had a spinal problem that was making it difficult for him to sit.  I decided I wasn't going to dole out harsh punishments when I wasn't sure he could safely and comfortably do what I was asking.  At this point, obedience training was no longer fun for either of us, and wasn't necessary for any other reason, so I completely quit.

Giant schnauzer pulling red cart
This is my dog Phoebe
pulling her cart!
Fortunately, I took a clicker-training class and taught him silly stuff, just for fun.  I attended a seminar to teach him to pull a cart, and the instructor had us using small, meaty pieces of food as rewards for approaching the cart, then walking next to the cart, then letting the cart bump the dog.  Before I knew it I could hook Atlas into the cart and he was happily pulling it around.  He loved doing it. You could see his eyes shine with delight when I pulled the cart out. It might have started as a love for the food I was giving him, but I learned a valuable lesson:  the enthusiasm your dog shows when trained with food, if you do it properly, will transfer to enthusiasm towards the behaviors you are training. 

Scientific studies of dog training show that dogs learn better using positive reinforcement methods, and food is one of the most basic, primal reinforcers that almost every dog values. Everyone knows how persistent dogs are when they want something.  If you train properly with food (as a reward and not a bribe) the dog learns that he won't always get a treat for good behavior, but he will keep trying because sometimes he gets a treat.  That is the benefit of positive reinforcement training:  the dog will continue to try.

It goes deeper than that, though.  If the dog is trained with discipline, he will come to respect discipline.  Like a Marine who makes his bed every day in the barracks, he will do what he must to avoid dressing-down by the Sergeant.  In this case, the behavior is leaving a messy bed, the punishment is getting yelled at, and the desired consequence is the Marine no longer leaves a messy bed. One of the drawbacks of punishment is the authority must be able to enforce demands. Once the Marine is out of the barracks, is he going to leave a messy bed again?  The answer depends on whether the Marine thinks making the bed is worthwhile.  Discipline is only effective as long as someone stronger is there to enforce it.   

German shepherd dog heeling
Hoss is demonstrating a focused "Heel" exercise.
For dogs, almost any behavior can be taught, and it doesn't require a drill sergeant. With positive reinforcement, there is more teaching right from the start.  For example, in loose-leash walking, the dog has to be taught the right way to do things, exactly what you want him to do.  Instead of "don't pull", you have to teach him, "I want you to stay where you can see me at all times, by my left side, on walks." He learns he is correct because you reward him, and he learns he is wrong when he doesn't get a reward. In the beginning you have to reward very frequently to let the dog know he is doing it right and encourage him to keep working. This is one of the drawbacks of positive reinforcement training:  more training is required at the start.  Another drawback is that it requires a lot of treats, although you can use some of your dog's food, or cut down on your dog's daily meals, to counterbalance the treats given.

A common assumption about positive reinforcement training is that the dog will only work for treats. It happens fairly often: while initially you lure a dog into position using food, if you don't fade the lure quickly it turns into a bribe. Once the dog learns how to work for bribes, he will only work if a treat is in sight.  This develops when an inexperienced trainer doesn't reward appropriately, anticipates giving the reward, or gets a treat ready before the dog has started the behavior.  Fortunately the dog can be easily re-trained using better timing: unfortunately, it is harder to re-train the trainer!
Two giant schnauzer dogs pulling on leashes
Following 170 lbs. of dog before
they learned loose-leash walking--
difficult at best!

For loose-leash walking, the benefit of positive reinforcement training, even though it requires more work in the beginning, is many years of enjoyment with your dog while occasionally reinforcing with treats.  Compare that to discipline training, where you must be physically able to restrain the dog, and periodically discipline him to remind him what you want.
  
Many trainers use a combination of these two teaching methods, generally using punishment when the dog understands but isn't performing correctly.  Most people agree it is unfair or abusive for a trainer to punish a dog that doesn't understand the behavior yet.  

The issue then becomes: how do you know your dog understands what you are asking of him? Dogs do not generalize behaviors well: learning to "sit" in the kitchen does not mean he understands "sit" in the living room.  Even after he learn how to sit throughout the house, taking him to a new environment, with extra distractions, may result in him not deciphering your command, "Sit".  Dogs do learn quickly with repetition, so teaching a dog in a new location is faster, and eventually he can generalize the behavior with almost any distraction. But far too often I hear my students say with frustration, "He knows how to do this!"... when the dog is showing me that he does not understand.  

As a trainer and dog advocate, unless I am 100% sure the dog understands the behavior, I will presume the dog is trying his best but just doesn't understand, and teach him again. Honestly, I cannot read dogs' minds, so I always prefer to give him the benefit of the doubt. Sometimes it is obvious the dog is confused, and other times I can see a distraction pulling him away, but I can say with certainty that I have never, ever regretted giving the dog the chance to re-learn instead of punishing him.

Positive Reinforcement:  Pros:

  • Dog wants to learn, and the enthusiasm transfers to the behavior
  • No physical intimidation is necessary
  • Any size and strength of human can teach the dog
  • Builds a great relationship with the dog
  • Encourages the dog to keep trying behaviors
  • You have to feed the dog anyway, why not train him at the same time?

Positive Reinforcement:  Cons:

  • Trainer needs good timing and skill, or else dog will not work without treats
  • Managing the dog on leash with a handful of treats is more difficult 
  • It takes more time to teach the dog, at the beginning
  • Dogs not trained to take treats gently can cause bloodshed
  • Dogs can get fat if daily meals are not adjusted
  • If the dog doesn't value the reinforcer, the behavior will not increase
  • Requires planning and preparation to have treats available when needed
  • Can be messy, both with treats and dog slobber
Punishment:  Pros:
  • Can be faster than positive reinforcement
  • A single strong punishment can stop a behavior for a very long time
  • Does not require any treats
  • Does not require planning ahead
Punishment:  Cons:
  • Less precise in creating behaviors (you are telling the dog what you don't want, but not what you do want)
  • A mild correction frequently ends up escalating to stronger punishment
  • A strong punishment can be considered abusive
  • Dogs can react unpredictably to punishment and might become fearful or aggressive
  • Dogs can associate you with the punishment and it undermines a trusting relationship
  • Punishment discourages the dog from trying new behaviors
  • Punishment is only effective as long as someone stronger is there to enforce it
Two giant schnauzers sitting, looking at owner
Guess which hand the treats are in?
In the end, it's up to you to create the relationship you want with your dog.  I have found the best way to do this is with positive reinforcement, and that is what I encourage my clients to do with their dogs, too.  A good trainer will set you on the road to success by teaching you how to use a clicker, how to get your dog on a variable schedule of reinforcements, and how to prevent or re-train undesired behavior.

Have I left out any important pros or cons about each method of training?  What has been your experience?  Let me know in the comments below!

** As far as rewarding Atlas when he sat, there were numerous reasons why I was not successfully increasing that behavior. Mostly it was due to was my lack of timing and skill as a trainer!  Fortunately, both have improved significantly with practice and experience.


Friday, May 9, 2014

Getting Started with Crate Training


It is a common misconception that dogs are “den animals".   Domesticated dogs are not wolves, and even wolves only use dens for birthing and raising pups.   Dogs need to be taught to enjoy their crate, and the easiest way is to start by tossing in tiny treats for the dog to sniff out and eat without closing the crate door.
Cat exiting box while dog looks on
Dogs often need encouragement to get into a box or crate.

This is important--- you do not want to force your dog into his crate in the beginning!  If the dog is terribly nervous, maybe offer a few treats just outside the open crate door.  After a few sessions, or when the dog is comfortable with that, you can toss the treats just inside the crate door for a few more sessions.  Gradually toss the treats in further, praise your dog for going inside, but still you should not close the door!  You can also feed your dog’s food in the crate, keeping the door open until he is comfortable with that environment.  Place the bowl all the way in the back of the crate so the dog needs to turn his back on the door.


When your dog is confidently walking into the crate to chase treats or eat, you can close the door, but only for a few seconds, and then immediately open the door again.  Practice this several times in a 3-5 minute session, and practice several sessions each day.   Your goal is to open the door before the dog starts to whine, bark, or paw at the door. 
Dog with head sticking out of soft crate
Soft crates are only for well-trained dogs!
Ideally, you do not want to open the crate door any time the dog is whining, barking or clawing.  If you do, you will be encouraging him to repeat behavior you don’t want.  If he is acting up when you want to get him out, wait patiently with your hand on the door latch until the split second he is quiet.  If you cannot possibly wait, toss in a treat or a bunch of treats, and the instant he quiets down, open the door.  You don’t want to teach the dog to bark in his crate to get treats, so only use the treat-tossing if you cannot wait for the dog to settle down on his own.

Sometimes you don’t have the luxury of all this training--- you need the dog in the crate, immediately.  In that case you can help the dog adjust by stuffing a Kong or hollow bone with peanut butter and putting it in the crate, or anything else that might distract him for a length of time.


Important note:  some dogs have gotten their collars caught on the wires of the crate and hurt themselves or even suffocated.  For his safety, please remove your dog’s collar before putting him in any crate