I might miss something in the full answer, but yes, anti-matter particles will only react with their precise fundamental particle opposites.
First things first, a proton (uud) and pion (using the one in your question, up/anti-down), or pion+, π+ or (ud¯). You're talking about two positively charged particles which would repel each other. An interaction between them would be unlikely for that reason. Another problem is that pions aren't stable. Because they decay very quickly and they're more often a step within an interaction than a stand on it's own particle (if that makes sense).
But if we ignore all that and we work out this unlikely interaction, then a proton (uud) and a pion+ (ud¯) meet, then only the d¯ could annihilate with the d, leaving you with an (uuu). That's simple addition. I think that's the answer you looking for. Only the quark and precise corresponding anti quark will annihilate and in your example, you'd be left with 3 ups, not 1 up because the particles will have already interacted. You also get interactions with the gluon fields and I don't understand that very well, but it's the gluon fields where most of the energy or mass of the proton is, not in the quarks.
the (uuu) particle is a very unstable 2 charge particle that would take enormously high energy to create, which would quickly decay into a proton and a pion, which kind of makes sense, since the two particles never wanted to get together in the first place.
Far easier is the pion+ (ud¯) and the Neutron (udd), where the d¯ and one of the d quarks from the neutron cancel out and you're left with (wait for it) . . . a proton - again, simple addition. Annihilate only the corresponding quark and it's anti-quark.
If so, what happens to the single up quark remaining in the pion? It
can't exist alone?
As explained above, the two particles in your example have merged, so you never get a single quark. You have to look at the remains of the merger, not what remains from each individual.
What about an anti-proton? Would it annihilate just the proton, or the
Also, is the explosion caused by the proton/anti-proton the same as
that caused by the electron/positron annihilation? And is the
explosion caused by helium/anti-helium annihilation simply the sum of
its smaller parts annihilating? Or, does it equal something more?
Well, for starters, the explosion with matter-anti-matter depends on the mass. The electron, being much less massive, has much less energy to annihilate into than the proton, so, obviously not all annihilation are the same. Some are bigger than others.
Now, in theory, a proton and an anti-proton could interact and annihilate each other entirely. In practice, that doesn't happen. (see John Rennie's answer for better explanation). To hugely oversimplify, proton-anti proton meet, you're more likely to get a single quark-anti quark interaction and be left with two mesons and a lot of released energy in the form of photons.
The two Mesons would be anti particles to each other and could annihilate each other, but don't because they are flying apart from initial interaction and the mesons themselves aren't stable and would quickly decay into Muons, anti Muons, neutrinos gamma rays, etc. Something a little bit like that anyway. Take that explanation with a grain of salt.
Electron-positron is, generally speaking, simpler because you have interaction of two fundamental particles, not two gluon fields each with two (meson) or three (baryon) valence quarks. With Electron-Positron and you can get complete annihilation of particles into gamma rays with low energy annihilation, compared to Proton/anti Proton where you essentially never get that outcome. Electron-Positron can also generate particles with higher energy annihilation, because energy is, (for the most part) always conserved.
Layman's answer, anyway.