Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove probability #164

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/config/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { deepCopy } from "../lib/utils";
// create copy of default settings
let exptBlock1 = deepCopy(defaultBlockSettings);

exptBlock1.probs = ["100%", "100%", "50%", "50%"];
exptBlock1.probs = ["100%", "100%"];
exptBlock1.counterbalance = true;
exptBlock1.get_subset = true;
exptBlock1.get_subset = false;
exptBlock1.value = [3, 5, 7];
exptBlock1.effort = [50, 100, 200]; // default vals were: 100, 120, 150
exptBlock1.keys = ["q", "p", "m"];
exptBlock1.get_reward = [true, true, true, false];
exptBlock1.num_breaks = 3;
exptBlock1.get_reward = [true, true];
exptBlock1.num_breaks = 2;

// debug settings where there are only 2 trials in main task block
//exptBlock1.probs = ["100%"];
Expand Down
2 changes: 1 addition & 1 deletion src/config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ try {
// then assume it's online in the browser
// with MTurk or Prolific
ONLINE = AT_HOME && !IS_ELECTRON ? true : false;
//ONLINE = true;
ONLINE = false;
console.log("ONLINE:", ONLINE);

// note: it _is_ possible to do both firebase & mturk if desired
Expand Down
5 changes: 1 addition & 4 deletions src/config/practice.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { deepCopy } from "../lib/utils";
let practiceBlock1 = deepCopy(defaultBlockSettings);

practiceBlock1.is_practice = true;
practiceBlock1.probs = ["100%"];
practiceBlock1.value = [1, 0];
practiceBlock1.effort = [20, 0];
practiceBlock1.high_effort = [false, false];
Expand All @@ -19,7 +18,6 @@ practiceBlock1.get_reward = [true, true];
let practiceBlock2 = deepCopy(defaultBlockSettings);

practiceBlock2.is_practice = true;
practiceBlock2.probs = ["100%"];
practiceBlock2.value = [0, 5];
practiceBlock2.effort = [0, 200];
practiceBlock2.high_effort = [false, true];
Expand All @@ -30,12 +28,11 @@ practiceBlock2.get_reward = [true, true];
let practiceBlock3 = deepCopy(defaultBlockSettings);

practiceBlock3.is_practice = true;
practiceBlock3.probs = ["50%"];
practiceBlock3.value = [1, 5];
practiceBlock3.effort = [20, 200];
practiceBlock3.high_effort = [false, true];
practiceBlock3.keys = ["q", "p"];
practiceBlock3.get_reward = [false, true];
practiceBlock3.get_reward = [true, true];
practiceBlock3.quiz_attempts = 1;
practiceBlock3.max_attempts = 5;

Expand Down
14 changes: 4 additions & 10 deletions src/language/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
"green_balloon_pump_bonus": "If you continue to pump the <span class='text-green'><b>GREEN</b></span> balloon after it hits the spike within the <span class='text-green'><b>25 seconds</b></span> time limit, the bigger the balloon will get and the more <u>bonus</u> points you will earn.<br></br>If you pump the <span class='text-green'><b>GREEN</b></span> balloon and it does not reach the spike within the <span class='text-green'><b>25 seconds</b></span> time limit, you will earn <b>some</b> of the points for pumping the balloon. <br></br>(Example: If the total possible points you can earn for a balloon is 2 points and you pump the balloon halfway to the spike, you will earn 1 point.)<br></br>",
"green_balloon_variable_points_pumps": "For the <span class='text-green'><b>GREEN</b></span> balloon, the number of pumps needed and the number of points you could win <span class='text-green'><b><u>can change on each round</u></b></span>. The number of pumps and points are listed below the <span class='text-green'><b>GREEN</b></span> balloon.",
"blue_balloon_constant_points_pumps": "For the <span class='text-blue'><b>BLUE</b></span> balloon, the potential win <span class='text-blue'><b><u>will always stay the same</u></b></span> (<span class='text-blue'><b>1 point</b></span>),<br>and it will always require <span class='text-blue'><b>20 pumps</b></span>.",
"reward_prob_variable": "For some rounds, the chances that you will win points for either balloon are <b> 50% </b> <br> <u>(even after popping the balloon). </u>",
"reward_prob_certain": "In other rounds the chances of winning will be <b>100%</b>.",
"prob_display_location": "<b>The probability at which you will receive points for a trial will appear at the <u>bottom</u> of the screen.</b>",
"reward_prob_display_event": "The chances of winning points on that round, and the number of points possible to win, will be shown to you while you choose which balloon to inflate.",
"pump_keys": "Press the <span class='text-large'><b>Q</b></span> key to pump the balloon on the left.<br>Press the <span class='text-large'><b>P</b></span> key to pump the balloon on the right.",
"choice_locked_in": "Once you have chosen a balloon, you can only pump that balloon.",
"ready": "The experiment will start now.<br>Press next when ready!",
Expand All @@ -68,15 +64,13 @@
"any_questions": "Do you have any questions?",
"prompt": {
"more_pumps": "1. Which balloon requires more pumps? <span class='text-blue'><b>BLUE</b></span> or <span class='text-green'><b>GREEN</b></span>?",
"reward_certainty_reach_spike": "2. True or False: You will <u>ALWAYS</u> get points once you reach the spike.",
"bonus_blue": "3. True or False: You can get bonus points on the <span class='text-blue'><b>BLUE</b></span> balloon.",
"bonus_green": "4. True or False: You can get bonus points on the <span class='text-green'><b>GREEN</b></span> balloon.",
"total_shown": "5. True or False: You will be shown your total number of points after each round.",
"points_to_money": "6. True or False: You will receive real money from your total number of points at the end of the task."
"bonus_blue": "2. True or False: You can get bonus points on the <span class='text-blue'><b>BLUE</b></span> balloon.",
"bonus_green": "3. True or False: You can get bonus points on the <span class='text-green'><b>GREEN</b></span> balloon.",
"total_shown": "4. True or False: You will be shown your total number of points after each round.",
"points_to_money": "5. True or False: You will receive real money from your total number of points at the end of the task."
},
"rules": {
"preface": "Summary of Instructions/Rules:",
"shown_probability": "1. You will be shown the probability of earning points for a round.",
"shown_blue_green_on_screen": "2. You will be shown a <span class='text-blue'><b>BLUE</b></span> balloon and a <span class='text-green'><b>GREEN</b></span> balloon on the screen.",
"job": "3. Your job is to choose which balloon to pump up.",
"blue_req_20": "4. The <span class='text-blue'><b>BLUE</b></span> balloon will ALWAYS require 20 pumps to reach the spike and can give 1 point.",
Expand Down
2 changes: 1 addition & 1 deletion src/timelines/taskBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const taskBlock = (blockSettings) => {
let timeline = startingOpts.map((opt) => taskTrial(blockSettings, blockDetails, opt))

if (blockSettings.num_breaks > 0) {
let breakInterval = Math.floor(timeline.length / (blockSettings.num_breaks + 1))
let breakInterval = Math.floor(36 / (blockSettings.num_breaks + 1))
for (let iBreak = 1; iBreak < blockSettings.num_breaks + 1; iBreak++) {
timeline.splice(iBreak * breakInterval, 0, breakTrial(iBreak))
}
Expand Down
2 changes: 1 addition & 1 deletion src/timelines/taskTrial.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const taskTrial = (blockSettings, blockDetails, opts) => {
let timeline = [
// show condition
fixation(300),
rewardProbability(1000, blockSettings, opts, trialDetails),
//rewardProbability(1000, blockSettings, opts, trialDetails),
//frameSpike(700, blockSettings, opts, trialDetails),
//costBenefits(1500, blockSettings, opts, trialDetails),
choice(6000, blockSettings, opts, trialDetails),
Expand Down
13 changes: 0 additions & 13 deletions src/trials/instructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,9 @@ const realPracticeScreenOne = baseStimulus(
true
);

const realPracticeScreenTwo = baseStimulus(
`
<div class='instructions'>
<p style='font-size:1.75vw;'>${lang.instructions.reward_prob_variable}</p>
<p style='font-size:1.75vw;'>${lang.instructions.reward_prob_certain}</p>
<p style='font-size:1.75vw;'>${lang.instructions.prob_display_location}</p>
</div>
`,
true
);

const realPracticeScreenThree = baseStimulus(
`
<div class='instructions'>
<p style='font-size:1.75vw;'>${lang.instructions.reward_prob_display_event}</p>
<p style='font-size:1.75vw;'>${lang.instructions.missed_choice}</p>
</div>
`,
Expand Down Expand Up @@ -175,7 +163,6 @@ const greenPracticeInstructions = () => {
const realPracticeInstructions = () => {
let realPracticeInstructionsArray = [
realPracticeScreenOne,
realPracticeScreenTwo,
realPracticeScreenThree,
realPracticeScreenFour,
];
Expand Down
11 changes: 1 addition & 10 deletions src/trials/quizTrials.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const blueOrGreen = [

const quizPrompts = [
`${lang.quiz.prompt.more_pumps}`,
`${lang.quiz.prompt.reward_certainty_reach_spike}`,
`${lang.quiz.prompt.bonus_blue}`,
`${lang.quiz.prompt.bonus_green}`,
`${lang.quiz.prompt.total_shown}`,
Expand All @@ -28,7 +27,6 @@ const quizPrompts = [
];

const quizRules = [
`${lang.quiz.rules.shown_probability}`,
`${lang.quiz.rules.shown_blue_green_on_screen}`,
`${lang.quiz.rules.job}`,
`${lang.quiz.rules.blue_req_20}`,
Expand Down Expand Up @@ -71,11 +69,6 @@ const quiz = (blockSettings) => {
options: quizOptions(),
required: true,
},
{
prompt: quizPrompts[5],
options: quizOptions(),
required: true,
},
];

return {
Expand Down Expand Up @@ -163,7 +156,6 @@ const retakeLoop = (blockSettings) => {
const correctAnswers = [
`${lang.quiz.answer_opts.green}`,
`${lang.quiz.answer_opts.false}`,
`${lang.quiz.answer_opts.false}`,
`${lang.quiz.answer_opts.true}`,
`${lang.quiz.answer_opts.true}`,
`${lang.quiz.answer_opts.true}`,
Expand Down Expand Up @@ -191,8 +183,7 @@ const checkRetake = (blockSettings) => {
const prevAnswers = prevData.answer;

const correctAnswers = [
`${lang.quiz.answer_opts.green}`,
`${lang.quiz.answer_opts.false}`,
`${lang.quiz.answer_opts.green}`,
`${lang.quiz.answer_opts.false}`,
`${lang.quiz.answer_opts.true}`,
`${lang.quiz.answer_opts.true}`,
Expand Down