Hi everyone,
I have some problems to code my app and I hope that somebody can give me leads to follow.
Using Ellserberg urns I have different treatments which are risk and ambiguity.
When the subject face a decision, if it’s a risk situation, he knows that there is 30 black balls 20 white and 50 yellow.
But when it’s ambiguity he knows that there is between 20 and 40 black balls, between 40 and 60 white and between 30 and 70 yellow.
I want to mix risk and ambiguity in the same app to randomize the questions order.
My problems are :
For the payement, I will draw one decision that the player made. Then, for this decision I will draw a row of the table decision (attached to the mail). If for this row he prefers to draw a ball then we will draw a ball. If he prefer 20€ with a probability 0,3 then we will do a lottery with 30% chance of wining.
I hope that my explanations are clear.
Thank you!
Vincent
random_draw = randint(1, 100)
num_black_balls = 20
if random_draw <= num_black_balls:
points = 20
else:
points = 0
Hi Vincent,Regarding your first bullet point, your workaround via including empty strings seems to works fine, so why change it? I wouldn’t call this “cheating.” I don’t understand what you mean by “I think it won’t work if I want to implement payments.”Regarding the second bullet point, including something along the following lines in your __init__.py should do the job. Includefrom random import randrangeat the top of the file. In class Player(BasePlayer): include something likerandom_draw = randint(1, 100)
num_black_balls = 20
if random_draw <= num_black_balls:
points = 20
else:
points = 0The variable num_black_balls will be different from round to round, I guess.Is this what you were asking for or did I misinterpret your question?Best,Holger