Beispiel #1
0
 def test_elicit_until(self, neg):
     for s in ("bisection", "titration+0.05", "titration-0.05", "pingpong"):
         user = User(ufun=ufun, cost=cost)
         stretegy = EStrategy(strategy=s, resolution=1e-3)
         stretegy.on_enter(neg.ami)
         outcome, query, qcost = next_query(
             strategy=stretegy, outcome=(0,), user=user
         )[0]
         stretegy.until(
             user=user, outcome=(0,), dist=query.answers[1].constraint.marginal((0,))
         )
Beispiel #2
0
 def test_countable_outcomes_user_can_return_next_queries(self, neg):
     for s in (
         "exact",
         "bisection",
         "titration+0.05",
         "titration-0.5",
         "dtitration+0.5",
         "dtitration-0.05",
     ):
         strategy = EStrategy(strategy=s)
         user = User(ufun=ufun, cost=cost)
         strategy.on_enter(neg.ami)
         q = next_query(strategy=strategy, user=user)
         # print(f'{strategy} Strategy:\n---------------')
         # pprint.pprint(q)
         assert len(q) > 0, "returns some queries"