Question about the "latency" column in the Cyberball (3-player) data record.


Question about the "latency" column in the Cyberball (3-player) data...
Author
Message
Olivia Ying
Olivia Ying
Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)
Group: Forum Members
Posts: 10, Visits: 20
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

However, in the returned data (see screenshot), there are a large number of '0's, which I think may be because player1 and player3 are not recorded as hesitation times for virtual players. However, again, it's not all '0's, it looks like '500' and '1000' are possible numbers as they are one of the randomized times, but why again '800'? I've checked the code but still can't explain this and wondered if you had any good insights?


Thank you very much for the time you put into this!

Best,
Yingying


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

However, in the returned data (see screenshot), there are a large number of '0's, which I think may be because player1 and player3 are not recorded as hesitation times for virtual players. However, again, it's not all '0's, it looks like '500' and '1000' are possible numbers as they are one of the randomized times, but why again '800'? I've checked the code but still can't explain this and wondered if you had any good insights?


Thank you very much for the time you put into this!

Best,
Yingying


The value returned by the cyberdecisiontime expression determines at what time the ball throwing animation is displayed by the given trial per

trial.1to3.insertStimulusTime(video.1to3, expressions.cyberdecisiontime);

<trial 1to3> has /trialduraton = 0, so latency will always be 0 (trial immediately ends after the throw animaton, no time to submit a response even if the trial were set up to take a response),

<trial 3to1> has /trialduration = expressions.cyberdecisiontime. I'm not sure why, I didn't write this script. It looks like a mistake left over from a previous revision to me. The effect of that is that two values sampled from the cyberdecisiontime expression will be used in that trial. One here

trial.3to1.insertStimulusTime(video.3to1, expressions.cyberdecisiontime);

and one here

/ trialduration= expressions.cyberdecisiontim

Depending on what those two values happen to be, you'll get some time left in the trial after the animation is finished, and that'll be recorded as the latency. E.g. animation is displayed at 500 ms, takes 200ms to finish, trialduration is 1500 -> 1500 - 700 = 800.

Edited Last Month by Dave
Olivia Ying
Olivia Ying
Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)
Group: Forum Members
Posts: 10, Visits: 20
Dave - 3/15/2024
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

However, in the returned data (see screenshot), there are a large number of '0's, which I think may be because player1 and player3 are not recorded as hesitation times for virtual players. However, again, it's not all '0's, it looks like '500' and '1000' are possible numbers as they are one of the randomized times, but why again '800'? I've checked the code but still can't explain this and wondered if you had any good insights?


Thank you very much for the time you put into this!

Best,
Yingying


The value returned by the cyberdecisiontime expression determines at what time the ball throwing animation is displayed by the given trial per

trial.1to3.insertStimulusTime(video.1to3, expressions.cyberdecisiontime);

<trial 1to3> has /trialduraton = 0, so latency will always be 0 (trial immediately ends after the throw animaton, no time to submit a response even if the trial were set up to take a response),

<trial 3to1> has /trialduration = expressions.cyberdecisiontime. I'm not sure why, I didn't write this script. It looks like a mistake left over from a previous revision to me. The effect of that is that two values sampled from the cyberdecisiontime expression will be used in that trial. One here

trial.3to1.insertStimulusTime(video.3to1, expressions.cyberdecisiontime);

and one here

/ trialduration= expressions.cyberdecisiontim

Depending on what those two values happen to be, you'll get some time left in the trial after the animation is finished, and that'll be recorded as the latency. E.g. animation is displayed at 500 ms, takes 200ms to finish, trialduration is 1500 -> 1500 - 700 = 800.

Hi Dave,

Thank you very much for your prompt response!

But my intention is to set some random pre-pitch hesitation times for players 1 and 3 and record them for those hesitation times. I wonder what you think would be the best way to change this?

Also, if this is the case, is the "latency" column for pitches thrown by player2 (either to plater1 or player3) recording the player's hesitation time before the pitch?

Thanks again!

Best.
Yingying

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Olivia Ying - 3/15/2024
Dave - 3/15/2024
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

However, in the returned data (see screenshot), there are a large number of '0's, which I think may be because player1 and player3 are not recorded as hesitation times for virtual players. However, again, it's not all '0's, it looks like '500' and '1000' are possible numbers as they are one of the randomized times, but why again '800'? I've checked the code but still can't explain this and wondered if you had any good insights?


Thank you very much for the time you put into this!

Best,
Yingying


The value returned by the cyberdecisiontime expression determines at what time the ball throwing animation is displayed by the given trial per

trial.1to3.insertStimulusTime(video.1to3, expressions.cyberdecisiontime);

<trial 1to3> has /trialduraton = 0, so latency will always be 0 (trial immediately ends after the throw animaton, no time to submit a response even if the trial were set up to take a response),

<trial 3to1> has /trialduration = expressions.cyberdecisiontime. I'm not sure why, I didn't write this script. It looks like a mistake left over from a previous revision to me. The effect of that is that two values sampled from the cyberdecisiontime expression will be used in that trial. One here

trial.3to1.insertStimulusTime(video.3to1, expressions.cyberdecisiontime);

and one here

/ trialduration= expressions.cyberdecisiontim

Depending on what those two values happen to be, you'll get some time left in the trial after the animation is finished, and that'll be recorded as the latency. E.g. animation is displayed at 500 ms, takes 200ms to finish, trialduration is 1500 -> 1500 - 700 = 800.

Hi Dave,

Thank you very much for your prompt response!

But my intention is to set some random pre-pitch hesitation times for players 1 and 3 and record them for those hesitation times. I wonder what you think would be the best way to change this?

Also, if this is the case, is the "latency" column for pitches thrown by player2 (either to plater1 or player3) recording the player's hesitation time before the pitch?

Thanks again!

Best.
Yingying

> But my intention is to set some random pre-pitch hesitation times for players 1 and 3 and record them for those hesitation times. I wonder what you think would be the best way to change this?

Use a value, sample a hesitaton time from the expression /ontrialbegin, use the value in the insertstimulustime function and log the value to the data file.

I don't understand your other question. Latency reflects when player 2 responded, i.e. decided to throw the ball to either player 1 or 3.

Olivia Ying
Olivia Ying
Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)
Group: Forum Members
Posts: 10, Visits: 20
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

然而,在返回的数据中(见截图),有大量的“0”,我认为这可能是因为player1和player3没有记录为虚拟玩家的犹豫时间。然而,同样,它也不全是“0”,看起来“500”和“1000”都是可能的数字,因为它们是随机时间之一,但为什么又是“800”呢?我已经检查了代码,但仍然无法解释这一点,想知道您是否有任何好的见解?


非常感谢您投入的时间!

最好的,
莹莹

[/引用]

cyberdecisiontime 表达式返回的值决定了每次试验中给定试验显示投球动画的时间。1to3.insertStimulusTime

(video.1to3, statements.cyberdecisiontime);

<Trial 1to3> 的 /Trialduraton = 0,因此延迟始终为 0(试验在投掷动画后立即结束,即使试验设置为接受响应,也没有时间响应),<Trial 3to1> 具有

/试验持续时间=表示.网络决策时间。我不知道为什么,这个脚本不是我写的。对我来说,这似乎是之前修订留下的错误。其效果是,从网络决策时间表达式中采样的两个值将用于该试验。这里有一个

Trial.3to1.insertStimulusTime(video.3to1, Expressions.cyberdecisiontime);

这里有一个

/ TrialDuration= Expressions.cyberdecisiontim

根据这两个值的情况,动画完成后您将在试验中剩下一些时间,这将被记录为延迟。例如,动画在 500 毫秒处显示,需要 200 毫秒才能完成,实验持续时间为 1500 -> 1500 - 700 = 800。
[/引用]

您好戴夫,

非常感谢您的及时回复!

但我的目的是为队员1和3设置一些随机的投球前停留时间,并记录这些停留时间。我想知道您认为改变这种情况的最佳方法另外

,如果是这种情况,玩家2(向盘手1或玩家3)投球的“延迟”栏是否记录了球员在投球前的犹豫时间?

再次感谢!

最好的。
莹莹
[/引用]

> 但我的目的是为员工 1 和 3 设置一些随机的投球前紧张时间,并记录这些紧张时间。我想您认为改变这种情况的最佳方法是什么?

使用一个值,来自表达式/ ontrialbegin 中采样采样时间,在 insertstimulustime 函数中使用该值将该值记录到数据文件中。

我不明白你的另一个问题。延迟反应了玩家 2 当做出响应时,即决定将球扔给玩家1 或 3。
[/引用]

