Describing systems in terms of choices and their resulting costs and rewards offers the promise of freeing algorithm designers and programmers from specifying how those choices should be made; in implementations, the choices can be realized by optimization techniques and, increasingly, by machine learning methods. We study this approach from a programming-language perspective. We define two small languages that support decision-making abstractions: one with choices and rewards, and the other additionally with probabilities. We give both operational and denotational semantics. In the case of the second language we consider three denotational semantics, with varying degrees of correlation between possible program values and expected rewards. The operational semantics combine the usual semantics of standard constructs with optimization over spaces of possible execution strategies. The denotational semantics, which are compositional and can also be viewed as an implementation by translation to a simpler language, rely on the selection monad, to handle choice, combined with an auxiliary monad, to handle other effects such as rewards or probability. We establish adequacy theorems that the two semantics coincide in all cases. We also prove full abstraction at ground types, with varying notions of observation in the probabilistic case corresponding to the various degrees of correlation. We present axioms for choice combined with rewards and probability, establishing completeness at ground types for the case of rewards without probability.
翻译:从选择及其所产生的成本和奖赏的角度描述系统,可以使算法设计者和编程者能够自由说明如何作出这些选择;在实施过程中,选择可以通过优化技术实现,并越来越多地通过机器学习方法实现。我们从编程语言的角度研究这一方法。我们定义了两种支持决策抽象的小型语言:一种是选择和奖赏,另一种是概率;我们给出了操作和注解的语义。在第二种语言中,我们考虑的是三种省略语义词义词义学,在可能的程序值和预期的奖赏之间有着不同程度的相互关系。操作语义学将标准结构的通常语义与可能的执行战略空间的优化结合起来。德语义学,这些语义学是构成性的,也可以被理解为通过将语言译为更简单的语言来实施。我们根据选择方式和辅助语义论,处理其他效果,例如奖赏或概率。我们确定了两种语义的语义学原理充分性,在所有情况下,可能的程序值和预期的奖赏之间都具有不同程度的关联性。我们还证明,在地面的概率方面,我们还证明完全的概率,在地面的概率学上,在各种的概率上,我们可以确定各种的概率的推比。