$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Maze-Suite consists of three main applications; an editing program to construct maze environments (MazeMaker), a visualization/rendering module (MazeWalker), and finally an analysis and path visualization tool (MazeAnalyzer). The following sections describe the use of MazeSuite and more details are available in the three supplementary videos, one for each MazeSuite module.
1. Designing mazes
The MazeMaker application within Maze-Suite, allows creating three-dimensional (3D) environments by simply drawing them on a two-dimensional (2D) canvas from a birds' eye view. Walls and floors can be drawn by mouse clicks to indicate coordinates, and users can import 3D object files or edit properties of items within the maze such as position, orientation, color, texture and lights.
Maze start and end regions can be assigned in addition to other exit criteria such as a timeout period. Separate text messages can also be displayed to inform a participant for each exit condition. During the design phase, mazes can be tested by using the ‘quick run' function within MazeMaker.
For functional imaging studies, participants are usually asked to perform a series of tasks with repeated trials. To facilitate this testing of repeated trials, MazeMaker can create maze list files, which are sorted lists of mazes and text messages for an experimental session. It is critical that the maze list file for the experiment is prepared and thoroughly pilot-tested before the day of the experiment.
A cursory tutorial for the use and development of environments with MazeMaker is provided in 'Supplementary video II – MazeMaker'.
2. fNIR Setup and placing the fNIR sensor-pad
Preparing the fNIR Box
- There are two cable connectors behind the fNIR box. One of the slots is for USB connection and the other connection is for the power cord.
- Connect the fNIR device box through the USB cable to a PC or Laptop that will be used for data acquisition.
- Connect the power adapter to the device and turn on the switch.
- The ribbon cable is used to connect the sensor pad with the fNIR box.
- The sensor pad houses light source (LEDs) and photo detectors.
- The LEDs emit infrared light at 730nm and 850nm wavelengths that are absorbed mainly by deoxygenated- and oxygenated- hemoglobin, respectively and thus can penetrate through biological tissue.
Placing the Sensor-pad
- Ask the participant to lift their hair off the forehead before sensor placement. Place the sensor strip just above the eyebrows. Match the center of the sensor with the vertical axis of symmetry that passes also through the nose
- Press the sensor pad firmly against the forehead and use a clip to hold the cables together at the back of the head. While not strictly necessary, head-wrap or tennis bandana is recommended to secure the sensor pad.
- Upon placing the sensor pad on the forehead, attach the two ends of the ribbon cable to the fNIR box. The ribbon cables should be attached by matching the 'I' and 'II' sides of the ribbon cable with the corresponding 'I' and 'II' connectors on the device.
Starting the COBI Studio Software for data collection
- Click on the Cognitive Optical Brain Imaging (COBI) Studio13 icon on the desktop to open the main window.
- The program will come with certain preset settings for data collection and visualization.
- It is important to check and confirm data acquisition parameters and triggering (marker synchronization) at device settings dialog if needed.
- COBI Studio can automatically name all related data files if "Experiment mode" is activated by using the "New Experiment" wizard.
- In the data folder, 3 types of files will be created: (*.nir) for fNIR data, (*.mrk) for marker data and (*.txt) for a log of the experiment session.
3. Running the experiment: Rendering the mazes
Device Setting and starting fNIR data acquisition
- LED Drive Current defines how bright each LED shines. The default value for LED Drive Current is 20mA. This value may have to change based on the skin pigmentation and other characteristics of the participant. Suggested range for the LED current is between 5mA to 20mA
- The default value for initial gain for all channels is 20. Suggested values for gain are 1,5,10,15,20.
- Click on the 'Start current device' link, and examine the signal quality. If the raw intensity values shown in COBI approach 4000 or are below 1000, click 'Stop Device', and adjust the LED Drive Current and Device Gain until suitable values are obtained. In low signal circumstances, increase LED Drive Current before increasing Device Gain. Under saturated signal circumstances reduce the Device Gain before reducing the LED Drive Current. Once signal quality is acceptable, continue to Step 4.
- Start Baseline. This will collect 10 seconds of data and use it as baseline in a modified Beer-Lambert equation set to calculate concentration changes for oxy- and deoxy-hemoglobin8.
- Let the Baseline complete (may take 10-20 seconds)
- Click 'Start recording'. This will start saving all the data. Experiment protocol should start after this.
- Experimenter may choose to add manual markers throughout the experiment session to denote certain events by pressing the ‘add manual marker' buttons using the manual marker menu located in the lower left corner of the screen.
- Start the Maze Suite to present visual stimuli.
Using MazeWalker to render mazes
- Run MazeWalker from menu at Start>Maze Suite>MazeWalker
- Turn on marker synchronization by selecting 'Enable Serial Port' from the in the menu under Advanced>Serial Port Options. Ensure that the correct COM port address is selected.
- Select the maze list file (that was created by MazeMaker), and also select name for the new log file for this session. Name or participant number can be recorded within walker field. Optionally the autolog may be used to automatically record to a time-stamped log file instead of manually specifying the log file.
- Click 'Start' to initiate the process. Depending on the video settings, protocol can run full screen or in windowed mode.
4. Visualizing the subject's path
Using MazeAnalyzer, the researcher can visualize the maze and the participant's path from the maze and log files. Additionally, a summary report including total path length and time to completion of the each maze are produced as cursory behavioral measures. Log files contain information in millisecond time resolution about the path that a subject traveled as well as subject's view vector and interactions with objects.
A tutorial video is provided in 'Supplementary video I – MazeAnalyzer' and describes the use of MazeAnalyzer's basic functionality along with methods to produce the behavioral metrics described in the results section.
5. Processing the fNIR data and analysis
Noise removal is the first step for processing the data. Sources of noise include 1) Head Movement 2) Physiological signals such as heart rate and respirations and 3) Instrument and environment-related noise.
Head movement can cause the fNIR detectors to shift and lose contact with the skin, exposing them to: 1) ambient light; 2) light emitted directly from the fNIR sources; or 3) light reflected from the skin, rather than being reflected from tissue in the cortex. This type of motion artifact is readily recognizable because it causes sudden, large spikes in the fNIR data. A more subtle artifact of head movement is due to the effects of gravity on the cerebral blood. Rapid head movement can cause the blood to move toward (or away from) the area that is being monitored, rapidly increasing (or decreasing) blood volume with a concomitant skewing of the data. Since the dynamics of this type of motion artifact are slower than LED "pop" they can be confused with the actual hemodynamic response due to brain activation. Hence, removing motion artifact from fNIR data is an important and necessary step if fNIR is to be deployed as a brain monitoring technology in natural environments16.
Physiological signals such as heart rate (over 0.5 Hz) and respiration (over 0.2 Hz) are at higher frequency ranges than hemodynamic responses, thus, they can be eliminated using a linear phase low-pass FIR filter with cut-off frequency between 0.1 to 0.15 Hz9.
Instrument and environmental noise can originate due to ambient light such as daylight (DC) and room light (60Hz) or light from a computer monitor (60-75Hz). It is suggested that the best way to eliminate this type of noise is to prepare the experimental environment and data acquisition accordingly. An analog low pass filter (anti-aliasing filter) has been implemented in the fNIR box to eliminate folding of high frequency noise onto sampling frequency range.
There are many advanced noise reduction algorithms available that utilize different characteristics of the signal17-20. However if a subject or session can be excluded if data is irrecoverable (i.e. saturated).