Thank you so much! I'll try asap.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Olivia Ying - 3/15/2024
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

然而,在返回的数据中(见截图),有大量的“0”,我认为这可能是因为player1和player3没有记录为虚拟玩家的犹豫时间。然而,同样,它也不全是“0”,看起来“500”和“1000”都是可能的数字,因为它们是随机时间之一,但为什么又是“800”呢?我已经检查了代码,但仍然无法解释这一点,想知道您是否有任何好的见解?


非常感谢您投入的时间!

最好的,
莹莹

[/引用]

cyberdecisiontime 表达式返回的值决定了每次试验中给定试验显示投球动画的时间。1to3.insertStimulusTime

(video.1to3, statements.cyberdecisiontime);

<Trial 1to3> 的 /Trialduraton = 0,因此延迟始终为 0(试验在投掷动画后立即结束,即使试验设置为接受响应,也没有时间响应),<Trial 3to1> 具有

/试验持续时间=表示.网络决策时间。我不知道为什么,这个脚本不是我写的。对我来说,这似乎是之前修订留下的错误。其效果是,从网络决策时间表达式中采样的两个值将用于该试验。这里有一个

Trial.3to1.insertStimulusTime(video.3to1, Expressions.cyberdecisiontime);

这里有一个

/ TrialDuration= Expressions.cyberdecisiontim

根据这两个值的情况,动画完成后您将在试验中剩下一些时间,这将被记录为延迟。例如,动画在 500 毫秒处显示,需要 200 毫秒才能完成,实验持续时间为 1500 -> 1500 - 700 = 800。
[/引用]

您好戴夫,

非常感谢您的及时回复!

但我的目的是为队员1和3设置一些随机的投球前停留时间,并记录这些停留时间。我想知道您认为改变这种情况的最佳方法另外

,如果是这种情况,玩家2(向盘手1或玩家3)投球的“延迟”栏是否记录了球员在投球前的犹豫时间?

再次感谢!

最好的。
莹莹
[/引用]

> 但我的目的是为员工 1 和 3 设置一些随机的投球前紧张时间,并记录这些紧张时间。我想您认为改变这种情况的最佳方法是什么?

使用一个值,来自表达式/ ontrialbegin 中采样采样时间,在 insertstimulustime 函数中使用该值将该值记录到数据文件中。

我不明白你的另一个问题。延迟反应了玩家 2 当做出响应时,即决定将球扔给玩家1 或 3。
[/引用]

Thank you so much! I'll try asap.

Something like this, basically:

<usermanual>
___________________________________________________________________________________________________________________    

                                    Cyberball: 3 PLAYERS
___________________________________________________________________________________________________________________    

Script Author: Sean Draine, PhD
last updated: 05-25-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 05-25-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO     
___________________________________________________________________________________________________________________
This script implements the Cyberball paradigm based on:

Williams, K. D., Cheung, C. K. T., & Choi, W. (2000). CyberOstracism: Effects of being ignored over
the Internet. Journal of Personality and Social Psychology, 79, 748-762.

Williams, K. D., & Jarvis, B. (2006). Cyberball: A program for use in research on ostracism and interpersonal
acceptance. Behavior Research Methods, Instruments, and Computers, 38, 174-180.

see also: http://www1.psych.purdue.edu/~willia55/Announce/cyberball.htm

___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________
Participant plays ball with 2 other participants (= the computer). It can be predefined with what
probability the computer includes/excludes the participant into the ball game.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. 4 minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________    
The default data stored in the data files are:

(1) Raw data file: '3playercyberball_raw*.iqdat' (a separate file for each participant)

build:                                The specific Inquisit version used (the 'build') that was run
computer.platform:                    the platform the script was run on (win/mac/ios/android)
date, time:                         date and time script was run
subject, group:                     with the current subject/groupnumber
session:                            with the current session id

blockcode, blocknum:                the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:                 the name and number of the currently recorded trial
                                    (Note: not all trials that are run might record data)
                                    Trialcode Explanation:
                                    Examples:
                                    "1to2" => in this trial player 2 (participant) throws the ball AFTER getting it from player 1
                                    "1to3" => in this trial player 3 throws the ball AFTER getting it from player 1 (random selection decides whether player 3 throws to player 1)

