Millisecond Forums

Errors in item pools: removeitem and item probablity

https://forums.millisecond.com/Topic15635.aspx

By tscho - 3/1/2015

I have 5 items in a pool using the list command.
1 2 3 4 5
If I delete item 1 from a pool it's giving me a pool that looks as follows.
3 4 5
If I delete item 3 from a pool it's giving me a pool that looks as follows.
1 2 5
If I delete item 5 from a pool it's giving me a pool that looks as follows.
1 2 3 4
Basically, it looks like it's sliding all items up 1 position, then deleting the requested position. Why is this happening?

I tried to work around this by not removing items from the pool but having expressions that evaluated to zero when I wanted the item removed from the pool, total probabilities of all items in the pool always equal 1.
list elementWhen I set a probability to zero via this method it is esesentially operating as if I've used list.listname.removeitem. I have no control over the fact that Inquisit removes the item from the pool. This would be fine (well, not really!) if removing items didn't show the defective behavior above.
By Dave - 3/1/2015

> If I delete item 1 from a pool it's giving me a pool that looks as follows.
> 3 4 5

No, it should give you a pool that looks like 2 3 4 5, which is the expected behavior (run the code below).

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ ontrialbegin = [list.mylist.removeitem(1)]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<list mylist>
/ items = (1,2,3,4,5)
</list>

<text mytext>
/ items = ("<%list.mylist.item(1)%><%list.mylist.item(2)%><%list.mylist.item(3)%><%list.mylist.item(4)%>")
</text>

When you remove 1st item, the 2nd item becomes the new 1st item and so forth. The behavior isn't defective, but intended.
By tscho - 3/1/2015

Ah, I see. It's just in the debug watch window.

http://www.millisecond.com/forums/uploads/images/45f243b1-dfbc-4dd6-ab97-23ee.png