Objets/Documentation
budgets32.py
Conditionnels communs et contrôles · budgets32.py
Télécharger ↓"""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)