## 2 Methodology
### Methods: AOSR Heuristics  
The foundations of the AOSR algorithm [26] are based on the classical belief desire intention (BDI) agent model architecture [39] in conjunction with the constructs and AOSF's agent categorisation [25], which enables it to support a dynamic environment and remain flexible. As depicted in Figure 1, the architecture of the AOSR 2.0 algorithmic heuristics incorporates concurrent information threads [28] for defined products and racks, as well as their characteristics and categorisations, via an important component called the _Belief Base_, which serves as the main source of truth. Information regarding stock levels and current system states are recorded or supplied via another parallel component called the _Knowledge Base_, which keeps itself updated from the information provided by actuators. The Knowledge Base continually uses actuators to update general information that is taken to be true from the environment and the Belief Base keeps information that is considered a central fact to compare with environmental percepts, but can be revised based on repetitive factual information from the environment. There are three main actuators used in the AOSR 2.0 algorithm: (i) _Search Rack_; (ii) _Placement Generator_; and (iii) _Extract Placement_. These actuators are responsible for sensing the percepts from the environment and updating the Belief and Knowledge Base via the _Knowledge Builder_ and _Belief Builder_ as detailed in Algorithm 1. Other supporting sub-functions, such as _extract characteristics_ and _Generate CharCID_, which, respectively, find details of the characteristics of a given product or find a matching product based on the given characteristics, are also incorporated within the AOSR 2.0 algorithmic heuristics, which support the role of actuators. The composite architecture of AOSR 2.0 provides the agents with needed properties (e.g., goals or objectives, interaction protocols, timestamped actions, available resources, knowledge and belief sets) and transforms the AOSR 2.0 strategy into a pure agent-oriented solution. The functionality of these components has been implemented in a prototype using JADE [32]. Algorithms 1-5, described later in this section, give details of this implementation. First of all (and as a continuous process), the _Belief Builder_ extracts and updates the overall _Belief Base_ by utilising the _Thread Reader_, and takes care of any anomalies by utilising the _Check-Exceptions_ function. In parallel, _Percept-Builder_ senses any upcoming changes for the environment by utilising the _Request-Analyser_ function. To process requests, the _Planner Agent_ utilises either _SearchRack_ or _Placement Generator_ and updates the overall plan. Algorithms 1-5 includes the details of the overall flow of the execution. ```
1:procedureBelief-Builder
2: CheckExceptions()
3: InitiateThreadReader()
4:top:
5:if\(updateThreadReceived\)then
6: UpdateBeliefBase()
7:endif
8: BeliefStream[]\(\leftarrow\)extractBeliefBase()
9:do:
10: BeliefThreadProduct[i]\(\leftarrow\)BeliefStreamProduct[i]
11: BeliefThreadCharacter[i]\(\leftarrow\)BeliefStreamCharacter[i]
12: BeliefThreadRack[i]\(\leftarrow\)BeliefStreamRack[i]
13:while(BeliefStream.hasNext())
14: CheckIdrates
15:ifUpdatesAvailablethen
16:gototop
17:endif
18:endprocedure
```  
**Algorithm 1** Overview of Belief Builder Heuristics. Flexibility and reconfigurability are key features that make the AOSR 2.0 strategy more adaptable for any implementation environment. All the baseline information sets are stored in a form of Belief Sets (Belief Set Products, Belief Set Characteristics, Belief Set Racks), which build the overall _Belief Base_ for the AOSR 2.0. Algorithm 1 presents an overview of how Belief Builder can initiate and update the _Belief Base_ for AOSF agents.