Just finished the first version of the 'maraIRAgents' implementation (2 agents, 1+ resources each, 1 goal each, distributed fulfils plans).
Seems to run and not loop infinitely but identified a problem case, as follows:
-----
a1: goal(a1,g1), has(a1,r1), fulfils(r2,g1)
a2: goal(a2,g2), has(a2,r2), fulfils(r1,g1), fulfils(r2,g2)
-----
If a2 can communicate fulfils(r1,g1) to a1 then both agents end successfully but this doesn't happen.
Solution: Responding agent should only agree to a response if one of the two agents end up better off (similar to the condition for initiating a request). Otherwise it should refuse providing argument as such.
As well as the above, need to inspect the way atoms are ordered in the policy clauses and rule bodies to ensure (correct!) variable instantiations.
ReplyDelete