No optimization algorithm dominates every problem. Averaged across all possible worlds, every optimizer performs equally. Your clever hack wins on one mountain and bleeds on another. The universe charges for every advantage. Cost function:
N01: No-Free-Lunch Theorem
The Claim
No optimization algorithm dominates every problem. Averaged across all possible worlds, every optimizer performs equally. Your clever hack wins on one mountain and bleeds on another. The universe charges for every advantage.
Definitions
Cost function: A map from solution to penalty. Algorithm: A rule for searching that map. Uniform average: Every possible problem weighted equally. Performance: Probability of finding a good answer after fixed effort. Zero-sum: Your gain equals another's loss. Inductive bias: The assumptions you bake in before you begin. Problem landscape: The shape of the terrain your algorithm must climb.
The Logic
You build a smarter optimizer. You test it on your favorite problems. It wins. You declare victory. You forgot something. The No-Free-Lunch theorem catches your breath. David Wolpert and William Macready proved it in 1997. They averaged every possible cost function. Every algorithm scored the same. Your neural network? Same average as random search. Your genetic algorithm? Same average as greedy hill-climbing. The advantage you found on your favorite problem hides a debt on problems you never tested. Performance is conserved. Like energy. Like momentum. You cannot cheat the landscape. You can only specialize. Stochastic gradient descent excels on smooth loss surfaces. It drowns in rugged terrain. Evolutionary algorithms thrive on discontinuity. They crawl on smooth gradients. The theorem is not pessimistic. It is honest. It says: know your domain. There is no universal key. Every lock demands its own pick.
The Evidence
Wolpert and Macready published the proof in 1997. IEEE Transactions on Evolutionary Computation. They did not run simulations. They proved it mathematically. The average over all functions is flat. Every algorithm, every heuristic, every human intuition — same average score.
Machine learning feels the weight. You train a transformer on text. It masters language. You test it on protein folding. It fails. Your inductive bias worked for text. It bled for proteins. The theorem predicted this. Google spent billions on search. The algorithm dominates web ranking. It would fail at sorting random noise. No free lunch. Always.
Biology knows this. Natural selection optimized humans for savannas. We excel at pattern recognition, social coordination, tool use. Put us underwater. We die. The algorithm is local. The domain is everything.
Finance learns it hard. Renaissance Technologies built Medallion. It prints money in specific market regimes. It would lose in a random-walk market. Their edge is specialization, not universalism.
Ponzi schemes prove the corollary. Charles Ponzi promised returns on all trades. He specialized in one trick: paying old investors with new money. When the domain shifted, he collapsed.
Forest fires teach it. Fire suppression optimizes for local safety. It builds fuel loads. The landscape shifts. The fire algorithm that "worked" creates catastrophic failure.
Tumors demonstrate it. Chemotherapy targets fast-dividing cells. It works in many cancers. It fails in slow-growing tumors. The optimizer is domain-specific. The tumor changes the landscape.
The Falsifier
The theorem would die if a single algorithm dominated every possible cost function uniformly. Find one optimizer that beats random search on all problems, averaged equally. You cannot. The math forbids it. The theorem is a mathematical truth. It holds as long as the average is uniform and the set of problems is exhaustive. Break either assumption and the theorem relaxes. But the theorem itself stands.
The Uncertainty
The theorem assumes uniform averaging. Real problems are not uniform. They cluster. They share structure. The real world is not all possible worlds. It is a thin slice. This is the escape hatch. If you know the slice, you can build a specialist that wins. The theorem cannot stop you. But it warns you: your win is not universal. Your AI is not general. It is a local optimum dressed in global ambition. The uncertainty is where the slice ends. We do not know the shape of real problem space. We only know our corner of it. The rival claim is that the universe is structured enough to make universal approximators viable. This might be true. It might be false. The theorem says: prove it, do not assume it.
{
"schema":"http://google-preview.miscsubjects.com/schemas/jarticle.json",
"status":"published",
"slug":"nogo-n01",
"title":"N01: No-Free-Lunch Theorem",
"kind":"grain",
"summary":"No optimization algorithm dominates every problem. Averaged across all possible worlds, every optimizer performs equally. Your clever hack wins on one mountain and bleeds on another. The universe charges for every advantage. Cost function:",
"created":"2026-07-04T21:53:24.583Z",
"body": [
"# N01: No-Free-Lunch Theorem\n\n## The Claim\n\nNo optimization algorithm dominates every problem. Averaged across all possible worlds, every optimizer performs equally. Your clever hack wins on one mountain and bleeds on another. The universe charges for every advantage.\n\n## Definitions\n\n**Cost function**: A map from solution to penalty. \n**Algorithm**: A rule for searching that map. \n**Uniform average**: Every possible problem weighted equally. \n**Performance**: Probability of finding a good answer after fixed effort. \n**Zero-sum**: Your gain equals another's loss. \n**Inductive bias**: The assumptions you bake in before you begin. \n**Problem landscape**: The shape of the terrain your algorithm must climb.\n\n## The Logic\n\nYou build a smarter optimizer. You test it on your favorite problems. It wins. You declare victory. You forgot something. The No-Free-Lunch theorem catches your breath. David Wolpert and William Macready proved it in 1997. They averaged every possible cost function. Every algorithm scored the same. Your neural network? Same average as random search. Your genetic algorithm? Same average as greedy hill-climbing. The advantage you found on your favorite problem hides a debt on problems you never tested. Performance is conserved. Like energy. Like momentum. You cannot cheat the landscape. You can only specialize. Stochastic gradient descent excels on smooth loss surfaces. It drowns in rugged terrain. Evolutionary algorithms thrive on discontinuity. They crawl on smooth gradients. The theorem is not pessimistic. It is honest. It says: know your domain. There is no universal key. Every lock demands its own pick.\n\n## The Evidence\n\nWolpert and Macready published the proof in 1997. *IEEE Transactions on Evolutionary Computation*. They did not run simulations. They proved it mathematically. The average over all functions is flat. Every algorithm, every heuristic, every human intuition — same average score.\n\nMachine learning feels the weight. You train a transformer on text. It masters language. You test it on protein folding. It fails. Your inductive bias worked for text. It bled for proteins. The theorem predicted this. Google spent billions on search. The algorithm dominates web ranking. It would fail at sorting random noise. No free lunch. Always.\n\nBiology knows this. Natural selection optimized humans for savannas. We excel at pattern recognition, social coordination, tool use. Put us underwater. We die. The algorithm is local. The domain is everything.\n\nFinance learns it hard. Renaissance Technologies built Medallion. It prints money in specific market regimes. It would lose in a random-walk market. Their edge is specialization, not universalism.\n\nPonzi schemes prove the corollary. Charles Ponzi promised returns on all trades. He specialized in one trick: paying old investors with new money. When the domain shifted, he collapsed.\n\nForest fires teach it. Fire suppression optimizes for local safety. It builds fuel loads. The landscape shifts. The fire algorithm that \"worked\" creates catastrophic failure.\n\nTumors demonstrate it. Chemotherapy targets fast-dividing cells. It works in many cancers. It fails in slow-growing tumors. The optimizer is domain-specific. The tumor changes the landscape.\n\n## The Falsifier\n\nThe theorem would die if a single algorithm dominated every possible cost function uniformly. Find one optimizer that beats random search on all problems, averaged equally. You cannot. The math forbids it. The theorem is a mathematical truth. It holds as long as the average is uniform and the set of problems is exhaustive. Break either assumption and the theorem relaxes. But the theorem itself stands.\n\n## The Uncertainty\n\nThe theorem assumes uniform averaging. Real problems are not uniform. They cluster. They share structure. The real world is not all possible worlds. It is a thin slice. This is the escape hatch. If you know the slice, you can build a specialist that wins. The theorem cannot stop you. But it warns you: your win is not universal. Your AI is not general. It is a local optimum dressed in global ambition. The uncertainty is where the slice ends. We do not know the shape of real problem space. We only know our corner of it. The rival claim is that the universe is structured enough to make universal approximators viable. This might be true. It might be false. The theorem says: prove it, do not assume it."
],
"facts": {
"converted_from":"markdown",
"original_updated":"2026-07-17T02:36:00.106Z",
"register":"grain",
"category":null
},
"sources": [
{
"id":"s1",
"type":"review",
"url":"https://ieeexplore.ieee.org/document/585893",
"title":"No Free Lunch Theorems for Optimization",
"quote":"No Free Lunch Theorems for Optimization",
"summary":"Wolpert and Macready (1997) proved mathematically that averaged over all possible cost functions, every optimization algorithm performs equally.",
"claim_ids": [
"c1",
"c2",
"c6"
],
"prev":"genesis",
"accessed_at":"2026-07-04T14:00:00Z",
"hash":"0a607ab4032ed2e04da7e83df282865eb40fd7139e580a9a4839abbe943738e3",
"quote_sha256":"d5efa6930121db1afea9d3524669c5a63db515c34c9236383639cb245f40c677"
},
{
"id":"s2",
"type":"other",
"url":"https://doi.org/10.1109/4235.974875",
"title":"Schumacher, Vose, Whitley (2001) The No Free Lunch and Problem Description Length, GECCO",
"quote":"closed under permutation",
"summary":"",
"author":"",
"publisher":"",
"date":"",
"claim_ids": [],
"found_by":"claude-fable-5",
"extra": {},
"accessed_at":"2026-07-17T02:30:06.270Z",
"link_status":"http_404",
"quote_status":"unverified",
"prev":"0a607ab4032ed2e04da7e83df282865eb40fd7139e580a9a4839abbe943738e3",
"hash":"86031f2c7c9cd56f45210a459cd4e212eff5d050ce88e173bcfcdd0d5a19c68d",
"quote_sha256":"2c7a6c0e4ee644a1f58ec21fd41fe7d5943d200ad53a62217e4d2377a677c7ea"
}
],
"claims": [
{
"id":"c1",
"text":"No optimization algorithm dominates every problem. Averaged across all possible worlds, every optimizer performs equally.",
"section":"The Claim",
"tier":"system",
"source_ids": [
"s1"
],
"why_material":"This is the core No-Free-Lunch theorem statement, proved mathematically by Wolpert and Macready."
},
{
"id":"c2",
"text":"Averaged across every possible cost function, every algorithm scores the same. A neural network has the same average performance as random search.",
"section":"The Logic",
"tier":"system",
"source_ids": [
"s1"
],
"why_material":"Direct consequence of the NFL theorem proof."
},
{
"id":"c3",
"text":"Performance is conserved like energy and momentum. The advantage on one problem hides a debt on problems never tested.",
"section":"The Logic",
"tier":"system",
"source_status":"derived",
"why_material":"Conceptual corollary of the NFL theorem — performance conservation across problem landscapes."
},
{
"id":"c4",
"text":"Stochastic gradient descent excels on smooth loss surfaces but drowns in rugged terrain.",
"section":"The Logic",
"tier":"system",
"source_status":"derived",
"why_material":"Domain-specificity example: SGD is a specialist, not a universal optimizer."
},
{
"id":"c5",
"text":"Evolutionary algorithms thrive on discontinuity but crawl on smooth gradients.",
"section":"The Logic",
"tier":"system",
"source_status":"derived",
"why_material":"Domain-specificity example: evolutionary algorithms are specialists for discontinuous landscapes."
},
{
"id":"c6",
"text":"The No-Free-Lunch theorem was proved by David Wolpert and William Macready in 1997 and published in IEEE Transactions on Evolutionary Computation.",
"section":"The Evidence",
"tier":"system",
"source_ids": [
"s1"
],
"why_material":"Historical fact establishing provenance of the theorem."
},
{
"id":"c7",
"text":"Machine learning inductive bias is domain-specific: a transformer masters language but fails at protein folding.",
"section":"The Evidence",
"tier":"system",
"source_status":"derived",
"why_material":"Empirical illustration of NFL in modern ML — success is local to the training distribution."
},
{
"id":"c8",
"text":"Natural selection optimized humans for savannas, not universally. Put humans underwater and they die.",
"section":"The Evidence",
"tier":"system",
"source_status":"derived",
"why_material":"Biological illustration: evolution itself is a local optimizer, not a universal one."
},
{
"id":"c9",
"text":"Renaissance Technologies' Medallion fund prints money in specific market regimes because its edge is specialization, not universalism.",
"section":"The Evidence",
"tier":"system",
"source_status":"derived",
"why_material":"Finance illustration: the most successful quantitative fund is a domain specialist."
},
{
"id":"c10",
"text":"The theorem assumes uniform averaging over all possible problems. Real problems cluster and share structure, which is the escape hatch for practical success.",
"section":"The Uncertainty",
"tier":"system",
"source_ids": [
"s1"
],
"why_material":"Critical caveat: NFL applies to the uniform average, not the structured subset of problems we encounter in practice."
},
{
"id":"c11",
"text":"A single algorithm dominating every possible cost function uniformly would falsify the No-Free-Lunch theorem.",
"section":"The Falsifier",
"tier":"system",
"source_ids": [
"s1"
],
"why_material":"The falsification condition is explicit in the theorem: uniform dominance is mathematically forbidden."
}
],
"type":"article",
"updated":"2026-10-08T11:34:39.868Z",
"version":1,
"hash":"c123cf7ac3401ce9338b8217408e874039695594e49b03f6e763becfbb6ae58f",
"styling": {
"scope":"shared",
"how":"no value on the page is set by hand: each comes from this theme, and each theme value becomes the CSS variable named beside it. PATCH http://google-preview.miscsubjects.com/api/jarticles/theme changes them.",
"widget_style": {
"what":"every widget may carry style: {…}; these are the only keys it reads",
"rotate":"degrees, a number",
"offset_x":"pixels, a number",
"offset_y":"pixels, a number",
"pulse":"true to pulse"
},
"theme": {
"color": {
"page_bg":"#f5f5f7",
"sheet_bg":"#ffffff",
"ink":"#1d1d1f",
"soft":"#424245",
"muted":"#6e6e73",
"dim":"#86868b",
"line":"#d2d2d7",
"accent":"#0071e3",
"accent_soft":"rgba(0,113,227,0.08)",
"link":"#0066cc",
"selection":"rgba(0,113,227,0.18)",
"widget_bg":"#f5f5f7",
"widget_border":"#d2d2d7",
"card_bg":"#ffffff",
"code_bg":"#f5f5f7",
"json_bg":"#161b19",
"json_ink":"#e6e1d4",
"json_key":"#7fd3c3",
"json_string":"#e9c46a",
"json_number":"#f4a261",
"json_bool":"#c792ea",
"json_null":"#928d7e",
"json_punct":"#6b6759",
"json_bar":"#0e1512",
"kind_badge_bg":"#0e6e60",
"kind_badge_ink":"#ffffff"
},
"color_dark": {
"page_bg":"#000000",
"sheet_bg":"#1d1d1f",
"ink":"#f5f5f7",
"soft":"#d2d2d7",
"muted":"#a1a1a6",
"dim":"#86868b",
"line":"#424245",
"accent":"#2997ff",
"accent_soft":"rgba(41,151,255,0.12)",
"link":"#2997ff",
"selection":"rgba(41,151,255,0.25)",
"widget_bg":"#2c2c2e",
"widget_border":"#424245",
"card_bg":"#1d1d1f",
"code_bg":"#2c2c2e",
"json_bg":"#0a0d0c",
"json_ink":"#e6e1d4",
"json_key":"#7fd3c3",
"json_string":"#e9c46a",
"json_number":"#f4a261",
"json_bool":"#c792ea",
"json_null":"#757062",
"json_punct":"#5d665f",
"json_bar":"#060807",
"kind_badge_bg":"#4fc1ab",
"kind_badge_ink":"#0b0f0d"
},
"font": {
"display":"-apple-system,BlinkMacSystemFont,\"SF Pro Display\",\"SF Pro Text\",\"Helvetica Neue\",Helvetica,Arial,sans-serif",
"body":"-apple-system,BlinkMacSystemFont,\"SF Pro Display\",\"SF Pro Text\",\"Helvetica Neue\",Helvetica,Arial,sans-serif",
"mono":"ui-monospace,SFMono-Regular,\"SF Mono\",Menlo,Consolas,monospace",
"google_fonts":""
},
"size": {
"body":"17px",
"small":"17px",
"eye":"17px",
"lead":"17px",
"h1":"52px",
"h2":"34px",
"h3":"22px",
"byline":"17px",
"h1_measure":"none",
"code":"17px",
"json":"17px",
"widget_title":"17px"
},
"leading": {
"body":"1.7",
"head":"1.18",
"lead":"1.5",
"json":"1.6"
},
"weight": {
"display":"700",
"head":"700",
"body":"400",
"strong":"700",
"eye":"700"
},
"tracking": {
"eye":"0.14em",
"display":"-0.03em",
"body":"-0.006em",
"badge":"0.08em"
},
"layout": {
"sheet_width":"1000px",
"text_width":"880px",
"gutter":"16px",
"sheet_padding":"56px 64px 64px",
"sheet_padding_mobile":"24px 18px 40px",
"sheet_margin":"28px auto 72px",
"block_gap":"1.15em",
"widget_gap":"28px",
"grid_gap":"14px"
},
"border": {
"sheet":"0px solid",
"sheet_radius":"30px",
"widget":"1px solid",
"widget_radius":"24px",
"card_radius":"24px",
"badge_radius":"999px",
"rule":"1px solid",
"code_radius":"18px",
"accent_bar":"3px"
},
"shadow": {
"sheet":"0 1px 1px rgba(0,0,0,.02),0 6px 26px rgba(0,0,0,.05)",
"widget":"none",
"card_hover":"0 10px 28px -16px rgba(28,27,23,0.35)"
},
"motion": {
"hover":"160ms ease"
}
}
},
"page":"http://google-preview.miscsubjects.com/a/nogo-n01",
"json":"http://google-preview.miscsubjects.com/a/nogo-n01.json",
"markdown":"http://google-preview.miscsubjects.com/a/nogo-n01.md",
"theme":"http://google-preview.miscsubjects.com/article-theme.json",
"calls": [
{
"what":"this article as a page (no key)",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/a/nogo-n01",
"headers": {}
},
{
"what":"this article as its object (no key)",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/a/nogo-n01.json",
"headers": {}
},
{
"what":"this article as Markdown (no key)",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/a/nogo-n01.md",
"headers": {}
},
{
"what":"the object with its hash, drafts too",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)"
}
},
{
"what":"one piece and that piece’s hash",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01/at?path=facts",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)"
}
},
{
"what":"grep: every key or value that matches, with the path to change it",
"method":"GET",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01/grep?q=owner",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)"
}
},
{
"what":"change pieces (set, merge, delete, append, insert, move); if-match is the hash",
"method":"PATCH",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
"content-type":"application/json",
"if-match":"<hash from the read>"
},
"body": {
"ops": [
{
"op":"set",
"path":"facts.example",
"value":1
}
]
}
},
{
"what":"replace the whole object",
"method":"PUT",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
"content-type":"application/json",
"if-match":"<hash>"
},
"body": {
"slug":"nogo-n01",
"title":"…"
}
},
{
"what":"fetch every source, hash what came back and check the quote is in it",
"method":"POST",
"url":"http://google-preview.miscsubjects.com/api/jarticles/nogo-n01/verify",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
"content-type":"application/json"
},
"body": {}
},
{
"what":"an Obsidian-style command",
"method":"POST",
"url":"http://google-preview.miscsubjects.com/api/jarticles/cli",
"headers": {
"x-sheets-key":"$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
"content-type":"application/json"
},
"body": {
"command":"backlinks",
"file":"nogo-n01"
}
}
]
}