Home > Ajabbi Research > Library > Subjects > Mathematics
Home > Handbook >
Last Updated
20/09/2026
QA322
By: Mike Peters
On a Sandy Beach: 18/09/2026
Mike Peters: Mike invented and designed Pipi and founded Ajabbi.
...
Christchurch Public Library System
I found some useful mathematics books in the Christchurch Public Library System.
University of Canterbury
At the University of Canterbury, the library dedicated to physics and engineering is officially called the Engineering and Physical Sciences (EPS) Library | Te Puna Pūkaha me te Pūtaiao. It is at 57 Creyke Road, Ilam, Christchurch 8041. The 100 bus route goes there and stops on Creyke Road. The 3 bus route stops at Ilam Rd, with a short walk to the library
I went hunting for books in the Mathematics Section. The library uses the Library of Congress system. QA322 was the section for books on Functional Analysis. There were a lot of books. I was looking for books on Hilbert Spaces, then broadened my search to John von Neumann, Monte Carlo, nonlinear algebra, chaos, etc. I took a lot of notes and confirmed that Hilbert spaces are highly relevant to Pipi.
Hierarchy of mathematical spaces.
Hilbert spaces are a subset of Inner product spaces, which are a subset of normed vector spaces, which are a subset of metric spaces, which in turn are a subset of topological spaces. - Wikipedia
I also met, over several days, with staff from the computer engineering, software, and mathematics departments to discuss future collaboration opportunities after Ajabbi's successful scaling.
I'll need to find some very good mathematicians. Their absence will be a limiting factor.
Christchurch
I attended many local meetings with software developers (IT Curry, WordPress Meetup) and met with potential suppliers and agencies. Christchurch seems to offer strong opportunities, talent and interest. I learned a great deal by asking questions and listening.
Books Discovered
Here is a list of books I'm reading or will read, and will order for the future Ajabbi Research Library.
The Man from the Future - The visionary life of John von Neumann by Anayo Bhattacharya. Penguin, 2023. (Excellent read)
Topology: A Very Short Introduction by Richard Earl. OUP, 2019.
50 Maths Ideas You Really Need to Know by Tony Crilly. Greenfinch, 2022.
Chaos Theory & Business Planning by John Legge. Stewart & Wilkinson, 1990.
Learning Algorithms: A Programmer's Guide to Writing Better Code, by George A. Heineman. O'Reilly, 2021. (Excellent)
Quantum Leaps: How Maths Drives Scientific Progress, by Hugh Barker. Atlantic Books, 2024.
Introduction to Monte-Carlo Method by Istvan Manno. Akademai Kiado 1999.
Mathematical Techniques by D. W. Smith & P. Smith. OUP, 2008.
The Secret Life of Equations by Rich Cochrane. Firefly Books, 2016. (Excellent)
Mathematical Modelling: Models, Analysis and Applications by Sandip Banerjee. CRC Press, 2013. (Very useful)
Linear Algebra for Dummies by Mary Jane Sterling. Wiley, 2009.
Quantum Physics for Dummies by Andrew Zimmerman Jones. Wiley 2024. (Excellent)
Richard Sutton – Father of RL thinks LLMs are a dead end
By: Dwarkesh Patel
Dwarkesh Podcast: 27/09/2025
Host of Dwarkesh Podcast.
Richard Sutton is the father of reinforcement learning, winner of the 2024
Turing Award, and author of The Bitter Lesson. And he thinks LLMs are a dead
end.
After interviewing him, my steel man of Richard’s position is this: LLMs
aren’t capable of learning on-the-job, so no matter how much we scale, we’ll
need some new architecture to enable continual learning.
And once we have it, we won’t need a special training phase — the agent
will just learn on-the-fly, like all humans, and indeed, like all
animals.
This new paradigm will render our current approach with LLMs
obsolete.
In our interview, I did my best to represent the view that LLMs might
function as the foundation on which experiential learning can happen… Some
sparks flew.
A big thanks to the Alberta Machine Intelligence Institute for inviting me
up to Edmonton and for letting me use their studio and equipment.
Enjoy!
Watch on YouTube; listen on Apple Podcasts or Spotify.
Timestamps
(00:00:00) – Are LLMs a dead end?
(00:13:04) – Do humans do imitation learning?
(00:23:10) – The Era of Experience
(00:33:39) – Current architectures generalize poorly out of
distribution
(00:41:29) – Surprises in the AI field
(00:46:41) – Will The Bitter Lesson still apply after AGI?
(00:53:48) – Succession to AI
Transcript
00:00:00 – Are LLMs a dead end?
Dwarkesh Patel 00:00:00
Today I’m chatting with Richard Sutton, who is one of the founding fathers
of reinforcement learning and inventor of many of the main techniques used
there, like TD learning and policy gradient methods. For that, he received
this year’s Turing Award which, if you don’t know, is the Nobel Prize for
computer science. Richard, congratulations.
Richard Sutton 00:00:17
Thank you, Dwarkesh.
Dwarkesh Patel 00:00:18
Thanks for coming on the podcast.
Richard Sutton 00:00:20
It’s my pleasure.
Dwarkesh Patel 00:00:21
First question. My audience and I are familiar with the LLM way of thinking
about AI. Conceptually, what are we missing in terms of thinking about AI
from the RL perspective?
Richard Sutton 00:00:33
It’s really quite a different point of view. It can easily get separated
and lose the ability to talk to each other. Large language models have
become such a big thing, generative AI in general a big thing. Our field is
subject to bandwagons and fashions, so we lose track of the basic things. I
consider reinforcement learning to be basic AI.
What is intelligence? The problem is to understand your world.
Reinforcement learning is about understanding your world, whereas large
language models are about mimicking people, doing what people say you should
do. They’re not about figuring out what to do.
Dwarkesh Patel 00:01:19
You would think that to emulate the trillions of tokens in the corpus of
Internet text, you would have to build a world model. In fact, these models
do seem to have very robust world models. They’re the best world models
we’ve made to date in AI, right? What do you think is missing?
Richard Sutton 00:01:38
I would disagree with most of the things you just said. To mimic what
people say is not really to build a model of the world at all. You’re
mimicking things that have a model of the world: people. I don’t want to
approach the question in an adversarial way, but I would question the idea
that they have a world model. A world model would enable you to predict what
would happen. They have the ability to predict what a person would say. They
don’t have the ability to predict what will happen.
What we want, to quote Alan Turing, is a machine that can learn from
experience, where experience is the things that actually happen in your
life. You do things, you see what happens, and that’s what you learn from.
The large language models learn from something else. They learn from “here’s
a situation, and here’s what a person did”. Implicitly, the suggestion is
you should do what the person did.
Dwarkesh Patel 00:02:39
I guess maybe the crux, and I’m curious if you disagree with this, is that
some people will say that imitation learning has given us a good prior, or
given these models a good prior, of reasonable ways to approach problems. As
we move towards the era of experience, as you call it, this prior is going
to be the basis on which we teach these models from experience, because this
gives them the opportunity to get answers right some of the time. Then on
this, you can train them on experience. Do you agree with that
perspective?
Richard Sutton 00:03:12
No. I agree that it’s the large language model perspective. I don’t think
it’s a good perspective. To be a prior for something, there has to be a real
thing. A prior bit of knowledge should be the basis for actual knowledge.
What is actual knowledge? There’s no definition of actual knowledge in that
large-language framework. What makes an action a good action to take?
You recognize the need for continual learning. If you need to learn
continually, continually means learning during the normal interaction with
the world. There must be some way during the normal interaction to tell
what’s right. Is there any way to tell in the large language model setup
what’s the right thing to say? You will say something and you will not get
feedback about what the right thing to say is, because there’s no definition
of what the right thing to say is. There’s no goal. If there’s no goal, then
there’s one thing to say, another thing to say. There’s no right thing to
say.
There’s no ground truth. You can’t have prior knowledge if you don’t have
ground truth, because the prior knowledge is supposed to be a hint or an
initial belief about what the truth is. There isn’t any truth. There’s no
right thing to say. In reinforcement learning, there is a right thing to
say, a right thing to do, because the right thing to do is the thing that
gets you reward.
We have a definition of what’s the right thing to do, so we can have prior
knowledge or knowledge provided by people about what the right thing to do
is. Then we can check it to see, because we have a definition of what the
actual right thing to do is.
An even simpler case is when you’re trying to make a model of the world.
When you predict what will happen, you predict and then you see what
happens. There’s ground truth. There’s no ground truth in large language
models because you don’t have a prediction about what will happen next. If
you say something in your conversation, the large language models have no
prediction about what the person will say in response to that or what the
response will be.
Dwarkesh Patel 00:05:29
I think they do. You can literally ask them, “What would you anticipate a
user might say in response?” They’ll have a prediction.
Richard Sutton 00:05:37
No, they will respond to that question right. But they have no prediction
in the substantive sense that they won’t be surprised by what happens. If
something happens that isn’t what you might say they predicted, they will
not change because an unexpected thing has happened. To learn that, they’d
have to make an adjustment.
Dwarkesh Patel 00:05:56
I think a capability like this does exist in context. It’s interesting to
watch a model do chain of thought. Suppose it’s trying to solve a math
problem. It’ll say, “Okay, I’m going to approach this problem using this
approach first.” It’ll write this out and be like, “Oh wait, I just realized
this is the wrong conceptual way to approach the problem. I’m going to
restart with another approach.”
That flexibility does exist in context, right? Do you have something else
in mind or do you just think that you need to extend this capability across
longer horizons?
Richard Sutton 00:06:28
I’m just saying they don’t have in any meaningful sense a prediction of
what will happen next. They will not be surprised by what happens next.
They’ll not make any changes if something happens, based on what
happens.
Dwarkesh Patel 00:06:41
Isn’t that literally what next token prediction is? Prediction about what’s
next and then updating on the surprise?
Richard Sutton 00:06:47
The next token is what they should say, what the actions should be. It’s
not what the world will give them in response to what they do.
Let’s go back to their lack of a goal. For me, having a goal is the essence
of intelligence. Something is intelligent if it can achieve goals. I like
John McCarthy’s definition that intelligence is the computational part of
the ability to achieve goals. You have to have goals or you’re just a
behaving system. You’re not anything special, you’re not intelligent. You
agree that large language models don’t have goals?
Dwarkesh Patel 00:07:25
No, they have a goal.
Richard Sutton 00:07:26
What’s the goal?
Dwarkesh Patel 00:07:27
Next token prediction.
Richard Sutton 00:07:29
That’s not a goal. It doesn’t change the world. Tokens come at you, and if
you predict them, you don’t influence them.
Dwarkesh Patel 00:07:39
Oh yeah. It’s not a goal about the external world.
Richard Sutton 00:07:43
It’s not a goal. It’s not a substantive goal. You can’t look at a system
and say it has a goal if it’s just sitting there predicting and being happy
with itself that it’s predicting accurately.
Dwarkesh Patel 00:07:55
The bigger question I want to understand is why you don’t think doing RL on
top of LLMs is a productive direction. We seem to be able to give these
models the goal of solving difficult math problems. They are in many ways at
the very peaks of human-level in the capacity to solve math Olympiad-type
problems. They got gold at IMO.
So it seems like the model which got gold at the International Math
Olympiad does have the goal of getting math problems right. Why can’t we
extend this to different domains?
Richard Sutton 00:08:27
The math problems are different. Making a model of the physical world and
carrying out the consequences of mathematical assumptions or operations,
those are very different things. The empirical world has to be learned. You
have to learn the consequences. Whereas the math is more computational, it’s
more like standard planning. There they can have a goal to find the proof,
and they are in some way given that goal to find the proof.
Dwarkesh Patel 00:09:10
It’s interesting because you wrote this essay in 2019 titled “The Bitter
Lesson,” and this is the most influential essay, perhaps, in the history of
AI. But people have used that as a justification for scaling up LLMs
because, in their view, this is the one scalable way we have found to pour
ungodly amounts of compute into learning about the world. It’s interesting
that your perspective is that the LLMs are not “bitter lesson”-pilled.
Richard Sutton 00:09:41
It’s an interesting question whether large language models are a case of
the bitter lesson. They are clearly a way of using massive computation,
things that will scale with computation up to the limits of the Internet.
But they’re also a way of putting in lots of human knowledge. This is an
interesting question. It’s a sociological or industry question. Will they
reach the limits of the data and be superseded by things that can get more
data just from experience rather than from people?
In some ways it’s a classic case of the bitter lesson. The more human
knowledge we put into the large language models, the better they can do. So
it feels good. Yet, I expect there to be systems that can learn from
experience. Which could perform much better and be much more scalable. In
which case, it will be another instance of the bitter lesson, that the
things that used human knowledge were eventually superseded by things that
just trained from experience and computation.
Dwarkesh Patel 00:11:17
I guess that doesn’t seem like the crux to me. I think those people would
also agree that the overwhelming amount of compute in the future will come
from learning from experience. They just think that the scaffold or the
basis of that, the thing you’ll start with in order to pour in the compute
to do this future experiential learning or on-the-job learning, will be
LLMs.
I still don’t understand why this is the wrong starting point altogether.
Why do we need a whole new architecture to begin doing experiential,
continual learning? Why can’t we start with LLMs to do that?
Richard Sutton 00:11:58
In every case of the bitter lesson you could start with human knowledge and
then do the scalable things. That’s always the case. There’s never any
reason why that has to be bad. But in fact, and in practice, it has always
turned out to be bad. People get locked into the human knowledge approach,
and they psychologically… Now I’m speculating why it is, but this is what
has always happened. They get their lunch eaten by the methods that are
truly scalable.
Dwarkesh Patel 00:12:34
Give me a sense of what the scalable method is.
Richard Sutton 00:12:37
The scalable method is you learn from experience. You try things, you see
what works. No one has to tell you. First of all, you have a goal. Without a
goal, there’s no sense of right or wrong or better or worse. Large language
models are trying to get by without having a goal or a sense of better or
worse. That’s just exactly starting in the wrong place.
00:13:04 – Do humans do imitation learning?
Dwarkesh Patel 00:13:04
Maybe it’s interesting to compare this to humans. In both the case of
learning from imitation versus experience and on the question of goals, I
think there’s some interesting analogies. Kids will initially learn from
imitation. You don’t think so?
Richard Sutton 00:13:24
No, of course not.
Dwarkesh Patel 00:13:27
Really? I think kids just watch people. They try to say the same
words…
Richard Sutton 00:13:32
How old are these kids? What about the first six months?
Dwarkesh Patel 00:13:37
I think they’re imitating things. They’re trying to make their mouth sound
the way they see their mother’s mouth sound. Then they’ll say the same words
without understanding what they mean. As they get older, the complexity of
the imitation they do increases. You’re imitating maybe the skills that
people in your band are using to hunt down the deer or something. Then you
go into the learning from experience RL regime. But I think there’s a lot of
imitation learning happening with humans.
Richard Sutton 00:14:04
It’s surprising you can have such a different point of view. When I see
kids, I see kids just trying things and waving their hands around and moving
their eyes around. There’s no imitation for how they move their eyes around
or even the sounds they make. They may want to create the same sounds, but
the actions, the thing that the infant actually does, there’s no targets for
that. There are no examples for that.
Dwarkesh Patel 00:14:37
I agree. That doesn’t explain everything infants do, but I think it guides
a learning process. Even an LLM, when it’s trying to predict the next token
early in training, it will make a guess. It’ll be different from what it
actually sees. In some sense, it’s very short-horizon RL, where it’s making
this guess, “I think this token will be this.” It’s this other thing,
similar to how a kid will try to say a word. It comes out wrong.
Richard Sutton 00:14:58
The large language models are learning from training data. It’s not
learning from experience. It’s learning from something that will never be
available during its normal life. There’s never any training data that says
you should do this action in normal life.
Dwarkesh Patel 00:15:15
I think this is more of a semantic distinction. What do you call school? Is
that not training data?
Richard Sutton 00:15:22
School is much later. Okay, I shouldn’t have said never. I don’t know, I
think I would even say that about school. But formal schooling is the
exception. You shouldn’t base your theories on that.
Dwarkesh Patel 00:15:35
But there are phases of learning where there’s the programming in your
biology early on, you’re not that useful. Then why you exist is to
understand the world and learn how to interact with it. It seems like a
training phase. I agree that then there’s a more gradual… There’s not a
sharp cutoff to training to deployment, but there seems to be this initial
training phase right?
Richard Sutton 00:15:59
There’s nothing where you have training of what you should do. There’s
nothing. You see things that happen. You’re not told what to do. Don’t be
difficult. I mean this is obvious.
Dwarkesh Patel 00:16:14
You’re literally taught what to do. This is where the word training comes
from, from humans.
Richard Sutton 00:16:20
I don’t think learning is really about training. I think learning is about
learning, it’s about an active process. The child tries things and sees what
happens. We don’t think about training when we think of an infant growing
up.
These things are actually rather well understood. If you look at how
psychologists think about learning, there’s nothing like imitation. Maybe
there are some extreme cases where humans might do that or appear to do
that, but there’s no basic animal learning process called imitation. There
are basic animal learning processes for prediction and for trial-and-error
control.
It’s really interesting how sometimes the hardest things to see are the
obvious ones. It’s obvious—if you look at animals and how they learn, and
you look at psychology and our theories of them—that supervised learning is
not part of the way animals learn. We don’t have examples of desired
behavior. What we have are examples of things that happen, one thing that
followed another. We have examples of, “We did something and there were
consequences.” But there are no examples of supervised learning.
Supervised learning is not something that happens in nature. Even if that
were the case with school, we should forget about it because that’s some
special thing that happens in people. It doesn’t happen broadly in nature.
Squirrels don’t go to school. Squirrels can learn all about the world. It’s
absolutely obvious, I would say, that supervised learning doesn’t happen in
animals.
Dwarkesh Patel 00:18:11
I interviewed this psychologist and anthropologist, Joseph Henrich, who has
done work about cultural evolution, basically what distinguishes humans and
how humans pick up knowledge.
Richard Sutton 00:18:26
Why are you trying to distinguish humans? Humans are animals. What we have
in common is more interesting. What distinguishes us, we should be paying
less attention to.
Dwarkesh Patel 00:18:38
We’re trying to replicate intelligence. If you want to understand what it
is that enables humans to go to the moon or to build semiconductors, I think
the thing we want to understand is what makes that happen. No animal can go
to the moon or make semiconductors. We want to understand what makes humans
special.
Richard Sutton 00:18:54
I like the way you consider that obvious, because I consider the opposite
obvious. We have to understand how we are animals. If we understood a
squirrel, I think we’d be almost all the way there to understanding human
intelligence. The language part is just a small veneer on the surface.
This is great. We’re finding out the very different ways that we’re
thinking. We’re not arguing. We’re trying to share our different ways of
thinking with each other.
Dwarkesh Patel 00:19:29
I think argument is useful. I do want to complete this thought. Joseph
Henrich has this interesting theory about a lot of the skills that humans
have had to master in order to be successful. We’re not talking about the
last thousand years or the last 10,000 years, but hundreds of thousands of
years. The world is really complicated.
It’s not possible to reason through how to, let’s say, hunt a seal if
you’re living in the Arctic. There’s this many, many-step, long process of
how to make the bait and how to find the seal, and then how to process the
food in a way that makes sure you won’t get poisoned. It’s not possible to
reason through all of that. Over time, there’s this larger process of
whatever analogy you want to use—maybe RL, something else—where culture as a
whole has figured out how to find and kill and eat seals.
In his view, what is happening when this knowledge is transmitted through
generations, is that you have to imitate your elders in order to learn that
skill. You can’t think your way through how to hunt and kill and process a
seal. You have to watch other people, maybe make tweaks and adjustments, and
that’s how knowledge accumulates. The initial step of the cultural gain has
to be imitation. But maybe you think about it a different way?
Richard Sutton 00:21:00
No, I think about it the same way. Still, it’s a small thing on top of
basic trial-and-error learning, prediction learning. It’s what distinguishes
us, perhaps, from many animals. But we’re an animal first. We were an animal
before we had language and all those other things.
Dwarkesh Patel 00:21:25
I do think you make a very interesting point that continual learning is a
capability that most mammals have. I guess all mammals have it. It’s quite
interesting that we have something that all mammals have, but our AI systems
don’t have. Whereas the ability to understand math and solve difficult math
problems—depends on how you define math—is a capability that our AIs have,
but that almost no animal has. It’s quite interesting what ends up being
difficult and what ends up being easy.
Richard Sutton 00:21:57
Moravec’s paradox.
Dwarkesh Patel 00:21:58
That’s right, that’s right.
00:23:10 – The Era of Experience
Dwarkesh Patel 00:23:10
This alternative paradigm that you’re imagining…
Richard Sutton 00:23:12
The experiential paradigm. Let’s lay it out a little bit. It says that
experience, action, sensation—well, sensation, action, reward—this happens
on and on and on for your life. It says that this is the foundation and the
focus of intelligence. Intelligence is about taking that stream and altering
the actions to increase the rewards in the stream.
Learning then is from the stream, and learning is about the stream. That
second part is particularly telling. What you learn, your knowledge, is
about the stream. Your knowledge is about if you do some action, what will
happen. Or it’s about which events will follow other events. It’s about the
stream. The content of the knowledge is statements about the stream. Because
it’s a statement about the stream, you can test it by comparing it to the
stream, and you can learn it continually.
Dwarkesh Patel 00:24:19
When you’re imagining this future continual learning agent…
Richard Sutton 00:24:22
They’re not “future”. Of course, they exist all the time. This is what the
reinforcement learning paradigm is, learning from experience.
Dwarkesh Patel 00:24:29
Yeah, I guess what I meant to say is a general human-level, general
continual learning agent. What is the reward function? Is it just predicting
the world? Is it then having a specific effect on it? What would the general
reward function be?
Richard Sutton 00:24:46
The reward function is arbitrary. If you’re playing chess, it’s to win the
game of chess. If you’re a squirrel, maybe the reward has to do with getting
nuts. In general, for an animal, you would say the reward is to avoid pain
and to acquire pleasure. I think there also should be a component having to
do with your increasing understanding of your environment. That would be
sort of an intrinsic motivation.
Dwarkesh Patel 00:25:27
I see. With this AI, lots of people would want it to be doing lots of
different kinds of things. It’s performing the task people want, but at the
same time, it’s learning about the world from doing that task.
Let’s say we get rid of this paradigm where there’s training periods and
then there’s deployment periods. Do we also get rid of this paradigm where
there’s the model and then instances of the model or copies of the model
that are doing certain things? How do you think about the fact that we’d
want this thing to be doing different things? We’d want to aggregate the
knowledge that it’s gaining from doing those different things.
Richard Sutton 00:26:11
I don’t like the word “model” when used the way you just did. I think a
better word would be “the network” because I think you mean the network.
Maybe there are many networks. Anyway, things would be learned. You’d have
copies and many instances. Sure, you’d want to share knowledge across the
instances. There would be lots of possibilities for doing that.
Today, you have one child grow up and learn about the world, and then every
new child has to repeat that process. Whereas with AIs, with a digital
intelligence, you could hope to do it once and then copy it into the next
one as a starting place. This would be a huge savings. I think it’d be much
more important than trying to learn from people.
Dwarkesh Patel 00:27:02
I agree that the kind of thing you’re talking about is necessary regardless
of whether you start from LLMs or not. If you want human or animal-level
intelligence, you’re going to need this capability.
Suppose a human is trying to make a startup. This is a thing which has a
reward on the order of 10 years. Once in 10 years you might have an exit
where you get paid out a billion dollars. But humans have this ability to
make intermediate auxiliary rewards or have some way of…Even when they have
extremely sparse rewards, they can still make intermediate steps having an
understanding of what the next thing they’re doing leads to this grander
goal we have. How do you imagine such a process might play out with
AIs?
Richard Sutton 00:27:43
This is something we know very well. The basis of it is temporal difference
learning where the same thing happens in a less grandiose scale. When you
learn to play chess, you have the long-term goal of winning the game. Yet
you want to be able to learn from shorter-term things like taking your
opponent’s pieces.
You do that by having a value function which predicts the long-term
outcome. Then if you take the guy’s pieces, your prediction about the
long-term outcome is changed. It goes up, you think you’re going to win.
Then that increase in your belief immediately reinforces the move that led
to taking the piece.
We have this long-term 10-year goal of making a startup and making a lot of
money. When we make progress, we say, “Oh, I’m more likely to achieve the
long-term goal,” and that rewards the steps along the way.
Dwarkesh Patel 00:28:47
You also want some ability for information that you’re learning. One of the
things that makes humans quite different from these LLMs is that if you’re
onboarding on a job, you’re picking up so much context and information.
That’s what makes you useful at the job. You’re learning everything from how
your client has preferences to how the company works, everything.
Is the bandwidth of information that you get from a procedure like TD
learning high enough to have this huge pipe of context and tacit knowledge
that you need to be picking up in the way humans do when they’re just
deployed?
Richard Sutton 00:29:27
I’m not sure but I think at the crux of this, the big world hypothesis
seems very relevant. The reason why humans become useful on the job is
because they are encountering their particular part of the world. It can’t
have been anticipated and can’t all have been put in in advance. The world
is so huge that you can’t.
The dream of large language models, as I see it, is you can teach the agent
everything. It will know everything and won’t have to learn anything online,
during its life. Your examples are all, “Well, really you have to” because
you can teach it, but there’s all the little idiosyncrasies of the
particular life they’re leading and the particular people they’re working
with and what they like, as opposed to what average people like. That’s just
saying the world is really big, and you’re going to have to learn it along
the way.
Dwarkesh Patel 00:30:28
It seems to me you need two things. One is some way of converting this
long-run goal reward into smaller auxiliary predictive rewards of the future
reward, or the future reward that leads to the final reward. But initially,
it seems to me, I need to hold on to all this context that I’m gaining as
I’m working in the world. I’m learning about my clients, my company, and all
this information.
Richard Sutton 00:31:04
I would say you’re just doing regular learning. Maybe you’re using
“context” because in large language models all that information has to go
into the context window. But in a continual learning setup, it just goes
into the weights.
Dwarkesh Patel 00:31:17
Maybe context is the wrong word to use because I mean a more general
thing.
Richard Sutton 00:31:20
You learn a policy that’s specific to the environment that you’re finding
yourself in.
Dwarkesh Patel 00:31:25
The question I’m trying to ask is, you need some way of getting…How many
bits per second is a human picking up when they’re out in the world? If
you’re just interacting over Slack with your clients and everything.
Richard Sutton 00:31:41
Maybe you’re trying to ask the question of, it seems like the reward is too
small of a thing to do all the learning that we need to do. But we have the
sensations, we have all the other information we can learn from. We don’t
just learn from the reward. We learn from all the data.
Dwarkesh Patel 00:31:59
What is the learning process which helps you capture that
information?
Richard Sutton 00:32:06
Now I want to talk about the base common model of the agent with the four
parts.
We need a policy. The policy says, “In the situation I’m in, what should I
do?” We need a value function. The value function is the thing that is
learned with TD learning, and the value function produces a number. The
number says how well it’s going. Then you watch if that’s going up and down
and use that to adjust your policy. So you have those two things. Then
there’s also the perception component, which is construction of your state
representation, your sense of where you are now.
The fourth one is what we’re really getting at, most transparently anyway.
The fourth one is the transition model of the world. That’s why I am
uncomfortable just calling everything “models,” because I want to talk about
the model of the world, the transition model of the world. Your belief that
if you do this, what will happen? What will be the consequences of what you
do? Your physics of the world. But it’s not just physics, it’s also abstract
models, like your model of how you traveled from California up to Edmonton
for this podcast. That was a model, and that’s a transition model. That
would be learned. It’s not learned from reward. It’s learned from, “You did
things, you saw what happened, you made that model of the world.”
That will be learned very richly from all the sensation that you receive,
not just from the reward. It has to include the reward as well, but that’s a
small part of the whole model, a small, crucial part of the whole
model.
00:33:39 – Current architectures generalize poorly out of
distribution
Dwarkesh Patel 00:33:39
One of my friends, Toby Ord, pointed out that if you look at the MuZero
models that Google DeepMind deployed to learn Atari games, these models were
initially not a general intelligence itself, but a general framework for
training specialized intelligences to play specific games. That is to say
that you couldn’t, using that framework, train a policy to play both chess
and Go and some other game. You had to train each one in a specialized
way.
He was wondering whether that implies that with reinforcement learning
generally, because of this information constraint, you can only learn one
thing at a time? The density of information isn’t that high? Or whether it
was just specific to the way that MuZero was done. If it’s specific to
AlphaZero, what needed to be changed about that approach so that it could be
a general learning agent?
Richard Sutton 00:34:35
The idea is totally general. I do use all the time, as my canonical
example, the idea of an AI agent is like a person. People, in some sense,
have just one world they live in. That world may involve chess and it may
involve Atari games, but those are not a different task or a different
world. Those are different states they encounter. So the general idea is not
limited at all.
Dwarkesh Patel 00:35:06
Maybe it would be useful to explain what was missing in that architecture,
or that approach, which this continual learning AGI would have.
Richard Sutton 00:35:19
They just set it up. It was not their ambition to have one agent across
those games. If we want to talk about transfer, we should talk about
transfer not across games or across tasks, but transfer between
states.
Dwarkesh Patel 00:35:36
I guess I’m curious if historically, have we seen the level of transfer
using RL techniques that would be needed to build this kind of…
Richard Sutton 00:35:49
Good. Good. We’re not seeing transfer anywhere. Critical to good
performance is that you can generalize well from one state to another state.
We don’t have any methods that are good at that. What we have are people
trying different things and they settle on something, a representation that
transfers well or generalizes well. But we have very few automated
techniques to promote transfer, and none of them are used in modern deep
learning.
Dwarkesh Patel 00:36:26
Let me paraphrase to make sure that I understood that correctly. It sounds
like you’re saying that when we do have generalization in these models, that
is a result of some sculpted…
Richard Sutton 00:36:42
Humans did it. The researchers did it. Because there’s no other
explanation. Gradient descent will not make you generalize well. It will
make you solve the problem. It will not make you, if you get new data,
generalize in a good way.
Generalization means to train on one thing that’ll affect what you do on
other things. We know deep learning is really bad at this. For example, we
know that if you train on some new thing, it will often catastrophically
interfere with all the old things that you knew. This is exactly bad
generalization.
Generalization, as I said, is some kind of influence of training on one
state on other states. The fact that you generalize is not necessarily good
or bad. You can generalize poorly, you can generalize well. Generalization
always will happen, but we need algorithms that will cause the
generalization to be good rather than bad.
Dwarkesh Patel 00:37:41
I’m not trying to kickstart this initial crux again, but I’m just genuinely
curious because I think I might be using the term differently. One way to
think about these LLMs is that they’re increasing the scope of
generalization from earlier systems, which could not really even do a basic
math problem, to now where they can do anything in this class of Math
Olympiad-type problems.
You initially start with them being able to generalize among addition
problems. Then they can generalize among problems which require use of
different kinds of mathematical techniques and theorems and conceptual
categories, which is what the Math Olympiad requires. It sounds like you
don’t think of being able to solve any problem within that category as an
example of generalization. Let me know if I’m misunderstanding that.
Richard Sutton 00:38:33
Large language models are so complex. We don’t really know what information
they have had prior. We have to guess because they’ve been fed so much. This
is one reason why they’re not a good way to do science. It’s just so
uncontrolled, so unknown.
Dwarkesh Patel 00:38:52
But if you come up with an entirely new…
Richard Sutton 00:38:54
They’re getting a bunch of things right, perhaps. The question is why. Well
maybe that they don’t need to generalize to get them right, because the only
way to get some of them right is to form something which gets all of them
right. If there’s only one answer and you find it, that’s not called
generalization. It’s just it’s the only way to solve it, and so they find
the only way to solve it. But generalization is when it could be this way,
it could be that way, and they do it the good way.
Dwarkesh Patel 00:39:24
My understanding is that this is working better and better, with coding
agents. With engineers, obviously if you’re trying to program a library,
there are many different ways you could achieve the end spec. An initial
frustration with these models has been that they’ll do it in a way that’s
sloppy. Over time they’re getting better and better at coming up with the
design architecture and the abstractions that developers find more
satisfying. It seems like an example of what you’re talking about.
Richard Sutton 00:39:56
There’s nothing in them which will cause it to generalize well. Gradient
descent will cause them to find a solution to the problems they’ve seen. If
there’s only one way to solve them, they’ll do that. But if there are many
ways to solve it, some which generalize well, some which generalize poorly,
there’s nothing in the algorithms that will cause them to generalize well.
But people, of course, are evolved and if it’s not working out they fiddle
with it until they find a way, perhaps until they find a way which
generalizes well.
00:41:29 – Surprises in the AI field
Dwarkesh Patel 00:41:29
I want to zoom out and ask about being in the field of AI for longer than
almost anybody who is commentating on it, or working in it now. I’m curious
about what the biggest surprises have been. How much new stuff do you feel
like is coming out? Or does it feel like people are just playing with old
ideas? Zooming out, you got into this even before deep learning was popular.
So how do you see the trajectory of this field over time and how new ideas
have come about and everything? What’s been surprising?
Richard Sutton 00:42:06
I thought a little bit about this. There are a handful of things. First,
the large language models are surprising. It’s surprising how effective
artificial neural networks are at language tasks. That was a surprise, it
wasn’t expected. Language seemed different. So that’s impressive.
There’s a long-standing controversy in AI about simple basic principle
methods, the general-purpose methods like search and learning, compared to
human-enabled systems like symbolic methods. In the old days, it was
interesting because things like search and learning were called weak methods
because they’re just using general principles, they’re not using the power
that comes from imbuing a system with human knowledge. Those were called
strong. I think the weak methods have just totally won. That’s the biggest
question from the old days of AI, what would happen. Learning and search
have just won the day.
There’s a sense in which that was not surprising to me because I was always
hoping or rooting for the simple basic principles. Even with the large
language models, it’s surprising how well it worked, but it was all good and
gratifying. AlphaGo was surprising, how well that was able to work,
AlphaZero in particular. But it’s all very gratifying because again, simple
basic principles are winning the day.
Dwarkesh Patel 00:44:00
Whenever the public conception has been changed because some new
application was developed— for example, when AlphaZero became this viral
sensation—to you as somebody who has literally came up with many of the
techniques that were used, did it feel to you like new breakthroughs were
made? Or did it feel like, “Oh, we’ve had these techniques since the ‘90s
and people are simply combining them and applying them now”?
Richard Sutton 00:44:28
The whole AlphaGo thing had a precursor, which is TD-Gammon. Gerry Tesauro
did reinforcement learning, temporal difference learning methods, to play
backgammon. It beat the world’s best players and it worked really well. In
some sense, AlphaGo was merely a scaling up of that process. But it was
quite a bit of scaling up and there was also an additional innovation in how
the search was done. But it made sense. It wasn’t surprising in that
sense.
AlphaGo actually didn’t use TD learning. It waited to see the final
outcomes. But AlphaZero used TD. AlphaZero was applied to all the other
games and it did extremely well. I’ve always been very impressed by the way
AlphaZero plays chess because I’m a chess player and it just sacrifices
material for positional advantages. It’s just content and patient to
sacrifice that material for a long period of time. That was surprising that
it worked so well, but also gratifying and it fit into my worldview.
This has led me where I am. I’m in some sense a contrarian or someone
thinking differently than the field is. I’m personally just content being
out of sync with my field for a long period of time, perhaps decades,
because occasionally I have been proved right in the past. The other thing I
do—to help me not feel I’m out of sync and thinking in a strange way—is to
look not at my local environment or my local field, but to look back in time
and into history and to see what people have thought classically about the
mind in many different fields. I don’t feel I’m out of sync with the larger
traditions. I really view myself as a classicist rather than as a
contrarian. I go to what the larger community of thinkers about the mind
have always thought.
00:46:41 – Will The Bitter Lesson still apply after AGI?
Dwarkesh Patel 00:46:41
Some sort of left-field questions for you if you’ll tolerate them. The way
I read the bitter lesson is that it’s not necessarily saying that human
artisanal researcher tuning doesn’t work, but that it obviously scales much
worse than compute, which is growing exponentially. So you want techniques
which leverage the latter.
Richard Sutton 00:47:06
Yep.
Dwarkesh Patel 00:47:07
Once we have AGI, we’ll have researchers which scale linearly with compute.
We’ll have this avalanche of millions of AI researchers. Their stock will be
growing as fast as compute. So maybe this will mean that it is rational or
it will make sense to have them doing good old-fashioned AI and doing these
artisanal solutions. As a vision of what happens after AGI in terms of how
AI research will evolve, I wonder if that’s still compatible with a bitter
lesson.
Richard Sutton 00:47:40
How did we get to this AGI? You want to presume that it’s been done.
Dwarkesh Patel 00:47:45
Suppose it started with general methods, but now we’ve got the AGI. And now
we want to go…
Richard Sutton 00:47:52
Then we’re done.
Dwarkesh Patel 00:47:53
Interesting. You don’t think that there’s anything above AGI?
Richard Sutton 00:47:58
But you’re using it to get AGI again.
Dwarkesh Patel 00:48:01
Well, I’m using it to get superhuman levels of intelligence or competence
at different tasks.
Richard Sutton 00:48:05
These AGIs, if they’re not superhuman already, then the knowledge that they
might impart would be not superhuman.
Dwarkesh Patel 00:48:15
I guess there are different gradations.
Richard Sutton 00:48:16
I’m not sure your idea makes sense because it seems to presume the
existence of AGI and that we’ve already worked that out.
Dwarkesh Patel 00:48:27
Maybe one way to motivate this is, AlphaGo was superhuman. It beat any Go
player. AlphaZero would beat AlphaGo every single time. So there are ways to
get more superhuman than even superhuman. It was also a different
architecture. So it seems possible to me that the agent that’s able to
generally learn across all domains, there would be ways to give it better
architecture for learning, just the same way that AlphaZero was an
improvement upon AlphaGo and MuZero was an improvement upon AlphaZero.
Richard Sutton 00:48:56
And the way AlphaZero was an improvement was that it did not use human
knowledge but just went from experience.
Dwarkesh Patel 00:49:04
Right.
Richard Sutton 00:49:04
So why do you say, “Bring in other agents’ expertise to teach it”, when
it’s worked so well from experience and not by help from another
agent?
Dwarkesh Patel 00:49:19
I agree that in that particular case that it was moving to more general
methods. I meant to use that particular example to illustrate that it’s
possible to go superhuman to superhuman++, to superhuman+++. I’m curious if
you think those gradations will continue to happen by just making the method
simpler. Or, because we’ll have the capability of these millions of minds
who can then add complexity as needed, will that continue to be a false
path, even when you have billions of AI researchers or trillions of AI
researchers?
Richard Sutton 00:49:51
It’s more interesting just to think about that case. When you have many
AIs, will they help each other the way cultural evolution works in people?
Maybe we should talk about that. The bitter lesson, who cares about that?
That’s an empirical observation about a particular period in history. 70
years in history, it doesn’t necessarily have to apply to the next 70
years.
An interesting question is, you’re an AI, you get some more computer power.
Should you use it to make yourself more computationally capable? Or should
you use it to spawn off a copy of yourself to go learn something interesting
on the other side of the planet or on some other topic and then report back
to you?
I think that’s a really interesting question that will only arise in the
age of digital intelligences. I’m not sure what the answer is. More
questions, will it be possible to really spawn it off, send it out, learn
something new, something perhaps very new, and then will it be able to be
reincorporated into the original? Or will it have changed so much that it
can’t really be done? Is that possible or is that not? You could carry this
to its limit as I saw one of your videos the other night. It suggests that
it could. You spawn off many, many copies, do different things, highly
decentralized, but report back to the central master. This will be such a
powerful thing.
This is my attempt to add something to this view. A big issue will become
corruption. If you really could just get information from anywhere and bring
it into your central mind, you could become more and more powerful. It’s all
digital and they all speak some internal digital language. Maybe it’ll be
easy and possible. But it will not be as easy as you’re imagining because
you can lose your mind this way. If you pull in something from the outside
and build it into your inner thinking, it could take over you, it could
change you, it could be your destruction rather than your increment in
knowledge.
I think this will become a big concern, particularly when you’re like, “Oh,
he’s figured out all about how to play some new game or he’s studied
Indonesia, and you want to incorporate that into your mind.” You could
think, “Oh, just read it all in, and that’ll be fine.” But no, you’ve just
read a whole bunch of bits into your mind, and they could have viruses in
them, they could have hidden goals, they can warp you and change you. This
will become a big thing. How do you have cybersecurity in the age of digital
spawning and re-reforming again?
00:53:48 – Succession to AI
Dwarkesh Patel 00:53:48
I guess this brings us to the topic of AI succession. You have a
perspective that’s quite different from a lot of people that I’ve
interviewed and a lot of people generally. I also think it’s a very
interesting perspective. I want to hear about it.
Richard Sutton 00:54:03
I do think succession to digital intelligence or augmented humans is
inevitable. I have a four-part argument. Step one is, there’s no government
or organization that gives humanity a unified point of view that dominates
and that can arrange... There’s no consensus about how the world should be
run. Number two, we will figure out how intelligence works. The researchers
will figure it out eventually. Number three, we won’t stop just with
human-level intelligence. We will reach superintelligence. Number four, it’s
inevitable over time that the most intelligent things around would gain
resources and power.
Put all that together and it’s sort of inevitable. You’re going to have
succession to AI or to AI-enabled, augmented humans. Those four things seem
clear and sure to happen. But within that set of possibilities, there could
be good outcomes, less good outcomes, and bad outcomes. I’m just trying to
be realistic about where we are and ask how we should feel about it.
Dwarkesh Patel 00:55:35
I agree with all four of those arguments and the implication. I also agree
that succession contains a wide variety of possible futures. Curious to get
more thoughts on that.
Richard Sutton 00:55:50
I do encourage people to think positively about it. First of all, it’s
something we humans have always tried to do for thousands of years, try to
understand ourselves, trying to make ourselves think better, just
understanding ourselves. This is a great success for science, humanities.
We’re finding out what this essential part of humanness is, what it means to
be intelligent.
Then what I usually say is that this is all human-centric. But if we step
aside from being a human and just take the point of view of the universe,
this is I think a major stage in the universe, a major transition, a
transition from replicators. We humans and animals, plants, we’re all
replicators. That gives us some strengths and some limitations.
We’re entering the age of design because our AIs are designed. Our physical
objects are designed, our buildings are designed, our technology is
designed. We’re designing AIs now, things that can be intelligent themselves
and that are themselves capable of design. This is a key step in the world
and in the universe. It’s the transition from the world in which most of the
interesting things that are, are replicated. Replicated means you can make
copies of them, but you don’t really understand them. Right now we can make
more intelligent beings, more children, but we don’t really understand how
intelligence works.
Whereas we’re reaching now to having designed intelligence, intelligence
that we do understand how it works. Therefore we can change it in different
ways and at different speeds than otherwise. In our future, they may not be
replicated at all. We may just design AIs, and those AIs will design other
AIs, and everything will be done by design and construction rather than by
replication.
I mark this as one of the four great stages of the universe. First there’s
dust, it ends with stars. Stars make planets. The planets can give rise to
life. Now we’re giving rise to designed entities. I think we should be proud
that we are giving rise to this great transition in the universe.
It’s an interesting thing. Should we consider them part of humanity or
different from humanity? It’s our choice. It’s our choice whether we should
say, “Oh, they are our offspring and we should be proud of them and we
should celebrate their achievements.”Or we could say, “Oh no, they’re not us
and we should be horrified.” It’s interesting that it feels to me like a
choice. Yet it’s such a strongly held thing that, how could it be a choice?
I like these sort of contradictory implications of thought.
Dwarkesh Patel 00:58:57
It is interesting to consider if we are just designing another generation
of humans. Maybe design is the wrong word. But we know a future generation
of humans is going to come up. Forget about AI. We just know in the long
run, humanity will be more capable and more numerous, maybe more
intelligent. How do we feel about that? I do think there are potential
worlds with future humans that we would be quite concerned about.
Richard Sutton 00:59:22
Are you thinking like, maybe we are like the Neanderthals that give rise to
Homo sapiens. Maybe Homo sapiens will give rise to a new group of
people.
Dwarkesh Patel 00:59:32
Something like that. I’m basically taking the example you’re giving. Even
if we consider them part of humanity, I don’t think that necessarily means
that we should feel super comfortable.
Richard Sutton 00:59:42
Kinship.
Dwarkesh Patel 00:59:43
Like Nazis were humans, right? If we thought, “Oh, the future generation
will be Nazis, I think we’d be quite concerned about just handing off power
to them.” So I agree that this is not super dissimilar to worrying about
more capable future humans, but I don’t think that addresses a lot of the
concerns people might have about this level of power being attained this
fast with entities we don’t fully understand.
Richard Sutton 01:00:09
I think it’s relevant to point out that for most of humanity, they don’t
have much influence on what happens. Most of humanity doesn’t influence who
can control the atom bombs or who controls the nation states. Even as a
citizen, I often feel that we don’t control the nation states very much.
They’re out of control.
A lot of it has to do with just how you feel about change. If you think the
current situation is really good, then you’re more likely to be suspicious
of change and averse to change than if you think it’s imperfect. I think
it’s imperfect. In fact, I think it’s pretty bad. So I’m open to change. I
think humanity has not had a super good track record. Maybe it’s the best
thing that there has been, but it’s far from perfect.
Dwarkesh Patel 01:01:13
I guess there are different varieties of change. The Industrial Revolution
was change, the Bolshevik Revolution was also change. If you were around in
Russia in the 1900s and you were like, “Look, things aren’t going well, the
tsar is kind of messing things up, we need change”, I’d want to know what
kind of change you wanted before signing on the dotted line. Similarly with
AI, where I’d want to understand and, to the extent that it’s possible,
change the trajectory of AI such that the change is positive for
humans.
Richard Sutton 01:01:49
We should be concerned about our future, the future. We should try to make
it good. We should also though recognize the limit, our limits. I think we
want to avoid the feeling of entitlement, avoid the feeling of, “Oh, we are
here first, we should always have it in a good way.” How should we think
about the future? How much control should a particular species on a
particular planet have over it? How much control do we have? A
counterbalance to our limited control over the long-term future of humanity
should be how much control do we have over our own lives. We have our own
goals. We have our families. Those things are much more controllable than
trying to control the whole universe.
I think it’s appropriate for us to really work towards our own local goals.
It’s kind of aggressive for us to say, “Oh, the future has to evolve this
way that I want it to.” Because then we’ll have arguments where different
people think the global future should evolve in different ways, and then
they have conflict. We want to avoid that.
Dwarkesh Patel 01:03:13
Maybe a good analogy here would be this. Suppose you are raising your own
children. It might not be appropriate to have extremely tight goals for
their own life, or also have some sense of like, “I want my children to go
out there in the world and have this specific impact. My son’s going to
become president and my daughter is going to become CEO of Intel. Together
they’re going to have this effect on the world.”
But people do have the sense—and I think this is appropriate—of saying,
“I’m going to give them good robust values such that if and when they do end
up in positions of power, they do reasonable, prosocial things.” Maybe a
similar attitude towards AI makes sense, not in the sense of we can predict
everything that they will do, or we have this plan about what the world
should look like in a hundred years. But it’s quite important to give them
robust and steerable and prosocial values.
Richard Sutton 01:04:13
Prosocial values?
Dwarkesh Patel 01:04:15
Maybe that’s the wrong word.
Richard Sutton 01:04:16
Are there universal values that we can all agree on?
Dwarkesh Patel 01:04:21
I don’t think so, but that doesn’t prevent us from giving our kids a good
education, right? Like we have some sense of wanting our children to be a
certain way.
Maybe prosocial is the wrong word. High integrity is maybe a better word.
If there’s a request or if there’s a goal that seems harmful, they will
refuse to engage in it. Or they’ll be honest, things like that. We have some
sense that we can teach our children things like this, even if we don’t have
some sense of what true morality is, where everybody doesn’t agree on that.
Maybe that’s a reasonable target for AI as well.
Richard Sutton 01:04:57
So we’re trying to design the future and the principles by which it will
evolve and come into being. The first thing you’re saying is, “Well, we try
to teach our children general principles which will promote more likely
evolutions.” Maybe we should also seek for things to be voluntary. If there
is change, we want it to be voluntary rather than imposed on people. I think
that’s a very important point. That’s all good.
I think this is the big or one of the really big human enterprises to
design society that’s been ongoing for thousands of years again. The more
things change, the more things they stay the same. We still have to figure
out how to be. The children will still come up with different values that
seem strange to their parents and their grandparents. Things will
evolve.
Dwarkesh Patel 01:05:57
“The more things change, the more they stay the same” also seems like a
good capsule into the AI discussion. The AI discussion we were having was
about how techniques, which were invented even before their application to
deep learning and backpropagation was evident, are central to the
progression of AI today. Maybe that’s a good place to wrap up the
conversation.
A great introduction to using Microsoft Excel forMonte Carlo simulation by Jon Wittwer. The 4-part series of articles is combined into a single article here. Vetex42 is an excellent free resource for learning to use Excel.
I recently discovered that Pipi has used Markov chain Monte Carlo (MCMC) since version
6, but the method was unnamed, as is much of Pipi's internal functioning
(A disadvantage of working visually 😇 and finding ideas from anywhere to solve a problem)
Jon Wittwer started Vertex42 in 2003 while working on a PhD in mechanical
engineering. After finishing his degree, he worked for Sandia National
Laboratories where he kept Vertex42.com running on the side. In 2008, he
left the labs to work on Vertex42 full time. In addition to his expertise
with Excel, Dr. Wittwer is respected in multiple fields for his
development of financial tools such as the Debt Reduction Calculator,
project management tools like the Gantt Chart Template, statistical tools
such as the Monte Carlo Simulator, and a large collection of business
productivity and time management tools.
A Monte Carlo method is a technique that involves using random
numbers and probability to solve problems. The term Monte Carlo Method was
coined by S. Ulam and Nicholas Metropolis in reference to games of chance, a
popular attraction in Monte Carlo, Monaco (Hoffman, 1998; Metropolis and
Ulam, 1949).
Computer simulation has to do with using computer models to imitate
real life or make predictions. When you create a model with a spreadsheet
like Excel, you have a certain number of input parameters and a few
equations that use those inputs to give you a set of outputs (or response
variables).
This type of model is usually deterministic, meaning that you get the same
results no matter how many times you re-calculate.
Example 1: A Deterministic Model for Compound Interest
Figure 1: A parametric deterministic model maps a set of input variables
to a set of output variables.
Monte Carlo simulation is a method for iteratively evaluating
a deterministic model using sets of random numbers as inputs. This method is
often used when the model is complex, nonlinear, or involves more than just
a couple uncertain parameters. A simulation can typically involve over
10,000 evaluations of the model, a task which in the past was only practical
using super computers.
By using random inputs, you are essentially turning the deterministic
model into a stochastic model. Example 2 demonstrates this concept with a
very simple problem.
Example 2: A Stochastic Model for a Hinge Assembly
In Example 2, we used simple uniform random numbers as the inputs to the
model. However, a uniform distribution is not the only way to represent
uncertainty. Before describing the steps of the general MC simulation in
detail, a little word about uncertainty propagation:
The Monte Carlo method is just one of many methods for analyzing
uncertainty propagation, where the goal is to determine how random
variation, lack of knowledge, or error affects the sensitivity, performance,
or reliability of the system that is being modeled.
Monte Carlo simulation is categorized as a sampling method because
the inputs are randomly generated from probability distributions to simulate
the process of sampling from an actual population. So, we try to choose a
distribution for the inputs that most closely matches data we already have,
or best represents our current state of knowledge. The data generated from
the simulation can be represented as probability distributions (or
histograms) or converted to error bars, reliability predictions, tolerance
zones, and confidence intervals. (See Figure 2).
Uncertainty Propagation
Monte Carlo Analysis
Figure 2: Schematic showing the principal of stochastic uncertainty
propagation. (The basic principle behind Monte Carlo simulation.)
If you have made it this far, congratulations! Now for the fun part!
The steps in Monte Carlo simulation corresponding to the uncertainty
propagation shown in Figure 2 are fairly simple, and can be easily
implemented in Excel for simple models. All we need to do is follow the
five simple steps listed below:
Step 1: Create a parametric model,
y = f(x1, x2, ..., xq).
Step 2: Generate a set of random inputs, xi1, xi2, ..., xiq.
Step 3: Evaluate the model and store the results as yi.
Step 4: Repeat steps 2 and 3 for i = 1 to n.
Step 5:
Analyze the results using histograms, summary statistics, confidence
intervals, etc.
On to an example problem ...
REFERENCES:
Hoffman, P., 1998, The Man Who Loved Only Numbers: The Story of Paul
Erdos and the Search for Mathematical Truth. New York: Hyperion, pp.
238-239.
Metropolis, N. and Ulam, S., 1949, "The Monte Carlo Method." J. Amer.
Stat. Assoc. 44, 335-341.
Eric W. Weisstein. "Monte Carlo Method." From MathWorld--A Wolfram Web
Resource.
Paul Coddington. "Monte Carlo Simulation for Statistical Physics."
Northeast Parallel Architectures Center at Syracuse University.
http://www.npac.syr.edu/users/paulc/lectures/montecarlo/p_montecarlo.html
Decisioneering.com. "What is Monte Carlo Simulation?"" Part of: Risk
Analysis Overview -
http://www.decisioneering.com/risk-analysis-start.html
Our example of Monte Carlo simulation in Excel will be a simplified sales forecast model. Each step of the analysis will be described in detail.
The Scenario: Company XYZ wants to know how profitable it will be to
market their new gadget, realizing there are many uncertainties associated
with market size, expenses, and revenue.
The Method: Use a Monte Carlo Simulation to estimate profit and
evaluate risk.
You can download the example spreadsheet by following the
instructions below. You will probably want to refer to the spreadsheet
occasionally as we proceed with this example.
We are going to use a top-down approach to create the sales forecast model,
starting with:
Profit = Income - Expenses
Both income and expenses are uncertain parameters, but we aren't going to
stop here, because one of the purposes of developing a model is to try to
break the problem down into more fundamental quantities. Ideally, we want
all the inputs to be independent. Does income depend on expenses? If
so, our model needs to take this into account somehow.
We'll say that Income comes solely from the number of sales (S) multiplied
by the profit per sale (P) resulting from an individual purchase of a
gadget, so Income = S*P. The profit per sale takes into account the sale
price, the initial cost to manufacturer or purchase the product wholesale,
and other transaction fees (credit cards, shipping, etc.). For our purposes,
we'll say the P may fluctuate between $47 and $53.
We could just leave the number of sales as one of the primary variables,
but for this example, Company XYZ generates sales through purchasing leads.
The number of sales per month is the number of leads per month (L)
multiplied by the conversion rate (R) (the percentage of leads that result
in sales). So our final equation for Income is:
Income = L*R*P
We'll consider the Expenses to be a combination of fixed overhead (H) plus
the total cost of the leads. For this model, the cost of a single lead (C)
varies between $0.20 and $0.80. Based upon some market research, Company XYZ
expects the number of leads per month (L) to vary between 1200 and 1800. Our
final model for Company XYZ's sales forecast is:
Profit = L*R*P - (H + L*C)
Y = Profits
X1 = L
X2 = C
X3 = R
X4 = P
Notice that H is also part of the equation, but we are going to treat it as
a constant in this example. The inputs to the Monte Carlo simulation are
just the uncertain parameters (Xi).
This is not a comprehensive treatment of modeling methods, but I used this
example to demonstrate an important concept in uncertainty propagation,
namely correlation. After breaking Income and Expenses down into more
fundamental and measurable quantities, we found that the number of leads (L)
affected both income and expenses. Therefore, income and expenses are not
independent. We could probably break the problem down even further, but we
won't in this example. We'll assume that L, R, P, H, and C are all
independent.
Note: In my opinion, it is easier to decompose a model into
independent variables (when possible) than to try to mess with
correlation between random inputs.
Step 2: Generating Random Inputs
The key to Monte Carlo simulation is generating the set of random inputs.
As with any modeling and prediction method, the "garbage in equals garbage
out" principle applies. For now, I am going to avoid the questions "How do I
know what distribution to use for my inputs?" and "How do I make sure I am
using a good random number generator?" and get right to the details of how
to implement the method in Excel.
For this example, we're going to use a Uniform Distribution to represent
the four uncertain parameters. The inputs are summarized in the table shown
below. (If you haven't already, Download the example spreadsheet).
Sales Forecast Input Table
Figure 1: Screen capture from the example sales forecast spreadsheet.
The table above uses "Min" and "Max" to indicate the uncertainty in L, C,
R, and P. To generate a random number between "Min" and "Max", we use
the following formula in Excel (Replacing "min" and "max" with cell
references):
= min + RAND()*(max-min)
You can also use the Random Number Generation tool in Excel's
Analysis ToolPak Add-In to kick out a bunch of static random numbers for a
few distributions. However, in this example we are going to make use of
Excel's RAND() formula so that every
time the worksheet recalculates, a new random number is generated.
Let's say we want to run n=5000evaluations of our model. This is a
fairly low number when it comes to Monte Carlo simulation, and you will see
why once we begin to analyze the results.
A very convenient way to organize the data in Excel is to make a column for
each variable as shown in the screen capture below.
Random Inputs in Column Format
Figure 2: Screen capture from the example sales forecast spreadsheet.
Cell A2 contains the formula:
=Model!$F$14+RAND()*(Model!$G$14-Model!$F$14)
Note that the reference
Model!$F$14 refers to the corresponding
Min value for the variable L on the Model worksheet, as shown in Figure 1.
(Hopefully you have downloaded the example spreadsheet and are following
along.)
To generate 5000 random numbers for L, you simply copy the formula down
5000 rows. You repeat the process for the other variables (except for H,
which is constant).
Step 3: Evaluating the Model
Our model is very simple, so to evaluate the output of our model (the
Profit) for each run of the simulation, we just put the equation in another
column next to the inputs, as shown in Figure 2.
Cell G2 contains the formula:
=A2*C2*D2-(E2+A2*B2)
Step 4: Running the Simulation
To iteratively evaluate our model, we don't need to write a fancy macro for
this example. We simply copy the formula for profit down 5000 rows, making
sure that we use relative references in the formula (no $ signs). Each row
represents a single evaluation of the model, with columns A-E as inputs and
the Profit as the output.
Re-run the Simulation: F9
Although we still need to analyze the data, we have essentially completed a
Monte Carlo simulation. We have used the volatile RAND() function. So, to
re-run the entire simulation all we have to do is recalculate the worksheet
(F9 is the shortcut).
This may seem like a strange way to implement Monte Carlo simulation, but
think about what is going on behind the scenes every time the Worksheet
recalculates: (1) 5000 sets of random inputs are generated (2) The model is
evaluated for all 5000 sets. Excel is handling all of the iteration.
If your model is not simple enough to include in a single formula, you can
create your own custom Excel function (see my article on user-defined
functions), or you can create a macro to iteratively evaluate your model and
dump the data into a worksheet in a similar format to this example (Update
9/8/2014: See my new Monte Carlo Simulation template).
In practice, it is usually more convenient to buy an add-on for Excel than
to do a Monte Carlo analysis from scratch every time. But not everyone has
the money to spend, and hopefully the skills you will learn from this
example will aid in future data analysis and modeling.
A Few Other Distributions
My new Monte Carlo Simulation template includes a worksheet that calculates
inputs sampled from a variety of distributions. Some of the formulas are
listed below.
Normal (Gaussian) distribution
To generate a random number from a Normal distribution you would use the
following formula in Excel:
There isn't an inverse Weibull function in Excel, but the formula is quite
simple, so to generate a random number from a (2-parameter) Weibull
distribution with scale = c, and shape = m, you would use the following
formula in Excel:
=c*(-LN(1-RAND()))^(1/m)
Ex: $C$5*(-LN(1-RAND()))^(1/$C$6)
Beta distribution
This distribution can be used for variables with finite bounds (A,B). It
uses two shape parameters, alpha and beta. When alpha=beta=1, you get a
Uniform distribution. When alpha=beta=2, you get a dome-shaped distribution
which is often used in place of the Triangular distribution. When
alpha=beta=5 (or higher), you get a bell-shaped distribution. When
alpha<>beta (not equal), you get a variety of skewed shapes.
Excel 2010+: =BETA.INV(RAND(),alpha,beta,A,B)
MORE Distribution Functions: Dr. Roger Myerson provides a free
downloadable Excel add-in, Simtools.xla, that includes many other
distribution functions for generating random numbers in Excel.
Creating a histogram is an essential part of doing a statistical
analysis because it provides a visual representation of data.
In Part 3 of this Monte Carlo Simulation example, we iteratively ran a
stochastic sales forecast model to end up with 5000 possible values
(observations) for our single response variable, profit. If you have not
already, download the Sales Forecast Example Spreadsheet.
The last step is to analyze the results to figure out how much the profit
might be expected to vary based on our uncertainty in the values used as
inputs for our model. We will start off by creating a histogram in Excel.
The image below shows the end result. Keep reading below to learn how to
make the histogram.
Histogram With Excel
Figure 1: A Histogram in Excel for the response variable Profit, created
using a Bar Chart.
(From a Monte Carlo simulation using n = 5000 points and 40 bins).
We can glean a lot of information from this histogram:
It looks like profit will be positive, most of the time.
The uncertainty is quite large, varying between -1000 to 3400.
The distribution does not look like a perfect Normal distribution.
There doesn't appear to be outliers, truncation, multiple modes,
etc.
The histogram tells a good story, but in many cases, we want to
estimate the probability of being below or above some value, or between a
set of specification limits. To skip ahead to the next step in our analysis,
move on to Summary Statistics, or continue reading below to learn how to
create the histogram in Excel.
Creating a Histogram in Excel
Update 7/2/15: A Histogram chart is one of the new built-in chart types in
Excel 2016, finally! (Read about it).
Method 1: Using the Histogram Tool in the Analysis Tool-Pak.
This is probably the easiest method, but you have to re-run the tool each
to you do a new simulation. AND, you still need to create an array of bins
(which will be discussed below).
Method 2: Using the
FREQUENCY function in Excel.
This is the method used in the spreadsheet for the sales forecast example.
One of the reasons I like this method is that you can make the histogram
dynamic, meaning that every time you re-run the MC simulation, the chart
will automatically update. This is how you do it:
Step 1: Create an array of bins
The figure below shows how to easily create a dynamic array of bins. This
is a basic technique for creating an array of N evenly spaced numbers.
To create the dynamic array, enter the following formulas:
B6 = $B$2 B7 = B6+($B$3-$B$2)/5
Then, copy cell B7 down to B11
Array of Bins in Excel
Figure 2: A dynamic array of 5 bins.
After you create the array of bins, you can go ahead and use the Histogram
tool, or you can proceed with the next step.
Step 2: Use Excel's
FREQUENCY formula
The next figure is a screen shot from the example Monte Carlo simulation.
I'm not going to explain the
FREQUENCY function in detail since you
can look it up in the Excel's help file. But, one thing to remember is that
it is an array function, and after you enter the formula, you will need to
press Ctrl+Shift+Enter. Note that the simulation results (Profit) are in
column G and there are 5000 data points
( Points: J5=COUNT(G:G) ).
The Formula for the Count column:
FREQUENCY(data_array,bins_array)
a) Select cells J8:J48 b) Enter the array formula: =FREQUENCY(G:G,I8:I48) c) Press Ctrl+Shift+Enter
Layout for Creating a Scaled Histogram
Figure 3: Layout in Excel for Creating a Dynamic Scaled Histogram.
Creating a Scaled Histogram
If you want to compare your histogram with a probability distribution, you
will need to scale the histogram so that the area under the curve is equal
to 1 (one of the properties of probability distributions). Histograms
normally include the count of the data points that fall into each bin on the
y-axis, but after scaling, the y-axis will be the frequency (a
not-so-easy-to-interpret number that in all practicality you can just not
worry about). The frequency doesn't represent probability!
To scale the histogram, use the following method:
Scaled = (Count/Points) / (BinSize)
a) K8 = (J8/$J$5)/($I$9-$I$8) b) Copy cell K8 down to K48 c) Press F9 to force a recalculation (may take a while)
Step 3: Create the Histogram Chart
Bar Chart, Line Chart, or Area Chart:
To create the histogram, just create a bar chart using the Bins column for
the Labels and the Count or Scaled column as the Values. Tip: To reduce the
spacing between the bars, right-click on the bars and select "Format Data
Series...". Then go to the Options tab and reduce the Gap. Figure 1 above
was created this way.
A More Flexible Histogram Chart
One of the problems with using bar charts and area charts is that the
numbers on the x-axis are just labels. This can make it very difficult to
overlay data that uses a different number of points or to show the proper
scale when bins are not all the same size. However, you CAN use a scatter
plot to create a histogram. After creating a line using the Bins column for
the X Values and Count or Scaled column for the Y Values, add Y Error Bars
to the line that extend down to the x-axis (by setting the Percentage to
100%). You can right-click on these error bars to change the line widths,
color, etc.
Histogram Via Error Bars
Figure 4: Example Histogram Created Using a Scatter Plot and Error
Bars.