seandr
|
|
Group: Administrators
Posts: 1.3K,
Visits: 5.6K
|
FYI - we've posted a new Hungry Donkey Task for Inquisit 3 to our task library. You can download it here: http://www.millisecond.com/download/samples/v3/HungryDonkeyTask/default.aspx -Sean
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
Okay. This is fairly easy. You have these <values> in your script in order to keep track of gains/losses:
<values> / currenttotal = 0 / previoustotal = 0 / gain = 0 / loss = 0 </values>
Now, after subjects have finished the habituation block, you'll want to reset all these values to zero. The correct syntax will look like this:
<block hungry_donkey0> [...] / onblockend = [values.currenttotal = 0; values.previoustotal = 0; values.gain = 0; values.loss = 0] </block>
As you can see, you have to specifically tell Inquisit the "name" of each <values> entry to reset. One further note: Assigning a value is done by using a single "=" sign. On the other hand, the double "==" sign is a logical operator used for evaluating the "Truth" of comparisons. That's that.
The port problem is a different story. Here are some basic things to check on: First, make sure that the computer really has a physical parallel port (i.e. crawl behind it and see if it's there). Also check the Windows device manager and see if you can find a correctly installed parallel port. Then start Inquisit and run the Parallel Port Monitor from the Tools menu. Switch through the port numbers and look for an entry that displays a non-zero value under port address (e.g. "378" or "3BC" on some systems). Once you have this, change the <port> elements in your script to use the correct port number (right now, they're referencing LPT1).
Best, ~Dave
|
|
|
HTibboel
|
|
Group: Forum Members
Posts: 7,
Visits: 1
|
Dear Dave, Thank you!!! Well, the file is uploaded on the following link: http://www.megaupload.com/?d=VAM5O4TI The habituation/try out block is depicted as Hungry Donkey0. When I tried out the following, it didn't work: <block hungry_donkey0> / trials = [1-5 = noreplacenorepeat (trial_ID1, trial_ID2, trial_ID3, trial_ID4, trial_ID5, trial_ID6, trial_ID7, trial_ID8, trial_ID9, trial_ID10)] / onblockend = [values == 00] </block> Furthermore, we downloaded at one computer the tryout version of Inquisit 3.00. We tried to run this experiment but then we got the notification that their is a port problem (we need that for measurement of the physiological data). Parallel port operation failed. Line Number: 200 File: .\DirLptPort.cpp Status Code: 9996 Error Message: 'No device handle' Do you know what this imply? Because on the other computer everything works ... Thank you again!! Regards, Kasia
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
Glad to hear it's basically working now. For resetting the scores, using '/ onblockend' generally seems to be the right idea. So, I suppose there's just some minor error somewhere in the syntax. If you'd again like to upload your updated script, I'll take a look.
~Dave
|
|
|
HTibboel
|
|
Group: Forum Members
Posts: 7,
Visits: 1
|
Thank you all for your valuable comments and tips!! My hungry donkey task works now! However, we still have one problem. We first have an habituation block where the participants have to practice. During this block the amount of losses and gains are already calculated. When the first real block begins (the actual experiment) we would like to start from 0. Is it possible to set the score back to zero somehow? I have tried to work with onblockend, but that didn't work... Greetz Kasia
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
Is this a bug? Well, not exactly although it's not ideal either. Intuitively, both of these conditionsal statements should evaluate to true, so it's a matter of having the response property return different values depending on whether it's being compared with a string or a number. As of yet, no other property works that way, and it would require some mucking around with the expression evaluator to do this properly. I'll certainly put it on my list of possible features for a future release. Sorry for somewhat falsely labeling this as a bug, Sean. I would have expected the expressions to work because within a trial using keypress responses noted as "literal" values the following syntax will function properly: <trial mytrial> / stimulusframes = [0=sometext] / validresponse = ("a", "b") / responsetrial = ("a", happytrial) / responsetrial = ("b", sadtrial) </trial>I understand that Inquisit records the scankeys in its datafile, but I wasn't aware that - after a keypress response trial has finished - only the scankey will be availble as response-property at runtime. Might it be possible - again - to tackle this problem by adding a new property to the trial element that returns the "literal" key value instead of the scankey value? However, I personally think that this is a minor issue at best. Cheers, ~Dave
|
|
|
seandr
|
|
Group: Administrators
Posts: 1.3K,
Visits: 5.6K
|
I believe the issue is that the response property returns the scancode of the key that was pressed, not the character value. The following conditional would thus never evaluate to true: / ontrialbegin = [if(trial.trial_ID1.response == "s") ...] However, the following would be true if the subject pressed the "s" key: / ontrialbegin = [if(trial.trial_ID1.response == 31...] because the scancode for "s" is 31. You can figure out scan codes for other keys using the Scancode tool on the Tools menu. Is this a bug? Well, not exactly although it's not ideal either. Intuitively, both of these conditionsal statements should evaluate to true, so it's a matter of having the response property return different values depending on whether it's being compared with a string or a number. As of yet, no other property works that way, and it would require some mucking around with the expression evaluator to do this properly. I'll certainly put it on my list of possible features for a future release. -Sean
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
I've had a look at your files and - as it seems - you've hit on a few Inquisit bugs. So, from what I can tell, it's not really your fault that things aren't working as they should. Here's a workaround for you, though. The general problem is that the /ontrialend and /ontrialbegin branches appear to have a hard time to work with keypress responses when they're given as "literal" values: / ontrialbegin = [if(trial.trial_ID1.response == "s") ...] If you use the key's scancode (see here: http://www.millisecond.com/support/docs/v3/html/language/scancodes.htm) instead, the script will start working. The scancode for the S-key is 31: / ontrialbegin = [if(trial.trial_ID1.response == "31") ...] Also, if you switch the script to accept mouse instead of keyboard responses, it starts working as expected. I've attached a small test script based on your original file to demonstrate what I described above. I additionally recommend emailing Sean about the issue. Now that you can have the core functions of your script running, I hope you'll be able to figure out the further details without too much hassle. Best, ~Dave
|
|
|
HTibboel
|
|
Group: Forum Members
Posts: 7,
Visits: 1
|
Hi Dave, That's really kind of you!!We are really panicking now.. On the next site you can find our stimuli and scripts: http://www.megaupload.com/?d=ULZ0BP4D The design of the task is as follows: If you run the block 'sukeltjes' (this is a block in which we tried to program one branching trial, don't mind the other trials, because the design will be the same for them), you should see four doors; the participant has to choose one door by pressing q,s,k, OR l on a standard azerty keyboard. Depending on the chosen door, a certain reward is given (apples): for door 1 = 4 apples won and 8 apples lost for door 2 = 4 apples won and 50 lost for door 3 = 2 apples won and 1 lost for door 4 = 2 apples won and 10 lost Feedback should be: the chosen door should be replaced by an open door showing the amount of apples lost and won (e.g. see picture 8r_4g.jpg), the total amount of apples gathered over trials (instead of the donkey), in the lower right corner: a bar showing visually the gains and losses (e.g. Bar13_87.jpg) on that particular trial with underneath the gains and losses on that particular trial in numbers (e.g. +4 and -8). For instance, if the participant gained a total of 6-19 apples over all trials, the bar 13_87 should be presented next to the fourth door. All feedback should be given at the same time during 2500ms. Do you see the problem in the script? I hope you can help us out, since we are really getting short in time. Regards, Kasia & Bram
|
|
|
seandr
|
|
Group: Administrators
Posts: 1.3K,
Visits: 5.6K
|
I don't see any problem with your branch, but you might try removing the "if (true)" part, as in: / branch = [trial.HD_ID1_feedback] This is logically equivalent to what you currently have. -Sean
|
|
|