@domain_constructor(loss_target=(-2))
def n_arms(N=2):
 rng = np.random.RandomState(123)
 x = hp.choice('x', [0, 1])
 reward_mus = as_apply(([(-1)] + ([0] * (N - 1))))
 reward_sigmas = as_apply(([1] * N))
 return {'loss': scope.normal(reward_mus[x], reward_sigmas[x], rng=rng), 'loss_variance': 1.0, 'status': base.STATUS_OK}

@ domain_constructor ( loss_target = ( - 2 ) ) def n_arms ( N = 2 ) : rng = np . random . RandomState ( 123 ) x = hp . choice ( 'x' , [ 0 , 1 ] ) reward_mus = as_apply ( ( [ ( - 1 ) ] + ( [ 0 ] * ( N - 1 ) ) ) ) reward_sigmas = as_apply ( ( [ 1 ] * N ) ) return { 'loss' : scope . normal ( reward_mus [ x ] , reward_sigmas [ x ] , rng = rng ) , 'loss_variance' : 1.0 , 'status' : base . STATUS_OK }
each arm yields a reward from a different gaussian .