﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » store correct response based on previous trial</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Fri, 18 Sep 2026 20:24:56 GMT</lastBuildDate><ttl>20</ttl><item><title>store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28021.aspx</link><description>Hi,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I am new to Inquisit, and creating a new task that requires participants to determine whether the current item matches with the previous (like playing the game of dominoes, where a domino containing one and two would match to three, one, but not with four, five). I am looking for syntax to store the correct response based on whether the current stimulus matches with the previous. Is there a way to do this?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Additionally, is there a way to counterbalance my blocks so that half of the trials in the block are "match" trials, and half of the trials are "mismatch" trials. A match trial would mean that the next stimulus contains one of the same numbers as the previous, and mismatch would mean that both of the numbers are different.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thank you very much in advance for any help! Let me know if you need additional clarification.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Sun, 24 Nov 2019 14:20:34 GMT</pubDate><dc:creator>lir1995</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28035.aspx</link><description>Ah, I see. Thank you very much!!</description><pubDate>Sun, 24 Nov 2019 14:20:34 GMT</pubDate><dc:creator>lir1995</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28033.aspx</link><description>&lt;div data-id="28032" class="if-quote-wrapper" unselectable="on" data-guid="1574613491452"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28032" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="28032" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="28032" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;lir1995 - 11/23/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28032"&gt;&lt;div class="if-quote-message-margin"&gt;Thank you so much again for your help! I have been working on adapting the code you sent to work with images. I will have one image on top of the other. The number of dots in each image will either match or non match.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Is this even possible? I have attached the code I have been working with as well as the data file.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial start&amp;gt;&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial match&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.dominoes.reset();&lt;br/&gt;values.matchposition = replace(1,2);&lt;br/&gt;if (values.matchposition == 1) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;&lt;br/&gt;} else if (values.matchposition == 2) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("y")&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.not1 = picture.mismatch1.nextvalue;&lt;br/&gt;values.not2 = picture.mismatch2.nextvalue;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mismatch&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.dominoes.reset();&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.matchposition = 0;&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.not1 = picture.mismatch1.nextvalue;&lt;br/&gt;values.not2 = picture.mismatch2.nextvalue&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block example&amp;gt;&lt;br/&gt;/ trials = [1= start; 2-21 = noreplace(match, mismatch)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ n1 = 0&lt;br/&gt;/ n2 = 0&lt;br/&gt;/ matchposition = 0&lt;br/&gt;/ not1 = 0&lt;br/&gt;/ not2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture domino&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ size = (50%, 50%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item domino&amp;gt;&lt;br/&gt;/1 = "1.png"&lt;br/&gt;/2 = "2.png"&lt;br/&gt;/3 = "3.png"&lt;br/&gt;/4 = "4.png"&lt;br/&gt;/6 = "5.png"&lt;br/&gt;/6 = "6.png"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_one&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 68%)&lt;br/&gt;/ select = replace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_two&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 32%)&lt;br/&gt;/ select = replace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture box&amp;gt;&lt;br/&gt;/ items = box&lt;br/&gt;/ size = (55%, 55%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item box&amp;gt;&lt;br/&gt;/1 = "dominostim/box.png"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list dominoes&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ replace = false&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ not = (values.not1)&lt;br/&gt;/ not = (values.not2)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list not1&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ not = (values.n1)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list not2&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ not = (values.n2)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mismatch1&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ select = list.not1.nextvalue&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mismatch2&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ select = list.not2.nextvalue&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency correct values.n1 values.n2 values.matchposition stimulusitem stimulusitem stimulusitem values.not1)&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;Thank you very much, and again happy to clarify!&lt;a class="if-quote-goto quote-link" href="#" data-id="28032"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Of course it's possible. Just use values.n1 and values.n2 to select the item in the &amp;lt;picture&amp;gt; elements, i.e.&lt;br/&gt;&lt;br/&gt;/ select = values.n1 &lt;br/&gt;&lt;br/&gt;and &lt;br/&gt;&lt;br/&gt;/ select = values.n2 &lt;br/&gt;&lt;br/&gt;respectively.&lt;br/&gt;&lt;br/&gt;&amp;lt;trial start&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial match&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.numbers.reset();&lt;br/&gt;values.matchposition = replace(1,2);&lt;br/&gt;if (values.matchposition == 1) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;} else if (values.matchposition == 2) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("y")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mismatch&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.numbers.reset();&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.matchposition = 0;&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block example&amp;gt;&lt;br/&gt;/ trials = [1= start; 2-21 = noreplace(match, mismatch)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_one&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 32%)&lt;br/&gt;/ select = values.n1&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_two&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 68%)&lt;br/&gt;/ select = values.n2&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item domino&amp;gt;&lt;br/&gt;/1 = "1.png"&lt;br/&gt;/2 = "2.png"&lt;br/&gt;/3 = "3.png"&lt;br/&gt;/4 = "4.png"&lt;br/&gt;/6 = "5.png"&lt;br/&gt;/6 = "6.png"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ n1 = 0&lt;br/&gt;/ n2 = 0&lt;br/&gt;/ matchposition = 0&lt;br/&gt;/ not1 = 0&lt;br/&gt;/ not2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list numbers&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ replace = false&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ not = (values.not1)&lt;br/&gt;/ not = (values.not2)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency correct values.n1 values.n2 values.matchposition)&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;</description><pubDate>Sun, 24 Nov 2019 08:51:14 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28032.aspx</link><description>Thank you so much again for your help! I have been working on adapting the code you sent to work with images. I will have one image on top of the other. The number of dots in each image will either match or non match.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Is this even possible? I have attached the code I have been working with as well as the data file.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial start&amp;gt;&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial match&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.dominoes.reset();&lt;br/&gt;values.matchposition = replace(1,2);&lt;br/&gt;if (values.matchposition == 1) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;&lt;br/&gt;} else if (values.matchposition == 2) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("y")&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.not1 = picture.mismatch1.nextvalue;&lt;br/&gt;values.not2 = picture.mismatch2.nextvalue;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mismatch&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.dominoes.reset();&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.matchposition = 0;&lt;br/&gt;values.n1 = picture.number_one.nextvalue;&lt;br/&gt;values.n2 = picture.number_two.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=box,number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.not1 = picture.mismatch1.nextvalue;&lt;br/&gt;values.not2 = picture.mismatch2.nextvalue&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block example&amp;gt;&lt;br/&gt;/ trials = [1= start; 2-21 = noreplace(match, mismatch)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ n1 = 0&lt;br/&gt;/ n2 = 0&lt;br/&gt;/ matchposition = 0&lt;br/&gt;/ not1 = 0&lt;br/&gt;/ not2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture domino&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ size = (50%, 50%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item domino&amp;gt;&lt;br/&gt;/1 = "1.png"&lt;br/&gt;/2 = "2.png"&lt;br/&gt;/3 = "3.png"&lt;br/&gt;/4 = "4.png"&lt;br/&gt;/6 = "5.png"&lt;br/&gt;/6 = "6.png"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_one&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 68%)&lt;br/&gt;/ select = replace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture number_two&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ position = (50%, 32%)&lt;br/&gt;/ select = replace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture box&amp;gt;&lt;br/&gt;/ items = box&lt;br/&gt;/ size = (55%, 55%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item box&amp;gt;&lt;br/&gt;/1 = "dominostim/box.png"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list dominoes&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ replace = false&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ not = (values.not1)&lt;br/&gt;/ not = (values.not2)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list not1&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ not = (values.n1)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list not2&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6)&lt;br/&gt;/ not = (values.n2)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mismatch1&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ select = list.not1.nextvalue&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture mismatch2&amp;gt;&lt;br/&gt;/ items = domino&lt;br/&gt;/ select = list.not2.nextvalue&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency correct values.n1 values.n2 values.matchposition stimulusitem stimulusitem stimulusitem values.not1)&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;Thank you very much, and again happy to clarify!</description><pubDate>Sat, 23 Nov 2019 17:05:35 GMT</pubDate><dc:creator>lir1995</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28026.aspx</link><description>This was very helpful, thanks!</description><pubDate>Thu, 21 Nov 2019 13:29:12 GMT</pubDate><dc:creator>lir1995</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28025.aspx</link><description>&lt;div data-id="28022" class="if-quote-wrapper" unselectable="on" data-guid="1574360155437"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28022" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="28022" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="28022" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 11/21/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28022"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="28021" class="if-quote-wrapper" unselectable="on" data-guid="1574360155437"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28021" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="28021" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="28021" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;lir1995 - 11/21/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28021"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I am new to Inquisit, and creating a new task that requires participants to determine whether the current item matches with the previous (like playing the game of dominoes, where a domino containing one and two would match to three, one, but not with four, five). I am looking for syntax to store the correct response based on whether the current stimulus matches with the previous. Is there a way to do this?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Additionally, is there a way to counterbalance my blocks so that half of the trials in the block are "match" trials, and half of the trials are "mismatch" trials. A match trial would mean that the next stimulus contains one of the same numbers as the previous, and mismatch would mean that both of the numbers are different.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thank you very much in advance for any help! Let me know if you need additional clarification.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28021"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;What you're describing is basically similar a 1-back task. You can look at the n-back scripts available in the library for elaborate examples on how to implement something like this. I could give you a more concrete example / some skeleton code, but you would have to spell out the exact matching rules you wish to implement first.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28022"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Here's a simple example with two different digits between 1 and 9 sampled randomly in each trial. In match trials, one of the previous digits will be kept, the other will be replaced with a different one. In mismatch trials, both previous digits will be replaced with different ones. &lt;br/&gt;&lt;br/&gt;&amp;lt;trial start&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial match&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.numbers.reset();&lt;br/&gt;values.matchposition = replace(1,2);&lt;br/&gt;if (values.matchposition == 1) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;} else if (values.matchposition == 2) {&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("y")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mismatch&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;list.numbers.reset();&lt;br/&gt;values.not1 = values.n1;&lt;br/&gt;values.not2 = values.n2;&lt;br/&gt;values.matchposition = 0;&lt;br/&gt;values.n1 = list.numbers.nextvalue;&lt;br/&gt;values.n2 = list.numbers.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=number_one, number_two]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ correctresponse = ("n")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block example&amp;gt;&lt;br/&gt;/ trials = [1= start; 2-21 = noreplace(match, mismatch)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text number_one&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.n1%&amp;gt;")&lt;br/&gt;/ position = (48%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text number_two&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.n2%&amp;gt;")&lt;br/&gt;/ position = (52%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ n1 = 0&lt;br/&gt;/ n2 = 0&lt;br/&gt;/ matchposition = 0&lt;br/&gt;/ not1 = 0&lt;br/&gt;/ not2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list numbers&amp;gt;&lt;br/&gt;/ items = (1,2,3,4,5,6,7,8,9)&lt;br/&gt;/ replace = false&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ not = (values.not1)&lt;br/&gt;/ not = (values.not2)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency correct values.n1 values.n2 values.matchposition)&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 21 Nov 2019 10:18:07 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: store correct response based on previous trial</title><link>https://forums.millisecond.com/Topic28022.aspx</link><description>&lt;div data-id="28021" class="if-quote-wrapper" unselectable="on" data-guid="1574357503175"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28021" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="28021" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="28021" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;lir1995 - 11/21/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28021"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I am new to Inquisit, and creating a new task that requires participants to determine whether the current item matches with the previous (like playing the game of dominoes, where a domino containing one and two would match to three, one, but not with four, five). I am looking for syntax to store the correct response based on whether the current stimulus matches with the previous. Is there a way to do this?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Additionally, is there a way to counterbalance my blocks so that half of the trials in the block are "match" trials, and half of the trials are "mismatch" trials. A match trial would mean that the next stimulus contains one of the same numbers as the previous, and mismatch would mean that both of the numbers are different.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thank you very much in advance for any help! Let me know if you need additional clarification.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28021"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;What you're describing is basically similar a 1-back task. You can look at the n-back scripts available in the library for elaborate examples on how to implement something like this. I could give you a more concrete example / some skeleton code, but you would have to spell out the exact matching rules you wish to implement first.&lt;br/&gt;</description><pubDate>Thu, 21 Nov 2019 09:36:28 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>