lottery and lists?


Author
Message
andregalvez
andregalvez
Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)Partner Member (581 reputation)
Group: Forum Members
Posts: 5, Visits: 10
Hi,

I made a recent post on inquisit 4 about how to program in this language very recently... I figured out many stuff, but now I'm lost again.

I tried something out but I'm not sure if the script is doing what I think it is, so I'll describe what I thin I'm doing.

The idea is:
first to retrieve a random response the participant makes (either ss or ll) see <trial 1>... I think I'm doing this in <list lotteryr>
then I generate 99 random numbers which I think I'm doing in <list lotterydist>... 
then I think I append the number from <list lotteryr> into <list lotterydist> and create a list <list lotterytotal>
the next step would be to retrieve a random number from <list lotterytotal>
and if possible show the numbers on the screen as if it was a lottery... like a for loop for each item and then show the "winning number" if the number retrieved form <list lotterytotal> equals the one in the <list lotteryr>

<trial 1>
/ inputdevice=mouse
/ validresponse=(ss, ll)
/ stimulusframes = [1 = ss, ll, delayss, delayll, remind]
</trial>

<values>
/ pay = 0
</values>

<list lotteryr>
/ items=[values.pay = trial.1.response]
/ poolsize=1
/ selectionmode=random
</list>

<values>
/ myvalue = 0
</values>

<list lotterydist>
/ items=[values.myvalue = floor(rand(1,99))]
/ poolsize=99
/ selectionmode=random
</list>

<list lotterytotal>
/ items=[list.lotterydist.appenditem(values.pay);]
/ selectionmode=random
</list>


As I said, I'm new to this language, so I have no idea if what I want to do is even possible (a lottery where the participant has 1% chance to win one of the options he/she chose).
I would appreciate some help on this... I also read this thread https://www.millisecond.com/forums/Topic17448.aspx (recommended by Dave on the post I mentioned earlier), but I don't understand most of it and I think what I want to do is different.

Another thing, I'm not sure if lists are the best way to do this in inquisit, any suggestion or help is welcome.

Thanks you for your time,

Andre
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
andregalvez - 9 Years Ago
Dave - 9 Years Ago
andregalvez - 9 Years Ago
Dave - 9 Years Ago
                     + x [quote] [b] Dave - Sunday, November 13, 2016 [/b]...
andregalvez - 9 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search