Repo for rock, paper, scissors experiments
- Clone repo
- This requires
node.js
and the node package managernpm
. Google these to download and run locally :) - cd to
rps/
directory - Start server:
node app.js
- In browser, navigate to URL below that matches the version you'd like to play
- Visit
http://localhost:3000/index.html
orhttp://localhost:3000/index.html?&mode=test
for test version (writes a file prepended withTEST_...
for easy debugging) - For dyad version, open two browser tabs and visit the links above in each to play against yourself!
- Visit
http://localhost:3000/index.html?&ver=2
orhttp://localhost:3000/index.html?&ver=2&mode=test
for test version (same as above) - For static bot version, the server chooses the bot strategy at random from among the strategies outlined in
/lib/server_constants.js:BOT_STRATEGY_SET
and prints the strategy out at runtime
- Visit
http://localhost:3000/index.html?&ver=3
orhttp://localhost:3000/index.html?&ver=3&mode=test
for test version (same as above) - For adaptive bot version, the server chooses the bot strategy at random from among the strategies outlined in
/lib/server_constants.js:ADAPTIVE_BOT_STRATEGY_SET
and prints the strategy out at runtime
- Visit
http://localhost:3000/admin
to view the state of games currently in play (helpful when running this as an experiment)
Participant data is in the /data
directory
/data/v1/
contains paired dyad results/data/v2/
contains individual player results against stable strategy bots/data/v3/
contains individual player results against adaptive strategy bots/data/pilot/
contains pilot results from the v1 paired dyad experiments
In each of the folders above, file naming conventions are as follows:
- Game data is saved in files with
{game_id}.json
- Free response survey data is saved in files with
freeResp_{player_id}.json
- Likert scale survey data is saved in files with
sliderData_{player_id}.json
Analysis code is in the /analysis
directory
- The python files
json_to_csv_v1.py
,json_to_csv_v2.py
,json_to_csv_v3.py
,json_to_csv_sliderData.py
, andjson_to_csv_freeResp.py
each convert the individual data files from json to a single csv output file for analysis (these are in the same directory and have matched names) cogsci_analysis-2020.R
contains the full analysis for the CogSci 2020 proceedings manuscript.cogsci_analysis-2021.R
contains the full analysis for the CogSci 2021 proceedings manuscript.manuscript_analysis.R
contains the full analysis for manuscript submission.