Tension was high last week at a checkpoint on the separation fence manned by three Artillery Corps soldiers along the separation fence in the Wadi Ara area. After long weeks of boredom, they suddenly found themselves facing several dangerous incidents.

The soldiers had to deal with an armed man hiding among a group of civilians approaching them - the civilians refused their orders to stop; panicked civilians ran toward them with shooting coming from an unidentified source; a driver became outraged at a request to see his identity card and then tried to shove the soldier aside; and a woman wearing a veil exited a car holding what appeared to be a baby but turned out to be a gun.

To add to the pressure, the soldiers knew that they were under constant supervision, that their every move was being monitored. Every bullet they fired or didn't fire, every shout and every decision they made was being reported to their superiors.

This day, perhaps unlike all others before at the checkpoint, there would be no soft-pedaling, glossing over or excuses. Suddenly a large group of demonstrators appeared before the three soldiers, whose nerves were already strained by an uncharacteristically stressful morning in the usually quiet sector.

Quickly, the demonstrators closed the distance between them and the soldiers and began hurling rocks at them. Staff Sergeant Liraz, the checkpoint's commander, ordered a soldiers to shoot once in the air, to deter the rockthrowers. Two seconds later, seeing that the rioting was continuing, Liraz ordered the soldier to shoot once more shot in the air.

But the small group of rioters showed no signs of being discouraged. They continued to advance toward the soldiers, all the while throwing rocks. Liraz, apparently fearing that the rioters would storm the checkpoint, ordered his soldiers to shoot at their legs. He did not have to ask twice.

The shots that the three soldiers fired at the rioters - 75 bullets in four or five seconds - sounded as if they came from a battle in Iraq rather than from a confrontation between soldiers and stone throwers. After this fusillade the rioters fled with their wounded.

A nasty surprise awaited the three soldiers. One of the rioters, who until now had made do with throwing rocks, pulled a gun from his pocket and while running, let off a few shots in their direction.

The soldiers realized that someone was shooting at them, but they had difficulty identifying the source. They fired five or six more shots toward the fleeing rioters and then stopped. Two had used up their magazines, and the third had only a few bullets left.

The salvo, disproportionate to the provocation, left the soldiers completely exposed to the most serious threat they face, a terrorist with a live weapon.

Battle on a screen in an air-conditioned trailer

At the real checkpoint, located only a few hundred meters from the one manned last Sunday by the three artillery soldiers with itchy trigger fingers, an incident like this could have ended in numerous deaths, perhaps even those of the soldiers themselves.

An analysis of the incident - which took place on a three-by-four meter screen in an air-conditioned trailer - showed that most of the bullets fired by Staff Sergeant Liraz and his soldiers at the rioters' legs actually hit the upper part of their bodies.

All the stone throwers in the virtual riot were hit by a number of bullets - the armed terrorist was the only one to be hit by just one bullet, and then only after he had shot a few times at the soldiers. This simulation, like others that model the dilemmas that IDF soldiers have to face daily, did not actually happen, at least not in the physical world.

For the last few months, since the IDF started using two mobile, computerized mobile shooting ranges purchased from the U.S. army, combat soldiers serving in the territories have benefited from very realistically simulated training under conditions unobtainable at any real checkpoint.

They train at shooting with a number of types of firearms, immediately receiving painfully precise feedback from the computerized system. They are required to make split-second decisions in situations amazingly similar to those they encounter at real checkpoints.

So far, this has been done using films created by the U.S. army. Starting next month, the IDF will start to produce its own films. The films, says Lieutenant Colonel Ilan Golan, the head of training in the Ground Forces Command, will be tailored to the IDF's needs and will make it possible to examine the decision-making process among soldiers in situations that have actually occurred or that are expected to occur.

Who shot, and who hit the target

From outside, only the armored door that separates the computerized shooting range from the outside world hints that the trailer accommodates more than a pile of sleeping bags or combat rations. Inside, things look entirely different.

On one of the narrow walls of the rectangular trailer, which is transported from base to base by truck, is a large white screen. Powerful speakers stand on both sides. A massive air compressor stands behind the screen, and five pipes emerge from the compressor that are connected to five firearms.

