oTree Forum >

Fail to find the real winner in Tullock

#1 by mayou

I want to run a contest using Tullock model, but it keeps making mistakes in finding the real winner.. For example, when winning probability of P1 is 0.46, that of P2 is 0.54, and the random_number generated is 0.22, it's supposed to see that P1 is the winner, however I always find it shows P2 is the winner.

#2 by woodsd42

You might want to follow the troubleshooting advice here:

https://otree.readthedocs.io/en/latest/tutorial/part2.html?highlight=set_payoff#troubleshoot-with-print

that should highlight what the issue is.  For instance, if you print those three variables you refer to, as well as lines in the if statements, you should be able to figure out why it isn't doing what you want.

Write a reply

Set forum username