Skip to content
Snippets Groups Projects
Commit 8822494f authored by Alex's avatar Alex
Browse files

fix wrong partner pb

parent ecd7b7a9
No related branches found
No related tags found
No related merge requests found
...@@ -145,7 +145,7 @@ class AgentBehaviour(variable: Variable, ...@@ -145,7 +145,7 @@ class AgentBehaviour(variable: Variable,
if (debug) println(s"$variable: the value of $peerVariable is $peerValue " + if (debug) println(s"$variable: the value of $peerVariable is $peerValue " +
s"(${updatedMind.context.size-1}/${neighbours.size})") s"(${updatedMind.context.size-1}/${neighbours.size})")
val potentialPartner: Variable = updatedMind.choosePartner(neighbours) val potentialPartner: Variable = updatedMind.choosePartner(neighbours)
updatedMind = updatedMind.setPartner(peerVariable) updatedMind = updatedMind.setPartner(potentialPartner)
if (debug) println(s"$variable> context before computing the joint offer=${updatedMind.currentContext}") if (debug) println(s"$variable> context before computing the joint offer=${updatedMind.currentContext}")
val moves: List[BilateralMove] = updatedMind.computeJointOffer(potentialPartner, neighbours, constraints) val moves: List[BilateralMove] = updatedMind.computeJointOffer(potentialPartner, neighbours, constraints)
val offer: Offer = new Offer(variable, moves) val offer: Offer = new Offer(variable, moves)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment