The name "Dynamic Programming" might seem out of place because it doesn't come from programming as a discipline. In this case, it actually refers to something like optimization, similar to linear programming. Dynamic programming is basically a method you can use to solve decision problems with discrete time, i.e picking the optimal sequence {a_t} in order to maximize \sum_t u_t(a_t) (plus constraints). The "dynamic programming" is defining a value function V* where V*(t) = max_{a_t}{ u_t(a_t) + V*(t-1) } which greatly reduces the dimensionality of the optimization problem.
In fact, the official line [0] on where the name comes from is quite funny. I shall quote my favourite part:
[0] https://en.wikipedia.org/wiki/Dynamic_programming#History
My dad told me a joke/story once about one of his old psychologist colleagues(call him Dave) arguing with a psychoanalyst* about some psychology thing.
After a while of the discussion going nowhere, the psychoanalyst said something like this. "Not to worry, Dave, I know you're dynamically minded enough that you'll eventually learn to agree with me."
Dave was not pleased.
I guess that was more condescending than pejorative, but oh well.
(Most modern clinical psychologists consider psychoanalysis to be a pseduoscience. A small minority still practice it even clinically. They don't like eachother very much)
Care to offer evidence of pseudoscience status? All I could find was debunkings of this claim as myth and outdated, and to my understanding research in the field has caught wind in past decades. I’d love to learn more about the debate, so any pointers are welcome.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6020924/
https://cosmonautmag.com/2021/10/on-the-scientific-status-of...
” Depending on where your philosophical allegiances lie, Karl Popper might be a friend or an enemy to whatever version of philosophy of science you accept. Falsificationist approaches to science imply that psychoanalysis makes untestable and unfalsifiable claims! Popper made the very same claims about Marxist social theory as well. There are two issues with this approach. One, if falsificationism is true, then all social sciences, and even some natural sciences, are pseudo-scientific. This is an unacceptable conclusion since much of social science is clearly science. Lots of cutting-edge physics whose models do not lend themselves to controlled experimental testing would also lose their status as science. That is also an absurd conclusion. Newtonian mechanics, for example, would never have been accepted as a theory if we use Popper’s standards of theory corroboration and falsifiability. The theory offered better ways of explaining phenomenon that previous theories were already decent at predicting reliably. The process of legitimizing Newtonian physics had nothing to do with testability.4 A good theory of science does not rule out obvious cases of scientific rigor.5”
The burden of proof lies on them that claim it’s a “real” science.
It appears to me the burden of proof lies on whoever wants to draw the line on what ”real” science is. Only natural sciences, then?
https://en.wikipedia.org/wiki/No_true_Scotsman
Rejecting an assertion because you don't like it's conclusion is pretty specious. I fully endorse the notion that any practice which makes unfalsifiable claims is not science. But that doesn't necessarily make such a practice pseudo science -- this is a false dichotomy. There are disciplines which are neither scientific nor pseudo-scientific.
Well hang on, let me go find my logic book from college to decipher...
https://en.wikipedia.org/wiki/Psychoanalysis#Debate_over_sta...
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5459228/
https://www.bbvaopenmind.com/en/science/research/psychoanaly...
https://link.springer.com/referenceworkentry/10.1007/978-94-...
https://www.skeptic.org.uk/2021/07/psychoanalysis-science-or...
https://philarchive.org/archive/FERIPA-6
That quote you included seems a little funny. It’s not making any direct or compelling argument in favor of psychoanalysis being science, it’s just saying well if psychoanalysis isn’t science then other disciplines aren’t science either, and since that’s sometimes not true, then Popper is wrong. It’s a slippery argument with some assumptions and big holes, and perhaps most glaringly it is intentionally ignoring the magnitude or degree of scientific experimentation, and attempting to frame the issue as only binary: science or not science.
I’m sure there is some modern psychoanalysis that is scientific, but OTOH it seems like the foundations of psychoanalysis, especially Freud, are certainly problematic from the perspective of science, right? Psychoanalysis has a valid, earned reputation that may take a very long time to fix, even if today’s practitioners are being careful and scientific. This could be compared to chiropractic medicine - some of it is valid medicine today, but it definitely came from non-medical, non-scientific origins.
There appear to be at least 2 separate arguments going. One is whether psychoanalysis can be a science, and the other is whether it actually was a science historically. This is why both sides are somewhat right: proponents of psychoanalysis argue that it can be scientific, which is true, and opponents argue that it wasn’t scientific in origin and has a troubled past, which is also true.
The issue for me is that the popular claim against psychoanalysis seems to be exactly that, binary.
Thanks for bringing nuance and providing quotes!
I’ve personally benefited tremendously from work with the ego structure and from realizing I can strenghen my will/ego capacities and learn to more and more discern and deny excessive power from my superego - from past learnt protective and restrictive impulses that no longer serve a purpose. This understanding alone seems like a treasure trove that keeps on giving year after year while doing introspective work and self inquiry with others interested in the work.
However I have little understanding how this fits in a modern understanding of psychoanalysis or psychodynamic psychotherapy.
What I do know is that CBT I did younger didn’t seem to have nearly sufficient explanatory powers to help me personally. Most of the skills I was offered seemed more or less trivial or perhaps were taught ineffectively.
Another thing that I would have needed was tapping into the resources of my body in the context of therapy and how that links to having capacity to work with myself. CBT seemed obsessed with, umh, overly just cognition.
Interesting quote, since my mind immediately went to Critical theory, one of the schools of philosophy probably targetted by Popper.
Over the last 200 years, the definition of science has been deliberately narrowed down a lot, mainly to combat pseudo-science and misinformation, but I think partially also to create an in-circle of academics. There are few good definitions of science, and usually they are a bit self-contradictory or insufficient to capture the underlying goal of science; the building of a corpus of verified knowledge. Falsification is a very high standard, that cannot always be applied, but it is still a good first test to filter out possible bullshit.
In deductive studies (formal sciences but also often in other fields) we need to have acceptable axioms, and rigorous deductions from these axioms. In inductive studies, you need good data and valid methods to derive meaning from that data. A lot of research actually falls somewhere in-between, and we wouldn't want to outright dismiss it, as many subjects would be too elusive to study at all, but we still have a vested interest in understanding them.
A lot of research, and I would count psycho-analysis in there for the most part, kind of walks the line between pseudo-science and proper deductive or inductive studies. These fields definetely build a corpus of knowledge, which often turns out to be true, but there are fewer good measures of filtering the bullshit from the nuggets of truth, and that substantially devalues the field. The risk, not exclusive but especially pronounced, is that acceptance of research becomes more a measure of eloquence than depth of enquiry.
And fields can be collectively wrong, even in the more rigorous fields that lend themselves to proper testing or deductive reasoning: You mention Newtonian Physics, but there are too many examples to enumerate: Quantum superposition was extremely controversial when first proposed, and poor Lobachevsky was ruthlessly mocked for his perfectly valid development of hyperbolic geometry.
IMO, modern psychology “walks the line between pseudo-science and proper deductive or inductive studies”. Psychoanalysis at best sometimes stumbles in the right direction.
Demarcation problem is unique to Popper's philosophy of science. That problem doesn't exist in other philosophies of science. The best attack on psychoanalysis comes from the late philosopher of science Adolf Grunbaum's "The Foundations of Psychoanalysis: A philosophical critique"
I'm not a psychologist myself, and I know nothing about modern academic psychoanalysis. I've tried to read some but it was indecipherable to me.
Modern clinical psychoanalysis is a strange field. It went out of vogue with the advent of behavioral and later cognitive psychology in the latter half of the 20th century, as well as psychiatry. Psychoanalysts tend to believe their way is the only way, while more modern psychologists are much more eclectic. They're often extremely critical of the use of medication even in cases where the evidence supporting their use is overwhelming, like stimulants for ADHD.
Psychoanalysts have their own strange nomenclature that's often incompatible with modern developments. So it's hard for other psychologists to even talk to them at all.
Those are some of the reasons psychoanalysis is viewed as pseudoscientific by modern clinical psychologists.
As I understand it, the notion of falsifiability is really more like, "Theory X is acceptable if it can be shown to be false by the use of tools whose principles meet the same standard of falsifiability, even if those tools aren't currently available."
So a theory that can be tested only with later scientific refinements -- say, by increasing measurement precision beyond what's currently available -- is indeed eligible to be classified as science. That criterion would allow for Newtonian mechanics to be accepted in its time, and for things like string theory to be accepted provisionally in ours.
Basically, the ultimate failure of the Newtonian model can't be used as an argument that it should never have been considered valid science.
> After a while of the discussion going nowhere, the psychoanalyst said something like this. "Not to worry, Dave, I know you're dynamically minded enough that you'll eventually learn to agree with me."
It looks like psychoanalyst suffered from a professional deformation. Not enough evidence to be sure, but it is the main premise of psychoanalysis that psychoanalyst knows better then his "patient". A psychoanalyst knows what his patient feels, thinks, wishes, and so on. If patient doesn't agree then it is a "resistance" and overcoming it is the first priority task for a psychoanalyst.
> I guess that was more condescending than pejorative, but oh well.
The whole statement is condescending, but not because of "dynamically minded". It is "you'll learn to agree with me" that does the trick.
This is a caricature of clinical psychoanalysis and is more applicable to other therapies. For example, the initial moments of CBT are "psychoeducation", where the therapist sketches out with magic markers a bunch of categories (feelings, thoughts, behaviors, emotions) and their subcategories, and the patient learns to see themselves in these ontological terms. Suggestibility is the cornerstone of these interventions.
Every psychoanalyst of course has their theoretical meta-psychology, but every clinical psychoanalyst knows that they must fight to abandon it at the door as they confront every analysand anew. Psychoanalysis is not a matter of instructing the patient of the death drive, of resistance, of the Oedipus complex, and so on. (Freud was wrong about why his intervention with Little Hans "succeeded".) Freud himself searched for something beyond hypnosis because the hypnotic technique required a susceptibility of the patient to suggestion, and furthermore required a constant relationship with the patient, otherwise the patient would invariably suffer a symptom relapse. Relate this to the dismal long-term rates of regression of CBT patients. (And this is the forbidden evidence of this "evidence based therapy".)
The analysand enters the analytical relationship supposing (as you have supposed) that the analyst knows something crucial that the analysand does not. So what happens as the analysand comes to realize that the analyst does not, in fact, possess this knowledge? The analyst indeed knows they don't know, but this is presumably nothing like what you assume the analyst supposes themselves to know.
The analyst is, in their role as an analyst (and not a therapist), merely the secretary of the analysand. They "take notes" on what the analyst says, in order to help show the analyst what they've said.
Dynamic typing comes to mind ;)
Dynamic scoping ;)
You cannot get any more pejorative. Mission accomplished!
Dynamic ethics.
It _is_ a funny quote.
But I would still point out that this is the exact reason “dynamic” does not help if you do not know about the history. Since it can be applied to anything, it does not help you trim down what it can refer to.
Scripting languages are called 'dynamic' sometimes pejoratively. Dynamic microphones are also inferior in studio recording situations. I could see a poor DP implementation wasting memory being described negatively.
Most of the time I hear the term being used by other people (not you :) ), I feel it's for showing off and look smarter than everybody else - "Look, I used dynamic programming to solve that problem", when in fact they were just employing what I'd consider the natural and intuitive approach for solving the problem. There was nothing they actually "used", besides happening to identify that the problem could be broken into progressively smaller subproblems.
Do you feel similarly if someone says they used an iterative, recursive, or greedy algorithm?
Dynamic programming is a whole chapter in most algorithms books. It's not about showing off, it's the name of the technique.
As I interpret the GP, the person is peacocking or gate-keeping by (humble)bragging about using dynamic programming to solve a problem. For all we know, they Googled for an efficient algorithm and copied the result. I have done it before, and I have no shame about it. If a teammate asks me how I knew about that dynamic programming algorithm, I would reply: "Are you joking? I could never program that myself. Thank you Google." Except for a few algorithms, most are solved using iterative or recursive.
Well aren’t you cynical.
Which is what dynamic programming is about. And no, not everyone is capable to do that, especially since not all problems solved at work are Leetcode.
Sometimes people really have to spend hours or days to understand how to split a problem. Only then optimizations can be applied or become "obvious".
Like usual, solutions are "so obvious" when someone has done a lot of heavy lifting to simplify the problem, improve the context, etc.
“Optimization” is similarly misleading (as someone who once took a CS class on “optimization” expecting something very different ;)).
Optimisation is just function minimisation/maximisation. What did you expect and how was it different?
Not speaking for the GP but I'd imagine "optimizing" for performance. I had a professor who would get very irritated when anyone mentioned "optimizing" a program for just this reason, since you weren't finding the best possible runtime.
Oh, makes sense, performance optimisation didn’t cross my mind for some reason.
Compare also 'Linear Programming'. Or the usage of a 'TV programme' or a 'musical programme'.
Yeah the "programming" part has always thrown me off when I started my first Engineering job one of the guys was always talking about an "LP" model I thought it was some deep piece of black magic until I realized it was essentially brute searching for a solution to a series of simultaneous equations.
I think "Linear Optimization" might be a better term, or maybe "Linear Solving".
Modern Linear Programming solvers are a lot more advanced than 'brute searching'. But otherwise, you are right.
That’s the programming part. As others have shared, the “Dynamic” part was made up by Bellman so it sounded important and politicians wouldn’t try to cut his funding. It’s often applied to dynamical systems, but that’s a coincidence.
You forgot to define u and t.
Here, u is presumably utility and t is time
I think utility (of what, why?) doesn't make sense in this context.
If you go further back, "programming" describes it precisely, and what we call "programming" today is "writing code" which can be subdivided into different kinds of "programming" such as functional, declarative, procedural, etc. But there's a lot more that fits under that umbrella.
It's interesting how computing things - like optimization problems - used to be much more dominant in terms of what people thought about and did with computers. It feels like most of the time we are just doing data storage and retrieval combined with networking... some computations are embedded within those things, but usually well encapsulated.
This is the correct definition of dp.