# Peter Norvig

Articles by Peter Norvig

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Functional Lifestyles Training

DevFeed: [Functional Lifestyles Training](<https://devfeed.tech/articles/functional-lifestyles-training-40598.md>)

Original publisher: [Read original article](<https://medium.com/@peternorvig/functional-lifestyles-training-47984a3cd2ba>)

Author: Peter Norvig

Published: 2023-04-03T23:19:47.031000Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [function](<https://devfeed.tech/topics/function.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [april-1](<https://devfeed.tech/tags/april-1.md>), [articles](<https://devfeed.tech/tags/articles.md>), [clients](<https://devfeed.tech/tags/clients.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [forms](<https://devfeed.tech/tags/forms.md>), [functional](<https://devfeed.tech/tags/functional.md>), [functions](<https://devfeed.tech/tags/functions.md>), [gym](<https://devfeed.tech/tags/gym.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [imperative](<https://devfeed.tech/tags/imperative.md>), [input](<https://devfeed.tech/tags/input.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [lifestyle](<https://devfeed.tech/tags/lifestyle.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [training](<https://devfeed.tech/tags/training.md>)

### AI overview

The article's gym interview is a programming-themed parody: its fitness claims are jokes built from functional-programming concepts. "Folds," lambda lifting and lambda drops stand in for exercise and weight loss; evaluation strategies and algebraic structures become personalized training options; monads are said to enable input, output and exception handling. The punchline is that clients remain immutable while applying functions produces a "new and improved" version. The text presents no real workout guidance or evidence for its safety and health claims.

### Source excerpt

Some heavy lambda lifting could get you in better functional shape.

## Advent of Code 2016

DevFeed: [Advent of Code 2016](<https://devfeed.tech/articles/advent-of-code-2016-40525.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Advent%20of%20Code.ipynb>)

Published: 2016-12-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Advent of Code](<https://devfeed.tech/topics/advent-of-code.md>), [Code Challenge](<https://devfeed.tech/topics/code-challenge.md>), [Jupyter Notebook](<https://devfeed.tech/topics/jupyter-notebook.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [advent-of-code](<https://devfeed.tech/tags/advent-of-code.md>), [code](<https://devfeed.tech/tags/code.md>), [jupyter-notebook](<https://devfeed.tech/tags/jupyter-notebook.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>), [solutions](<https://devfeed.tech/tags/solutions.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

Peter Norvig documents his solutions to the Advent of Code puzzles released from December 1 through December 25, 2016. The notebook includes preparation, utility functions, tests, and selected explanations of his solving approach.

### Source excerpt

Solutions to the puzzle site.

## On the (Small) Number of Atoms in the Universe

DevFeed: [On the (Small) Number of Atoms in the Universe](<https://devfeed.tech/articles/on-the-small-number-of-atoms-in-the-universe-40543.md>)

Original publisher: [Read original article](<http://norvig.com/atoms.html>)

Published: 2016-04-27T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [passwords](<https://devfeed.tech/topics/passwords.md>), [digital](<https://devfeed.tech/topics/digital.md>)

Tags: [complexity](<https://devfeed.tech/tags/complexity.md>), [number](<https://devfeed.tech/tags/number.md>), [observable](<https://devfeed.tech/tags/observable.md>), [password](<https://devfeed.tech/tags/password.md>), [small](<https://devfeed.tech/tags/small.md>)

### AI overview

Peter Norvig explains why the number of atoms in the observable universe can be large for counting physical objects but comparatively small when discussing combinations. He illustrates the distinction with Go board positions, password search spaces, and digital pictures.

### Source excerpt

On the difference between counting things and counting combinations of things.

## Countdown to 2016

DevFeed: [Countdown to 2016](<https://devfeed.tech/articles/countdown-to-2016-40528.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Countdown.ipynb>)

Published: 2016-01-06T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Calculate Pi](<https://devfeed.tech/topics/calculate-pi.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>)

Tags: [2016](<https://devfeed.tech/tags/2016.md>), [alex](<https://devfeed.tech/tags/alex.md>), [dynamic-programming](<https://devfeed.tech/tags/dynamic-programming.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>)

### AI overview

Using dynamic programming to build and cache expressions for every contiguous countdown subsequence, the author solves the 2016 puzzle with four basic operations and parentheses in about 56 seconds in Python. The expression is (10 + 9 x 8 x 7 − 6 − 5) x 4 + 3 + 2 − 1. A floating-point count gives 30,066 solutions, but exact rational arithmetic changes that to 44,499; the author cautions that this still needs independent verification and depends on how "distinct" is defined. The post also explores four and five 4s or 5s with exponentiation, concatenation, decimals, roots, factorials, floor and ceiling. With five 5s and these added operations, its search reports every integer from 0 through 23,307 as makeable, with 23,308 the first gap. For exponentiation and roots it uses floats, accepting possible rounding errors, and limits certain exponent forms to control problematic values.

### Source excerpt

Solving the equation 10 _ 9 _ 8 _ 7 _ 6 _ 5 _ 4 _ 3 _ 2 _ 1 = 2016. From an Alex Bellos puzzle.

## Refactoring a Crossword Game Program

DevFeed: [Refactoring a Crossword Game Program](<https://devfeed.tech/articles/refactoring-a-crossword-game-program-40534.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Scrabble.ipynb>)

Published: 2015-12-29T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Tech Debt](<https://devfeed.tech/topics/tech-debt.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [17](<https://devfeed.tech/tags/17.md>), [2](<https://devfeed.tech/tags/2.md>), [2015](<https://devfeed.tech/tags/2015.md>), [22](<https://devfeed.tech/tags/22.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [ach](<https://devfeed.tech/tags/ach.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [anchor](<https://devfeed.tech/tags/anchor.md>), [approach](<https://devfeed.tech/tags/approach.md>), [argument](<https://devfeed.tech/tags/argument.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [background](<https://devfeed.tech/tags/background.md>), [game](<https://devfeed.tech/tags/game.md>), [program](<https://devfeed.tech/tags/program.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [scrabble](<https://devfeed.tech/tags/scrabble.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

The refactor represents the board as a one-dimensional list with a border, finds candidate plays by extending rack prefixes from anchor squares, and validates cross words against the dictionary. Blanks are marked with lowercase letters on the board so they retain their chosen letter without scoring. Scoring combines the main word, cross words, bonus squares, and a seven-tile bingo bonus; the example BACKBENCH play scores 116. The highest-scoring-play strategy averaged about 370 points across 10 games and took under four seconds per game, but the author says it is not world-champion caliber. The program uses the Words with Friends board and a 35-point bingo; Scrabble support and tile exchanges are listed as future work.

### Source excerpt

Refactoring the Scrabble / Wrds with Friends game from Udacity CS 212.

## Beal's Conjecture Revisited

DevFeed: [Beal's Conjecture Revisited](<https://devfeed.tech/articles/beal-s-conjecture-revisited-40544.md>)

Original publisher: [Read original article](<http://norvig.com/beal.html>)

Published: 2015-10-20T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Calculate Pi](<https://devfeed.tech/topics/calculate-pi.md>), [Python](<https://devfeed.tech/topics/python.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [1-5](<https://devfeed.tech/tags/1-5.md>), [2](<https://devfeed.tech/tags/2.md>), [2015](<https://devfeed.tech/tags/2015.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [argument](<https://devfeed.tech/tags/argument.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [ax](<https://devfeed.tech/tags/ax.md>), [base](<https://devfeed.tech/tags/base.md>), [berlin](<https://devfeed.tech/tags/berlin.md>), [better](<https://devfeed.tech/tags/better.md>), [bloom](<https://devfeed.tech/tags/bloom.md>), [bloom-filter](<https://devfeed.tech/tags/bloom-filter.md>), [book](<https://devfeed.tech/tags/book.md>), [i](<https://devfeed.tech/tags/i.md>), [search](<https://devfeed.tech/tags/search.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

Beal's Conjecture remains unproved, and the author's searches found no counterexamples. The article explains common false leads, especially apparent equalities caused by floating-point rounding, then updates a Python search program. It derives that if A and B share a prime factor in a solution, C must share it too, and reduces the exponent search to odd primes and 4. The author describes the search limits and caveats, including how this optimization changes the ranges examined. A modular-arithmetic version is presented as a possible route to speed, though the shown run did not demonstrate a speedup. The excerpt reports a separate C++ search over A, B up to 200,000 and exponents up to 5,000, also without counterexamples, and advises against spending substantial computing resources on further searches.

### Source excerpt

Updating the work I did in 2000 to search for counterexamples to Beal's Conjecture. Lists some of the things that people do wrong in trying to settle the conjecture.

## Let's Code About Bike Locks

DevFeed: [Let's Code About Bike Locks](<https://devfeed.tech/articles/let-s-code-about-bike-locks-40529.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Fred%20Buns.ipynb>)

Published: 2015-06-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [bike](<https://devfeed.tech/tags/bike.md>), [code](<https://devfeed.tech/tags/code.md>), [locks](<https://devfeed.tech/tags/locks.md>)

### AI overview

Peter Norvig models a four-tumbler WordLock as a product of letter choices, then counts combinations found in a 4,360-entry word list. The featured lock yields 1,118 words out of 10,000; greedy selection and random hill-climbing improve the count to 1,240, but experiments suggest rather than prove that this is the maximum. The post also reframes the lock as ten four-letter rows: seeking rows that avoid repeated letters in each tumbler produces examples of 10 and 11 simultaneous words. It introduces `itertools.product`, a transpose operation, and a reusable `improved` function for hill-climbing. The author notes the word count depends on the chosen dictionary and says the word-based lock offers no practical security advantage over a numeric cable lock.

### Source excerpt

How many words can be made from a letter-based combination lock?

## When Cheryl Met Eve: A Birthday Story

DevFeed: [When Cheryl Met Eve: A Birthday Story](<https://devfeed.tech/articles/when-cheryl-met-eve-a-birthday-story-40526.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl-and-Eve.ipynb>)

Published: 2015-05-13T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Koans](<https://devfeed.tech/topics/koans.md>)

Tags: [birthday](<https://devfeed.tech/tags/birthday.md>), [eve](<https://devfeed.tech/tags/eve.md>), [exploration](<https://devfeed.tech/tags/exploration.md>), [logic](<https://devfeed.tech/tags/logic.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>), [story](<https://devfeed.tech/tags/story.md>)

### AI overview

The excerpt shows how code can generate and verify variants of the "Cheryl's Birthday" puzzle by filtering candidate dates against what each character can infer. Randomly sampled date sets yield a unique solution about 6% of the time for the original puzzle; adding Eve's eavesdropping clue lowers that to about 3%, while a more complex version where Albert waits again yields a unique solution about 9% of the time in the reported 10,000-sample runs. A worked example traces the complex puzzle to July 27. Eve's clue relies on a date set designed so the month's first letter and day's first digit uniquely identify matching candidates. These rates describe the excerpt's chosen date generator and sample space.

### Source excerpt

An extended exploration beyond the popular "Cheryl's Birthday" logic puzzle.

## Cheryl's Birthday (How to Solve It with Code)

DevFeed: [Cheryl's Birthday (How to Solve It with Code)](<https://devfeed.tech/articles/cheryl-s-birthday-how-to-solve-it-with-code-40527.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb>)

Published: 2015-04-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Computer science](<https://devfeed.tech/topics/computer-science.md>), [learn programming](<https://devfeed.tech/topics/learn-programming.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [logic](<https://devfeed.tech/tags/logic.md>), [problem-solving](<https://devfeed.tech/tags/problem-solving.md>), [programming](<https://devfeed.tech/tags/programming.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>), [puzzles](<https://devfeed.tech/tags/puzzles.md>), [python](<https://devfeed.tech/tags/python.md>), [solution](<https://devfeed.tech/tags/solution.md>), [solve](<https://devfeed.tech/tags/solve.md>)

### AI overview

The code-based solution represents each person's knowledge as the dates still possible after learning a month or day. For each candidate date, it checks whether Albert initially lacks the answer while knowing Bernard cannot answer, whether Bernard can then identify the date, and whether Albert can identify it afterward. Filtering the ten candidates through those conditions leaves one solution: July 16. The excerpt demonstrates the method with Python functions and does not include a complete runnable program: the main function initially marks the three statement checks as TODO before defining them later.

### Source excerpt

A solution to the popular "Cheryl's Birthday" logic puzzle.

## xkcd 1313: Regex Golf

DevFeed: [xkcd 1313: Regex Golf](<https://devfeed.tech/articles/xkcd-1313-regex-golf-40537.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313.ipynb?create=1>)

Published: 2014-02-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [implement](<https://devfeed.tech/tags/implement.md>), [program](<https://devfeed.tech/tags/program.md>), [python](<https://devfeed.tech/tags/python.md>), [regex](<https://devfeed.tech/tags/regex.md>), [strategy](<https://devfeed.tech/tags/strategy.md>), [xkcd](<https://devfeed.tech/tags/xkcd.md>)

### AI overview

Peter Norvig examines the regex-golf challenge from xkcd 1313 and develops a Python approach for finding a regular expression that matches presidential election winners while excluding losers. The article also investigates an apparent inconsistency in the original xkcd example.

### Source excerpt

Code to implement a meta-regex-golf program based on xkcd comic #1313. The code is "a program that plays regex golf with arbitrary lists..."

## xkcd 1313: Regex Golf (Part 2: Infinite Problems)

DevFeed: [xkcd 1313: Regex Golf (Part 2: Infinite Problems)](<https://devfeed.tech/articles/xkcd-1313-regex-golf-part-2-infinite-problems-40536.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313-part2.ipynb?create=1>)

Published: 2014-02-20T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Combinatorial optimization](<https://devfeed.tech/topics/combinatorial-optimization.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [golf](<https://devfeed.tech/tags/golf.md>), [regex](<https://devfeed.tech/tags/regex.md>), [regex-golf](<https://devfeed.tech/tags/regex-golf.md>), [xkcd](<https://devfeed.tech/tags/xkcd.md>)

### AI overview

The article improves a greedy regex-golf program and then explores how to find shorter solutions. Profiling shows matching dominates runtime; compiling regexes, testing losers as one newline-joined string with multiline matching, and caching which winners each regex part covers cut an example from about 4 seconds to 198 ms. The author then models the task as set cover: branch-and-bound search tracks the best solution and prunes partial solutions already too costly, while simplification removes dominated parts and selects parts that uniquely cover a winner. In benchmarks across 22 list pairs, greedy search took about 5 seconds and produced 1,749 total characters; branch-and-bound with a 1,000-call limit took about 7 seconds and produced 1,680. Raising the limit to 10,000 took about 18 seconds and reduced the total only to 1,679, with several cases still hitting the limit. Results can vary because ties depend on set iteration order across Python versions.

### Source excerpt

Newly updated and improved version of my code to implement a meta-regex-golf program based on xkcd comic #1313. The code is "a program that plays regex golf with arbitrary lists..."

## Google's Hybrid Approach to Research

DevFeed: [Google's Hybrid Approach to Research](<https://devfeed.tech/articles/google-s-hybrid-approach-to-research-40567.md>)

Original publisher: [Read original article](<http://norvig.com/hybrid-research.pdf>)

Published: 2012-06-24T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Google](<https://devfeed.tech/topics/google.md>), [communications](<https://devfeed.tech/topics/communications.md>)

Tags: [approach](<https://devfeed.tech/tags/approach.md>), [article](<https://devfeed.tech/tags/article.md>), [communications](<https://devfeed.tech/tags/communications.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [google](<https://devfeed.tech/tags/google.md>), [research](<https://devfeed.tech/tags/research.md>)

### AI overview

An article in Communications of the ACM describes Google's hybrid approach to research across Google Research and engineering as a whole.

### Source excerpt

An article printed in the Communications of the ACM describing Google's research, both within Google Research and within Engineering as a whole. Alfred Spector, Peter Norvig and Slav Petrov.

## Peter Norvig: The 100,000-student classroom

DevFeed: [Peter Norvig: The 100,000-student classroom](<https://devfeed.tech/articles/peter-norvig-the-100-000-student-classroom-40594.md>)

Original publisher: [Read original article](<http://www.ted.com/talks/peter_norvig_the_100_000_student_classroom.html>)

Author: Peter Norvig

Published: 2012-06-24T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [AI Development](<https://devfeed.tech/topics/ai-development.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [about](<https://devfeed.tech/tags/about.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [class](<https://devfeed.tech/tags/class.md>), [classroom](<https://devfeed.tech/tags/classroom.md>), [computers](<https://devfeed.tech/tags/computers.md>), [education](<https://devfeed.tech/tags/education.md>), [fall](<https://devfeed.tech/tags/fall.md>), [global](<https://devfeed.tech/tags/global.md>), [global-issues](<https://devfeed.tech/tags/global-issues.md>), [intelligence](<https://devfeed.tech/tags/intelligence.md>), [interactive](<https://devfeed.tech/tags/interactive.md>), [internet](<https://devfeed.tech/tags/internet.md>), [over](<https://devfeed.tech/tags/over.md>), [shares](<https://devfeed.tech/tags/shares.md>), [stanford](<https://devfeed.tech/tags/stanford.md>), [student](<https://devfeed.tech/tags/student.md>), [students](<https://devfeed.tech/tags/students.md>), [talks](<https://devfeed.tech/tags/talks.md>), [teaching](<https://devfeed.tech/tags/teaching.md>), [ted](<https://devfeed.tech/tags/ted.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

In fall 2011, Peter Norvig and Sebastian Thrun taught an artificial intelligence class at Stanford with 175 students attending in person and more than 100,000 participating through an interactive webcast. Norvig's talk shares what he learned from teaching this global classroom; the excerpt does not specify those lessons.

### Source excerpt

My talk at the TED conference. Six minute video.

## Strachey's Checkers program from 1966

DevFeed: [Strachey's Checkers program from 1966](<https://devfeed.tech/articles/strachey-s-checkers-program-from-1966-40585.md>)

Original publisher: [Read original article](<http://norvig.com/sciam/checkers.py>)

Published: 2011-08-24T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [source-code](<https://devfeed.tech/tags/source-code.md>)

### AI overview

Source code accompanies an essay about Strachey's 1966 checkers program and its Scientific American article.

### Source excerpt

The source code to accompany my essay on Strachey's Scientific American article.

## On Chomsky and the Two Cultures of Statistical Learning

DevFeed: [On Chomsky and the Two Cultures of Statistical Learning](<https://devfeed.tech/articles/on-chomsky-and-the-two-cultures-of-statistical-learning-40547.md>)

Original publisher: [Read original article](<http://norvig.com/chomsky.html>)

Published: 2011-05-27T00:00:00Z

Content type: opinion

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [linear-regression](<https://devfeed.tech/topics/linear-regression.md>)

Tags: [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [history-of-science](<https://devfeed.tech/tags/history-of-science.md>), [language](<https://devfeed.tech/tags/language.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [learning](<https://devfeed.tech/tags/learning.md>), [models](<https://devfeed.tech/tags/models.md>), [science](<https://devfeed.tech/tags/science.md>), [tasks](<https://devfeed.tech/tags/tasks.md>)

### AI overview

The essay argues that statistical and probabilistic language models are neither novel nor merely successful at prediction: they can fit observed language, handle graded uncertainty, and sometimes provide insight. It distinguishes statistical training from probabilistic modeling and contrasts compact categorical rules with probabilistic approaches, using spelling, sentence likelihood, grammatical variation, and gradual language change as examples. It presents two modeling cultures: choosing an interpretable model meant to represent nature's underlying process, and using flexible algorithms that predict well without claiming to reveal that process. The author argues that Chomsky's objections often target the latter and favor idealized competence over observed performance. The excerpt also notes limitations: simple Markov models are restricted, while more advanced probabilistic models such as PCFGs can capture richer structures; prediction and explanatory insight remain distinct aims.

### Source excerpt

At the MIT 150 symposium, Chomsky said that the notion of success used by statistical language models (namely, that they successfully predict the world and allow programs to accomplish tasks) was "very novel ... I don't know of anything like it in the history of science." This essay argues that it is not novel at all, but perfectly commonplace.

## (An ((Even Better) Lisp) Interpreter (in Python))

DevFeed: [(An ((Even Better) Lisp) Interpreter (in Python))](<https://devfeed.tech/articles/an-even-better-lisp-interpreter-in-python-40573.md>)

Original publisher: [Read original article](<http://norvig.com/lispy2.html>)

Published: 2010-10-05T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Lisp](<https://devfeed.tech/topics/lisp.md>), [scheme](<https://devfeed.tech/topics/scheme.md>), [Python](<https://devfeed.tech/topics/python.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>)

Tags: [interpreter](<https://devfeed.tech/tags/interpreter.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

The excerpt presents an improved Python implementation of a Scheme-like Lisp interpreter. It adds stream-based input so expressions can span lines and a REPL that recovers from errors. Parsing now checks special forms, expands macros and quasiquote, and supports shorthand procedure definitions, optional `if` alternatives, and variadic lambda arguments. Its evaluator uses a loop for tail-position evaluation, allowing arbitrarily deep tail recursion without exhausting the Python call stack, though procedures may need restructuring into tail-recursive form. The excerpt also implements `call/cc` as a non-local escape, while explicitly noting it lacks Scheme's ability to save and invoke continuations repeatedly. Included examples and test output report 0 failures out of 81 tests for `lispy.py`.

### Source excerpt

A new version of Lispy (Lisp interpreter in Python). I released an earlier version on Sept. 30th, but this version is improved.

## (How to Write a (Lisp) Interpreter (in Python))

DevFeed: [(How to Write a (Lisp) Interpreter (in Python))](<https://devfeed.tech/articles/how-to-write-a-lisp-interpreter-in-python-40572.md>)

Original publisher: [Read original article](<http://norvig.com/lispy.html>)

Published: 2010-09-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [scheme](<https://devfeed.tech/topics/scheme.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Python](<https://devfeed.tech/topics/python.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [how-to](<https://devfeed.tech/tags/how-to.md>), [interpreter](<https://devfeed.tech/tags/interpreter.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

The excerpt shows how to build a small Scheme interpreter in Python, starting with tokenization and parsing expressions into nested lists, then evaluating numbers, variables, conditionals, definitions, and procedure calls against an environment of built-in operations. It extends the evaluator with `quote`, `set!`, and `lambda`; user procedures capture their defining environment, while nested environments resolve names outward according to lexical scoping. Examples demonstrate recursion, list operations, and higher-order procedures. The supplied text calls the implementation 90 lines in its summary, but its final line-count example reports 117 non-comment lines; the excerpt does not reconcile those figures. It also notes that the implementation omits minor Scheme details.

### Source excerpt

A Lisp interpreter in 90 lines of Python

## Simulating Primary Elections with Uniform and Normal Voter Distributions

DevFeed: [Simulating Primary Elections with Uniform and Normal Voter Distributions](<https://devfeed.tech/articles/lieberman-egg-sausage-and-lieberman-40546.md>)

Original publisher: [Read original article](<http://norvig.com/chart538.html>)

Published: 2009-02-22T00:00:00Z

Content type: opinion

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Simulation](<https://devfeed.tech/topics/simulation.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [simulation](<https://devfeed.tech/tags/simulation.md>)

### AI overview

The article revisits assumptions in Nate Silver's jungle primary simulation. It replicates the original results, then tests normal voter and candidate distributions with different standard deviations, finding that the resulting primary-election patterns change substantially.

### Source excerpt

A reply to Nate Silver's jungle primary post

## All we want are the facts, ma'am

DevFeed: [All we want are the facts, ma'am](<https://devfeed.tech/articles/all-we-want-are-the-facts-ma-am-40563.md>)

Original publisher: [Read original article](<http://norvig.com/fact-check.html>)

Published: 2009-02-22T00:00:00Z

Content type: opinion

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [data](<https://devfeed.tech/topics/data.md>), [model architecture](<https://devfeed.tech/topics/model-architecture.md>)

Tags: [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [biology](<https://devfeed.tech/tags/biology.md>), [complex](<https://devfeed.tech/tags/complex.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [data](<https://devfeed.tech/tags/data.md>), [dna](<https://devfeed.tech/tags/dna.md>), [edit-distance](<https://devfeed.tech/tags/edit-distance.md>), [eureka](<https://devfeed.tech/tags/eureka.md>), [game](<https://devfeed.tech/tags/game.md>), [theory](<https://devfeed.tech/tags/theory.md>), [wired](<https://devfeed.tech/tags/wired.md>)

### AI overview

The author argues that data-rich science still depends on models and theory, while criticizing Wired for misquoting him to support a provocative framing of Chris Anderson's "The End of Theory." More data and processing can support complex, non-parametric models--such as nearest-neighbor or kernel methods in messy domains--where simple equations or parametric models may not fit. The author's spell-correction example also relies on assumptions about word sequences, language stability, and likely spelling errors. These models can be hard to interpret, but the author sees data as helping estimate them, not replacing scientific method. He praises The New Yorker's fact-checking and urges publications to maintain accuracy.

### Source excerpt

On the lost art of fact-checking, and Chris Anderson's Wired Magazine article on The End of Theory

## An Exercise in Species Barcoding

DevFeed: [An Exercise in Species Barcoding](<https://devfeed.tech/articles/an-exercise-in-species-barcoding-40568.md>)

Original publisher: [Read original article](<http://norvig.com/ibol.html>)

Published: 2009-02-11T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [clustering](<https://devfeed.tech/topics/clustering.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [australia](<https://devfeed.tech/tags/australia.md>), [butterflies](<https://devfeed.tech/tags/butterflies.md>), [clustering](<https://devfeed.tech/tags/clustering.md>), [clusters](<https://devfeed.tech/tags/clusters.md>), [collectors](<https://devfeed.tech/tags/collectors.md>), [data](<https://devfeed.tech/tags/data.md>), [diameter](<https://devfeed.tech/tags/diameter.md>), [dna](<https://devfeed.tech/tags/dna.md>), [dynamic-programming](<https://devfeed.tech/tags/dynamic-programming.md>), [edit-distance](<https://devfeed.tech/tags/edit-distance.md>)

### AI overview

The 1,248 Australian Lepidoptera barcodes (659 bases each; 801 distinct sequences) suggest genetic clusters but do not establish crisp species boundaries. To handle possible truncation, the author compared sequences with a Levenshtein distance that treats "N" and "-" as free matches and stops once distance reaches 4%; this reduced computation from an estimated week with a naive implementation. About 84% of barcodes had a nearest neighbor within four edits. Across tested clustering thresholds, results ranged from 375 to 390 clusters, with few clusters combining multiple collector labels; randomizing processing order had little effect. Some clusters were close to others under particular parameter settings, and many broad or coarse collector labels contained genetically diverse sequences. The author concludes that barcode distances can help explore groupings, while the observed variation and examples such as ring species underscore that species boundaries may not be sharp.

### Source excerpt

Just in time for Darwin's birthday: an exercise in analyzing the differences in genomes to detect the boundaries between species

## How to Write a Spelling Corrector (in Python)

DevFeed: [How to Write a Spelling Corrector (in Python)](<https://devfeed.tech/articles/how-to-write-a-spelling-corrector-in-python-40587.md>)

Original publisher: [Read original article](<http://norvig.com/spell-correct.html>)

Published: 2007-04-10T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

The Python corrector builds a word-frequency model from a text corpus, generates candidates at edit distances one and two, then selects the candidate with the highest corpus probability. It achieves 75% accuracy on a 270-item development set at 41 words per second and 68% on a 400-item final set at 35 words per second, below the stated 80-90% accuracy goal. Its simple edit model can favor a less suitable candidate, and words missing from the dictionary cannot be chosen. The excerpt suggests improving it with a larger corpus, morphology or character-sequence models, learned error probabilities, and surrounding-word context; it argues context is needed for high accuracy when several candidates are plausible. Training data that mixes American and British spellings can also produce dialect mismatches.

### Source excerpt

Theory and practice of spelling correction algorithms

## Alexa Toolbar and the Problem of Experiment Design

DevFeed: [Alexa Toolbar and the Problem of Experiment Design](<https://devfeed.tech/articles/alexa-toolbar-and-the-problem-of-experiment-design-40574.md>)

Original publisher: [Read original article](<http://norvig.com/logs-alexa.html>)

Published: 2007-01-08T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [experiments](<https://devfeed.tech/topics/experiments.md>)

Tags: [alexa](<https://devfeed.tech/tags/alexa.md>), [bias](<https://devfeed.tech/tags/bias.md>), [random](<https://devfeed.tech/tags/random.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [toolbar](<https://devfeed.tech/tags/toolbar.md>), [trust](<https://devfeed.tech/tags/trust.md>)

### AI overview

The author argues that Alexa Toolbar traffic rankings can be skewed because they sample people who chose to install the toolbar, including a disproportionate number of SEO enthusiasts. In an explicitly unscientific comparison of shared site logs with Alexa estimates, the author reports roughly twice as many actual pageviews for their site as for mattcutts.com, but an Alexa pageview ranking about 25 times higher for Matt's site. The author estimates that this example reflects a 50-to-1 difference in relative audience likelihood within the toolbar sample, while warning that log definitions differ and the figures may have errors of ±30% to ±50%. A later comparison of two traffic spikes also showed Alexa's estimate diverging sharply from the author's logs. The piece does not claim to measure Alexa's overall accuracy; it uses the examples to stress that statistics depend on how the sample is selected.

### Source excerpt

Can you trust statistics about internet usage?

## Solving Every Sudoku Puzzle

DevFeed: [Solving Every Sudoku Puzzle](<https://devfeed.tech/articles/solving-every-sudoku-puzzle-40588.md>)

Original publisher: [Read original article](<http://norvig.com/sudoku.html>)

Published: 2006-05-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [competitive-programming](<https://devfeed.tech/topics/competitive-programming.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [depth-first-search](<https://devfeed.tech/tags/depth-first-search.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [puzzle](<https://devfeed.tech/tags/puzzle.md>), [python](<https://devfeed.tech/tags/python.md>), [solve](<https://devfeed.tech/tags/solve.md>)

### AI overview

The solver models each Sudoku square by its remaining possible digits and uses constraint propagation to eliminate impossible choices. When propagation stalls, it applies recursive depth-first search, choosing the square with the fewest possibilities and trying its digits in numeric order. The article reports solving its tested easy, hard, and hardest puzzle sets quickly, while random puzzles reveal highly variable runtimes: a few take far longer, and some generated puzzles have multiple solutions or none. The author notes that search ordering affects runtime and that further experiments would be needed to characterize difficult puzzles.

### Source excerpt

Python code and an explanation of how to solve any Sudoku puzzle.

## Design Patterns in Dynamic Languages

DevFeed: [Design Patterns in Dynamic Languages](<https://devfeed.tech/articles/design-patterns-in-dynamic-languages-40549.md>)

Original publisher: [Read original article](<http://norvig.com/design-patterns>)

Published: 2005-08-08T00:00:00Z

Content type: article

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Lisp](<https://devfeed.tech/topics/lisp.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [languages](<https://devfeed.tech/tags/languages.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

An article about how design patterns are implemented in dynamic languages, including Lisp, Dylan, and Python.

### Source excerpt

How design patterns are implemented in dynamic languages such as Lisp, Dylan, or Python. Recently mentioned on Slashdot.

[Next page](<https://devfeed.tech/sources/peter-norvig.md?cursor=WyIyMDA1LTA4LTA4VDAwOjAwOjAwKzAwOjAwIiwgImY4MzAwNDk3LTcxZWYtNDRmZi05MDcyLTAxZDVmMWUyOGZmZiJd>)