Fix piece selection algorithm in docs (#524)