During a patrol, a team may bump into another patrol. It may walk into a hasty or prepared ambush. Or it may encounter an unknown group, of unknown size, and unknown intentions.
You should learn the textbook techniques for hasty and deliberate ambushes. They may come in handy.
But The Book assumes a lot of things that won't be the case for you.
It assumes a de facto bi-polar state of conflict.
It assumes anything not friendly is enemy.
It assumes everyone on your side is intensively trained and drilled.
It assumes a larger friendly element nearby.
It assumes communications, a robust response by a Quick Reaction Force (QRF), it assumes ability to call in supporting fires, friendly close air support, and rapid medevac.
In sporty times, from disasters to societal meltdown, you will have precisely NONE of these things, in all likelihood.
There may be no conflict. Reflexively opening fire makes you the bandits.
There may be friendly, neutral, or uncommitted parties out there, some of whom may be amenable to some loose or sturdy alliance. Unless you greet them by shooting them up.
There may be multiple unfriendly forces.
They may, and probably WILL, outnumber you. In size, capabilities, possibly even in terms of training and cohesive tactics. Definitely so if they're TPTB. Try to remember, you're the guerrilla. If you aren't thinking like one, you can always die like one.
Your communications will vary (we'll get to that by and by); your QRF may be another gaggle of foot-borne guys, some time and distance away; your supporting fires will likely be nil; as will be anything like CAS or medevac. If you're lucky, somebody may be able to cobble up an ad hoc ambulance with a QRF to come and get you. Or, not.
For all these reasons, your default reaction to contact should be to hide, fade, regroup, and reconnoiter. Unless you're pinned to the wall with no other options, fighting should probably be the last thing on your mind. Returning fire should only be utilized in the context of TCCC, to get any wounded out, and then to break contact as expeditiously as possible.
Because if you allow yourself to become decisively engaged by a superior force, you will be mauled.
Don't believe me; let's let the US Army's Special Forces show you what happens when you think you're the biggest grizzly bear in the woods, and then meet the real grizzly, and you find out you're just the badger.
I won't belabor Monday morning quarterbacking.
The mistakes in this incident were legion, from the beginning to the end, in the short-time eternity of just one hour and fifteen minutes.
They behaved as if all the assumptions above were in force, when in fact virtually none of them were.
Like the LAPD in the North Hollywood bank shootout, the individual guys here were exceedingly brave. And exceedingly stupid. And they paid for bravery plus stupidity in the usual fashion: with their own blood.
In this case, it cost them all three of their vehicles and equipment, and 4 guys dead (out of 11); no word on other friendly or enemy casualties. In the grand scheme of things, what matters was, everything after getting shot at, and not electing to GTFO of Dodge ASAP to regroup on safe ground were tactical and strategic blunders. This A-team was eaten for lunch, and beaten like rented mules. If it can happen to them, it can happen to anybody.
Think about you and your group, and tell me what 36% casualties would mean for your friends, family, and neighbors in tough times.
This ain't the movies, you ain't John Wayne, and the cavalry, especially the Air Cavalry, isn't coming over the hill in the nick of time. Like they weren't for that A-team, thinking and acting like they were in Iraq amidst a war in 2004, instead of totally on their own in Niger in 2017.
If you get seen, you can be shot; if you get shot, you can be killed. The solution for that is to stay out of sight, and if you can't get out of sight, get out of range. Then, when you aren't trading lead, figure it out.
Or make out your will, and set your affairs in order.
Working things out while standing on the bullseye rarely works out well for you.
There may be times and places when you make a deliberate attack, with the odds as much in your favor as you can get them.
That will almost never be amidst contact, or in any ambush when you're the one on the "X".
Return what fire you need to, in order to recover your casualties, and/or to break contact.
That's pretty much the only drill you need to know, cold. At least once you're taking fire, you've established the other side's intentions.
The drill itself is simple: If you're on the side in contact, unload in the enemy's direction (bonus points if it's aimed fire, and not suppressive to-whom-it-may-concern fire), then withdraw through your teammates and away from the enemy. You're using return fire to slow them down so you can create distance, and move out of sight, and then out of range.
The way to learn this is hands-on, in meatspace, with people who can see you doing it, and correct errors on the spot. Every group and situation will be different, but the drill boils down to: put their heads down (and/or a couple of their guys) and go the other way, rapidly.
The rest is purely details.
Most times a patrol is to gain information, and once you're getting shot at, you've just learned where the limit of territory that is friendly ends, for you.
But until you know you've got that drill, and take the lesson of breaking contact rather than duking it out to heart, you're liable to be a lesson for others in how not to do this. If anyone even writes it down, at that point in history. And no one will likely be going back to recover your body, nor pin any medals on your coffins.