From Lupyan_Lab_Wiki
Jump to: navigation, search


This is a finite-state machine (automaton).

Some examples of legal strings that it can generate:

Part 2

  • Implement the rest of the study.

Participants see letters in boxes around a central point. The letters change colors (from white to pink) in the order specified by the string generated by the automaton. The participant's task is to click on the letter currently appearing in pink, as quickly as possible. Learning the grammar shows up as speeding up in processing of legal sequences and slowing down in the processing of illegal ones.

Your task should read in a "sentence" of legal strings. The current letter in the string should turn pink. Once the subject clicks on it, it should return to white, the response (see below) should be recorded, and after a certain delay(say, 500 ms) the next letter should turn pink. Only advance to the next letter when the active letter box is clicked on. If the subject clicks on the wrong box, do not advance. Include a break screen in your code: Every 5 minutes, display a text screen saying "Please take a short break. Click a mouse button to continue"

Your output file should have the following columns:

  • subject code
  • seed (for shuffling the grammaticalStates list)
  • total number of letters in the current word
  • word number
  • position within current word (i.e., 1 = first letter, 2 = second letter, etc.)
  • current letter
  • current string (all the letters in the current trial)
  • x coordinate of the active letter
  • y coordinate of the active letter
  • Are we on the last letter for the string (True/False)
  • RT (in ms)

There's no accuracy column because only correct responses are being recorded.