Figure 1. fNIR signal components
The fNIR raw signals are light intensity measurements (See Figure 1). By measuring optical density (OD) changes at two wavelengths, the relative change of oxy-Hb and deoxy-Hb versus time can be obtained using the modified Beer–Lambert Law21-23. OD at a specific input wavelength (λ) is the logarithmic ratio of input light intensity (Iin) and output (detected) light intensity (Iout). OD is also related to the concentration (c) and extinction coefficient (e) of chromophores, the corrected distance (d) between the light source and detector, plus a constant attenuation factor (G).

Having the same Iin at two different time instances and detected light intensity during baseline (Irest) and during performance of the task (Itest), the difference in OD for wavelength λ is

Measuring the OD at two different wavelengths gives

This equation set can be solved for concentrations if the 2x2 matrix is non-singular. Typically, the two wavelengths are chosen i) within 700-900nm where the absorption of oxy-Hb and deoxy-Hb are dominant as compared to other tissue chromophores, and ii) below and above the isosbestic point (~805nm where absorption spectrums of deoxy- and oxy-Hb cross each other) to focus the changes in absorption to either deoxy-Hb or oxy-Hb, respectively. The fNIR instrument used in this study employs 730nm and 850nm wavelengths.
Finally, using the markers (time synchronization signals), periods of baseline/rest and tasks are labeled and select features from oxygenation data are extracted such as mean, min and max values. COBI Studio saves both raw light intensity measurements and calculated oxygenation values (using modified beer lambert law) to text based files as well as time synchronization (marker) files. COBI Studio can also be used to apply noise removal methods such as finite impulse response low-pass or band-pass filters. Output files can be exported to common analysis software such as (Matlab, Excel, SPM and SPSS) or dedicated analysis software such as fnirSoft24 for further processing.
6. Representative Results:
fNIR Signal Examples
Figures 2-5 preset fNIR raw signals from a single measurement location with two wavelength components (730nm and 850nm) shown separately. Figure 2 represents a valid and acceptable signal epoch whereas Figure 3 and 4 are unacceptable and needs to be discarded. Figure 5 presents raw signal that was contaminated with motion artifact and needs to be cleaned or discarded.

