Skip to content

Commit

Permalink
add predefined optimal strategies in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vagechirkov committed Feb 9, 2023
1 parent be499bc commit 375b6d7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion backend/app/routes/session_utils/save_trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ async def save_social_learning_selection(trials: List[Trial],
sl_selection = trials[0]
sl_trials = trials[1:]

# TODO: remove this after pilot 2B !!!
# ----------------- Relevant for pilot 2B -----------------
# sl_selection.id == 4 is the first social learning selection trial
if sl_selection.id == 4:
comment = "To be able to get to the arrows with 400 points you first need to take three arrows with -50 points."
else:
comment = "Follow three red arrows, then follow the highest points possible."
# ---------------------------------------------------------

# remove instruction trial if it is in the list of social learning trials
sl_trials = [t for t in sl_trials if t.trial_type != 'instruction']

Expand Down Expand Up @@ -119,7 +128,11 @@ async def save_social_learning_selection(trials: List[Trial],
sl_trials[n * 3 + i].advisor = Advisor(
advisor_id=body.advisor_id,
solution=t.solution,
written_strategy=wr_s.strategy
# written_strategy=wr_s.strategy
# TODO: remove this after pilot 2B !!!
# ----------------- Relevant for pilot 2B -----------------
written_strategy=comment
# ---------------------------------------------------------
)
# assign advisor's network to the trial
sl_trials[n * 3 + i].network = t.network
Expand Down

0 comments on commit 375b6d7

Please sign in to comment.