C++ Data Structure

### Message Sending Rules

Your agent should implement the following rules for sending messages:

– An agent should never send the same message (i.e., a message with the
same `msg_id`) to the same neighbour twice nor should it send a message
to the same neighbour from which the messages was received.

– At each iteration an agent may choose to broadcast a single new
message with the following probabilities:

| Agent’s Personality | **RED** Message | **GREEN** Message | **BLUE** Message | None |
| ——————- | ————— | —————– | —————- | —- |
| **CHATTY** | 30% | 10% | 20% | 40% |
| **QUIET** | 10% | 5% | 10% | 75% |

E.g., a **QUIET** agent will send a **GREEN** message with 5% probability.

– At each iteration and for each newly received message, an agent may
choose to forward the message independently to each of its
neighbours according to the following rules:

| Agent’s Personality | Neighour’s Personality | Message Type | Forward | Don’t Fwd |

Leave a Reply

Your email address will not be published. Required fields are marked *