This is called a utility function. This utility function U is defined by U(chicken) = 1, U(pork) = 2, U(steak) = 3. We prefer things with higher utility — in other words, we want to maximize the utility function!
Just because you have a DAG of your preferences, does not mean that you have a utility function. There are many utility functions that are consistent with any particular DAG, so if all you have is a DAG then your utility function is under-specified.
First, maybe you don’t care about the difference between pork and steak, and remove that arrow from your DAG. In that case, the toposort is going to produce either U(chicken) = 1, U(pork) = 2, U(steak) = 3 or U(chicken) = 1, U(steak) = 2, U(pork) = 3, arbitrarily. Toposort is guaranteed to produce an ordering that matches the DAG, but there might be several of them. (A slight variant on toposort could produce U(chicken) = 1, U(pork) = 2, U(steak) = 2 instead, but that’s still a bit questionable because it’s conflating incomparability with equality.)
Second, the magnitude of these numbers is pretty arbitrary in a toposort (they’re just sequential integers), but very important in a utility function. For example, maybe you really like steak, so that the more appropriate utility function is U(chicken) = 1, U(pork) = 2, U(steak) = 10. You’re not going to get this from a toposort.
I just wanted to clarify this, because the post could be read as saying DAG==utility-function.
Roughly correct. The missing piece is completeness: for the DAG to uniquely define a utility function, we have to have an edge between each pair of nodes. Then the argument works.
The relative magnitude of the numbers matters only in nondeterministic scenarios, where we take an expectation over possible outcomes. If we restrict ourselves to deterministic situations, then any monotonic transformation of the utility function produces the exact same preferences. In that case, the toposort numbers are fine.
And if we assume that the nodes are whole worlds, rather than pieces of worlds.
For example, if I’m also ordering a soda, and prefer Pepsi to Coke, then the relative magnitudes become important. (There’s an implicit assumption here that the utility of the whole is the sum of the utilities of the parts.) However, if the node includes the entire meal, so that there are six nodes (chicken, pepsi), (chicken, coke), (pork, pepsi), (pork, coke), (steak, pepsi), (steak, coke), then the magnitude doesn’t matter. Are utility functions generally assumed to be whole-world like this?
Yes, although I would word it as “the nodes include everything relevant to our implied preferences”, rather than “whole worlds”, just to be clear what we’re talking about. Certainly the entire notion of adding together two utilities is something which requires additional structure.
However, if the node includes the entire meal, so that there are six nodes (chicken, pepsi), (chicken, coke), (pork, pepsi), (pork, coke), (steak, pepsi), (steak, coke), then the magnitude doesn’t matter.
I don’t think this is right; you still want to be able to decide between actions which might have probabilistic “outcomes” (given that your action is necessarily being taken under incomplete information about its exact results).
You could define a continuous DAG over probability distributions, but that structure is actually too general; you do want to be able to rely on linear additivity if you’re using utilitarianism (rather than some other consequentialism that cares about the whole distribution in some nonlinear way).
Of course, once you have your function from worlds to utilities, you can construct the ordering between nodes of {100% to be X | outcomes X}, but that transformation is lossy (and you don’t need the full generality of a DAG, since you’re just going to end up with a linear ordering.
(For modeling incomplete preferences, DAGs are great! Not so great for utility functions.)
Just because you have a DAG of your preferences, does not mean that you have a utility function. There are many utility functions that are consistent with any particular DAG, so if all you have is a DAG then your utility function is under-specified.
First, maybe you don’t care about the difference between pork and steak, and remove that arrow from your DAG. In that case, the toposort is going to produce either U(chicken) = 1, U(pork) = 2, U(steak) = 3 or U(chicken) = 1, U(steak) = 2, U(pork) = 3, arbitrarily. Toposort is guaranteed to produce an ordering that matches the DAG, but there might be several of them. (A slight variant on toposort could produce U(chicken) = 1, U(pork) = 2, U(steak) = 2 instead, but that’s still a bit questionable because it’s conflating incomparability with equality.)
Second, the magnitude of these numbers is pretty arbitrary in a toposort (they’re just sequential integers), but very important in a utility function. For example, maybe you really like steak, so that the more appropriate utility function is U(chicken) = 1, U(pork) = 2, U(steak) = 10. You’re not going to get this from a toposort.
I just wanted to clarify this, because the post could be read as saying DAG==utility-function.
Roughly correct. The missing piece is completeness: for the DAG to uniquely define a utility function, we have to have an edge between each pair of nodes. Then the argument works.
The relative magnitude of the numbers matters only in nondeterministic scenarios, where we take an expectation over possible outcomes. If we restrict ourselves to deterministic situations, then any monotonic transformation of the utility function produces the exact same preferences. In that case, the toposort numbers are fine.
And if we assume that the nodes are whole worlds, rather than pieces of worlds.
For example, if I’m also ordering a soda, and prefer Pepsi to Coke, then the relative magnitudes become important. (There’s an implicit assumption here that the utility of the whole is the sum of the utilities of the parts.) However, if the node includes the entire meal, so that there are six nodes (chicken, pepsi), (chicken, coke), (pork, pepsi), (pork, coke), (steak, pepsi), (steak, coke), then the magnitude doesn’t matter. Are utility functions generally assumed to be whole-world like this?
Yes, although I would word it as “the nodes include everything relevant to our implied preferences”, rather than “whole worlds”, just to be clear what we’re talking about. Certainly the entire notion of adding together two utilities is something which requires additional structure.
I don’t think this is right; you still want to be able to decide between actions which might have probabilistic “outcomes” (given that your action is necessarily being taken under incomplete information about its exact results).
You could define a continuous DAG over probability distributions, but that structure is actually too general; you do want to be able to rely on linear additivity if you’re using utilitarianism (rather than some other consequentialism that cares about the whole distribution in some nonlinear way).
Of course, once you have your function from worlds to utilities, you can construct the ordering between nodes of {100% to be X | outcomes X}, but that transformation is lossy (and you don’t need the full generality of a DAG, since you’re just going to end up with a linear ordering.
(For modeling incomplete preferences, DAGs are great! Not so great for utility functions.)