{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"written-versus-trained","title":"Written by a person, or grown from examples","url":"https://addaly.com/learn/ai-actually-explained/written-versus-trained","position":3,"of":92,"minutes":7,"answer":"A written program follows rules a person can read; a trained model follows patterns nobody ever wrote down.","keyIdea":"A written program follows rules a person can read; a trained model follows patterns nobody ever wrote down."},"body":{"format":"markdown","text":"## Two ways to make a machine do something\n\nThis is the distinction the whole course rests on. There are broadly two ways to get a computer to behave a certain way.\n\n## Way one: somebody writes the rules\n\nA person decides what should happen and writes it down in a form the machine follows exactly. A shop's billing software might contain something like this:\n\n```\nif total > 2000:\n    discount = total * 0.10\n```\n\nThat is a rule. Someone chose 2000, someone chose ten percent, and both choices are sitting there in the file where anyone can read them.\n\nAn early spam filter worked the same way. Block anything containing free money. Block anything with more than six exclamation marks. Someone sat down and thought of each of those, one at a time.\n\nThe defining feature: **you can point at the reason**. If your mother's email about a free clinic gets blocked, you find the line that matched, and you change it.\n\n## Way two: nobody writes the rules\n\nNow the other way. You do not tell the machine what spam looks like. You collect fifty thousand emails, each one already marked spam or not spam by a human, and you hand them over. A training procedure then adjusts a very large pile of numbers, over and over, until the system's answers on those fifty thousand emails match the human labels reasonably often.\n\nWhat you end up with is a **model**: millions or billions of numbers that, taken together, produce good answers. Nobody wrote them. Nobody chose them. Nobody can read them.\n\nThe defining feature: **you cannot point at the reason**. There is no line saying it mentioned a Nigerian prince. There is a pattern spread across millions of numbers, and the only way to find out what it does is to try things and watch.\n\n## Why this changes everything downstream\n\n**They fail differently.** A written program fails the same way every time, on the same input. It has a bug, and the bug is a fact about the code. A trained model fails at a rate. It is right about 96 percent of the time, and the 4 percent is not a bug you can find, it is the shape of the thing.\n\n**They are fixed differently.** You fix a rule by editing it. You fix a model by changing what you show it and training again, then testing to see whether you made it better or just different. This is slow, costs money, and can break something that used to work.\n\n**Only one of them can explain itself.** If a lender in Manila refuses your loan and the decision came from written rules, someone can tell you which condition you failed. If it came from a trained model, the honest answer is that applications resembling yours were often not repaid in the data, which is a different kind of answer and a much less satisfying one.\n\n## Both live in the same product\n\nDo not imagine a clean split between old rule software and new AI software. A single app is usually both. Your maps app uses ordinary written code to search the road network for a route, and a trained model to predict how long each road will take at 6pm on a Friday. The rules and the model sit side by side.\n\nWhen someone tells you a product has AI in it, the useful follow-up is: which part came from examples?"},"check":{"question":"Two spam filters both wrongly send your friend's email to the spam folder. One was built from written rules, one was trained on examples. What is genuinely different about fixing them?","options":[{"text":"With the written one you find and change the rule that matched. With the trained one there is no rule to change, so you alter the examples, train again, and test whether things actually improved.","correct":true},{"text":"There is no real difference. Both are software, so in both cases an engineer opens the file and edits it.","correct":false,"tempting":"From outside, both are just programs that misbehaved, and every misbehaving program you have heard of got fixed by someone editing code."},{"text":"The trained one is fixed by telling it in plain language never to do that again.","correct":false,"tempting":"Chat interfaces have taught everyone that you correct these systems by instructing them, so it feels like instruction is how a model gets changed."},{"text":"The trained one cannot really be fixed, because nobody understands what it is doing.","correct":false,"tempting":"The phrase black box suggests total helplessness, so it seems honest to conclude that nothing can be done."}]},"prev":{"slug":"the-family-tree","title":"Four rings, one inside the next","url":"https://addaly.com/learn/ai-actually-explained/the-family-tree"},"next":{"slug":"what-training-means","title":"What training on data actually means","url":"https://addaly.com/learn/ai-actually-explained/what-training-means"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Written by a person, or grown from examples', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/written-versus-trained (Accessed: 31 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Written by a person, or grown from examples","courseTitle":"AI, Actually Explained","module":{"index":1,"slug":"what-the-word-names","title":"What this word actually names"},"answer":null,"keyIdea":"A written program follows rules a person can read; a trained model follows patterns nobody ever wrote down.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"two-ways-to-make-a-machine-do-something","runs":[{"text":"Two ways to make a machine do something"}]},{"t":"p","runs":[{"text":"This is the distinction the whole course rests on. There are broadly two ways to get a computer to behave a certain way."}]},{"t":"h2","id":"way-one-somebody-writes-the-rules","runs":[{"text":"Way one: somebody writes the rules"}]},{"t":"p","runs":[{"text":"A person decides what should happen and writes it down in a form the machine follows exactly. A shop’s billing software might contain something like this:"}]},{"t":"code","lang":"","label":"Text","text":"if total > 2000:\n    discount = total * 0.10"},{"t":"p","runs":[{"text":"That is a rule. Someone chose 2000, someone chose ten percent, and both choices are sitting there in the file where anyone can read them."}]},{"t":"p","runs":[{"text":"An early spam filter worked the same way. Block anything containing free money. Block anything with more than six exclamation marks. Someone sat down and thought of each of those, one at a time."}]},{"t":"p","runs":[{"text":"The defining feature: "},{"text":"you can point at the reason","b":true},{"text":". If your mother’s email about a free clinic gets blocked, you find the line that matched, and you change it."}]},{"t":"h2","id":"way-two-nobody-writes-the-rules","runs":[{"text":"Way two: nobody writes the rules"}]},{"t":"p","runs":[{"text":"Now the other way. You do not tell the machine what spam looks like. You collect fifty thousand emails, each one already marked spam or not spam by a human, and you hand them over. A training procedure then adjusts a very large pile of numbers, over and over, until the system’s answers on those fifty thousand emails match the human labels reasonably often."}]},{"t":"p","runs":[{"text":"What you end up with is a "},{"text":"model","b":true},{"text":": millions or billions of numbers that, taken together, produce good answers. Nobody wrote them. Nobody chose them. Nobody can read them."}]},{"t":"p","runs":[{"text":"The defining feature: "},{"text":"you cannot point at the reason","b":true},{"text":". There is no line saying it mentioned a Nigerian prince. There is a pattern spread across millions of numbers, and the only way to find out what it does is to try things and watch."}]},{"t":"h2","id":"why-this-changes-everything-downstream","runs":[{"text":"Why this changes everything downstream"}]},{"t":"p","runs":[{"text":"They fail differently.","b":true},{"text":" A written program fails the same way every time, on the same input. It has a bug, and the bug is a fact about the code. A trained model fails at a rate. It is right about 96 percent of the time, and the 4 percent is not a bug you can find, it is the shape of the thing."}]},{"t":"p","runs":[{"text":"They are fixed differently.","b":true},{"text":" You fix a rule by editing it. You fix a model by changing what you show it and training again, then testing to see whether you made it better or just different. This is slow, costs money, and can break something that used to work."}]},{"t":"p","runs":[{"text":"Only one of them can explain itself.","b":true},{"text":" If a lender in Manila refuses your loan and the decision came from written rules, someone can tell you which condition you failed. If it came from a trained model, the honest answer is that applications resembling yours were often not repaid in the data, which is a different kind of answer and a much less satisfying one."}]},{"t":"h2","id":"both-live-in-the-same-product","runs":[{"text":"Both live in the same product"}]},{"t":"p","runs":[{"text":"Do not imagine a clean split between old rule software and new AI software. A single app is usually both. Your maps app uses ordinary written code to search the road network for a route, and a trained model to predict how long each road will take at 6pm on a Friday. The rules and the model sit side by side."}]},{"t":"p","runs":[{"text":"When someone tells you a product has AI in it, the useful follow-up is: which part came from examples?"}]}],"check":{"question":[{"text":"Two spam filters both wrongly send your friend’s email to the spam folder. One was built from written rules, one was trained on examples. What is genuinely different about fixing them?"}],"options":[{"text":[{"text":"With the written one you find and change the rule that matched. With the trained one there is no rule to change, so you alter the examples, train again, and test whether things actually improved."}],"correct":true,"tempting":null},{"text":[{"text":"There is no real difference. Both are software, so in both cases an engineer opens the file and edits it."}],"correct":false,"tempting":[{"text":"From outside, both are just programs that misbehaved, and every misbehaving program you have heard of got fixed by someone editing code."}]},{"text":[{"text":"The trained one is fixed by telling it in plain language never to do that again."}],"correct":false,"tempting":[{"text":"Chat interfaces have taught everyone that you correct these systems by instructing them, so it feels like instruction is how a model gets changed."}]},{"text":[{"text":"The trained one cannot really be fixed, because nobody understands what it is doing."}],"correct":false,"tempting":[{"text":"The phrase black box suggests total helplessness, so it seems honest to conclude that nothing can be done."}]}],"order":[2,3,0,1],"why":null},"prev":{"slug":"the-family-tree","title":"Four rings, one inside the next","minutes":9},"next":{"slug":"what-training-means","title":"What training on data actually means","minutes":7}}}