ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Analysis > Analysis options > Options for how ANY-maze should process overlapping keystrokes when adding additional scoring to tests

Options for how ANY-maze should process overlapping keystrokes when adding additional scoring to tests

Introduction

ANY-maze allows you to review a test any number of times, and on each review, add some more scoring to the test results using keys.

This feature is described fully in the Adding additional scoring to a performed test topic.

When adding additional scoring to test in this way, a potential problem can arise - the same key can have overlapping key presses in two different test reviews. This topic describes the problem, and the options you have to address it.

The problem

The 'overlapping keystrokes' problem is best described using a diagram - see figure 1, below:

  

  

Figure 1. Two scenarios of multiple presses of the same key in two reviews of a test. In scenario 1, the key presses are entirely separate; but in scenario 2, they overlap - making their meaning obscure.

Looking at scenario 1, it's clear that key A was pressed twice, once in the first review and once in the second. ANY-maze will count these presses as two presses, and will show the total time pressed as the sum of the time that the two keys were on, etc. So in this case, everything is as you would expect it to be.

Now look at scenario 2. In this case, how many key presses occurred? It looks like two, but remember this key is scoring a behaviour, and the two reviews are considering the same video - so what's happening here? Did the animal perform whatever behaviour the key is being used to score once (starting at time A and ending at time D), or did it perform the behaviour twice (starting at time A, stopping presumably at some point before time B, starting again, presumably at some point before time C, and finally ending at time D)?

As there is no way for ANY-maze to know which of these options is correct, it offers you the choice of using either of them.

The solutions

The first solution to the problem is to merge overlapping keystrokes; thus a key which is ON and which then goes ON again is still just considered ON, although it then has to go OFF the same number of time before it will be considered OFF. So in this case, ANY-maze would consider scenario 2 to consist of ONE key press starting at time A and ending at time D.

The second solution to the problem is to split the overlapping keystrokes, so that each key press is seen as a press. In scenario 2, this would cause the system to count TWO key presses, with a notional OFF event just before the second ON event. As it's clearly illogical to say a key went on twice and off three times, the now redundant OFF event related to the first ON event is then eliminated.

Again, this is easier to understand in a diagram - see figure 2.

  

  

Figure 2. The ways ANY-maze can analyse Scenario 2 (from figure 1). In the first case, the key presses are merged to create a single press; while in the second case, they're split to create two separate presses.

So, in the Analysis and results section of the protocol, you can choose whether ANY-maze should 'Merge' or 'Split' overlapping keystrokes.

It's probably worth mentioning that this problem will generally never occur, because you will probably choose to score different behaviours on each review of a test - so in the first review you might be using key A, while in the second review you might be using key B. In this case, it doesn't matter at all if the keystrokes overlap, as they relate to different keys and therefore different behaviours, and clearly these could occur at the same time.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0655