Atelier des rouesLab FR
Objects/Documentation

budgets32.py

Shared conditionals and checks · budgets32.py

Download ↓
"""Compare proposals after an equal number of fresh dyadic decisions, in separate processes."""
from fractions import Fraction as F
from pathlib import Path
from time import perf_counter
import json,sys,subprocess
import decouverte30 as geo
from relations31 import guesses

def trial(laws,bits,method):
    laws=[list(map(F,r)) for r in laws];cache={};stats={'decision':0.,'proposal':0.,'verification':0.}
    decision=geo.decide
    def memo(laws,e):
        if e not in cache:
            tic=perf_counter();cache[e]=decision(laws,e);stats['decision']+=perf_counter()-tic
        return cache[e]
    a,b=F(0),F(1);memo(laws,a);memo(laws,b)

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.