PlaceIt
A peer-reviewed paper solving a game of perfect online sorting: the best strategy wins 0.0134% of the time.
A Mathematical Analysis of PlaceIt: A Game of Perfect Online Sorting, with Casey Chock and Bernardo Subercaseaux (Carnegie Mellon University). Presented at Computers and Games 2024 and published in Springer's Lecture Notes in Computer Science, vol. 15550, pp. 185–196 (2025).
In the single-player game PlaceIt, twenty random numbers from 1 to 999 arrive one at a time, and each must be placed in one of twenty slots before the next one is shown, so that the slots end up in sorted order. One bad guess early on and the game is lost. We compute the optimal strategy and prove that even playing perfectly, you win with probability of about .
The code is a small library, onsort, for optimal online ranking of numbers drawn from a known distribution: a semi-symbolic computation of the exact winning probability for the original discrete game, a C++ implementation, and the continuous variant on . You can play PlaceIt online and see how far you get.