## 3 Methodology
### System Analysis and Design  
1. Unity-based simulation  
The development of the grocery store simulation was performed in the Unity 2D development platform. The simulation environment, as shown in Figure 2, follows a top-down view of the entire grocery store with approximate measurements of the store layout. We selected a typical supermarket model for the simulation and conducted indoor mapping, detailing layout, aisles, sections, and product placement. To ensure accuracy, the researchers visited the chosen location in person and measured the dimensions. The simulation incorporates five essential elements. The grocery shoppers for this experiment are virtual entities created with different movement speeds, decision times, and section entry and exit probabilities; and the A\({}^{*}\) pathfinding algorithm provided by Unity game engine is used for determining the route for the item to be acquired on the list. Grocery shoppers are presented with a shopping list and navigate through the supermarket, visiting sections based on probability, and scanning items within each section. Since we aim to achieve the fastest possible time to acquire all shopping items, narrowing their behavioral model to an optimal one should increase the effectiveness of the dataset used, as well as eliminating unnecessary data [17]. Figure 3 summarizes the flow for the behavior of the grocery shopper in a simulation environment. Shelf arrangement of items  
The positioning of aisles and labels follows the selected supermarket model. The grocery items are objects with assigned names (e.g., fruit, meat, fish, chips, tissue paper, soap, etc. ), which are in a similar arrangement to the supermarket model chosen, and these items could also have multiple instances inside the store. These variables have a significant impact on the path that the grocery shopper takes as they roa  
Figure 2: Grocery store simulation environment with layout based on actual supermarket. GURE:S3.F3][ENDFIGURE]  
Shopping listGrocery shopping lists were prepared with three different sizes, i.e., number of items the list contains. A small list contains 5-7 items, a medium list contains 10-14 items, and a large list contains 15-21 items. The items that are generated on each list are loaded randomly from the 555 items found in the selected grocery store. Moreover, these items do not feature brands or prices. Upon first creation of the grocery shopper, a shopping list is assigned to the shopper. An item is crossed off the list when the grocery shopper locates the item in the section they are currently in until all the items have been purchased. Item acquisition timestampIn a simulation environment, the assigned shopping list serves as their personal list for the products that they intend to purchase; a collision trigger is used on the simulation which allows the shopper to signal to the system if an item has been acquired (simulating a button-press event upon item acquisition), and automatically lists a timestamp for the item. The first item acquired starts with a timestamp of 0.0 s and immediately triggers a counter that continues indefinitely until the user acquires the last item on the list, which marks the dwell time or the total time it takes the user to finish their grocery shopping. These processes are integral in data validation since dwell time reduction is one of the key desired outcomes of this study. Dynamic list sortingFor the experimental group, the grocery shoppers have the dynamic sorting function on their shopping list. Each time an item is acquired, the list is re-sorted so that items that are in closest proximity are listed at the top. This functionality is only deployed after the machine learning model training completes, since prior to that, there are no data on which to base the sorting. The dynamic nature of the sorting algorithm holds the possibility of memory space constraints or large time complexities; however, the machine learning model has been found to solve the problems mentioned. 2.