Atelier des rouesLab FR
Objects/Documentation

huit32.py

The eight-arrival delivery game · huit32.py

Download ↓
"""Transfer a seven-arrival dual strategy to eight arrivals and certify its regret lower bound."""
from fractions import Fraction as F
from functools import lru_cache
from pathlib import Path
from itertools import product
from hasard27 import schedules
from sept31 import solve
import json
def against(weights):
    @lru_cache(None)
    def best(i,group):
        if i==8:return F(0)
        losses=[]
        for k in range(1,min(2,8-i)+1):
            parts={}
            for s in group:parts.setdefault(s[:i+k+2],[]).append(s)

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.