# 6G Goal-Oriented Communications: How to Coexist with Legacy Systems?
## 2 Definition of a Goal
### The Goal Value, Achievability and Effectiveness  
As anticipated, the first fundamental step is for an agent to be able to verify whether a goal has been achieved by carefully selecting metrics assessed by the agent for that purpose. In this context, we define a quantified representation of the target system state indicating goal accomplishment, which we name as _goal value_. The goal value can be, for instance, a binary variable that equals 1 if the goal is achieved and 0 otherwise. Of course, it is not restricted to this case, and it may be represented as a generic real vector (e.g., the position in space of a robot with respect to a target one). In a dynamic system, a goal value is possibly time-varying, i.e., at each time instant \(t\), a new/updated goal value can be made available to an agent as a result of environment states, agents' actions and environment feedback. Therefore, in the most general case, the goal value can be denoted as a real variable \(\Theta_{t}\in\mathbb{R}^{l}\), with \(t\) denoting the time instant. Goal Achievability and Goal Effectiveness  
Going beyond the goal value, and, with focus on either repetitive or long-standing application-related goals, agents eventually have to measure the goal accomplishment rate, i.e., the probability of achieving the goal value. Indeed, a goal accomplishment must not necessarily be deterministic. For instance, a goal value can be obtained with a certain probability, which we can refer to as goal effectiveness. The goal effectiveness is inherently non-negative and is a long-term measure. Indeed, even in the case that a goal is a sequence of sub-goals, the sub-goal accomplishment is stochastic, and what we are interested in is the success rate of the goal. We can give the following example: _(i)_ edge pattern (e.g., image) classification: in this use case, we can choose the goal value to be equal to 1 if a pattern is correctly classified and 0 otherwise. In this case, without additional constraints, the goal effectiveness is the probability that the goal value equals 1 and corresponds to the correct classification rate. Nonetheless, besides the goal value itself, the goal effectiveness may be subject to \(J\) instantaneous constraints that, if not met, prevent the goal from being perceived by the agent as accomplished, per a user service-level agreement. Sticking to the edge classification use case, the goal value is defined as before, while a possible constraint is represented by the End-to-End (E2E) delay being kept under a predefined threshold. Without loss of generality, we can write these constraints (which we refer to as _short-term goal constraints_) as \(g_{j,t}\leq 0,j=1,\ldots,J\). Building on the goal value and the short-term goal constraints, we can formally define the goal effectiveness as follows:  
\[\mathcal{E}_{g}=\lim_{T\to\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E}\Bigg{\{} \mathbf{1}_{\{\Theta_{t}\geq\Theta_{\text{th}}\}}\cdot\prod_{j=1}^{J}\mathbf{1 }_{\{g_{j},t\leq 0\}}\Bigg{\}}, \tag{2}\]  
where \(\Theta_{\text{th}}\) is a predefined goal value threshold, and the expectation is generally taken with respect to the random context parameters and the strategy (policy) followed by the agents to achieve the goal. From (2), we can already state that, as per our definition, the goal effectiveness is a probability, thus \(\mathcal{E}_{g}\in[0,1]\). Going further, besides the goal value, achieving a goal may also entail other \(M\) long-term constraints. As an example, a typical long-term constraint is to keep the average energy consumption of an agent below a predefined threshold, e.g., to not quickly drain its battery level.