Generating a Balloon Analog Risk Task for an OSWeb study
Greetings everyone,
I am trying to generate a Balloon Analog Risk Task on Opensesame, however, since I have very little knowledge about Javascript and programming I fail to write the correct scripts. Could you help me with BART. (What codes should I use, where to use them, etc) I attached a screenshot of BART in case you don't know. If you think you are capable in Javascript but need any information on BART please let me know.
Peace,
Meto

Comments
Hi @meto,
Welcome to the forum!
I am assuming that what you'd like to do is to generate a BART task in OSWeb (not OS). OSWeb allows you to run your OS inside a browser (either from the OS interface or as a JATOS experiment). However, it is important to note that not all OS features are supported in OSWeb (see https://osdoc.cogsci.nl/3.3/manual/osweb/osweb/#supported-functionality).
There is no already-made code for a BART task. It all depends on your specific experiment and requirements (your post is not specific enough about the experimental design; how many trials, what probability that the balloon should explode, what probability as a function of the number of pumps, etc.). It will require investing some time into learning some programming in OS and Javascript on your part. I recommend you start here: https://osdoc.cogsci.nl/3.3/manual/javascript/about/. Javascript, at least when it comes to using it to manipulate variables in OSWeb, is not difficult to learn.
As you develop your experiment, please run it through the browser:
In this way, you'll be able to verify step by step that your task is compatible with OSWeb.
Note that you should also check the compatibility check:
I recommend that you dedicate some time to learning OS and some Javascript, reading the documentation provided and looking up information on the forum to build your task little by little.
You can actually find a thread on the forum where other users published a version of the BART, though for OS and not for OSWeb. It's written entirely in Python, but the general idea and structure might be of use to you. You'd just need to adapt it to your requirements and write some Javascript code: https://forum.cogsci.nl/discussion/2925/balloon-analogue-risk-task
Feel free to post a more detailed description of your design and/or a version of your task if you're facing specific problems.
Kind regards,
Fabrice.