player:                                stores the current player (1, 2, 3)
recipient:                            stores the recipient of the current ball toss (1, 2, 3)                                    
response:                            the (participant's) response
latency:                             the response latency in ms

count_ignore2:                        counts how often player 2 (participant) was "ignored" before a throw (resets every time
                                    player 2 gets to throw the ball)

(2) Summary data file: '3playercyberball_summary*.iqdat' (a separate file for each participant)

inquisit.version:                         Inquisit version run
computer.platform:                    the platform the script was run on (win/mac/ios/android)
startDate:                            date script was run
startTime:                            time script was started
subjectid:                            assigned subject id number
groupid:                            assigned group id number
sessionid:                            assigned session id number
elapsedTime:                        time it took to run script (in ms); measured from onset to offset of script
completed:                            0 = script was not completed (prematurely aborted);
                                    1 = script was completed (all conditions run)
                                
///Parameter Settings:
showpictures:                        true = pictures of players are onscreen (default)
                                    false = no pictures are presented
                                
showlabels:                            true = labels of players are onscreen (default)
                                    false = no labels are presented

item.player1.1-
item.player3label.1:                images and labels used for the various players

///Data:
max_trialcount:                        maximum number of trials (= passes between all players) played        

ignore2_streak1:                     the number of times player 2 (participant) was ignored before player2 (participant) gets to respond for the first time

max_ignore2:                        the longest streak of ignoring player 2 (participant) in the game that participant experienced
                                    before being able to respond

count_player1throws:            counts the number of times that player 1 gets to throw the ball
count_player3throws:            counts the number of times that player 3 gets to throw the ball
count_player2throws:            counts the number of times that participant gets to throw the ball
meanRT_player2:                    mean latency (in ms) of participant throw

count_12:                            counts the number of times that player 1 throws to player 2 (participant)
percent_12:                        percentage of player 1 throws that play to player 2 (participant)
count_21:                            counts the number of times that player 2 (participant) throws to player 1
percent_21:                        percentage of player 2 throws (participant) that play to player 1
meanRT_21:                            mean latency (in ms) of player 2 (participant) decisions to throw to player 1

count_32:                            counts the number of times that player 3 throws to player 2 (participant)
percent_32:                        percentage of player 3 throws that play to player 2 (participant)
count_23:                            counts the number of times that player 2 (participant) throws to player 3
percent_23:                        percentage of player 2 throws (participant) that play to player 3
meanRT_23:                            mean latency (in ms) of player 2 (participant) decisions to throw to player 3

percent_sameplayer:                percentage of player 2 (participant) throws when player 2 throws the ball back to the player who threw the ball to participant
                                    Note: random selection -> 1/2 times of all player 2 throws
                                    
percent_otherplayer:                percentage of player 2 (participant) throws when player 2 throws ball to the player who didn't threw the ball to participant
                                    Note: random selection -> 1/2 times of all player 2 throws
                                    
meanRT_sameplayer:                mean latency (in ms) of trials in which player2 (participant) throws ball back to the player who threw the ball to participant
meanRT_otherplayer:                mean latency (in ms) of trials in which player2 (participant) throws ball to the player who didn't threw the ball to participant


___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________
* Participant plays ball with 2 other players for 50 trials.
The number of trials can be edited under section EDITABLE PARAMETERS.

* By default, all players are represented by names and pictures.
Names and pictures can be edited under section EDITABLE STIMULI.
To remove names or pictures go to EDITABLE PARAMETERS.

* By default, player 1 throws the ball to participant (= player 2) with a pre-determined probability (default: 25% of the times)
as does Player 3 (default: 25% of the times). The probabilities can be edited under section EDITABLE LISTS.
The player schedules can further be customized to dictate specific/fixed throw sequences for each of the
"computer player". Go to section EDITABLE LISTS for further instructions.

* Decision Times for Player 1 and 3 are controlled by expressions.cyberdecisiontime under
EDITABLE PARAMETERS.

___________________________________________________________________________________________________________________    
STIMULI
___________________________________________________________________________________________________________________    
picture examples are provided by Millisecond Software. They can easily be edited under section
Editable Stimuli

___________________________________________________________________________________________________________________    
INSTRUCTIONS
___________________________________________________________________________________________________________________
can be edited under section Editable Instructions

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

/max_trialcount:        maximum number of trials (= passes between the players) played
        
/showpictures:        true = pictures of players are onscreen (default)
                    false = no pictures are presented
                    
/showlabels:            true = labels of players are onscreen (default)
                    false = no labels are presented
                        
NOTE: parameters.showpictures and parameters.showlabels cannot be set to false at the same time.

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

</usermanual>


**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************

<parameters>
/ max_trialcount = 50
/ showpictures = true
/ showlabels = true
</parameters>


<expressions>
/ cyberdecisiontime =replace(500, 1000, 1500, 2000)
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************


***********************
Player Pictures
***********************

<item player1>
/ 1 = "cassie.jpg"
</item>

Note: the participant is player 2
<item player2>
/ 1 = "kip.jpg"
</item>

<item player3>
/ 1 = "trevor.jpg"
</item>

***********************
Player Labels
***********************
<item player1label>
/ 1 = "Cassie"
</item>

<item player3label>
/ 1 = "Trevor"
</item>

will be filled in automatically with participant input:
<item player2label>
/ 1 = "<%capitalize(textbox.name.response)%>"
</item>

***********************
Animation Movies
***********************
<item animations>
/ 1 = "1to2.gif"
/ 2 = "1to3.gif"
/ 3 = "2to1.gif"
/ 4 = "2to3.gif"
/ 5 = "3to1.gif"
/ 6 = "3to2.gif"
</item>

***********************
static images
***********************
<picture start>
/ items = ("start.gif")
/ erase = false
/ size = (30%, 30%)
</picture>

<picture cyberball>
/ items = ("cyberball.gif")
/ position = (50%, 10%)
/ size = (20%, 20%)
</picture>

<picture cyberboy>
/ items = ("cyberboy.gif")
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************

<item instructions>
/ 1 = "Welcome to Cyberball, the Interactive Ball-Tossing Game Used for Mental Visualization!"

/ 2 = "In the upcoming experiment, we test the effects of practicing mental visualization on task performance. Thus, we need you to practice your mental visualization skills. We have found that the best way to do this is to have you play an on-line ball tossing game with other participants who are logged on at the same time.

In a few moments, you will be playing a ball tossing game with other students over our network. The game is very simple. When the ball is tossed to you, simply <%expressions.buttoninstruct2%> the player you want to throw it to.

What is important is not your ball tossing performance, but that you MENTALLY visualize the entire experience. Imagine what the others look like. What sort of people are they? Where are you playing? Is it warm and sunny or cold and rainy? Create in your mind a complete mental picture of what might be going on if you were playing this game in real life.

Okay, ready to begin? Please <%expressions.buttoninstruct1%> 'Start' to begin."
</item>

****************************************************************************************************
general instruction expressions: adjust the instruction text depending on device used to run script
****************************************************************************************************
<expressions>
/buttoninstruct1 = if (computer.touch && !computer.hasKeyboard) {"Touch";} else {"click";}
/buttoninstruct2 = if (computer.touch && !computer.hasKeyboard) {"touch";} else {"click on";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE LISTS: change editable lists here
**************************************************************************************************************
**************************************************************************************************************

Note: by default player 1 and player 3 throw to player 2 roughly 25% of the time (1 out 4 times)

The item lists of these schedules can be further controlled by setting a specific/fixed throw sequence:
Example Player 1:

/items = (3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3)
/selectionmode = sequence

(if selectionmode = sequence => it is suggested to create the list as long as (parameters.max_trialcount/2)
to ensure that the beginning of the list does NOT get repeated)

<list player1schedule>
/ items = (3, 3, 3, 2)
/ replace = false
</list>

<list player3schedule>
/ items = (1, 1, 1, 2)
/ replace = false
</list>

**************************************************************************************************************
                                !!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/ canvasaspectratio = (4,3)
/ minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ inputdevice = mouse
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA: this section contains data file information (customize)
**************************************************************************************************************
**************************************************************************************************************

*************
raw data
*************

<data>
/ columns = (build, computer.platform, date, time, subject, group, session, blockcode, blocknum,
trialcode, trialnum,
values.player, values.recipient, values.cyberdecisiontime, response, latency, values.count_ignore2)
</data>

*************
summary data: remove variables that are not of interest
*************

<summarydata>
/ columns = (inquisit.version, computer.platform, script.startDate, script.startTime,
script.subjectId, script.groupId, script.sessionId, script.elapsedTime,
script.completed,
parameters.showpictures, parameters.showlabels,
item.player1.1, item.player1label.1, item.player2.1, item.player2label.1, item.player3.1, item.player3label.1,
parameters.max_trialcount, values.ignore2_streak1, values.max_ignore2,
values.count_player1throws, values.count_player3throws, values.count_player2throws, expressions.meanRT_player2,
values.count_12, expressions.perc_12, values.count_21, expressions.perc_21, expressions.meanRT_21,
values.count_32, expressions.perc_32, values.count_23, expressions.perc_23, expressions.meanRT_23,
expressions.perc_sameplayer, expressions.perc_otherplayer, expressions.meanRT_sameplayer, expressions.meanRT_otherplayer)
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    AUTOMATICALLY UPDATED VALUES
**************************************************************************************************************
**************************************************************************************************************
/player:                            stores the current player (1, 2, 3)
/recipient:                            stores the recipient of the current ball toss (1, 2, 3)

/count_player1throws:                counts the number of times that player 1 gets to throw the ball
/count_player3throws:                counts the number of times that player 3 gets to throw the ball
/count_player2throws:                counts the number of times that player 2 (participant) gets to throw the ball

/sumrt_player2:                        sums the latencies of player2 throws (participant)
/sumrt_21:                            sums the latencies of player 2 throws (participant) to player 1
/sumrt_23:                            sums the latencies of player 2 throws (participant) to player 3

/count_ignore2:                        counts how often player 2 (participant) was "ignored" before a throw (resets every time
                                    player 2 gets to throw the ball)
/max_ignore2:                        the longest streak of ignoring player 2 in the game that participant experienced
                                    before responding
/ignore2_streak1:                     the ignorestreak before player2 (participant) gets to respond for the first time

/count_12:                            counts the number of times that player 1 throws to player 2 (participant)
/count_32:                            counts the number of times that player 3 throws to player 2 (participant)
/count_13:                            counts the number of times that player 1 throws to player 3
/count_31:                            counts the number of times that player 3 throws to player 1
/count_21:                            counts the number of times that player 2 (participant) throws to player 1
/count_23:                            counts the number of times that player 2 (participant) throws to player 3

/count_121:                            counts how often player2 (participant) throws the ball back to player 1 (after getting it from player 1)
/count_323:                            counts how often player2 (participant) throws the ball back to player 3 (after getting it from player 3)
/count_123:                            counts how often player2 (participant) throws the ball to player 3 after getting it from player 1
/count_321:                            counts how often player2 (participant) throws the ball to player 1 after getting it from player 3

/sumrt_121:                            sums latencies for all trials in which player2 (participant) throws the ball back to player 1 (after getting it from player 1)
/sumrt_323:                            sums latencies for all trials in which player2 (participant) throws the ball back to player 3 (after getting it from player 3)
/sumrt_123:                            sums latencies for all trials in which player2 (participant) throws the ball to player 3 after getting it from player 1
/sumrt_321:                            sums latencies for all trials in which player2 (participant) throws the ball to player 1 after getting it from player 3

<values>
/ cyberdecisiontime = 0

/ player = 0
/ recipient = 0

/ count_player1throws = 0
/ count_player3throws = 0
/ count_player2throws = 0

/ sumrt_player2 = 0
/ sumrt_21 = 0
/ sumrt_23 = 0

/ count_ignore2 = 0
/ max_ignore2 = 0
/ ignore2_streak1 = 0

/ count_12 = 0
/ count_32 = 0
/ count_13 = 0
/ count_31 = 0
/ count_21 = 0
/ count_23 = 0

/ count_121 = 0
/ count_323 = 0
/ count_123 = 0
/ count_321 = 0

/ sumrt_121 = 0
/ sumrt_323 = 0
/ sumrt_123 = 0
/ sumrt_321 = 0
</values>


**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/meanRT_player2:            mean latency of player 2 throws (participant)
/meanRT_21:                    mean latency of player 2 (participant) decisions to throw to player 1
/meanRT_23:                    mean latency of player 2 (participant) decisions to throw to player 3

/perc_12:                    percentage of player 1 throws that play to player 2 (participant)
/perc_21:                    percentage of player 2 throws (participant) that play to player 1
/perc_32:                    percentage of player 3 throws that play to player 2 (participant)
/perc_23:                    percentage of player 2 throws (participant) that play to player 3

/perc_sameplayer:            percentage of player 2 (participant) throws when player 2 throws the ball back to the player who threw the ball to participant
                                Note: random selection -> 1/2 times of all player 2 throws
/perc_otherplayer:            percentage of player 2 (participant) throws when player 2 throws ball to the player who didn't threw the ball to participant
                                Note: random selection -> 1/2 times of all player 2 throws

/meanRT_sameplayer:            mean latencies of trials in which player2 (participant) throws ball back to the player who threw the ball to participant
/meanRT_otherplayer:        mean latencies of trials in which player2 (participant) throws ball to the player who didn't threw the ball to participant


<expressions>
/ meanRT_player2 = values.sumrt_player2/values.count_player2throws
/ meanRT_21 = values.sumrt_21/values.count_21
/ meanRT_23 = values.sumrt_23/values.count_23

/ perc_12 = (values.count_12/values.count_player1throws) * 100
/ perc_21 = (values.count_21/values.count_player2throws) * 100
/ perc_32 = (values.count_32/values.count_player3throws) * 100
/ perc_23 = (values.count_23/values.count_player2throws) * 100

/ perc_sameplayer = ((values.count_121 + values.count_323)/values.count_player2throws) * 100
/ perc_otherplayer = ((values.count_123 + values.count_321)/values.count_player2throws) * 100

/ meanRT_sameplayer = (values.sumrt_121 + values.sumrt_323)/(values.count_121 + values.count_323)
/ meanRT_otherplayer = (values.sumrt_123 + values.sumrt_321)/(values.count_123 + values.count_321)
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS:
**************************************************************************************************************
**************************************************************************************************************
<text welcome>
/ items = instructions
/ select = 1
/ position = (50%, 40%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
/ txcolor = darkblue
/ valign = top
</text>

<text instructions>
/ items = instructions
/ select = 2
/ position = (50%, 45%)
/ fontstyle = ("Arial", 1.5%)
/ size = (80%, 30%)
/ hjustify = left
/ txcolor = darkblue
/ valign = top
</text>

<text startlabel>
/ items = ("Start")
/ position = (50%, 80%)
/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)
/ txcolor = blue
</text>

<shape blankscreen>
/ shape = rectangle
/ size = (100%, 100%)
/ color = white
</shape>

************TRIALS & BLOCKS****************************
<trial instructions>
/ stimulusframes = [1=cyberball, cyberboy, welcome, instructions, startlabel]
/ validresponse = (startlabel)
/ responsemessage = (startlabel, blankscreen, 0)
/ recorddata = false
</trial>

<block instructions>
/ trials = [1=instructions; 2=name]
</block>


**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<picture player1>
/ items = player1
/ position = (25%, 45%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player1label>
/ items = player1label
/ position = (25%, 45%)
/ halign = center
/ valign = top
/ erase = false
</text>

<picture player2>
/ items = player2
/ position = (50%, 75%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player2label>
/ items = player2label
/ position = (50%, 75%)
/ valign = top
/ erase = false
</text>

<picture player3>
/ items = player3
/ position = (75%, 45%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player3label>
/ items = player3label
/ position = (75%, 45%)
/ valign = top
/ erase = false
</text>


**************************************************************************************************************
**************************************************************************************************************
    ANIMATION VIDEOS
**************************************************************************************************************
**************************************************************************************************************
<video 1to2>
/ items = animations
/ select = 1
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 1to2_static>
/ items = animations
/ select = 1
/ size = (30%, 30%)
</picture>

<video 1to3>
/ items = animations
/ select = 2
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 1to3_static>
/ items = animations
/ select = 2
/ size = (30%, 30%)
</picture>

<video 2to1>
/ items = animations
/ select = 3
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 2to1_static>
/ items = animations
/ select = 3
/ size = (30%, 30%)
</picture>

<video 2to3>
/ items = animations
/ select = 4
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 2to3_static>
/ items = animations
/ select = 4
/ size = (30%, 30%)
</picture>

<video 3to1>
/ items = animations
/ select = 5
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 3to1_static>
/ items = animations
/ select = 5
/ size = (30%, 30%)
</picture>

<video 3to2>
/ items = animations
/ select = 6
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 3to2_static>
/ items = animations
/ select = 6
/ size = (30%, 30%)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    SURVEYPAGE: INQUIRIES ABOUT PLAYER
**************************************************************************************************************
**************************************************************************************************************
*you label gets dynamically set during runtime in surveypage.name
<text youlabel>
/ position = (50%, 80%)
/ valign = bottom
/ erase = false
</text>

<textbox name>
/ caption = "Please enter your name"
/ required = true
/ mask = alphabetic
/ position = (30%, 45%)
/ textboxsize = (50%, 5%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</textbox>

<surveypage name>
/ showquestionnumbers = false
/ questions = [1=name]
/ ontrialend = [text.youlabel.items = textbox.name.response]
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (45%, 65%)
</surveypage>

**************************************************************************************************************
**************************************************************************************************************
    MAIN TRIALS
**************************************************************************************************************
**************************************************************************************************************
Note: trial.start always "plays" player 1 - a random selection decides whether player 1 throws to
player 3 or player 2 (-> list.player1schedule)

<trial start>
/ ontrialbegin = [
    values.player = 1;
    if (parameters.showpictures == true) {    
        trial.start.insertStimulusFrame(picture.player1, 1);
        trial.start.insertStimulusFrame(picture.player2, 1);
        trial.start.insertStimulusFrame(picture.player3, 1)
    }
    if (parameters.showlabels == true) {
        trial.start.insertStimulusFrame(text.player1label, 1);
        trial.start.insertStimulusFrame(text.player2label, 1);
        trial.start.insertStimulusFrame(text.player3label, 1);
    }
        
]
/ stimulusframes = [1 = start]
/ validresponse = (noresponse)
/ trialduration = 0
/ ontrialend = [
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
    trial.start.resetStimulusFrames();
]
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.1to2.insertStimulusTime(video.1to2, values.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetStimulusFrames();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    }
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    }
]
</trial>

Note: trial.1to3 => video shows player 1 throwing the ball to player 3 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player3schedule
<trial 1to3>
/ ontrialbegin = [
    values.player = 3;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.1to3.insertStimulusTime(video.1to3, values.cyberdecisiontime);
]
/ stimulusframes = [1= 1to3_static]
/ validresponse = (noresponse)
/ trialduration= 0
/ ontrialend = [
    trial.1to3.resetStimulusFrames();
    
    if (list.player3schedule.nextValue == 1) {
        values.recipient = 1;
        values.count_player3throws += 1;
        values.count_31 += 1;
        values.count_ignore2 += 1;
    } else if (list.player3schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player3throws += 1;
        values.count_32 += 1;
        values.count_ignore2 = 0;
    }
]
/ branch = [
    if (list.player3schedule.currentValue == 1) {
        return trial.3to1;
    } else if (list.player3schedule.currentValue == 2) {
        return trial.3to2;
    }
]
</trial>

Note: trial.2to1 => video shows player 2 throwing the ball to player 1.
Player 1 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player1schedule
<trial 2to1>
/ ontrialbegin = [
    values.player = 1;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
]
/ stimulusframes = [1= 2to1]
/ validresponse = (noresponse)
/ ontrialend = [
    
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
]
/ trialduration = 0
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

Note: trial.2to3 => video shows player 2 throwing the ball to player 3.
Player 3 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player3schedule
<trial 2to3>
/ ontrialbegin = [
    values.player = 3;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
]
/ stimulusframes = [1= 2to3]
/ validresponse = (noresponse)
/ trialduration= 0
/ ontrialend = [
    
    if (list.player3schedule.nextValue == 1) {
        values.recipient = 1;
        values.count_player3throws += 1;
        values.count_31 += 1;
        values.count_ignore2 += 1;
    } else if (list.player3schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player3throws += 1;
        values.count_32 += 1;
        values.count_ignore2 = 0;
    }
]
/ branch = [
    if (list.player3schedule.currentValue == 1) {
        return trial.3to1;
    } else if (list.player3schedule.currentValue == 2) {
        return trial.3to2;
    }
]
</trial>

Note: trial.3to2 => video shows player 3 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 2 (= values.player) then has to decide where to throw the ball next (= values.recipient).
<trial 3to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.3to2.insertStimulusTime(video.3to2, values.cyberdecisiontime);
]
/ stimulusframes = [1= 3to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.3to2.resetStimulusFrames();

    values.sumrt_player2 += trial.3to2.latency;
    if (trial.3to2.response == "player1" || trial.3to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.3to2.latency;
        values.count_321 += 1;
        values.sumrt_321 += trial.3to2.latency;
    } else if (trial.3to2.response == "player3" || trial.3to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.3to2.latency;
        values.count_323 += 1;
        values.sumrt_323 += trial.3to2.latency;
    }
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    }
]
</trial>

Note: trial.3to1=> video shows player 3 throwing the ball to player 1 after expressions.cyberdecisiontime.
Player 1 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player1schedule
<trial 3to1>
/ ontrialbegin = [
    values.player = 1;    
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.3to1.insertStimulusTime(video.3to1, values.cyberdecisiontime);
]
/ stimulusframes = [1= 3to1_static]
/ validresponse = (noresponse)
/ trialduration= 0//expressions.cyberdecisiontime
/ ontrialend = [
    trial.3to1.resetStimulusFrames();
    
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
]
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    MAIN BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block game>
/ trials = [1 = start]
/ stop = [block.game.trialcount >= parameters.max_trialcount]
</block>

**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt main>
/ blocks = [
    1=instructions;
    2=game;
]
</expt>

**************************************************************************************************************
                                    End of Script
**************************************************************************************************************

Olivia Ying
Olivia Ying
Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)
Group: Forum Members
Posts: 10, Visits: 20
Dave - 3/15/2024
Olivia Ying - 3/15/2024
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
[引用]
Dave - 3/15/2024
[引用]
Olivia Ying - 3/15/2024
Dear Dave,

I hope you're doing well these days.

I was examining the data returned by Cyberball (3-player) and found something that confused me.

As you can see, player1 and 3 are coded as virtual players whose hesitation time before pitching is determined by the following code:

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

<expressions>
/ cyberdecisiontime = replace(500, 1000, 1500, 200)


As well as this is an example of applying 'cyberdecisiontime' in trial:
Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    trial.1to2.insertstimulustime(video.1to2, expressions.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetstimulusframes();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    };
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    };
]
</trial>

