Experiment( SubjectCode, SubjectGroup){
Context(){
AssignmentGroup(){
ExperimentName = "Remember/Know Recognition Paradigm";
SubjectCode = "pxlab";
SubjectGroup = ["imagery", "rote"];
new Correct = 100*(TrialCounter-ResponseErrorCount)/TrialCounter;
new WorkingTime = (Trial:Multiply.ClearScreen.TimeControl-BlockTime)/1000;
SkipBoundingBlockDisplays = 0;
new abstractItems = <"love", "value">;
new abstractDistractors = <"hate", "form">;
new concreteItems = <"house", "car">;
new concreteDistractors = <"garden", "sun">;
new InstructionA = ["Learning Words", " ", "We show you a list of words which you should learn.", "Please try to rehearse each word silently such that you are able to remember it later.", " ", "Press any key to start the presentation!"];
new InstructionB = ["Learning Words", " ", "We show you a list of words which you should learn.", "Please try to imagine each concept as vividly as possible such that you are able to remember it later.", " ", "Press any key to start the presentation!"];
new NounType = 1;
DataFileTrialFormat = "%SubjectCode% %SubjectGroup% %NounType% %Trial:Test.Feedback:Item.CorrectCode% %Trial:Test.Feedback:Item.Response%";
TrialFactor = 1;
new commonFontSize = 32;
}
Session(){
Message(){
Text = "Remember/Know Memory Task";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
FontSize = commonFontSize;
}
}
Block:Study( StoreData){
Message(){
Text = (SubjectGroup=="rote")? InstructionA: InstructionB;
FontSize = commonFontSize;
Alignment = de.pxlab.pxl.AlignmentCodes.LEFT;
Timer = de.pxlab.pxl.TimerCodes.RELEASE_RESPONSE_TIMER;
}
}
Trial:Study( Message.Text, NounType){
Message(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 2000;
FontSize = commonFontSize;
}
}
Block:Multiply( StoreData, TrialCounter, ResponseErrorCount, TrialFactor){
Message(){
Text = ["Arithmetic Test", " ", "We now like to test your arithmetic speed.", "Please type in the result of the given multiplication as fast as you can.", "Finish your input with the RETURN key.", "You may use the Cursor and Del keys to correct typing errors.", "This part of the experiment takes 5 minutes.", " ", "Press any key to start the test!"];
FontSize = commonFontSize;
Alignment = de.pxlab.pxl.AlignmentCodes.LEFT;
Timer = de.pxlab.pxl.TimerCodes.RELEASE_RESPONSE_TIMER;
}
}
Trial:Multiply( TrialCounter, TextInput.Text){
RandomGenerator:A(){
DistributionType = de.pxlab.pxl.RandomGeneratorCodes.EQUAL_DISTRIBUTION_INT;
LowerLimit = 1;
UpperLimit = 10;
}
RandomGenerator:B(){
DistributionType = de.pxlab.pxl.RandomGeneratorCodes.EQUAL_DISTRIBUTION_INT;
LowerLimit = 1;
UpperLimit = 10;
}
TextInput(){
Label = "%Trial:Multiply.RandomGenerator:A.ResponseCode% x %Trial:Multiply.RandomGenerator:B.ResponseCode% =";
Text = "";
FontSize = commonFontSize;
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
}
Feedback(){
ResponseParameter = "Trial:Multiply.TextInput.Text";
CorrectCode = Trial:Multiply.RandomGenerator:A.ResponseCode*Trial:Multiply.RandomGenerator:B.ResponseCode;
CorrectText = "Correct!\n \nTrials run: %TrialCounter%\nCorrect responses: %Correct% \\%\nTime = %WorkingTime@i% seconds";
FalseText = "Wrong!\n \nTrials run: %TrialCounter%\nCorrect responses: %Correct% \\%\nTime = %WorkingTime% seconds";
FontSize = commonFontSize;
Alignment = de.pxlab.pxl.AlignmentCodes.LEFT;
Evaluation = de.pxlab.pxl.EvaluationCodes.COMPARE_CODE;
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 3000;
}
SetParameter(){
Parameter = "BlockState";
Value = (WorkingTime>20)? de.pxlab.pxl.StateCodes.BREAK: de.pxlab.pxl.StateCodes.EXECUTE;
}
}
Block:Test( StoreData, TrialCounter, ResponseErrorCount){
Message(){
Text = ["Test", " ", "Now please decide whether an item is", "\'old\' (Cursor left) or", "\'new\' (Cursor right)", " ", "For \'old\' items please also determine whether you", "\'remember\' (Cursor left) or", "\'know\' (Cursor right)", " ", "Press any key to start the test!"];
FontSize = commonFontSize;
Alignment = de.pxlab.pxl.AlignmentCodes.LEFT;
Timer = de.pxlab.pxl.TimerCodes.RELEASE_RESPONSE_TIMER;
}
}
BlockEnd:Test(){
Message(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
FontSize = commonFontSize;
Alignment = de.pxlab.pxl.AlignmentCodes.LEFT;
Text = "Trials run: %TrialCounter%\nCorrect responses: %Correct% \\%";
}
}
Trial:Test( TrialCounter, Message:ON.Text, NounType, Feedback:Item.CorrectCode, Message:ON.ResponseCode, TextParagraphMultiple:RK.ResponseCode){
TextParagraphMultiple(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
LocationY = 200;
Text = ["<= old", "new =>"];
FontSize = commonFontSize;
}
Message:ON(){
Overlay = de.pxlab.pxl.OverlayCodes.JOIN;
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
ResponseSet = [de.pxlab.pxl.KeyCodes.LEFT_KEY, de.pxlab.pxl.KeyCodes.RIGHT_KEY];
FontSize = commonFontSize;
}
Feedback:Item(){
ResponseParameter = "Trial:Test.Message:ON.ResponseCode";
Evaluation = de.pxlab.pxl.EvaluationCodes.COMPARE_CODE;
Visible = 0;
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
FontSize = commonFontSize;
}
TextParagraphMultiple:RK(){
Execute = Trial:Test.Message:ON.ResponseCode==0;
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
LocationY = 200;
Width = 800;
Text = ["<= remember", "know =>"];
ResponseSet = [de.pxlab.pxl.KeyCodes.LEFT_KEY, de.pxlab.pxl.KeyCodes.RIGHT_KEY];
FontSize = commonFontSize;
}
}
// Command line assignments
AssignmentGroup();
}
Factors(){
CovariateFactor( SubjectGroup){
FactorLevel( "imagery");
FactorLevel( "rote");
}
}
Procedure(){
Session(){
Block:Study( 0){
Trial:Study( concreteItems, 0);
Trial:Study( abstractItems, 1);
}
Block:Multiply( 0, 1, 0, 6){
Trial:Multiply( ?, ?);
}
Block:Test( 1, 0, 0){
Trial:Test( ?, concreteItems, 0, 0, ?, ?);
Trial:Test( ?, abstractItems, 1, 0, ?, ?);
Trial:Test( ?, concreteDistractors, 0, 1, ?, ?);
Trial:Test( ?, abstractDistractors, 1, 1, ?, ?);
}
}
}
}