Razvan00Rusu / SOMAS2022-Team6

Self Organising Multi Agent Systems 2022 Team 6
Mozilla Public License 2.0
2 stars 0 forks source link

[Leader] - Handle loot #18

Open thl19git opened 1 year ago

thl19git commented 1 year ago

Implement the following functions:

Loot allocation should use the idea of legitimate claims, as outlined in the presentation.

thl19git commented 1 year ago

HandleLootProposalRequest

One of our agent ideologies is the idea of 'freedom of information', i.e. number of proposals shared by a leader - this is one of the pieces of information that is used to update the leadership value for other agents. We don't want to be hypocritical, but we also don't want proposals wildly different from our own to be shared - we are the leader after all.

When a proposal is received, it should be compared with our own, and only shared with other agents if it exceeds a certain similarity threshold. This will be the same similarity test that will be used when voting on proposals.

Code to test the similarity of two proposals is currently WIP. Assume there is a function ProposalSimilarity(), which takes two immutable lists of rules, and returns a floating point number [0,1] indicating proposal similarity, where 1 is most similar and 0 is least similar. When an agent wants their proposal to be broadcasted, only share it if the similarity > 0.6 (exact value can be adjusted as necessary).

thl19git commented 1 year ago

@Razvan00Rusu Any idea how we are actually supposed to implement LootAllocation and FightResolution? We are given a proposal (presumably this is the one that won the vote), and expected to return a map of actions / loot items. How are we supposed to do this when we can't actually apply the proposal to each agent's state (i.e. any map returned basically can't be informed by the proposal). Could infra give us a map (generated by the proposal applied to all agent's states) and then we can edit that map if we so choose?

Razvan00Rusu commented 1 year ago

LootAllocation and FightResolution are only called on the leader at the end of the respective rounds. At the moment the leader probably just has to make a best guess using hiddenagentstate. Maybe leave this for the time being - might implement this with neel in within an hour or so 👀

Razvan00Rusu commented 1 year ago

See https://github.com/SOMAS2022/SOMAS2022/pull/169/files

Razvan00Rusu commented 1 year ago

@thl19git any ideas on how to generate an agent's own proposal? 👀

Razvan00Rusu commented 1 year ago

HandleLootProposalRequest implemented for now but will need to be updated when I work out how to generate an agent's own idea of what a proposal should be.

LootResuolution just returns the (new) calculated proposedActions - can add some conditions to change this slightly - based on generosity, bravery etc...