然而,在返回的数据中(见截图),有大量的“0”,我认为这可能是因为player1和player3没有记录为虚拟玩家的犹豫时间。然而,同样,它也不全是“0”,看起来“500”和“1000”都是可能的数字,因为它们是随机时间之一,但为什么又是“800”呢?我已经检查了代码,但仍然无法解释这一点,想知道您是否有任何好的见解?


非常感谢您投入的时间!

最好的,
莹莹

[/引用]

cyberdecisiontime 表达式返回的值决定了每次试验中给定试验显示投球动画的时间。1to3.insertStimulusTime

(video.1to3, statements.cyberdecisiontime);

<Trial 1to3> 的 /Trialduraton = 0,因此延迟始终为 0(试验在投掷动画后立即结束,即使试验设置为接受响应,也没有时间响应),<Trial 3to1> 具有

/试验持续时间=表示.网络决策时间。我不知道为什么,这个脚本不是我写的。对我来说,这似乎是之前修订留下的错误。其效果是,从网络决策时间表达式中采样的两个值将用于该试验。这里有一个

Trial.3to1.insertStimulusTime(video.3to1, Expressions.cyberdecisiontime);

这里有一个

/ TrialDuration= Expressions.cyberdecisiontim

根据这两个值的情况,动画完成后您将在试验中剩下一些时间,这将被记录为延迟。例如,动画在 500 毫秒处显示,需要 200 毫秒才能完成,实验持续时间为 1500 -> 1500 - 700 = 800。
[/引用]

