On the twentieth day of the ninth month, in the year 1082, Shen Kuo stood inside the walls of Mizhi with ten thousand men and could not get through.
The day before, he had marched west to relieve the fortress at Yongle and been stopped at the bank of the Yongding river by a Tangut army. That same day a message came from Suide that eighty thousand tribal troops were closing on the prefectural city.
He paused, then turned east to hold Suide.
Behind him, Yongle fell.
The Bank of the River
The first half of the life of Shen Kuo ran smoothly.
He was born in Qiantang, the modern Hangzhou, in 1031, into a family of officials. His father died when he was young and he entered service through the family privilege, taking a post as assistant magistrate in Shuyang, where the Shu river flooded every few years. He organised the dredging, opened several thousand qing of farmland, and learned the thing that stayed with him for forty years: water can be argued with, if you measure it.
He passed the metropolitan examination in 1063, served as a judicial officer in Yangzhou, and was then brought to the capital to collate books in the Zhaowen library and help revise the armillary sphere. From that point he did two jobs at once. By day he was an official. At night he computed.
In 1072 he was put in charge of the astronomical bureau. The calendars of the day were wrong often enough to matter, and the men who made them were mostly time servers. He reorganised the office, submitted three memorials on the armillary sphere, the water clock and the shadow table, and brought in a commoner named Wei Pu to recalculate the calendar. Characters like that could not be found by examination, so he asked the whole empire to send in old observation records.
Those were also the years of Wang Anshi and the New Policies. Shen Kuo served in the finance office, drafted edicts, and for a year and more ran the treasury as acting commissioner. He then took over the weapons bureau, where output rose more than tenfold in a few months; he studied bows, argued that the crossbow called the divine arm should be manufactured in quantity, and wrote a set of regulations for fortifications and barracks.
In 1075 the Liao sent an envoy demanding a new border on the Huangwei ridge. Shen Kuo went through the archives in the privy council and found the old agreement: the line ran along the old earthen wall, and Huangwei stood thirty li to the south of it. The emperor gave him a thousand taels of silver and sent him north to negotiate.
They met six times. Every time the Liao chancellor produced an argument, Shen Kuo had a clerk read out the relevant clause. The other side finally observed that a few li of ground were not worth ruining the peace between two states. Shen Kuo did not move. On the way home he drew the roads, the rivers and the customs of the country into a report for the throne.
That was the high point.
Who Chose the Site
The turn came in the northwest.
In 1080 he was made prefect of Yanzhou and military commissioner of the Fuyan circuit, facing the Tangut state of Western Xia. On arrival he used the money the court had given him to buy wine, and invited the sons of the frontier families to compete at archery and riding, pouring for the winners himself. The competitions ran for a year. Out of them he picked the strongest men for the border regiments, and Yanzhou became the sharpest command on that frontier.
In 1081, with Western Xia in civil conflict, the Song attacked on five roads. Shen Kuo did well on his. When several tens of thousands of tribal horsemen came at Shunning fort, he sent three thousand men at them and had a thousand more parade with grain enough for a hundred thousand, so that the enemy would misread the size of the force. In the eleventh month he paraded the twelve Henan regiments at Suide, let the Xia garrison conclude that a general offensive was coming, and took three fortresses without a fight.
In the second month of 1082 he was promoted and given a place in the Longtu pavilion.
The trouble was the next step.
In the fifth month he and his deputy Zhong E were asked for a plan against Western Xia. Both wanted to push into the Hengshan country and hold it with forts. The court sent an official from the capital, Xu Xi, to supervise. In the seventh month they argued about where to build. Shen Kuo wanted Shibao. Zhong E wanted Yinzhou. Xu Xi wanted a site called Yongle.
Yongle won.
The site lay northwest of Mizhi, close to the Wuding river and close to the Xia border. Its advantage was that it was forward. Its disadvantage was the same thing. The supply road was long, and the garrison would sit alone in front of the enemy. Zhong E refused to agree. Shen Kuo knew it was wrong and did not insist.
In the eighth month the emperor ordered Xu Xi to build, and ordered Shen Kuo to move his headquarters to the frontier to keep the works supplied and to relieve them if attacked.
The fort was finished in fourteen days.
Xu Xi left four thousand men under Jing Siyi and went back to Mizhi.
On the ninth day of the ninth month the Xia came, with a nominal three hundred thousand.
Three Years in a Temple
Xu Xi turned around with twenty five thousand men and ordered Shen Kuo to hold Mizhi.
The Xia cut the water first, then closed the ring. There were too few men inside and the relief force was pinned at the river. Shen Kuo brought ten thousand men west and could not cross the Yongding. On the same day eighty thousand tribal troops moved on Suide. He had to choose one of two disasters, and he chose to keep Suide, because Suide was the root of the whole circuit.
Yongle held for a little over ten days.
Nobody came.

