My puppy can recognise dogs by their shape and movement - but she does generalise a bit - at one point she thought all whippetts were scary because one particularily stupid one kept attacking her and didn't back off when she submitted or defended herself. I think now she's much bigger than him - he no longer recognises her as the helpless little puppy he bullied and he leaves her alone.
She also thought all golden retrievers were great because she had several good playmates who were golden retrievers... She's slowly learning - every dog is a little bit different even if they look the same as a friend.
I've seen some dogs attack anything bigger than them, other dogs attack anything younger, and still other dogs attack any other dog on a lead. I think this depends on the experiences that each dog has had. I used to live with a dog that thought all dogs with tails that curled over their backs were for fighting.
I try to make sure that my dog is on lead for greeting all new dogs - just in case. I know lots of border collies that are very timid/fearful and will attack anything that approaches too quickly. I prefer to let the nervous dogs approach mine in their own time, especially since my puppy is usually upside down and grovelling as soon as we get to within a couple of metres. She does this with every dog and every person - no matter age or size. It's very funny when she does it for a toddler or daschund. She's the ultimate in non-threatening greetings.
As for "tried everything", sometimes dogs are a bit slow and you need to try a little bit often like every day for five minutes and it might take a month for improvement to be noticeable. Find an obedience dog club (ask your vet or the RSPCA), and persist. My club in South Australia is $50 for a single dog and owner for a full year. Loads of training, information, ideas and supervised on-lead doggy socialization. Socialization is ideally an every day, as many different dogs as you can find, thing.
The following describes my main problem and approaches for dealing with it. And suggestions for you.
My puppy is terrified of traffic. When I first got her, it was impossible to take her for a walk along a footpath or anywhere a car might go past us. She's still not perfect but she's getting better.
1. I ignore any bad behaviour by her. I don't reassure her if she hugs the ground and I used to wait until she got up to continue the walk but now I "drag" her (as suggested by our chief instructor). I pull and she gets up and walks normally.
2. I do praise any good behaviour she does - ie sitting at curbs or if I stop (ie when there is a lot of traffic or oncoming people).
3. Timing is everything. Either a click (hard to do with your hands full of lead or treats), or "yes" or "good" (high pitched happy tone) for "that's what I want" and "uh-uh" (neutral normal voice tone) for "you got it wrong".
If your timing is off - you encourage the bad behaviour and discourage the good.
4. All training has to be done over for each new environment. Currently my puppy is best at the place where our obedience classes take place, and next best in the back yard where I practice, and less good at dog oval where we go for walks, and crap on walks along footpaths/streets. Ie at the moment - she's grade 4 in class, and about grade 1 on footpath walks.
5. Persistance in short doses. Cesare Dog Whisperer has loads of useful tips and techniques. Try for little steps at a time, five minutes or less at a time. Try to finish with a win ie dog doing something that you want.
6. For back yard training - I have a 1 litre capacity pump up garden sprayer that has about a 10m range. If dog fails to notice me walking up behind her with the "weapon of doggy discipline" she gets it in the head. She actually likes water a lot so this doesn't upset her but it absolutely diverts her attention back to me. I use this to stop inappropriate barking (always check there is nothing to bark at first), and digging and anything else that dog must not do in the back yard.
Other people use rattles made of chain or tin cans with bolts or tin jar lids or smaller tins inside. I don't know why rattling metal gets the dog's attention but it does. I use pecariously balanced stacks of tins to deter "counter top surfing" ie where dog puts its paws on your kitchen benches looking for whatever. Knocks the cans off - massive rattle - stops the counter surfing.
Start with stopping the barking in the back yard. Progress to stopping dog to dog aggression in/from the back yard... (although it might be easier in a neutral territory).
Raising your voice is usually pointless as a correction technique. Especially for barking - the dog will just think that you - as a pack member - are helping with the barking task at hand.
7. To stop pulling, try a front attaching harness for dog walks - like the one shown here:
SENSE-ible Dog Harness, Dog Training Equipment | Softouch Concepts, Inc.
There is also a "gentle leader" version. You will probably need to smear the harness in something that smells and tastes bad - like vicks vapour rub to stop the dog chomping through it until it gets used to it and don't leave it on when you're not there. The front attach harness will pull the dog back to facing you, the harder it lunges - the faster it ends up facing away from where it was trying to go and back to you, and the straps give you leverage making the dog much easier to hold.
Worst comes to worst - if you see a problem approaching - wrap your end of the lead around a pole or small but sturdy tree once or twice to get extra strength for you to make holding the dog back - easier. Poles attached to no parking signs are handy. So are football goal posts. I've mainly used this technique for horses (fence posts) or run away boats (bollards).
It seems to me you have a lot of problems. Pick one, and work on that every day for five minutes (or as it occurs). Don't try to cure everything all at once. For training - I read the triangle of temptation, it is good advice. First doggy requirement "watch me - the boss". Use food, distraction noises, toys, play - what ever works to get your dog's attention. I'm still trying to work out what reward/treat my puppy will do anything for - I suspect in her case - it varies depending on what else is around to interest her. If you use toys or play for reward - make sure you have a "working" command and a "go" (release) command to let her know when play stops and starts.
Most of the training articles I've found - suggest you need to repeat each training task - about 20 or 30 times to start to have an effect. Our obedience dog club - has us doing just "heel and sit" for a whole month before we can progress to "heel and automatic sit and stand" for another month - provided we got "heel and sit" right the first month etc.
I make my dog pay attention to me when we're doing heel - by changing direction and speed often - if she's not paying attention - I bump into her or she gets dragged back... Try to finish on a successful move.
I also introduce distractions for tasks like "watch me" and "stay". Ie for "watch" she gets the treat/toy if she looks at me not the treat. Start with the treat right in front of my face, and then gradually move it away each time as she gets the task right, increasing the difficulty/standard.
And for "stay", I tell her "stay" and hold her while I toss little bits of bread or toys away from her, she gets the treats, toys if she stays put. And she gets "uh-uh" and we start over if she breaks (or tries to). When she gets that right (20 times) - I repeat without holding her...20 more times - repeat then I move in front of her and repeat the task..., then change environments and repeat from the very beginning - stay and hold - with lead on somewhere there are more distractions like other dogs or children. Ie when you go somewhere new - lower the required standard, shorten the time required, and start over from the beginning.
There are some things that are still difficult for my dog - she doesn't like to go back on the lead at the end of a run on the oval - but she's getting better. Some days I think she understands and some days she relapses. I've trained other dogs and this one I have now is one of the more difficult but if I can get her attention - she's a very fast learner.
Hope some of that helps and I admire your persistance.