您好戴夫,

非常感谢您的及时回复!

但我的目的是为队员1和3设置一些随机的投球前停留时间,并记录这些停留时间。我想知道您认为改变这种情况的最佳方法另外

,如果是这种情况,玩家2(向盘手1或玩家3)投球的“延迟”栏是否记录了球员在投球前的犹豫时间?

再次感谢!

最好的。
莹莹
[/引用]

> 但我的目的是为员工 1 和 3 设置一些随机的投球前紧张时间,并记录这些紧张时间。我想您认为改变这种情况的最佳方法是什么?

使用一个值,来自表达式/ ontrialbegin 中采样采样时间,在 insertstimulustime 函数中使用该值将该值记录到数据文件中。

我不明白你的另一个问题。延迟反应了玩家 2 当做出响应时,即决定将球扔给玩家1 或 3。
[/引用]

Thank you so much! I'll try asap.

Something like this, basically:

<usermanual>
___________________________________________________________________________________________________________________    

                                    Cyberball: 3 PLAYERS
___________________________________________________________________________________________________________________    

Script Author: Sean Draine, PhD
last updated: 05-25-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 05-25-2023 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO     
___________________________________________________________________________________________________________________
This script implements the Cyberball paradigm based on:

Williams, K. D., Cheung, C. K. T., & Choi, W. (2000). CyberOstracism: Effects of being ignored over
the Internet. Journal of Personality and Social Psychology, 79, 748-762.

Williams, K. D., & Jarvis, B. (2006). Cyberball: A program for use in research on ostracism and interpersonal
acceptance. Behavior Research Methods, Instruments, and Computers, 38, 174-180.

see also: http://www1.psych.purdue.edu/~willia55/Announce/cyberball.htm

___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________
Participant plays ball with 2 other participants (= the computer). It can be predefined with what
probability the computer includes/excludes the participant into the ball game.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. 4 minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________    
The default data stored in the data files are:

(1) Raw data file: '3playercyberball_raw*.iqdat' (a separate file for each participant)

build:                                The specific Inquisit version used (the 'build') that was run
computer.platform:                    the platform the script was run on (win/mac/ios/android)
date, time:                         date and time script was run
subject, group:                     with the current subject/groupnumber
session:                            with the current session id

blockcode, blocknum:                the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:                 the name and number of the currently recorded trial
                                    (Note: not all trials that are run might record data)
                                    Trialcode Explanation:
                                    Examples:
                                    "1to2" => in this trial player 2 (participant) throws the ball AFTER getting it from player 1
                                    "1to3" => in this trial player 3 throws the ball AFTER getting it from player 1 (random selection decides whether player 3 throws to player 1)

