html5 / javascript code for Qualtrics

Anulowany Opublikowano Mar 24, 2015 Płatność przy odbiorze
Anulowany Płatność przy odbiorze

We need an extension of an existing HTML5 / javascript code that can be implemented entirely in a survey/experiment in Qualtrics ([url removed, login to view]).

The current code which we use to represent a dice game in a Qualtrics survey is a minor modification based on the following tutorial/wheel: [url removed, login to view])

WHAT WE CURRENTLY HAVE

Our game consists of 6 rounds of throwing a dice with the objective of scoring a sum of 21 or greater, the player starts with a budget of 36 credits can bet between 0-6 each round. If he wins the credits bet are doubled and what is left in his budget is added. If he loses he gets only what he did not bet.

After each bet the player faces a spinning wheel (representing the dice outcomes) which loads once on showing the question and is partially covered (the player only sees the top portion of the wheel). The wheel spins and shows the result of the throw/spin. Before each round (starting with the 2nd) the player is reminded of the current running sum (of all previous throws). After the 6 throws the player is told whether he won (if sum>=21) or not and depending on whether he won or not how many credits he has won overall.

We currently use the scoring function in Qualtrics to count the credits the player bets each round. We then use the embedded data function to calculate the total winnings and show them to individual participants in the survey using piped text based on the embedded data.

Our wheels are currently not random which allows us to know in which game the credits bet are doubled (score > 21).

See a preview of our current game here: [url removed, login to view] (This example still includes a partially covered & an uncovered wheel.)

WHAT WE NEED

We need 2 versions using a different wheel each to represent the dice, one with a distribution of (5, 4, 5, 3, 5, 3, 5, 2, 3, 1, 6, 2), and one with a distribution of (4, 2, 5, 3, 4, 3, 1, 5, 3, 1, 6, 1). We now need the wheels to be random (as in the original code) except for round 6 (see below) and as a consequence we need:

1) The outcomes of the wheel spins for every spin to be recorded per player (ideally as a variable in Qualtrics as they have to be matched with the player's ID).

The outcomes should be recorded as exact as possible, e.g. as an angle on the wheel or the distance from the middle of each partition to the next. Basically, we would like to know if, e.g. given the first distribution, how close the wheel came to a 3 and a 6 if it stopped on the 1.

2) The credits earned to be computed (as explained above) for every player, and to be shown in Qualtrics after playing each game, depending on the random outcomes, i.e. whether the player won or not.

3) The ability to show players the actual probability of winning the game before each round. We already have an Excel sheet with the probabilities of winning the game depending on a given running sum in a given round (attached here). We would need these probabilities to be shown before making a bet in Qualtrics, depending on the current running sum and round the player is in.

4) For round 6 the wheel needs to be semi-random. The objective is that, if possible, the result should be exactly 21. If the running sum after round 5 is too low or too high, the wheel spins at random. Otherwise the wheel spin should be non-random to achieve an end result of 21. For example, in Excel we could have the following as the model for round 6:

=IF(RUNNINGSUMRND5>20,RANDBETWEEN(1,6),IF(RUNNINGSUMRND5=20,1,IF(RUNNINGSUMRND5=19,2,IF(RUNNINGSUMRND5=18,3,IF(RUNNINGSUMRND5=17,4,IF(RUNNINGSUMRND5=16,5,IF(RUNNINGSUMRND5=15,6,IF(CA3<15,RANDBETWEEN(1,6)))))))))

Instead of the randbetween(1,6) function the wheel with the distributions mentioned above would simply spin at random.

FURTHERMORE

If you have a Qualtrics account we can share the survey that is linked above with your account (for you to see the current structure etc).

I'm a PhD student and I need this extension for an experiment. My budget is therefore unfortunately limited.

JavaScript Platforma Ankiety Qualtrics

Numer ID Projektu: #7364334

O projekcie

6 ofert Zdalny projekt Aktywny Apr 15, 2015

6 freelancerów złożyło ofertę za €240 w tym projekcie

ibapi

A proposal has not yet been provided

€263 EUR w ciągu 3 dni
(26 Oceny)
5.7
guangzhen122

Hello. Dear employer. Thank you for your posting with my skill's scope. I had read your requirement and had a confidence to complete this project on time as you will be satisfied because I have many experience in th Więcej

€200 EUR w ciągu 3 dni
(12 Oceny)
4.1
als31

A proposal has not yet been provided

€333 EUR w ciągu 3 dni
(2 Oceny)
2.8
WhatTechnologies

A proposal has not yet been provided

€222 EUR w ciągu 5 dni
(0 Oceny)
0.0