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.