Nature has been running its own chemistry experiments for eons, and in the dark, sticky corners of forests and jungles, it produces compounds that mess with the human mind in very specific ways. Take the yellow mushroom with a droopy cap that grows in China's Yunnan province, usually under long-needled pines. People who eat it, regardless of age or background, report seeing elf-like figures that parkour around on clothes, furniture, and walls. These tiny acrobats love dancing and marching in formation, and closing your eyes does nothing - they just stare back at you, teasingly. This "lilliputian hallucination" can last a full day, which is either a fantastic party trick or a nightmare, depending on your tolerance for tiny, mocking gymnasts.

For thousands of years, humans have searched nature for mind-altering substances through trial and (sometimes fatal) error. They've choked down foul roots, boiled woody vines, scraped bitter bark off trees, milked toad glands, and even chugged the urine of reindeer that were themselves tripping on fungi. These experiments have yielded hundreds of plants and fungi with psychedelic compounds. Now that psychedelic research has been legitimized, scientists at university labs and biotech start-ups are asking: can we make a better one? The idea is seductive - a perfect little pill that lets you shed your old self and see the world anew in a half-day therapy session, leaving you feeling enlightened without the pesky risk of jumping off a building.

"Nature's compounds aren't always optimal," Manoj Doss, a psychiatry professor at the University of Texas at Austin, told me. Take ibogaine, a naturally occurring psychedelic from an African shrub. A single dose can help people liberate themselves from opioids, quelling cravings and mellowing withdrawal symptoms. But ibogaine is a "dirty drug" - a blunt biochemical instrument that stresses the heart. "If we could remove ibogaine's cardio risks and preserve its therapeutic benefit, that's something we should do," Doss said. A gentler analogue has already been developed in the lab, though it hasn't reached clinical trials yet.

Doss has noticed a proliferation of lab-modified psychedelics. He recently heard about a promising new compound in the same class as MDMA. This one is supposedly "the best ever" - less intense than MDMA, socially lubricating but not the full "I love you!" - and with way less of a crash. "It just kind of cruises to the end," he said. Psilocybin, the magic mushroom compound, could also be improved. It's hardly toxic - no one dies from overdosing - but its effects can be unpleasant or tragic. Recreational users may become confused and jump off a building, David Yaden, a researcher at the Center for Psychedelic and Consciousness Research at Johns Hopkins University, told me. Even in careful lab settings, patients can have psychotic breaks or dissociative episodes. "It's like running a marathon or climbing a mental mountain," Yaden said. "Some people don't do well with it."

One way to make psilocybin trips less intense is to shorten them. A standard trip lasts six to eight hours, and like other powerful psychedelics, it leaves a residue on your consciousness that may not rinse clean until you've slept. Several companies are working on milder versions in nasal sprays, injectables, and Listerine-style strips. A psilocybin analogue from Reunion Neuroscience produces a high lasting just three or four hours, according to a Phase 2 trial of 84 women with postpartum depression. The drug showed signs of clinical effectiveness, though Yaden isn't fully sold that shorter trips have the same therapeutic pop as a daylong journey.

In San Francisco, Mindstate Design Labs is trying to go beyond just making shorter, easier trips. "We don't want to just develop a more convenient psilocybin," CEO Dillan DiNardo told me. "We want to provide mental states that aren't yet reliably accessible." The company is starting with a compound that enhances aesthetic perception, turning the world into a "sensory feast" that could treat anhedonia - and would have obvious recreational appeal. Mindstate compiled a database of over 70,000 trip reports from Erowid, books, and clinical materials, covering hundreds of psychoactive drugs, including many first synthesized by the underground researcher Alexander "Sasha" Shulgin. (Ann Shulgin, his widow, was a co-owner until her death in 2022.) The company then used an AI model to link subjective reports to receptor-binding profiles, aiming to predict the neurobiology of specific emotional states.

DiNardo claims Mindstate's AI works like AlphaFold, Google DeepMind's Nobel-winning protein-structure predictor. We won't know if that's true for a while: only one of the company's compounds has reached human testing, and it wasn't discovered by the model - Shulgin made a version in the 1980s. Human trials for other drugs could be years away. Doss is skeptical of the approach; the trip reports, though rich, are still "crap," colored by biases and people's inability to cram psychedelic states into words. Boris Heifets, a Stanford anesthesiologist and neuroscientist, also has doubts. "I am cheering them on and I would love to be wrong, but my deep suspicion is that they're barking up the wrong tree," he told me. He thinks adjusting the intensity of a trip has the most important effects, and that altering a person's pre- and post-trip experiences - the "context of care" - can have more transformative clinical effects than tweaking the drugs. If context didn't matter, he noted, the average rave attendee would be a guru.

Recreational users already tinker with their trips by choosing different settings - cities, mountaintops, beaches. "You could imagine that being in the natural world and feeling awe would be beneficial," Yaden said. "On the other hand, if people are more engaged with their perceptual environment, they might lose the benefit of being left with the workings of their own mind." Testing this formally is dangerous; a clinical trial of psilocybin in the wilderness could easily result in a participant running away, or worse.

Even indoors, scientists could engineer a particular high by varying conditions: better preparatory materials, encouraging introspection, asking patients to bring a photo or look in a mirror while tripping, or piping in more diverse music. (Doss said he hates "the Hopkins playlist," which is mostly Western classical music.) Yaden said not nearly enough of this work has been done. But even if researchers performed all these experiments, the "perfect trip" may always be beyond engineering. Psychedelic journeys might be too ineffable and too personal for science. We may be stuck with storytelling, folk knowledge, and ancient texts like the Baopuzi, a 1,700-year-old Chinese Taoist text that describes a "flesh spirit mushroom" that, when eaten raw, lets you "see a little person" and experience transcendence. So maybe the elves were there all along - we just need to find the right mushroom.