The lessons that could help keep 33 trapped Chilean miners safe and sane during their months underground were learned at desperate times in isolated places: ice-bound sailing ships, prisoner-of-war camps, malfunctioning capsules whizzing through space.

They include: Don't over-promise. Keep track of night and day - even if you can't see daylight. Encourage friendships - but watch out for cliques. Let everybody have privacy - but don't let anybody become a loner.

And remember the keys to survival in what psychologists call "extreme environments": Entertainment. Structure. Hope.

"I'm not a 'Lord of the Flies' guy. I'm very optimistic this group will be able to stay stable for a long time," said Col. Thomas A. Kolditz, who heads the department of behavioral sciences and leadership at the U.S. Military Academy.

But, Kolditz said, the potential for conflict and violence is always there. "Have you ever been in an airport where the airplanes were stuck and the airlines weren't giving [people] any information? If you take that and magnify that many times over, that's an example of what can happen," he said.

On Tuesday, NASA, which was called in to consult because of its experience in preparing astronauts for isolation, said it was working with Chilean officials on a plan that would, among other measures, enlist celebrities to help brighten the miners' spirits.

The men - trapped in a tunnel deep underground since a collapse at the San Jose mine Aug. 5 - have spoken remotely with a national soccer star and Chilean President Sebastian Pinera. NASA officials said they might recommend involving other famous Chileans and possibly astronauts.

A video of the miners, released late Tuesday by the Chilean government, shows them smiling, shaved and wearing red T-shirts. The short video, which doesn't appear to have sound, is a stark contrast to previous videos that pictured the men shirtless and more subdued, with some getting emotional while recording a message for loved ones.

At a news conference, James Michael Duncan, deputy chief medical officer at NASA's Johnson Space Center, said the miners "have already shown great courage and ability to survive."

The rescue ahead is daunting, and its success is not guaranteed: Officials say they need to drill a 28-inch shaft through half a mile of solid but soft rock. The process could take two to four months.

The miners have survived for 17 days on meager supplies, connected to the surface by six-inch boreholes, which can be used to deliver food, water and electricity. Officials have also discussed sending down antidepressant medication, if needed, and aluminum bed frames, towels, shampoo and hot-weather clothes that wick away sweat.

The miners don't have the kind of physical needs, for warmth and nourishment, that turned other stories of isolation into nightmares. The Donner Party turned to cannibalism in the California mountains in the winter of 1846-1847. In 1972, survivors of a plane crash in the Andes ate pieces of dead passengers.

"The worst thing is to be thrown into darkness [after a collapse], not knowing if anybody knows they're there," said John Grubb, an adjunct professor at the Colorado School of Mines. Now, he said, "it's just a matter of coping with the time. It's really boring and all, but I would think that the worst is behind them."

Terrors of time, boredom

But mental health experts say boredom and time - if not handled correctly - can be terrors.

Their case studies are often drawn from decades ago, before advances in technology and communication reduced real isolation to the realms of war, space, polar ice stations and underground mines. Many of the starkest lessons are taken from the polar expeditions of the late 19th and early 20th centuries.

"I so wish I could talk to those miners and tell them about Ernest Shackleton's ill-fated Antarctic voyage. If they knew that 27 men survived for 20 months in the harshest conditions known to man, with no contact with the outside world and no immediate hope of a rescue, I think these miners would know that they could get through this," said Alison Levine, who has led polar expeditions and expeditions to Mount Everest. She was citing one of the most famous stories of polar survival, beginning in 1914, when Shackleton led a crew of men across wild polar seas to safety after their boat was crushed in ice.

One key lesson, survival experts said, is to keep up the rhythms of day and night. In the mine's constant darkness, they said, the men might have trouble falling asleep, leading to fatigue, irritability and bad decisions.

In one early polar expedition, a ship doctor made his patients sit by roaring fires. Now, experts say, the same goal might be achieved by keeping the crew to an unchanging schedule of sleep, breakfast and work.

Another maxim, for those communicating with the miners from the surface, is that honesty is crucial. Experts said keeping dispiriting information from the miners could carry risks.

"Expectations unmet are a horrible thing, especially when you're already psychologically stressed," said Jerry Linenger, a U.S. astronaut who was aboard the Russian Mir space station when a fire broke out in 1997.

He and two Russian crewmates were trapped in the malfunctioning craft until a rescue ship arrived four months later. Linenger said one of his lowest points during that ordeal was a time that he was told he would be able to speak with his pregnant wife over a radio link.

"I prepared for a week. I wrote down what I would say and then crossed things off and added new ones. I was so excited. But the time came, they said she was on the line, and all I got was static," he said. "After that, I expected nothing and was psychologically more healthy."

Parceling out work

For the miners' leaders, historians said, it will be key to parcel out work - to provide a sense of purpose - and leisure time. There seems to be plenty of work to do because the miners must clear debris caused by the tunneling from above.

Providing entertainment in the mine will be far easier than it was for ice-locked polar explorers, who organized musicals, soccer games and lectures to distract sailors from their idleness and the sound of ice crushing their ships' hulls. In this case, the borehole that has brought the miners food will also be used to send MP3 players, speakers, a mini-TV projector, recordings of soccer games and films. The miners can also speak to relatives remotely.

Psychologists said the leaders of the group must take care to ensure that the miners work and play together. They said it's normal, even helpful, for people in isolation to form groups with people of similar backgrounds or habits. It can even be helpful to have a scapegoat - someone whom the group blames, at least in jest, for its misfortunes.

In these situations, though, a withdrawn person is a danger. "You need a certain degree of that, to maintain your sanity," said Lawrence Palinkas, a professor at the University of Southern California who has studied polar expeditions. "Too much of that becomes counterproductive."

If all 33 are eventually rescued, psychologists said, the effects of the ordeal are likely to follow them to the surface. Some could be good: Peter Suedfeld of the University of British Columbia said survivors of traumatic situations often come out with a greater confidence in their abilities and feeling more selfless.

But other effects could be disorienting. Like returning soldiers, the miners could emerge to find that their wives or family members have taken on new responsibilities in their absence. And they could find the world overstimulating after months in the dark and quiet. Suedfeld said this is a common reaction among modern-day researchers returning from winters at the pole.

"When I come back from a polar-research visit, I don't drive for at least a week because, you know, [there's] too much going on," Suedfeld said.