On the twentieth the fort fell. Xu Xi died in it, with the supply commissioner, a senior eunuch general and a veteran commander. Two hundred and thirty officers were killed and more than twelve thousand men lost. It was the worst defeat the Northern Song suffered against Western Xia, and the end of the five road campaign.
On the seventeenth day of the tenth month the court issued its finding. Shen Kuo had proposed building at Yongle, and had responded badly when the enemy came. He was reduced to a nominal military post and ordered to live at Suizhou.
The court needed a name to hang the defeat on. Xu Xi was dead. Zhong E had opposed the fort and had refused to send troops, which made him awkward to blame. Shen Kuo had been the commander of the circuit, present when the site was chosen, absent when the relief was needed. His name was the cheapest.
It was not exile, but it was close. The post carried no duties, he was forbidden to sign official papers, and his movements were watched. He arrived at Suizhou without family and without staff, and lodged in a Buddhist temple called Fayun.
Three years.
What he did in those three years is barely recorded. What is clear is that a man who understood water, calendars, weapons and terrain had been broken by a decision that was not his, and that he now had nothing to do but think.
In 1085 the emperor died, the young Zhezong came to the throne, and a general amnesty followed. Shen Kuo was moved to Xiuzhou, near his native Hangzhou, still under restriction. There he finished the atlas of the empire he had been ordered to compile years before, and presented it in 1088. The court gave him a hundred bolts of silk and allowed him to move about the prefecture freely.
So he bought a garden outside Zhenjiang, on the south bank of the Yangzi, and called it Mengxi, the dream brook.
English readers know this kind of ending. Francis Bacon was dismissed as lord chancellor in 1621, barred from parliament and from court, and spent the last five years of his life writing philosophy in a house outside London. The fall did not make him a philosopher. It only removed everything else.
Six Hundred and Nine Notes
In the garden there was a small stream. He received visitors beside it and wrote down what was said, which is why the book is called brush talks.
It has no argument and no plan. It is a collection of entries: this one heard, that one seen, this one worked out on paper. Twenty six chapters, plus three more of supplement and eleven short addenda, sorted into seventeen categories that run from official precedents and philology to music, mathematics, medicine, jokes and strange occurrences. Six hundred and nine entries in all.
Later generations called it the Dream Brook Brush Talks.
Some of the entries still stand out.
He observed that a needle rubbed with lodestone points south but always leans a little to the east, and never exactly south. That is the earliest clear record of magnetic declination anywhere, four centuries before the same observation was made in Europe.
He described movable type. In the Qingli period a commoner named Bi Sheng cut characters in clay, baked them hard, and set them in an iron frame. Bi Sheng has no other biography. Without this entry his name would not exist.
He described how Yu Hao built pagodas, and how the wooden tower at the Fanyin temple in Hangzhou was straightened, and in doing so preserved the practical knowledge of a carpenter who could not write.
He worked out how to sum stacked piles of objects, and how to find an arc from a chord. He studied optics and defined the focal point, which he called the obstruction, and used it to explain the image in a pinhole and the behaviour of a concave mirror. He studied sound and stuck paper figures on lute strings to watch them jump at resonance.
He recorded how copper was precipitated out of mine water in Jiangxi with scrap iron. He explained the strange stone pillars of the Yandang mountains as the remnants of erosion, and said that the North China plain was silt carried down by rivers, and that the hills along its edge had once been reefs in a shallow sea.
And he recorded one other thing.
He also collected medical prescriptions. After his death, someone combined them with a collection made by Su Shi, and the two were printed together as the Su Shen formulas. In one notebook, stars and weapons and medicine and jokes sit at the same table without ranking each other.
The Word for Oil
Along the river near Yanzhou there was a black seep that the local people called fat water. It burned. It gave off a heavy smoke that stained the curtains and would not wash out.
Shen Kuo went to look at it. He gave it a name: shiyou, rock oil.
He wrote that this substance would certainly come into wide use in the world.
That sentence was written in the eleventh century. Nobody took it seriously. There was wood for burning and oil for lamps, and what use was a black puddle? He added something more practical. The smoke was heavy, and the soot from it made excellent ink, black and glossy, better than pine soot. He tried it. He made a batch of ink sticks and stamped them with four characters: Yanchuan stone liquid.
He was in his sixties when he wrote these entries in the garden at Zhenjiang. He died there in 1095, aged sixty five.
The manuscript scattered after his death and was not printed until the Southern Song. In the twentieth century the British historian of science Joseph Needham called the book a landmark in the history of Chinese science, and called Shen Kuo the most remarkable figure in the whole of it.
The garden is still there, a small enclosure with a few rooms and some trees and his name on a wall.
When he stood on the bank of the Yan river looking at that black layer, he could not have known that the stuff underneath it would one day drive the entire world forward.