0% found this document useful (0 votes)
4 views22 pages

Competitive and Cooperative Models in AI

The document discusses competitive and cooperative models in agent-based intelligent systems, focusing on strategies, equilibria, and opponent modeling in competitive scenarios, as well as bargaining and negotiation in cooperative contexts. Competitive models utilize Game Theory to predict agent behavior and identify stable outcomes like Nash Equilibria, while cooperative models aim for Pareto-optimal agreements through binding contracts and communication. Key concepts include various strategies, the significance of equilibria, and the application of probabilistic reasoning and machine learning in opponent modeling.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views22 pages

Competitive and Cooperative Models in AI

The document discusses competitive and cooperative models in agent-based intelligent systems, focusing on strategies, equilibria, and opponent modeling in competitive scenarios, as well as bargaining and negotiation in cooperative contexts. Competitive models utilize Game Theory to predict agent behavior and identify stable outcomes like Nash Equilibria, while cooperative models aim for Pareto-optimal agreements through binding contracts and communication. Key concepts include various strategies, the significance of equilibria, and the application of probabilistic reasoning and machine learning in opponent modeling.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module No.

4 COMPETITIVE AND COOPERATIVE MODELS


Competitive Models: strategies and equilibria, opponent modelling. Cooperative models: bargaining
and negotiation, resource allocation, inter-agent relationships.

Competitive Models: strategies and equilibria

Competitive models in agent-based intelligent systems use Game Theory to analyze


interactions where agents pursue self-interested goals that often conflict. The primary goal is
to predict agent behavior by defining optimal strategies and identifying stable outcomes called
equilibria.

Strategies and Game Theory Fundamentals


A competitive interaction, or game, is defined by a set of players (agents), the actions
(strategies) available to them, and the payoffs (utilities) each agent receives based on the
combination of actions chosen by all players.

Types of Strategies

 Pure Strategy: An agent chooses one specific action with 100% certainty (e.g.,
"Always attack flank A").
 Mixed Strategy: An agent chooses a probability distribution over its available actions
(e.g., "Attack A 70% of the time and B 30% of the time"). Mixed strategies are crucial
in highly competitive games to keep agents unpredictable.
 Dominant Strategy: A strategy that yields the highest payoff for an agent, regardless
of the actions chosen by the opponents. A rational agent will always choose a
dominant strategy if one exists.

Equilibria: Stable Outcomes


The central task of competitive modeling is finding a stable set of strategies, or an
equilibrium, where no agent has an incentive to change its behavior.

Nash Equilibrium (NE)

A Nash Equilibrium is a strategy profile (one strategy for each agent) such that no agent can
unilaterally improve its payoff by switching to a different strategy, assuming all other agents
keep their strategies fixed.

 Significance: In competitive AI, agents are designed to adopt their part of a NE, as
this represents a stable, locally optimal point given the assumed rationality of the
opponents.
Pareto Optimality vs. NE

The best outcome for the individual (NE) is often not the best for the group (Pareto Optimal).

 An outcome is Pareto Optimal if it's impossible to make one agent better off without
