Perched above the prison yard, five cameras tracked the play-acting prisoners, and artificial-intelligence software analyzed the images to recognize faces, gestures and patterns of group behavior. When two groups of inmates moved toward each other, the experimental computer system sent an alert — a text message — to a corrections officer that warned of a potential incident and gave the location.

The computers cannot do anything more than officers who constantly watch surveillance monitors under ideal conditions. But in practice, officers are often distracted. When shifts change, an observation that is worth passing along may be forgotten. But machines do not blink or forget. They are tireless assistants.

. . .

The uses, noted Frances Scott, an expert in surveillance technologies at the National Institute of Justice, the Justice Department’s research agency, could allow the authorities to spot a terrorist, identify a lost child or locate an Alzheimer’s patient who has wandered off.

The future of law enforcement, national security and military operations will most likely rely on observant machines. A few months ago, the Defense Advanced Research Projects Agency, the Pentagon’s research arm, awarded the first round of grants in a five-year research program called the Mind’s Eye. Its goal is to develop machines that can recognize, analyze and communicate what they see.