Figure 2. A good fNIR raw signal sample

Figure 3. A bad fNIR raw signal sample where 850nm channel is saturated.

Figure 4. A bad fNIR raw signal sample where there's hardware problem or cable connectivity issue.

Figure 5. A bad fNIR raw signal sample where there are motion artifacts.
Study Protocol
Assessments of learning are best exemplified by retention (i.e., memory) and transfer (i.e., generalizability) tests. In our study, three mazes (maze1, maze2 and maze3) were practiced during the acquisition phase for a total of 105 trials each across three days. The two conditions; random practice order (RND) and blocked practice order (BLK) are summarized in Figure 6. Two subjects volunteered for the four day study. On the 4th day, 10 retention trials were conducted for each maze and the mazes were presented in a random order. Two novel mazes (maze4 and maze5) were created that had additional corridors and different starting and ending points than the mazes originally practiced. Subjects completed ten trials for each of the two new mazes. These mazes constituted a transfer phase, and were presented in a random order to all. The transfer phase mazes were used to determine the extent to which each subject was able to generalize their learning and practice with acquisition mazes.

Figure 6. Representative experiment protocol outline.
Study Behavioral Results
The following figures 7 through 9, display average feature values (path length, total time of completion, and velocity) of subjects across each day. First, results from maze1, maze2 and maze3 are listed for both RND and BLK practice. Next, maze4 and maze5 results are listed to compare random versus blocked practice results. All error bars are standard error of the mean (SEM).

Figure 7. RND practice behavioral performance summary for acquisition and retention tasks including total path length, total time of completion and average velocity.

Figure 8. BLK practice behavioral performance summary for acquisition and retention tasks including total path length, total time of completion and average velocity.

Figure 9. Behavioral performance comparison of BLK vs. RND practice for transfer tasks including total path length, total time of completion and average velocity.
Study fNIR Results
Oxygenated hemoglobin concentration changes from baseline were averaged over the time course of each individual maze using marker data received from MazeWalker (indicates start and end of each maze). Larger magnitude concentration changes are taken to represent higher levels of regional brain activation. A higher level of activation was observed during both retention and transfer tasks for BLK practice compared to RND practice. During transfer tasks, a higher level of activation was seen under BLK practice as compared with RND practice (See Figure 10).
For the BLK practice subject, transfer trials required higher activation compared to retention trials. For the RND practice subject, activation level DID NOT differ for transfer and retention tasks as opposed to BLK practice subject (See Figure 11).

Figure 10. Comparison of average oxy-Hb concentration changes for BLK vs. RND practice for both retention tasks (left) and transfer tasks (right).

Figure 11. Comparison of average oxy-Hb concentration changes for retention vs. transfer tasks for both BLK (left) and RND (right) practice.