making at least one other agent worse off.
 In competitive games, the NE often leads to a suboptimal collective outcome (e.g.,
in the Prisoner's Dilemma, both agents defect, resulting in a low payoff for both).

Applications and Examples


Application Domain Agent Interaction Competitive Strategy Focus
Financial Trading High-frequency Predicting opponent trading patterns;
Bots trading, bidding, and using mixed strategies to maintain
market manipulation. market advantage without being
penalized.
Cybersecurity/Defense Attacker vs. Defender Defender: Optimizing limited
interaction in resources (e.g., firewalls) to minimize
networks. attack impact, modeled as a zero-sum
game. Attacker: Maximizing payoff
by exploiting known vulnerabilities.
Resource Allocation Multiple entities Bidding mechanisms and price wars;
competing for limited strategic queuing to minimize wait time
server bandwidth or while imposing costs on rivals.
cloud storage.

Example: The Matching Pennies Game

This game perfectly illustrates a zero-sum, purely competitive scenario where no Pure
Strategy Nash Equilibrium exists, necessitating a Mixed Strategy solution.

Player 1 \ Player 2 Heads (H) Tails (T)


Heads (H) (+1, -1) (-1, +1)
Tails (T) (-1, +1) (+1, -1)

 Goal: Player 1 wants to match Player 2; Player 2 wants to mismatch Player 1.


 NE: There is no pure strategy NE. If Player 1 plays H, Player 2 immediately
switches to T.
 Mixed Strategy NE: Both agents play (H: 0.5, T: 0.5). If either agent deviates from
the 50/50 split, the opponent can exploit the predictability.

Computational Problems
1. Finding Mixed Strategy NE: Computing NEs for mixed strategies involves solving
complex systems of linear inequalities, often requiring iterative algorithms or
sophisticated optimization techniques, which is computationally expensive for large
games.
2. Imperfect Information: Most real-world scenarios involve hidden information (e.g.,
one agent doesn't know the other's true payoffs or current strategy). This requires
agents to use probabilistic reasoning (like Bayesian Nash Equilibrium) alongside
Game Theory, drastically increasing complexity.
3. Modeling Opponent Rationality: Competitive models often assume opponents are
perfectly rational and omniscient. Real agents may be boundedly rational, irrational,
or driven by factors outside the defined payoff matrix.

Pseudocode for Finding Pure Strategy Nash Equilibrium


The following pseudocode outlines a brute-force approach for finding all Pure Strategy
Nash Equilibria in a two-player game by systematically checking every combination of
actions against the definition of NE.

function FIND_PURE_NASH_EQUILIBRIA(Agent1_Actions, Agent2_Actions,


Payoff_Matrix):

"""

Identifies all Pure Strategy Nash Equilibria for a two-player, finite-action game.

Args:

Agent1_Actions: List of actions for Player 1 (A1).

Agent2_Actions: List of actions for Player 2 (A2).

Payoff_Matrix: Matrix mapping (A1_index, A2_index) -> (Payoff1, Payoff2).

Returns:

A list of equilibrium action pairs [(a1_eq, a2_eq)].

"""

Equilibria = []
# Iterate through every possible strategy profile (a1, a2)

for i, a1 in enumerate(Agent1_Actions):

for j, a2 in enumerate(Agent2_Actions):

is_nash_equilibrium = True

# 1. Check Agent 1: Can Agent 1 improve payoff by switching actions?

current_payoff_1 = Payoff_Matrix[i][j][0]

for i_prime, a1_prime in enumerate(Agent1_Actions):

# Check all alternatives a1_prime (where a1_prime != a1)

if i_prime != i:

alternative_payoff_1 = Payoff_Matrix[i_prime][j][0]

if alternative_payoff_1 > current_payoff_1:

is_nash_equilibrium = False

break

if not is_nash_equilibrium:

continue # Skip to the next profile

# 2. Check Agent 2: Can Agent 2 improve payoff by switching actions?

current_payoff_2 = Payoff_Matrix[i][j][1]
for j_prime, a2_prime in enumerate(Agent2_Actions):

# Check all alternatives a2_prime (where a2_prime != a2)

if j_prime != j:

alternative_payoff_2 = Payoff_Matrix[i][j_prime][1]

if alternative_payoff_2 > current_payoff_2:

is_nash_equilibrium = False

break

# 3. Final Check: If neither agent can unilaterally deviate for a better payoff

if is_nash_equilibrium:

[Link]((a1, a2))

return Equilibria

Opponent modelling:

Opponent modelling is the process by which an intelligent agent tries to infer the goals,
capabilities, beliefs, and intentions of other agents (its opponents or competitors) within a
shared environment. This inference allows the agent to anticipate the opponent's future moves
and select a strategy that maximizes its own utility, especially in competitive or adversarial
domains.

Core Concepts and Techniques


Opponent modelling is generally an application of Probabilistic Reasoning and Machine
Learning techniques.

1. Inferring Goals and Payoffs

The most common form of modelling is inferring the opponent's payoff matrix in a Game
Theory context.
 Technique: The agent assumes the opponent is rational (i.e., seeks to maximize their
own payoff) and uses the opponent's past actions to estimate what utility function
drove those choices.
o Example: If an opponent consistently chooses action 'A' over 'B' in a given
state, the agent infers that Utility(Action A)>Utility(Action B) for the
opponent.

2. Inferring Beliefs and Knowledge

In games of imperfect information (like Poker), agents must infer what the opponent knows
or believes.

 Technique: Bayesian Inference. The agent maintains a probability distribution (a


belief state) over the opponent's hidden information (e.g., their hand of cards) and
updates this distribution based on observed actions (e.g., betting behavior).

3. Inferring Strategy/Policy

Predicting the opponent's entire behavior pattern.

 Technique: Reinforcement Learning (RL). The agent treats the opponent as a


stochastic part of the environment and learns a model of their policy, P(Action∣State),
by observing their actions over many interactions.

Applications and Examples


Application Agent's Goal Opponent Modelling Task
Domain
Video Games Maximizing win rate Inferring the opponent's tech tree choice or
(RTS/MOBA) against human/AI resource balance to select a counter-strategy
players. (e.g., predicting a 'fast rush' build).
Poker/Bridge Maximizing profit Inferring the opponent's hand strength
Bots against human (belief) and their risk tolerance (utility
players. function) based on betting patterns.
Autonomous Ensuring safety and Predicting the intent of other drivers (e.g.,
Driving efficient traffic flow. inferring whether a cutting car intends to
speed up or slow down) based on velocity and
turn signals.
Cybersecurity Defending a network Inferring the goals and capabilities of the
resource. attacker based on the type of probes and
attacks launched.

Computational Problems
1. Non-Stationarity: If the opponent is also a learning agent, their strategy changes over
time (it's non-stationary). This makes the opponent model constantly outdated, forcing
the agent to learn and relearn continuously.
2. Computational Cost: Maintaining a comprehensive model (e.g., a full probability
distribution over all possible opponent policies) for games with large state or action
spaces is often intractable.
3. Ambiguity: In many situations, a single action by the opponent can be consistent with
multiple different goals or utility functions, making definitive inference difficult.
4. Modeling Irrationality: Agents typically assume the opponent is perfectly rational.
Modelling human opponents, who may act irrationally or emotionally, adds
significant complexity.

Pseudocode for Strategy-Based Opponent Modelling


The following pseudocode outlines a basic approach where an agent uses observed opponent
actions to learn a simple, probabilistic model of the opponent's policy (πopp).

function OPPONENT_MODEL_UPDATE(State, Opponent_Action, Model_History):

"""

Updates the agent's probabilistic model of the opponent's policy (P(A_opp | S)).

Args:

State: The observed state S where the action was taken.

Opponent_Action: The observed action A_opp taken by the opponent.

Model_History: Historical count of all (S, A_opp) occurrences.

Returns:

Pi_Opp: The updated probabilistic policy model.

"""

# 1. Update Historical Counts

Model_History.INCREMENT_COUNT(State, Opponent_Action)
Model_History.INCREMENT_TOTAL_STATE_COUNT(State)

# 2. Build/Update the Policy Model (Pi_Opp)

Pi_Opp = {} # Dictionary mapping State -> P(Action | State) distribution

for S in Model_History.ALL_STATES:

# Calculate the total number of times the opponent acted in state S

Total_Obs_in_S = Model_History.GET_TOTAL_STATE_COUNT(S)

if Total_Obs_in_S > 0:

# Initialize distribution for P(A_opp | S)

Pi_Opp[S] = {}

# Calculate P(Action | State) = Count(Action in S) / Count(S)

for A_opp in OPPONENT_POSSIBLE_ACTIONS:

Count_A_in_S = Model_History.GET_COUNT(S, A_opp)

# Apply Laplace smoothing or add a small epsilon if Count_A_in_S is 0

# to prevent zero probabilities. (Simplified here)

Pi_Opp[S][A_opp] = Count_A_in_S / Total_Obs_in_S

return Pi_Opp
function AGENT_DECIDE_WITH_MODEL(My_Possible_Actions, State, Pi_Opp,
Utility_Function):

"""

Selects the best action by anticipating the opponent's probabilistic move.

"""

Best_Action = None

Max_Expected_Utility = -float('inf')

for My_Action in My_Possible_Actions:

Expected_Utility_My_Action = 0.0

# Sum over all opponent's possible moves, weighted by the predicted probability

for Opponent_Action in Pi_Opp[State].keys():

Prob_Opponent_Action = Pi_Opp[State][Opponent_Action]

# Calculate the resulting payoff if the agent chooses My_Action and opponent
chooses Opponent_Action

Outcome_Utility = Utility_Function.GET(State, My_Action, Opponent_Action)

Expected_Utility_My_Action += Prob_Opponent_Action * Outcome_Utility

if Expected_Utility_My_Action > Max_Expected_Utility:

Max_Expected_Utility = Expected_Utility_My_Action
Best_Action = My_Action

return Best_Action

Cooperative models: bargaining and negotiation

Cooperative models: bargaining

Cooperative bargaining in agent-based intelligent systems focuses on achieving Pareto-


optimal agreements by assuming agents can form binding contracts and communicate
openly to maximize their collective utility or social welfare. This is in contrast to non-
cooperative bargaining, where agents act purely to maximize individual gain without
guaranteed contract enforcement.

Core Principles of Cooperative Bargaining

Cooperative bargaining models are typically axiomatic, meaning they define a "fair" solution
based on a set of desirable properties rather than modeling the procedural steps of offers and
counter-offers.

Concept Description
Feasible Set (S) The set of all possible utility outcomes (payoffs) that agents can
achieve through an agreement. It is assumed to be convex and
compact.
Disagreement The payoff vector agents receive if they fail to reach an agreement
Point (D) (the status quo). This point is crucial as the cooperative solution
seeks to improve upon it.
Pareto The agreement must be one where no agent can increase their utility
Optimality without decreasing another agent's utility. This ensures the solution is
efficient.
Binding The foundational assumption that once agents agree on an outcome,
Agreements they are committed to it (it is enforceable).

Key Cooperative Bargaining Models

The most famous and widely applied model is the Nash Bargaining Solution (NBS).

1. Nash Bargaining Solution (NBS)

The NBS is the unique solution that satisfies a set of axioms (Pareto optimality, symmetry,
scale invariance, and independence of irrelevant alternatives).
 Objective Function: The agents act as if they are maximizing the Nash product,
which is the product of their utility gains over the disagreement point.

 Interpretation: Intuitively, the solution gives each agent their disagreement payoff
(di) plus a share of the cooperation benefits, adjusted for their relative utility
preferences.

2. Alternative Cooperative Rules

Other rules exist that prioritize different notions of fairness:

 Kalai-Smorodinsky Bargaining Solution: This rule is not based on maximizing a


product but on maximizing the joint gain while maintaining a proportional
relationship to the ideal maximum payoff for each agent (the Utopia point).
 Egalitarian Bargaining Solution: This rule prioritizes minimizing the maximum
utility difference between agents, ensuring the most equal distribution of the benefits.
 Utilitarian Rule (Social Welfare Maximization): This model maximizes the sum of
the agents' utilities (∑ui), which ensures the greatest overall benefit for the system but
may result in a highly unequal distribution if one agent has a higher ability to convert
resources into utility.

Bargaining Outcome Space (Nash Bargaining Frontier)


Multi-Agent Bargaining Network (Coalition Bargaining)

Negotiation in Cooperative MAS


While the theoretical models define the optimal outcome, agents still need protocols to reach
that agreement in practice:

 Argumentation Protocols: Agents exchange justifications and evidence (arguments)


to persuade others that a certain proposal maximizes collective utility. This is a
mechanism for joint problem-solving and consensus-reaching.
 Deliberative Systems: Agents jointly plan their actions by communicating and
aligning their internal beliefs and intentions toward a common goal, often with built-
in partial or complete altruism towards the group's interests.

Cooperative models: negotiation

Cooperative models of negotiation in agent-based intelligent systems focus on achieving


Pareto-optimal or mutually beneficial agreements by assuming agents are aligned towards
a common goal or are willing to prioritize social welfare over pure individual gain. These
models define the rules and procedures agents use to exchange information, resolve conflicts,
and reach a consensus.

1. Cooperative Negotiation Protocols

Cooperative negotiation is procedural; it defines the structured exchange of messages agents


follow to reach an agreement.

A. Contract Net Protocol (CNP)

This is a standard, highly influential protocol (and a FIPA standard) primarily used for task
allocation in cooperative Multi-Agent Systems (MAS).

 Roles:
o Manager (Initiator): The agent that has a task to be executed and issues a
Call for Proposals (CFP).
o Contractor (Participant): Agents that receive the CFP and submit Proposals
(bids) or Refuse the task.
 Process: The Manager evaluates the bids (e.g., based on cost, completion time, or
capability) and sends an Accept-Proposal to the best-suited contractor and a Reject-
Proposal to the others. The chosen contractor then executes the task.

B. Argumentation-Based Negotiation (ABN)

This is a more sophisticated protocol where agents exchange not just offers and counter-
offers, but also justifications, critiques, or explanations for their proposals.

 Focus: It shifts the negotiation from purely price/utility-based concession to a shared


problem-solving process where agents aim for an integrative (win-win) solution by
revealing and aligning their underlying interests and constraints.
 Mechanism: Agents propose a course of action and provide supporting arguments.
Other agents can challenge the proposal with counter-arguments based on domain
rules or their private knowledge, leading to a consensus.

C. Deliberative Negotiation

Agents in this model coordinate by jointly planning their actions, often communicating their
intentions and beliefs to ensure their local actions contribute to the global, shared objective.
This typically assumes a high degree of pre-existing trust and goal alignment.

2. Key Cooperative Negotiation Strategies

Cooperative agents employ strategies designed to expand the total value created ("the size of
the pie") before dividing it, which is characteristic of integrative bargaining.

Strategy Description Goal


Integrative Agents explore multiple issues Achieve a Win-Win
Bargaining simultaneously to find solutions that outcome where the final
maximize joint gains by trading off low- agreement is Pareto-
priority issues for high-priority ones. optimal.
Logrolling An agent makes a package offer that Create value by exploiting
(Package combines multiple issues, where concessions differences in agent
Deals) are made on issues the agent cares less about preferences and utilities.
in exchange for gains on issues it cares more
about.
Interests Agents voluntarily reveal their underlying Facilitate innovative
Disclosure goals and reasons (their interests) for a solutions that satisfy both
position, allowing the other agents to craft a parties' true needs, often
solution that addresses those true interests. using ABN.
Trust and Agents use learned information about a Mitigate risk and
Reputation partner's past behavior (e.g., reliability, encourage long-term,
honesty) to adjust their current negotiation reliable cooperation.
strategy and commitment level.
3. Game Theory Models for Negotiation
While cooperative bargaining models like the Nash Bargaining Solution focus on the
axiomatic outcome (the fair division of surplus), cooperative negotiation often uses game
theory to model the process of reaching that outcome.

 Utility Functions: Agents are designed with utility functions that often incorporate a
component for the collective utility (∑ui) or a factor for fairness (e.g., a penalty for
extreme inequality).
 Equilibrium: The goal is to reach a Nash Equilibrium that is also Pareto-optimal,
meaning it's a stable point from which no agent would unilaterally deviate, and it is
the best possible collective outcome.
 Commitment: The key distinction remains the assumption of binding agreements,
which is the mechanism that ensures the negotiated cooperative outcome is stable and
enforceable in the system.

1. Cooperative Bargaining Theory (e.g., Nash Bargaining Solution)

This is a foundational concept in cooperative models.

 Assumption: Agents can collaborate and commit to a binding agreement, often


referred to as a coalition.
 Goal: To find a fair division of the surplus (the extra value generated by the
agreement compared to the disagreement point) that satisfies certain axioms (like
symmetry, Pareto efficiency, and scale invariance).
 The Nash Bargaining Solution (NBS): A key solution concept that maximizes the
product of the agents' utility gains relative to their disagreement payoffs (max(u1−d1
)(u2−d2)...). It offers a predicted rational outcome for cooperative agents.

Negotiation protocol flowchart:


his diagram models a classic bilateral bargaining protocol adapted for agents,
Resource allocation:

Resource allocation in agent-based intelligent systems is the process of deciding how to


distribute limited resources (like time, computational power, bandwidth, or physical assets)
among a group of competing or cooperating agents to achieve individual or collective goals
effectively. It is a critical aspect of multi-agent systems (MAS) that ensures efficient
operation and prevents conflicts. 💰

Core Mechanisms and Challenges


Resource allocation requires sophisticated coordination and negotiation, falling largely under
the domain of cooperative or mixed-motive (cooperative and competitive) planning.

1. Allocation Mechanisms

Mechanism Description Use Case


Market-Based Agents bid for resources. The Cloud computing services
(Auction) highest bidder wins. where agents compete for
CPU time or storage space.
Contract Net Protocol Agents announce tasks (requests Autonomous logistics,
for resources/services), and other where tasks like "fetch part
agents bid to fulfill them. X" are announced, and
robots bid based on
location/battery.
Negotiation/Bargaining Agents communicate to find a Two robots negotiating a
mutually acceptable compromise shared path to prevent
on resource usage (e.g., sharing a collision and minimize
communication channel or time- total delay.
slicing usage).
Centralized A single central agent calculates Small, fully cooperative
Optimization the global optimal allocation systems like factory
based on all agents' needs and automation cells.
priorities.

2. Key Problems

1. Conflict Resolution: When two agents need the same resource simultaneously (e.g., a
shared robot arm or a network channel), the system must have rules (prioritization,
time-slicing) to resolve the clash without deadlock.
2. Fairness and Efficiency: The allocation must balance efficiency (maximizing the
total utility of all agents) with fairness (ensuring no single agent is permanently
starved of resources).
3. Dynamic Re-allocation: In dynamic environments, resource availability changes
(e.g., a server crashes). The system must rapidly re-allocate resources to the remaining
functional agents.
4. Information Asymmetry: In decentralized systems, agents may lie about their true
resource needs or exaggerate their priorities to gain an advantage, requiring
mechanisms to enforce truthfulness.

Applications and Examples


Application Resource(s) Allocation Example
Domain
Cloud CPU time, Memory, Virtual machines (agents) dynamically bid
Computing Network Bandwidth. for temporary burst capacity on a central
server cluster to handle peak loads.
Automated Paths/Corridors, Charging A central traffic controller allocates specific
Warehouses Stations, Pickup/Drop-off time slots for robot A and robot B to use a
Zones. crucial intersection to prevent gridlock.
Disaster Drones, Communication A ground commander agent dynamically
Response Channels, Sensors. assigns the limited number of search drones
to areas based on the most recent, high-
priority survivor signals.

Pseudocode for Decentralized Resource Allocation


(Bidding)
The following pseudocode illustrates a simplified decentralized bidding mechanism for
allocating a shared, single resource (like a specific machine or a charging dock). This uses a
market-based approach.

function RESOURCE_ALLOCATION_CYCLE(Agent_i, Shared_Resource):

"""

Agent i participates in a bidding cycle to gain temporary access to a shared resource.

Args:

Agent_i: The current agent (with its current needs and priority).

Shared_Resource: The resource being contended for (e.g., Charging Dock 1).

"""

# 1. Agent Evaluation (Determine Need/Priority)


Agent_i.Urgency = CALCULATE_URGENCY(Agent_i.Current_Task_Deadline,
Agent_i.Current_Battery)

Agent_i.Bid_Value = DETERMINE_BID_BASED_ON_URGENCY(Agent_i.Urgency)

# 2. Bidding Phase (Communication)

Message = CREATE_MESSAGE(PERFORMATIVE="Bid", Content=Agent_i.Bid_Value,


Resource_ID=Shared_Resource.ID)

SEND_BROADCAST_TO_RESOURCE_MANAGER(Message)

# 3. Listen for Allocation Decision (Wait for Auction Result)

Auction_Result = RECEIVE_MESSAGE_FROM_MANAGER()

if Auction_Result.WINNER == Agent_i.ID:

# 4. Resource Acquisition and Usage

print(f"Agent {Agent_i.ID} won the bid with ${Agent_i.Bid_Value}. Acquiring resource...")

Shared_Resource.ACQUIRE(Agent_i)

Agent_i.UTILIZE_RESOURCE()

Shared_Resource.RELEASE(Agent_i)

# Optionally, deduct the bid cost from agent's virtual currency/utility

Agent_i.Utility -= Agent_i.Bid_Value

elif Auction_Result.STATUS == "Failure" and Agent_i.Urgency > CRITICAL_THRESHOLD:

# 5. Fallback/Replanning

print(f"Agent {Agent_i.ID} lost bid. Initiating fallback plan...")

Agent_i.REPLAN_TO_USE_ALTERNATE_RESOURCE()

else:

print(f"Agent {Agent_i.ID} lost bid. Will try again later.")


inter-agent relationships:

Inter-agent relationships form the social fabric of any Multi-Agent System (MAS), defining
how individual agents interact, influence, and depend on one another. These relationships
dictate the overall system dynamics, coherence, and performance. Understanding and
modeling these relationships are crucial for designing effective collaborative or competitive
AI systems.

1. Core Categories of Inter-Agent Relationships


Relationships can be classified based on the agents' motivations and the resulting impact of
their actions on one another.

Relationship Goal Alignment Interaction Key Mechanism


Type Nature
Cooperative Aligned (Shared Mutually Communication, Joint Plan
Goal) Beneficial Execution, Task Allocation.
Competitive Opposed Zero-Sum or Game Theory, Opponent
(Conflicting Goals) Negative-Sum Modelling, Strategic
Deception.
Mixed- Partially Negotiation, Negotiation Protocols,
Motive Aligned/Opposed Compromise Auctions, Bargaining.
Dependency Asymmetric (A Control, Trust, Contract Net, Authority
needs B) Delegation Structures.

2. Examples and Applications


A. Cooperative Relationship: Task Allocation (Dependency)

 Relationship: Agent A (requester) is dependent on Agent B (provider) to complete a


task.
 Example: In a manufacturing system, a Planning Agent might need a Welding
Agent to complete a step. The relationship is one of dependency and delegation.
 Application: Contract Net Protocol is used to formally define this relationship,
where the requester broadcasts a task, and providers bid to form a temporary
cooperative relationship.

B. Competitive Relationship: Resource Contention

 Relationship: Agents have conflicting interests over a limited resource.


 Example: Two autonomous delivery vehicles racing to claim the fastest route to a
destination. The relationship is competitive.
 Application: The interaction is solved using Game Theory, aiming for a Nash
Equilibrium where neither agent can unilaterally improve their payoff.

C. Mixed-Motive Relationship: Negotiation


 Relationship: Agents have overlapping interests but disagree on the terms of
cooperation (e.g., price, time, effort).
 Example: A Buyer Agent wants a low price; a Seller Agent wants a high price. They
both want the transaction, but their individual utilities are opposed.
 Application: Negotiation protocols (like the Monotonic Concession Protocol) are
used, where agents iteratively exchange proposals until a deal is struck or the
relationship terminates.

3. Problems and Challenges


1. Trust and Honesty (Cooperation): In open MAS, agents may not be trustworthy. If
a relationship is based on cooperation, a malicious agent might lie about its
capabilities or effort, leading to system failure.
2. Commitment Management (Dependency): Establishing and enforcing
commitments (e.g., "I promise to deliver part X by 2:00 PM") is hard. If an agent fails
a commitment, the relationship must have rules for penalties or reassignment.
3. Modeling Opponent Rationality (Competition): Competitive relationships rely on
the agent accurately modeling the opponent's strategy and rationality. If the opponent
is human or irrational, the predictive power of the model collapses.
4. Relationship Dynamics: Relationships are not static. Cooperation can turn into
competition (e.g., resources dry up), or competition can force temporary cooperation
(e.g., two competitors must temporarily share a rescue channel).

4. Pseudocode for Modeling Trust in a Cooperative


Relationship
A basic way to manage trust in a dependency relationship is through reputation scoring.
Agent A (the principal) updates its trust score for Agent B (the provider) based on the history
of successful and failed delegated tasks.

function UPDATE_TRUST_SCORE(Agent_B_ID, Result_of_Last_Interaction,


Trust_History):
"""
Updates Agent A's trust score for Agent B based on performance.

Args:
Agent_B_ID: The identity of the agent being evaluated.
Result_of_Last_Interaction: Boolean (True for Success, False for
Failure).
Trust_History: Dictionary storing trust metrics (e.g., success count,
score).

Returns:
New_Trust_Score: The updated trust rating for Agent B.
"""

# 1. Retrieve Current Trust Metrics


current_score = Trust_History.GET_SCORE(Agent_B_ID)
success_count = Trust_History.GET_SUCCESS_COUNT(Agent_B_ID)
total_count = Trust_History.GET_TOTAL_COUNT(Agent_B_ID)

# Define update parameters (e.g., learning rate or forgetting factor)


LEARNING_RATE = 0.1

# 2. Calculate New Trust Metrics


total_count += 1

if Result_of_Last_Interaction == True:
success_count += 1

# Reward successful interaction (e.g., increase current score


slightly)
new_score = current_score + (1.0 - current_score) * LEARNING_RATE
else:
# Penalize failure (e.g., decrease current score significantly)
new_score = current_score - (current_score * 0.5) * LEARNING_RATE
# The penalty is harsher than the reward to reflect risk aversion

# 3. Use Frequency and Score to set the Final Trust Metric


# Using Beta distribution mean (simplified here to weighted average)
if total_count > 0:
Frequency_Trust = success_count / total_count

# Combine the recent score update with the historical frequency


Final_Trust_Score = 0.7 * Frequency_Trust + 0.3 * new_score
else:
Final_Trust_Score = 0.5 # Default neutral score

# 4. Store and Return


Trust_History.STORE(Agent_B_ID, Final_Trust_Score, success_count,
total_count)

return Final_Trust_Score

function DECIDE_WHICH_AGENT_TO_HIRE(Task, Potential_Providers, Trust_History):


"""
Decides which agent to delegate a task to based on trust and capability.
"""
Best_Agent = None
Max_Score = -float('inf')

for Agent_B in Potential_Providers:


Trust_Score = Trust_History.GET_SCORE(Agent_B.ID)
Capability_Score = Agent_B.GET_CAPABILITY_FOR_TASK(Task)

# Prioritize capable and trustworthy agents (Weighted combination)


Combined_Score = (0.6 * Capability_Score) + (0.4 * Trust_Score)

if Combined_Score > Max_Score:


Max_Score = Combined_Score
Best_Agent = Agent_B

return Best_Agent

You might also like