Even before you took your first breath, your brain was already learning, exploring and adapting. Now a new project in London is charting its journey in astonishing detail.

The small room feels a little like a spaceship cockpit. In front of me, a group of scientists are sitting in front of a series of monitors, deep in concentration as they fine-tune their equipment. There is a hushed silence, save for the gentle chugging and churning sound of powerful motors rotating around us. In fact, I am not in a space shuttle but in the neonatal unit of St Thomas’s Hospital, London, yet our journey is not less impressive: we are watching the emergence of a human mind.

Far from being baby steps, these are huge leaps in thinking – achievements that arguably dwarf our later accomplishments

It’s easy to underestimate the genius of a mewling, newborn baby. Yet as soon as we leave the comfort of the womb (and even, surprisingly, before), we are equipped with an amazing organ that allows us to feel, explore, and learn. The brain continues to grow as we develop all the skills we need throughout life, from the ability to smile at someone we love to decoding the complex sounds of language, and eventually forging its own will and identity.

How do we make this astonishing journey? Until recently, neuroscientists were in the dark about this ‘first age of the brain’. But the Developing Human Connectome Project is now shining light on that critical period of our lives. Using cutting-edge technology, they are charting the growth of the baby brain from its last few months in the womb to the baby’s first breaths and beyond. And with the permission of one of its principal investigator David Edwards, I’m here to see a snapshot of their work.

The project began in 2013 as a collaboration between King’s College London, Imperial College London and the University of Oxford. The “connectome” in its name refers to the intricate neural networks that are thought to underlie its astonishing processing. In the USA, an equally ambitious project is already mapping the connectome of the mature adult brain – but Edwards’ team are instead charting the terrain in its first few months and years, to see how those networks grow in the first place.

When I arrive in the ward, the team tell me they’ve just reached an important landmark – just a day earlier, the team had scanned their 100th baby (of about 1,000 over the full course of the project). Some of the scans have taken place before the baby has even been born, while the foetus is still in the womb. That’s no mean feat: movement tends to produce a fuzzy signal in the scanner, but foetuses rarely keep completely still, meaning that the team has had to develop some ingenious maths to account for the in-utero acrobatics.

Before they placed the boy in the scanner, the team tucked him into a snug cocoon and placed an inflatable pillow around his head

Today, the team are scanning a newborn, less than 24-hours-old. He has just been fed and is oblivious to the hubbub around him. “He’s sleeping naturally – he’s very happy,” Michelle Sleeth, the clinical trials manager of the project, tells me. Before they placed him in the scanner, the team tucked him into a snug cocoon and placed an inflatable pillow around his head that should help muffle the whirring sounds outside.

The whirring comes from the sound of powerful magnets that allow the scanner to track the jostling movements of water molecules in the brain. Since the water will move more easily along neural connections, than across them, the result is a detailed image showing the brain’s long-distance wiring, called axons. “I would think of it as Tube map of the brain,” explains Edwards – the main pathways that ferry electrical signals between the brain’s different regions. By directing the flow of information, they provide the building blocks for our cognitive abilities.

It does not always go to plan – about one in 10 babies wake up during the two or three hours it takes to finish and fail to fall back asleep, meaning the time will have been a wasted effort. “We have to have very tolerant and calm radiographers,” says Edwards. But when it does come off, it adds valuable information to a growing blueprint of the emerging mind. “We’re so grateful for every scan – each one is so important,” says Sleeth.

The dense forests of fibres show just how much of our brain’s networks were forged in the womb.

Take a look at the video below, kindly built by Dafnis Batalle of King's College London, to see a stunning, 3D reconstruction of a newborn brain – from the inside and out. When you consider that there will be many, many more links that were too fine to  show up on this scan, it is little wonder that the brain is sometimes called “the most complex object on Earth”.

Although the Developing Human Connectome Project is unique in its scale and ambition, other projects have also started peering into the brain’s first few months. For instance, we now know that babies start to learn and explore the world long before they have taken their first breath. Using different techniques to measure a foetus’s real-time neural activity, scientists have found that their brains seem to react to flashes of bright light or loud noises, for instance. In the last trimester they also seem to have learnt to recognise the calming sound of their mother’s voice and the theme tune to her favourite TV show. They may even taste her latest meals: flavours such as garlic might be able to pass into the amniotic fluid, meaning that weaning babies tend to be drawn to the smells of foods their mother ate during pregnancy.

Our capacity to learn only increases once we finally leave the womb. In its first few days, a baby is already listening to the sounds of speech and beginning to work out the structure of their parents’ proud cooing, laying down the foundations for grammar. At around the same time, the brain is constantly tending those thickets of new neural connections, both growing and then pruning the spreading axons to build the most efficient networks possible as it expands its skills and intelligence.

So far, the team are still refining their methods, but Edwards hopes that future work will be able to compare his brain scans with tests of the children’s cognitive abilities. Simple video games, for example, could measure traits like attention, movement reaction time and learning speed to get a rudimentary idea of the baby’s cognitive abilities. Looking at the baby’s connectome, they could then see if their abilities reflect differences in the underlying wiring.

As a doctor, Edwards is particularly interested in what it will tell us about children who have suffered some kinds of complications in their growth. His primary concern, so far, has been babies born prematurely. What’s amazing, he says, is how resilient they can be; their brains often grow remarkably well. “They’ve been out of the womb for three or four months when they should have been inside, they’ve had all these stresses, so the fact the brain looks normal is extraordinary.” Even so, he will be keen to see if there are subtler differences in the wiring that might affect the way they develop as they get older. 

To give an example, he points to a particularly dense bush of fibres connecting the thalamus in the centre of the brain, and the cortex, the folded surface on the outside. “The thalamus is the internet portal of the brain where all the information goes in and out,” Edwards explains – it gathers information from the senses, sends it back and forth between different regions for processing and then also relays the message to our body, to control our behaviour. “These connections grow a lot during the time we have the children in intensive care, so medically, it’s a valuable thing to look at.” It could be that weaker connections here may be able to predict whether a child will suffer cognitive difficulties later.

He also hopes the work could shed light on conditions like schizophrenia, autism or depression, which may be linked to subtle differences in the brain’s wiring. “The structures that are underlying these things seem to be laid down during the last three months of pregnancy,” says Edwards. These are complex disorders, and they might not appear for years or even decades later. Even so, the child’s family could have history of these conditions, which might allow Edwards to start to look for subtle differences that may predispose some of the children to mental illness.

Edwards is candid about his project's limitations; the technology is constantly improving and in 10 years, he says, our current understanding may already seem very out of date. But every journey needs a map, and these first few scans are helping to scout out the territory for others to follow.

As our conversation ends, I hear a cry as the little boy has just left the scanner. Awake and out of his cosy little cocoon, he is again facing the shock of being alive, but his parents are soon on hand to comfort him. When they are processed, the hospital will give him a copy of his scans – a snapshot of his budding consciousness when he first entered this brave new world.

David Robson is BBC Future’s feature writer. He is @d_a_robson on Twitter.

Follow us on Facebook, TwitterGoogle+LinkedIn and Instagram.

BBC Britain is a series focused on exploring this extraordinary island, one story at a time. Readers outside of the UK can see every BBC Britain story by heading to the Britain homepage; you also can see our latest stories by following us on Facebook and Twitter.