Argmax[A in Actions] in Sum[O in Outcomes] (Utility(O)*P(this computation yields A []-> O|rest of universe))
evaluate to:
def Tdt(Actions,Outcomes): currentMax = 0 output = null for A in Actions: sum = 0 for O in Outcomes: sum += U(O)*P(O|Tdt(Actions,Outcomes) == A and background knowledge) if sum >= currentMax: currentMax = sum output = A return output
Or am I missing some subtly? I am assuming that “P” and “U” have been defined elsewhere, and that python can deal with referencing the outcome of a computation inside itself before it has been completed (or at least that the probability function halts when given a yet to be computed function evaluating to a certain output as its inout statement).
(edit): couldn’t get the tabs to work, it’s supposed to be pseudo python, but it’s probably just as readable. Is there a way to type set tabs in the comments?
To make a paragraph where your indentation is preserved and no characters are treated specially, precede each line with (at least) four spaces. This is commonly used for computer program source code.
Does
evaluate to:
Or am I missing some subtly? I am assuming that “P” and “U” have been defined elsewhere, and that python can deal with referencing the outcome of a computation inside itself before it has been completed (or at least that the probability function halts when given a yet to be computed function evaluating to a certain output as its inout statement). (edit): couldn’t get the tabs to work, it’s supposed to be pseudo python, but it’s probably just as readable. Is there a way to type set tabs in the comments?
From the “Comment formatting” page on the wiki: