Part 4.6: Compute the Score
Identify the correct time to compute the score
Empirica.onStageEnded(({ stage }) => {
if (stage.get("name") !== "choice") return;
console.log("End of choice stage");
});Loop over all the players
const players = stage.currentGame.players;for (const player of players) {
console.log("computing score for player ", player.id)
}Compute the payoff for each player
Restart and run through the experiment again
Last updated
Was this helpful?