player:                                stores the current player (1, 2, 3)
recipient:                            stores the recipient of the current ball toss (1, 2, 3)                                    
response:                            the (participant's) response
latency:                             the response latency in ms

count_ignore2:                        counts how often player 2 (participant) was "ignored" before a throw (resets every time
                                    player 2 gets to throw the ball)

(2) Summary data file: '3playercyberball_summary*.iqdat' (a separate file for each participant)

inquisit.version:                         Inquisit version run
computer.platform:                    the platform the script was run on (win/mac/ios/android)
startDate:                            date script was run
startTime:                            time script was started
subjectid:                            assigned subject id number
groupid:                            assigned group id number
sessionid:                            assigned session id number
elapsedTime:                        time it took to run script (in ms); measured from onset to offset of script
completed:                            0 = script was not completed (prematurely aborted);
                                    1 = script was completed (all conditions run)
                                
///Parameter Settings:
showpictures:                        true = pictures of players are onscreen (default)
                                    false = no pictures are presented
                                
showlabels:                            true = labels of players are onscreen (default)
                                    false = no labels are presented

item.player1.1-
item.player3label.1:                images and labels used for the various players

///Data:
max_trialcount:                        maximum number of trials (= passes between all players) played        

ignore2_streak1:                     the number of times player 2 (participant) was ignored before player2 (participant) gets to respond for the first time

max_ignore2:                        the longest streak of ignoring player 2 (participant) in the game that participant experienced
                                    before being able to respond

count_player1throws:            counts the number of times that player 1 gets to throw the ball
count_player3throws:            counts the number of times that player 3 gets to throw the ball
count_player2throws:            counts the number of times that participant gets to throw the ball
meanRT_player2:                    mean latency (in ms) of participant throw

count_12:                            counts the number of times that player 1 throws to player 2 (participant)
percent_12:                        percentage of player 1 throws that play to player 2 (participant)
count_21:                            counts the number of times that player 2 (participant) throws to player 1
percent_21:                        percentage of player 2 throws (participant) that play to player 1
meanRT_21:                            mean latency (in ms) of player 2 (participant) decisions to throw to player 1

count_32:                            counts the number of times that player 3 throws to player 2 (participant)
percent_32:                        percentage of player 3 throws that play to player 2 (participant)
count_23:                            counts the number of times that player 2 (participant) throws to player 3
percent_23:                        percentage of player 2 throws (participant) that play to player 3
meanRT_23:                            mean latency (in ms) of player 2 (participant) decisions to throw to player 3

percent_sameplayer:                percentage of player 2 (participant) throws when player 2 throws the ball back to the player who threw the ball to participant
                                    Note: random selection -> 1/2 times of all player 2 throws
                                    
percent_otherplayer:                percentage of player 2 (participant) throws when player 2 throws ball to the player who didn't threw the ball to participant
                                    Note: random selection -> 1/2 times of all player 2 throws
                                    
meanRT_sameplayer:                mean latency (in ms) of trials in which player2 (participant) throws ball back to the player who threw the ball to participant
meanRT_otherplayer:                mean latency (in ms) of trials in which player2 (participant) throws ball to the player who didn't threw the ball to participant


___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________
* Participant plays ball with 2 other players for 50 trials.
The number of trials can be edited under section EDITABLE PARAMETERS.

* By default, all players are represented by names and pictures.
Names and pictures can be edited under section EDITABLE STIMULI.
To remove names or pictures go to EDITABLE PARAMETERS.

* By default, player 1 throws the ball to participant (= player 2) with a pre-determined probability (default: 25% of the times)
as does Player 3 (default: 25% of the times). The probabilities can be edited under section EDITABLE LISTS.
The player schedules can further be customized to dictate specific/fixed throw sequences for each of the
"computer player". Go to section EDITABLE LISTS for further instructions.

* Decision Times for Player 1 and 3 are controlled by expressions.cyberdecisiontime under
EDITABLE PARAMETERS.

___________________________________________________________________________________________________________________    
STIMULI
___________________________________________________________________________________________________________________    
picture examples are provided by Millisecond Software. They can easily be edited under section
Editable Stimuli

___________________________________________________________________________________________________________________    
INSTRUCTIONS
___________________________________________________________________________________________________________________
can be edited under section Editable Instructions

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

/max_trialcount:        maximum number of trials (= passes between the players) played
        
/showpictures:        true = pictures of players are onscreen (default)
                    false = no pictures are presented
                    
/showlabels:            true = labels of players are onscreen (default)
                    false = no labels are presented
                        
NOTE: parameters.showpictures and parameters.showlabels cannot be set to false at the same time.

/ cyberdecisiontime:     selects with replacement (replace) one of the 4 decision times for players1 and 3

</usermanual>


**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************

<parameters>
/ max_trialcount = 50
/ showpictures = true
/ showlabels = true
</parameters>


<expressions>
/ cyberdecisiontime =replace(500, 1000, 1500, 2000)
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************


***********************
Player Pictures
***********************

<item player1>
/ 1 = "cassie.jpg"
</item>

Note: the participant is player 2
<item player2>
/ 1 = "kip.jpg"
</item>

<item player3>
/ 1 = "trevor.jpg"
</item>

***********************
Player Labels
***********************
<item player1label>
/ 1 = "Cassie"
</item>

<item player3label>
/ 1 = "Trevor"
</item>

will be filled in automatically with participant input:
<item player2label>
/ 1 = "<%capitalize(textbox.name.response)%>"
</item>

***********************
Animation Movies
***********************
<item animations>
/ 1 = "1to2.gif"
/ 2 = "1to3.gif"
/ 3 = "2to1.gif"
/ 4 = "2to3.gif"
/ 5 = "3to1.gif"
/ 6 = "3to2.gif"
</item>

***********************
static images
***********************
<picture start>
/ items = ("start.gif")
/ erase = false
/ size = (30%, 30%)
</picture>

<picture cyberball>
/ items = ("cyberball.gif")
/ position = (50%, 10%)
/ size = (20%, 20%)
</picture>

<picture cyberboy>
/ items = ("cyberboy.gif")
/ position = (50%, 30%)
/ size = (20%, 20%)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************

<item instructions>
/ 1 = "Welcome to Cyberball, the Interactive Ball-Tossing Game Used for Mental Visualization!"

/ 2 = "In the upcoming experiment, we test the effects of practicing mental visualization on task performance. Thus, we need you to practice your mental visualization skills. We have found that the best way to do this is to have you play an on-line ball tossing game with other participants who are logged on at the same time.

In a few moments, you will be playing a ball tossing game with other students over our network. The game is very simple. When the ball is tossed to you, simply <%expressions.buttoninstruct2%> the player you want to throw it to.

What is important is not your ball tossing performance, but that you MENTALLY visualize the entire experience. Imagine what the others look like. What sort of people are they? Where are you playing? Is it warm and sunny or cold and rainy? Create in your mind a complete mental picture of what might be going on if you were playing this game in real life.

Okay, ready to begin? Please <%expressions.buttoninstruct1%> 'Start' to begin."
</item>

****************************************************************************************************
general instruction expressions: adjust the instruction text depending on device used to run script
****************************************************************************************************
<expressions>
/buttoninstruct1 = if (computer.touch && !computer.hasKeyboard) {"Touch";} else {"click";}
/buttoninstruct2 = if (computer.touch && !computer.hasKeyboard) {"touch";} else {"click on";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE LISTS: change editable lists here
**************************************************************************************************************
**************************************************************************************************************

Note: by default player 1 and player 3 throw to player 2 roughly 25% of the time (1 out 4 times)

The item lists of these schedules can be further controlled by setting a specific/fixed throw sequence:
Example Player 1:

/items = (3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3)
/selectionmode = sequence

(if selectionmode = sequence => it is suggested to create the list as long as (parameters.max_trialcount/2)
to ensure that the beginning of the list does NOT get repeated)

<list player1schedule>
/ items = (3, 3, 3, 2)
/ replace = false
</list>

<list player3schedule>
/ items = (1, 1, 1, 2)
/ replace = false
</list>

**************************************************************************************************************
                                !!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/ canvasaspectratio = (4,3)
/ minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ inputdevice = mouse
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA: this section contains data file information (customize)
**************************************************************************************************************
**************************************************************************************************************

*************
raw data
*************

<data>
/ columns = (build, computer.platform, date, time, subject, group, session, blockcode, blocknum,
trialcode, trialnum,
values.player, values.recipient, values.cyberdecisiontime, response, latency, values.count_ignore2)
</data>

*************
summary data: remove variables that are not of interest
*************

<summarydata>
/ columns = (inquisit.version, computer.platform, script.startDate, script.startTime,
script.subjectId, script.groupId, script.sessionId, script.elapsedTime,
script.completed,
parameters.showpictures, parameters.showlabels,
item.player1.1, item.player1label.1, item.player2.1, item.player2label.1, item.player3.1, item.player3label.1,
parameters.max_trialcount, values.ignore2_streak1, values.max_ignore2,
values.count_player1throws, values.count_player3throws, values.count_player2throws, expressions.meanRT_player2,
values.count_12, expressions.perc_12, values.count_21, expressions.perc_21, expressions.meanRT_21,
values.count_32, expressions.perc_32, values.count_23, expressions.perc_23, expressions.meanRT_23,
expressions.perc_sameplayer, expressions.perc_otherplayer, expressions.meanRT_sameplayer, expressions.meanRT_otherplayer)
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    AUTOMATICALLY UPDATED VALUES
**************************************************************************************************************
**************************************************************************************************************
/player:                            stores the current player (1, 2, 3)
/recipient:                            stores the recipient of the current ball toss (1, 2, 3)

/count_player1throws:                counts the number of times that player 1 gets to throw the ball
/count_player3throws:                counts the number of times that player 3 gets to throw the ball
/count_player2throws:                counts the number of times that player 2 (participant) gets to throw the ball

/sumrt_player2:                        sums the latencies of player2 throws (participant)
/sumrt_21:                            sums the latencies of player 2 throws (participant) to player 1
/sumrt_23:                            sums the latencies of player 2 throws (participant) to player 3

/count_ignore2:                        counts how often player 2 (participant) was "ignored" before a throw (resets every time
                                    player 2 gets to throw the ball)
/max_ignore2:                        the longest streak of ignoring player 2 in the game that participant experienced
                                    before responding
/ignore2_streak1:                     the ignorestreak before player2 (participant) gets to respond for the first time

/count_12:                            counts the number of times that player 1 throws to player 2 (participant)
/count_32:                            counts the number of times that player 3 throws to player 2 (participant)
/count_13:                            counts the number of times that player 1 throws to player 3
/count_31:                            counts the number of times that player 3 throws to player 1
/count_21:                            counts the number of times that player 2 (participant) throws to player 1
/count_23:                            counts the number of times that player 2 (participant) throws to player 3

/count_121:                            counts how often player2 (participant) throws the ball back to player 1 (after getting it from player 1)
/count_323:                            counts how often player2 (participant) throws the ball back to player 3 (after getting it from player 3)
/count_123:                            counts how often player2 (participant) throws the ball to player 3 after getting it from player 1
/count_321:                            counts how often player2 (participant) throws the ball to player 1 after getting it from player 3

/sumrt_121:                            sums latencies for all trials in which player2 (participant) throws the ball back to player 1 (after getting it from player 1)
/sumrt_323:                            sums latencies for all trials in which player2 (participant) throws the ball back to player 3 (after getting it from player 3)
/sumrt_123:                            sums latencies for all trials in which player2 (participant) throws the ball to player 3 after getting it from player 1
/sumrt_321:                            sums latencies for all trials in which player2 (participant) throws the ball to player 1 after getting it from player 3

<values>
/ cyberdecisiontime = 0

/ player = 0
/ recipient = 0

/ count_player1throws = 0
/ count_player3throws = 0
/ count_player2throws = 0

/ sumrt_player2 = 0
/ sumrt_21 = 0
/ sumrt_23 = 0

/ count_ignore2 = 0
/ max_ignore2 = 0
/ ignore2_streak1 = 0

/ count_12 = 0
/ count_32 = 0
/ count_13 = 0
/ count_31 = 0
/ count_21 = 0
/ count_23 = 0

/ count_121 = 0
/ count_323 = 0
/ count_123 = 0
/ count_321 = 0

/ sumrt_121 = 0
/ sumrt_323 = 0
/ sumrt_123 = 0
/ sumrt_321 = 0
</values>


**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/meanRT_player2:            mean latency of player 2 throws (participant)
/meanRT_21:                    mean latency of player 2 (participant) decisions to throw to player 1
/meanRT_23:                    mean latency of player 2 (participant) decisions to throw to player 3

/perc_12:                    percentage of player 1 throws that play to player 2 (participant)
/perc_21:                    percentage of player 2 throws (participant) that play to player 1
/perc_32:                    percentage of player 3 throws that play to player 2 (participant)
/perc_23:                    percentage of player 2 throws (participant) that play to player 3

/perc_sameplayer:            percentage of player 2 (participant) throws when player 2 throws the ball back to the player who threw the ball to participant
                                Note: random selection -> 1/2 times of all player 2 throws
/perc_otherplayer:            percentage of player 2 (participant) throws when player 2 throws ball to the player who didn't threw the ball to participant
                                Note: random selection -> 1/2 times of all player 2 throws

/meanRT_sameplayer:            mean latencies of trials in which player2 (participant) throws ball back to the player who threw the ball to participant
/meanRT_otherplayer:        mean latencies of trials in which player2 (participant) throws ball to the player who didn't threw the ball to participant


<expressions>
/ meanRT_player2 = values.sumrt_player2/values.count_player2throws
/ meanRT_21 = values.sumrt_21/values.count_21
/ meanRT_23 = values.sumrt_23/values.count_23

/ perc_12 = (values.count_12/values.count_player1throws) * 100
/ perc_21 = (values.count_21/values.count_player2throws) * 100
/ perc_32 = (values.count_32/values.count_player3throws) * 100
/ perc_23 = (values.count_23/values.count_player2throws) * 100

/ perc_sameplayer = ((values.count_121 + values.count_323)/values.count_player2throws) * 100
/ perc_otherplayer = ((values.count_123 + values.count_321)/values.count_player2throws) * 100

/ meanRT_sameplayer = (values.sumrt_121 + values.sumrt_323)/(values.count_121 + values.count_323)
/ meanRT_otherplayer = (values.sumrt_123 + values.sumrt_321)/(values.count_123 + values.count_321)
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS:
**************************************************************************************************************
**************************************************************************************************************
<text welcome>
/ items = instructions
/ select = 1
/ position = (50%, 40%)
/ fontstyle = ("Arial", 2%, true, false, false, false, 5, 0)
/ txcolor = darkblue
/ valign = top
</text>

<text instructions>
/ items = instructions
/ select = 2
/ position = (50%, 45%)
/ fontstyle = ("Arial", 1.5%)
/ size = (80%, 30%)
/ hjustify = left
/ txcolor = darkblue
/ valign = top
</text>

<text startlabel>
/ items = ("Start")
/ position = (50%, 80%)
/ fontstyle = ("Arial", 3%, false, false, true, false, 5, 0)
/ txcolor = blue
</text>

<shape blankscreen>
/ shape = rectangle
/ size = (100%, 100%)
/ color = white
</shape>

************TRIALS & BLOCKS****************************
<trial instructions>
/ stimulusframes = [1=cyberball, cyberboy, welcome, instructions, startlabel]
/ validresponse = (startlabel)
/ responsemessage = (startlabel, blankscreen, 0)
/ recorddata = false
</trial>

<block instructions>
/ trials = [1=instructions; 2=name]
</block>


**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<picture player1>
/ items = player1
/ position = (25%, 45%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player1label>
/ items = player1label
/ position = (25%, 45%)
/ halign = center
/ valign = top
/ erase = false
</text>

<picture player2>
/ items = player2
/ position = (50%, 75%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player2label>
/ items = player2label
/ position = (50%, 75%)
/ valign = top
/ erase = false
</text>

<picture player3>
/ items = player3
/ position = (75%, 45%)
/ valign = bottom
/ erase = false
/ size = (10%, 10%)
</picture>

<text player3label>
/ items = player3label
/ position = (75%, 45%)
/ valign = top
/ erase = false
</text>


**************************************************************************************************************
**************************************************************************************************************
    ANIMATION VIDEOS
**************************************************************************************************************
**************************************************************************************************************
<video 1to2>
/ items = animations
/ select = 1
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 1to2_static>
/ items = animations
/ select = 1
/ size = (30%, 30%)
</picture>

<video 1to3>
/ items = animations
/ select = 2
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 1to3_static>
/ items = animations
/ select = 2
/ size = (30%, 30%)
</picture>

<video 2to1>
/ items = animations
/ select = 3
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 2to1_static>
/ items = animations
/ select = 3
/ size = (30%, 30%)
</picture>

<video 2to3>
/ items = animations
/ select = 4
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 2to3_static>
/ items = animations
/ select = 4
/ size = (30%, 30%)
</picture>

<video 3to1>
/ items = animations
/ select = 5
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 3to1_static>
/ items = animations
/ select = 5
/ size = (30%, 30%)
</picture>

<video 3to2>
/ items = animations
/ select = 6
/ playthrough = true
/ size = (30%, 30%)
</video>

<picture 3to2_static>
/ items = animations
/ select = 6
/ size = (30%, 30%)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    SURVEYPAGE: INQUIRIES ABOUT PLAYER
**************************************************************************************************************
**************************************************************************************************************
*you label gets dynamically set during runtime in surveypage.name
<text youlabel>
/ position = (50%, 80%)
/ valign = bottom
/ erase = false
</text>

<textbox name>
/ caption = "Please enter your name"
/ required = true
/ mask = alphabetic
/ position = (30%, 45%)
/ textboxsize = (50%, 5%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</textbox>

<surveypage name>
/ showquestionnumbers = false
/ questions = [1=name]
/ ontrialend = [text.youlabel.items = textbox.name.response]
/ showpagenumbers = false
/ navigationbuttonfontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ navigationbuttonsize = (20%, 5%)
/ nextbuttonposition = (45%, 65%)
</surveypage>

**************************************************************************************************************
**************************************************************************************************************
    MAIN TRIALS
**************************************************************************************************************
**************************************************************************************************************
Note: trial.start always "plays" player 1 - a random selection decides whether player 1 throws to
player 3 or player 2 (-> list.player1schedule)

<trial start>
/ ontrialbegin = [
    values.player = 1;
    if (parameters.showpictures == true) {    
        trial.start.insertStimulusFrame(picture.player1, 1);
        trial.start.insertStimulusFrame(picture.player2, 1);
        trial.start.insertStimulusFrame(picture.player3, 1)
    }
    if (parameters.showlabels == true) {
        trial.start.insertStimulusFrame(text.player1label, 1);
        trial.start.insertStimulusFrame(text.player2label, 1);
        trial.start.insertStimulusFrame(text.player3label, 1);
    }
        
]
/ stimulusframes = [1 = start]
/ validresponse = (noresponse)
/ trialduration = 0
/ ontrialend = [
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
    trial.start.resetStimulusFrames();
]
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

Note: trial.1to2 => video shows player 1 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to decide where to throw the ball next (= values.recipient)
<trial 1to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.1to2.insertStimulusTime(video.1to2, values.cyberdecisiontime);
]
/ stimulustimes = [1= 1to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.1to2.resetStimulusFrames();
    
    values.sumrt_player2 += trial.1to2.latency;
    if (trial.1to2.response == "player1" || trial.1to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.1to2.latency;
        values.count_121 += 1;
        values.sumrt_121 += trial.1to2.latency;
    } else if (trial.1to2.response == "player3" || trial.1to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.1to2.latency;
        values.count_123 += 1;
        values.sumrt_123 += trial.1to2.latency;
    }
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    }
]
</trial>

Note: trial.1to3 => video shows player 1 throwing the ball to player 3 after expressions.cyberdecisiontime.
Player 3 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player3schedule
<trial 1to3>
/ ontrialbegin = [
    values.player = 3;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.1to3.insertStimulusTime(video.1to3, values.cyberdecisiontime);
]
/ stimulusframes = [1= 1to3_static]
/ validresponse = (noresponse)
/ trialduration= 0
/ ontrialend = [
    trial.1to3.resetStimulusFrames();
    
    if (list.player3schedule.nextValue == 1) {
        values.recipient = 1;
        values.count_player3throws += 1;
        values.count_31 += 1;
        values.count_ignore2 += 1;
    } else if (list.player3schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player3throws += 1;
        values.count_32 += 1;
        values.count_ignore2 = 0;
    }
]
/ branch = [
    if (list.player3schedule.currentValue == 1) {
        return trial.3to1;
    } else if (list.player3schedule.currentValue == 2) {
        return trial.3to2;
    }
]
</trial>

Note: trial.2to1 => video shows player 2 throwing the ball to player 1.
Player 1 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player1schedule
<trial 2to1>
/ ontrialbegin = [
    values.player = 1;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
]
/ stimulusframes = [1= 2to1]
/ validresponse = (noresponse)
/ ontrialend = [
    
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
]
/ trialduration = 0
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

Note: trial.2to3 => video shows player 2 throwing the ball to player 3.
Player 3 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player3schedule
<trial 2to3>
/ ontrialbegin = [
    values.player = 3;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
]
/ stimulusframes = [1= 2to3]
/ validresponse = (noresponse)
/ trialduration= 0
/ ontrialend = [
    
    if (list.player3schedule.nextValue == 1) {
        values.recipient = 1;
        values.count_player3throws += 1;
        values.count_31 += 1;
        values.count_ignore2 += 1;
    } else if (list.player3schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player3throws += 1;
        values.count_32 += 1;
        values.count_ignore2 = 0;
    }
]
/ branch = [
    if (list.player3schedule.currentValue == 1) {
        return trial.3to1;
    } else if (list.player3schedule.currentValue == 2) {
        return trial.3to2;
    }
]
</trial>

Note: trial.3to2 => video shows player 3 throwing the ball to player 2 after expressions.cyberdecisiontime.
Player 2 (= values.player) then has to decide where to throw the ball next (= values.recipient).
<trial 3to2>
/ ontrialbegin = [
    values.player = 2;
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
    if (values.ignore2_streak1 == 0)
        values.ignore2_streak1 = values.max_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.3to2.insertStimulusTime(video.3to2, values.cyberdecisiontime);
]
/ stimulusframes = [1= 3to2_static]
/ validresponse = (player1, player3, player1label, player3label)
/ ontrialend = [
    trial.3to2.resetStimulusFrames();

    values.sumrt_player2 += trial.3to2.latency;
    if (trial.3to2.response == "player1" || trial.3to2.response == "player1label") {
        values.recipient = 1;
        values.count_player2throws += 1;
        values.count_21 += 1;
        values.sumrt_21 += trial.3to2.latency;
        values.count_321 += 1;
        values.sumrt_321 += trial.3to2.latency;
    } else if (trial.3to2.response == "player3" || trial.3to2.response == "player3label") {
        values.recipient = 3;
        values.count_player2throws += 1;
        values.count_23 += 1;
        values.sumrt_23 += trial.3to2.latency;
        values.count_323 += 1;
        values.sumrt_323 += trial.3to2.latency;
    }
]
/ branch = [
    if (values.recipient == 1) {
        return trial.2to1;
    } else if (values.recipient == 3) {
        return trial.2to3;
    }
]
</trial>

Note: trial.3to1=> video shows player 3 throwing the ball to player 1 after expressions.cyberdecisiontime.
Player 1 (= values.player) then has to 'decide' where to throw the ball next (= values.recipient) based on
list.player1schedule
<trial 3to1>
/ ontrialbegin = [
    values.player = 1;    
    if (values.count_ignore2 > values.max_ignore2)
        values.max_ignore2 = values.count_ignore2;
        
    values.cyberdecisiontime = expressions.cyberdecisiontime;
    trial.3to1.insertStimulusTime(video.3to1, values.cyberdecisiontime);
]
/ stimulusframes = [1= 3to1_static]
/ validresponse = (noresponse)
/ trialduration= 0//expressions.cyberdecisiontime
/ ontrialend = [
    trial.3to1.resetStimulusFrames();
    
    if (list.player1schedule.nextValue == 2) {
        values.recipient = 2;
        values.count_player1throws += 1;
        values.count_12 += 1;
        values.count_ignore2 = 0;
    } else if (list.player1schedule.nextValue == 3) {
        values.recipient = 3;
        values.count_player1throws += 1;
        values.count_13 += 1;
        values.count_ignore2 += 1;
    }
]
/ branch = [
    if (list.player1schedule.currentValue == 2) {
        return trial.1to2;
    } else if (list.player1schedule.currentValue == 3) {
        return trial.1to3;
    }
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    MAIN BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block game>
/ trials = [1 = start]
/ stop = [block.game.trialcount >= parameters.max_trialcount]
</block>

**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt main>
/ blocks = [
    1=instructions;
    2=game;
]
</expt>

**************************************************************************************************************
                                    End of Script
**************************************************************************************************************

Hi Dave,
That's so nice of you to show such detailed code!
But  I'm wondering if I just added a


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Olivia Ying - 3/19/2024

Hi Dave,
That's so nice of you to show such detailed code!
But  I'm wondering if I just added a


Just added a what?
Olivia Ying
Olivia Ying
Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)Associate Member (98 reputation)
Group: Forum Members
Posts: 10, Visits: 20
Hi Dave
Sorry, I hit the "post reply" button by mistake.
What I meant to say was thank you for the detailed code! I tried it, but it still seems to be a bit of a problem because all the decision times are set to 0. I tried replacing them with :

<values>
cyberdesiciontime=replaece(500,1000,1500,2000)


But still had some problems, so I changed the data output in the original code, I added an item directly in the
<data>: expressions.cyberdesiciontime.

I looked at the modified data output file, and the data in this column looks normal (i.e. it's either 500 or 1000 or 1500 or 2000) although it seems to be not be that random, often with the same number appearing consecutively. I'm wondering if this added column of data can directly represent the hesitation time determined by the code before player 1 & 3 pitch?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Olivia Ying - 3/19/2024
Hi Dave
Sorry, I hit the "post reply" button by mistake.
What I meant to say was thank you for the detailed code! I tried it, but it still seems to be a bit of a problem because all the decision times are set to 0. I tried replacing them with :

<values>
cyberdesiciontime=replaece(500,1000,1500,2000)


But still had some problems, so I changed the data output in the original code, I added an item directly in the
<data>: expressions.cyberdesiciontime.

I looked at the modified data output file, and the data in this column looks normal (i.e. it's either 500 or 1000 or 1500 or 2000) although it seems to be not be that random, often with the same number appearing consecutively. I'm wondering if this added column of data can directly represent the hesitation time determined by the code before player 1 & 3 pitch?

(1)

<values>
cyberdesiciontime=replaece(500,1000,1500,2000)
...
</values>

can't work. The value is then set when the script is parsed (i.e. it will be either 500, 100, 1500 or 2000) and then won't change. A value is a variable. It doesn't change on its own, it only changes when you explicitly set it to something else. See the code I gave you for how to use a value properly.

(2)

<data>: expressions.cyberdesiciontime

You can do that. Of course it'll show the same value, the values are sampled *with* replacement. There is nothing preventing the value 1500 from being sampled multiple times in a row. Also, as I explained previously, there's a trial that samples twice from the expression. The expressions result will only change if and when a new value is sampled from it.
If you want to use this approach here, you need to fix that, otherwise the expression result logged may not accurately reflect the throw delay (what's logged will be whatever the last return from the expression was, which may or may not be the same value sampled previously for the throw delay).

My advice to you is to do it the way I've shown you. That ensures only one result sampled from the expression per trial and that result is accurately logged.


Edited Last Month by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search