/smile

a head-meltingly happy approach to online behavioral research

Primary LanguageJavaScriptMIT LicenseMIT

🫠 Smile.

A happy approach to online research.

Online docs: https://smile.gureckislab.org

Required software to work on this

rtdb_multiplayer branch changelog

  • in stores/firestore-db.js, add lines commented "for rtdb". This allows us to use rtdb in other files.
  • added multi-player.js
    • includes the WaitRoom object for matching players (from matching.js in dyadic-learning-trap-task, branch v3)
    • also includes the stuff from user.js in dyadic-learning-trap-task, branch v3

proposed matching logic

  • have a list of unmatched players in rtdb
  • for new player, if list is empty, add self to list. else, try to match with first person on the list that isn't currently in the proces of pairing.
  • while pairing, make sure to check that proposed partner's partner is me
  • use transactions to avoid collisions? if things change during proposal, move on to proposing to someone else