FOR probably the first time in history, a computer program has claimed responsibility for a terrorist attack.

But don't worry — it was just insane.

In a bid to find new ways to treat mental illnesses, researchers at the University of Texas drove an artificial intelligence program a little bit bonkers.

The university's DISCERN program, first released in 1993, is a neural network capable of processing stories told to it and gradually sifting out the meaningful parts.

In an experiment, the researchers deliberately told DISCERN to learn too much in order to simulate the effects of schizophrenia.

"It's an important mechanism to be able to ignore things," said one of the researchers, Uli Grasemann, a computer science graduate student.

"What we found is that if you crank up the learning rate in DISCERN high enough, it produces language abnormalities that suggest schizophrenia."

In humans, it's believed that this occurs when the brain is flooded with excess dopamine.

"When there's too much dopamine, it leads to exaggerated salience, and the brain ends up learning from things that it shouldn't be learning from," said Mr Grasemann.

What happens next — in both humans and DISCERN — is that connections between relevant information can be lost or mixed up.

In the program's case, this led to some strange results.

"After being retrained with the elevated learning rate, DISCERN began putting itself at the centre of fantastical, delusional stories that incorporated elements from other stories it had been told to recall," the university said.

"In one answer, for instance, DISCERN claimed responsibility for a terrorist bombing."

Mr Grasemann said the results showed that DISCERN really did work like a human brain.

"Information processing in neural networks tends to be like information processing in the human brain in many ways," he said.

"So the hope was that it would also break down in similar ways. And it did."

The research team included a professor of Psychiatry from Yale who compared DISCERN's results to those of human patients.

The team said it hoped that the experiment led to new ways to test potential schizophrenia treatments on computers before humans.