It seems there is a small bug in the example you show on Page 4:
... least(0, @game := game)), pos_in_game = @pos ...
I believe pos_in_game should be rank_in_game...