Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikipedia

1-2-AX working memory task

Reference material by Wikipedia contributors. This retains its source identity and is not 411 news reporting.

1-2-AX working memory task Working memory abilities of long short-term memory The 1-2-AX working memory task is a cognitive test which requires working memory to be solved. It can be used as a test case for learning algorithms to test their ability to remember some old data. This task can be used to demonstrate the working memory abilities of algorithms like PBWM or Long short-term memory.http://psych.colorado.edu/~oreilly/pubs-abstr.html#OReillyFrank06 Making Working Memory Work: A Computational Model of Learning in the Frontal Cortex and Basal Ganglia. Neural 2006 Neural Computation 18 2 283–328 O'Reilly, R.C. Frank, M.J amp 2010-05-30 10.1162/089976606775093909 16378516 8912485 subscription Description The input of the task is a sequence of the numbers/letters 1, 2, A, X, B and Y, and additional distracting instances of 3, C and Z which should be ignored. For each character of input in sequence, the subject must respond with left (L) or right (R). The two target sequences that the subject is looking for are A-X and B-Y. When the subject encounters a 1 they must switch to looking for A-X, and when they encounter a 2 they must switch to looking for B-Y. While looking for A-X, if the subject encounters an X having seen an A previously (and similarly for a Y while looking for B-Y), and where that previous letter was not part of an earlier sequence, they respond R to mark the end of that sequence. Their response to all other characters should be L.O'Reilly Randall C. Frank Michael J. Making Working Memory Work: A Computational Model of Learning in the Prefrontal Cortex and Basal Ganglia Neural Computation 1 February 2006 18 2 283–328 10.1162/089976606775093909 16378516 8912485 https://www.researchgate.net/publication/7391892 28 January 2023 Examples Input 2 1 A A X X Y A X Output L L L L R L L L R Input 1 2 A B X Y A C Z Output L L L L L R L L L Requirements for algorithms To solve this task, an algorithm must be able to both remember the last number 1 or 2 and the last letter A or B independently. We refer to this memory as the working memory. This memory must persist all other input. In addition, the algorithm must be able to strip out and ignore the letters C and Z. Solutions April 2020 Pseudocode For traditional computer models, both requirements are easy to solve. Here is some Python code (kind of pseudocode but works) where the function next_output gets one single number/letter as input and returns either a letter or nothing. next_outputs is there for convenience to operate on a whole sequence. last_num = "" last_letter = "" def next_output(next_input: str) -> str | None: """ Args: next_input: A string containing a single character. Returns: A string containing the letters "L", "R" or None. Example: >>> next_output("2") 'L' """ global last_num, last_letter if next_input in ["1", "2"]: last_num = next_input last_letter = "" return "L" elif next_input in ["A", "B"]: last_letter = next_input return "L" elif next_input in ["X", "Y"]: seq = last_num + last_letter + next_input last_letter = next_input if seq in ["1AX", "2BY"]: return "R" return "L" return None def next_outputs(next_inputs: str) -> list[str]: """ Args: next_inputs: A string. Returns: A list of strings containing the letters "L" or "R". Example: >>> next_outputs("21AAXBYAX") ["L", "L", "L", "L", "R", "L", "L", "L", "R"] """ return [next_output(c) for c in next_inputs] Example: >>> next_outputs("21AAXBYAX") ['L', 'L', 'L', 'L', 'R', 'L', 'L', 'L', 'R'] >>> next_outputs("12CBZY") ['L', 'L', None, 'L', None, 'R'] Finite-state machine Similarly, this task can be solved in a straightforward way by a finite-state machine with 7 states (call them ---, 1--, 2--, 1A-, 2B-, 1AX, 2BY). Neural network This task is much more difficult for neural networks. For simple feedforward neural networks, this task is not solvable because feedforward networks don't have any working memory. Including working memory into neural networks is a difficult task. There have been several approaches like PBWM or Long short-term memory which have working memory, both are able to solve it. References Category:Cognitive tests Category:Memory tests Category:Neuropsychological tests