The air pressure is designed to simulate the recoil felt every time a weapon is fired. Aside from the fact that the weapons never fire a single bullet, they are completely genuine and are positioned five or six meters from the screen. Each of the weapons (an M16, a Tabor rifle or a machine gun) has sensors that monitor everything the soldiers do.

The operator of the shooting range, a civilian employee, is located 1.5 meters behind the line of fire, and any data he may need is fed in real time into the computer that controls the system.

The operator can know exactly when a soldier cocked his weapon, if the safety was on or off, how hard the trigger was squeezed and exactly where the barrel was aimed at any particular moment. The laser marking on each of the barrels, synchronized with the visual display on the screen, makes it possible to know exactly where each bullet hit, which of the five soldiers in the shooting range shot each bullet and when.

The range operator can change the rules of the game at any time. With the click of a mouse he can change night into day, a clear day into a snowy one, or challenge the soldiers with a side or back wind that affects the laws of ballistics. Within seconds, he can create a 25-meter firing range or just as easily, change it into a range with moving, jumping targets 100 or 200 meters away. He can also make virtual targets disappear from the screen and play one of the almost-real scenarios using actors simulating friend or foe. In these short films, all the laws of ballistics are observed and all the data about each bullet and those firing them is recorded.

Director, editor and costumes

Field commanders could not be more enthusiastic about the firing range. Lieutentant Udi Abrahamov, who commands some of the soldiers taking part in the training, said that the simulator's visit to an outpost "saves the command personnel a lot of trouble."

He said, "Before soldiers can use a conventional firing range, we have to get a truck, set up the firing range, set out the boundaries, set up targets and get ammunition. Here, I can always bring five soldiers, before or after a mission, and provide them with laboratory conditions - there is no sand on the floor, no wind to move the targets and of course no danger of an accident."

Lieutenant Colonel Golan, an engineer with a great love of computer games, said that the mobile range lets units stationed in confrontation zones continue to train and maintain their skills. During a period when the IDF's ethical image is being eroded in its own eyes as a result of one horrific incident after another, Golan said he believes that the state-of-the-art simulator can help the army far beyond improving the shooting skills of its soldiers.

"After every real event, there is an analysis of the event and conclusions are drawn," said Golan, who refused to discuss specific incidents like the fatal shooting of the Palestinian girl in Rafah.

"We decide what we want to teach and produce a film in coordination with soldiers who have studied film. After an incident, a script is written, and after it is authorized, we go out to shoot the film. There is a director, a film editor, actors, costumes, civilian vehicles - just like in a regular movie. If we want the figures in the film to fall down when shot, then we have to film them in all kinds of situations. There is a great deal of raw material, but it is cut during the editing stage. We can produce a film like this in two to three days, up to a week, but if there is something very urgent, we can work on it through the night."

The most significant advantage of the "dilemma films," or the "cases and responses" as they are called in IDF terminology, is that they make it possible to investigate events based on objective truth, rather than on human memory, which can be altered by pressure or lies.

This analysis is carried out soon after each incident, or even while it is still in progress. For example, after the first shot was fired in the virtual incident described above, Staff Sergeant Liraz was asked to explain why and where it was fired. Afterward, when the incident was replayed, it was possible to see the rate of fire, where each of the three soldiers fired his weapon at any particular moment and where the bullets that were intended for the legs of the rioters actually ended up.

In another incident, where soldiers opened fire on unarmed civilians approaching a checkpoint, saying that they shot because the civilians "wouldn't listen to them," the operator of the shooting range rebuked them, asking the checkpoint commander, "Since when do you shoot at someone just because he doesn't listen to you?"

Unlike the bloody reality in the territories, in which civilians are killed by bullets ostensibly never fired and for which no one provides an accounting, the simulator does not make things easy for anyone. Every bullet has an address, and also a "father."

Corporal Tuval Frankel of Hadera, who completed a two-hour training session with the simulator and then immediately left for his shift at a real checkpoint along the separation fence, said he would be glad to undergo simulations involving the abduction of a soldier, distant firing on a checkpoint or the search of a suspect vehicle. "I feel that the range helps me manage an incident and make clear decisions," he said.

With only two mobile simulators and four stationary ones, the army may not have enough for soldiers to train for the impossible situations that they face every day, but it is certainly a step in the right direction. (shahar-s@haaretz.co.il)