1
$\begingroup$

I'm designing an experiment that investigates the result of different groups sizes on the outcomes of Nash Demand games.

I already programmed this experiment once in zTree, where we then conducted the experiment in a laboratory environment. Now, I'm looking to transfer this over to oTree ("a Django-based framework for implementing multiplayer decision strategy games."), and to conduct online experiments with Amazon Turk.

Here's the problem I've run across: How do I set up games with unequal groups sizes, where the groups are interacting (exclusively) with one another, and so players from the larger (majority) group will occasionally sit out rounds.

The groups will typically be middling in size (say 6 in a majority group, and 2 in a minority group), but let's consider the simplest case: The larger group has 2 members, and the smaller group has 1 member, and in each round members of each group are chosen at random to play the Nash Demand game against one another.

So, letting Player 1 be in the minority group (G1) & Players 2, 3 be in the majority group (G2), a matching sequence might be: Round 1: Player 1 (G1) plays with Player 2 (G2), Round 2: Player 1 (G1) plays with Player 3 (G2), Round 3: Player 1 (G1) plays with Player 3 (G2), and so on…

For this kind of random matching, notice that players in the majority must occasionally sit out. In the example, Player 3 sits sat out in Round 1, and Player 2 sat out in Rounds 2 and 3. Here, the minority group member, Player 1, will ultimately play twice as many rounds as the majority group members.

In zTree, I was able to do this by importing a spreadsheet that contained the matching data--about which player was to be matched to which other player in each round--into the Parameters Table in that environment. My problem is that it is not clear how to accomplish the same thing in oTree.

I'm aware that I can establish group sizes in models.py as follows

class Constants(BaseConstants): 
players_per_group = [x,y] # Where x, y are the Minority and Majority group sizes, respectively.

And I'm aware that I can establish constants that could correspond to the matching parameters in the same class, but there will typically be eight players playing 120 rounds of the game. That would require at least 480 unique ordered pairs to specify. And this will also change from experiment-experiment, as we will change group sizes. That would be impractical to hand-code.

I already have the spreadsheets (.csv files) with the appropriately randomized matching tables from the previous experiment. Is there a way I can get oTree to read those spreadsheets and conduct the matchings based on those values?

And suggestions of how to proceed would be greatly appreciated. Cheers & warmth.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.