The 'chimptest' task is a working memory task based on the famous Ayumu chimp memory test (Inoue & Matsuzawa, 2007). Participants see numbered boxes displayed on a 5×8 grid of positions. The task includes screen calibration to maintain consistent field of view.

The task has two versions that can be run in blocks:

**Original Masking Task (showDuration=0):** Numbers remain visible until the participant clicks the first number (1), then all remaining numbers are hidden behind blank white squares. The participant must remember the positions and continue clicking in order. This version uses adaptive difficulty - participants must complete 2 out of 3 trials correctly to advance to the next level (starting at 4, maximum 9 numbers).

**Limited-Hold Task (showDuration>0):** Numbers appear briefly (e.g., 650ms, 430ms, or 210ms), then ALL numbers are automatically hidden behind white squares before any clicks. The participant must remember all positions and click in numerical order (1, 2, 3, etc.). This version is more difficult and uses a fixed set size of 5 items with 10 trials per block.

Correct clicks turn the box green, while incorrect clicks turn it red and end the trial. Multiple blocks with different time delays can be run in sequence. This task measures visual-spatial working memory capacity and has gained fame through studies showing that chimpanzees like Ayumu can outperform humans at this task.

**Screen Calibration:** The task begins with screen calibration (using CalibrateScreen from Utility.pbl) to ensure consistent visual field across different monitors and viewing distances. This can be set to "internal" (built-in calibration) or "none" (skip calibration, uses default 30 pixels/cm). The calibration determines the pixels-per-cm ratio which is used to calculate the box size.

**Visual Angle:** Each number box is sized based on visual angle (default 1.5 degrees) at the user's viewing distance (default 18 inches / 45.72 cm). This ensures consistent perceptual size across different screen setups. The box size can be adjusted via the boxSizeDegrees parameter. The calibration data (pixels/cm, eye distance, box size in pixels and degrees) is recorded in the output files for analysis.

Reference: Inoue, S., & Matsuzawa, T. (2007). Working memory of numerals in chimpanzees. Current Biology, 17(23), R1004-R1005.
