Objects/Documentation
enligne24.py
The cost of unseen arrivals · enligne24.py
Download ↓"""Finite minimax regret with FIFO, five known arrivals, and revealed costs."""
from functools import lru_cache
from itertools import product
import json
from glouton23 import compare
from dispersion21 import scan,primes_to
def game(d):
alphabet=(1,2,6);n=5
oracle={seq:compare(seq,d)['opt'] for seq in product(alphabet,repeat=n)}
policy={}
@lru_cache(None)
def turn(prefix,i):
if i==n:return -oracle[prefix]
visible=min(n,i+d+1)
if len(prefix)<visible: