0
0
Agentic AIml~10 mins

Handling conflicts between agents in Agentic AI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize the conflict resolution method for agents.

Agentic AI
conflict_resolver = AgentConflictManager([1]=True)
Drag options to blanks, or click blank then click option'
Aenable_resolution
Ballow_conflicts
Cconflict_mode
Dresolve_conflicts
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'allow_conflicts' which would permit conflicts instead of resolving them.
Using 'conflict_mode' which is not a valid parameter.
2fill in blank
medium

Complete the code to detect conflicts between two agents' actions.

Agentic AI
if agent1.action [1] agent2.action:
    handle_conflict()
Drag options to blanks, or click blank then click option'
A!=
B==
Cin
Dnot in
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' which checks if actions are the same, not conflicting.
Using 'in' or 'not in' which are not appropriate for direct action comparison.
3fill in blank
hard

Fix the error in the conflict resolution function call.

Agentic AI
result = resolve_conflict(agent1, agent2, strategy=[1])
Drag options to blanks, or click blank then click option'
A'priority'
Brandom
C'random'
Dpriority
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the strategy without quotes causing a NameError.
Using an undefined variable instead of a string literal.
4fill in blank
hard

Fill both blanks to create a dictionary mapping agents to their chosen conflict resolution strategies.

Agentic AI
strategies = {agent1: [1], agent2: [2]
Drag options to blanks, or click blank then click option'
A'compromise'
B'voting'
C'negotiation'
D'arbitration'
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-string values without quotes.
Assigning the same strategy to both agents.
5fill in blank
hard

Fill all three blanks to filter conflicting agents and apply a resolution method.

Agentic AI
conflicting_agents = [agent for agent in agents if agent.status == [1]]
resolution_method = [2]
results = [resolution_method(agent) for agent in conflicting_agents if agent.priority [3] 5]
Drag options to blanks, or click blank then click option'
A'conflicted'
Bresolve_agent_conflict
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong status string without quotes.
Using a comparison operator that selects lower priority agents.
Passing a string instead of a function for the resolution method.