AW000 → AW001 → AW002
In AW001, we observed that two agents could coexist in the same artificial world without interacting.
This notebook asks the next question.
What is the smallest possible interaction between two agents?
To answer this question, we extend the previous world by introducing one simple mechanism that allows one agent to transfer energy to the other.
The purpose is not yet to study cooperation, exchange, or economics.
Instead, we examine the smallest possible interaction that can connect two independent agents.
As in the previous notebooks, we begin by defining what exists before writing any Python code.
Compared with AW001, this notebook introduces only one new mechanism.
This artificial world now contains the following entities.
| Entity | Description |
|---|---|
| Universe | The environment in which the agents exist. |
| Agent #1 | The first active entity. |
| Agent #2 | The second active entity. |
| Energy | The internal state of each agent. |
| Transfer | A mechanism through which one agent can change the energy of another agent. |
To answer the question, we extend the previous artificial world by introducing a transfer mechanism.
This artificial world now contains
The transfer mechanism allows one agent to transfer part of its energy to the other.
No memory, communication, cooperation, or competition has yet been introduced.
By intentionally introducing only one new mechanism, we isolate the effect of transfer itself.
The following diagram illustrates the ontology introduced above and the relationships among the entities in this artificial world.
class Agent:
def __init__(self, name, money):
self.name = name
self.money = money
def receive_money(self, amount):
self.money += amount
def give_money(self, other, amount):
self.money -= amount
other.receive_money(amount)
agent_1 = Agent("Agent 1", 100)
agent_2 = Agent("Agent 2", 200)
print("Before")
print(agent_1.name, agent_1.money)
print(agent_2.name, agent_2.money)
agent_1.give_money(agent_2, 20)
print()
print("After")
print(agent_1.name, agent_1.money)
print(agent_2.name, agent_2.money)
Before Agent 1 100 Agent 2 200 After Agent 1 80 Agent 2 220
Run the simulation once and observe the transfer between the two agents.
The simulation shows that two agents can influence one another once a transfer mechanism is introduced.
Unlike AW001, the internal state of one agent can now be changed by the actions of the other.
The existence of a transfer mechanism therefore creates the first interaction between agents.
A transfer mechanism establishes the first interaction between two agents.
The existence of multiple agents alone is not sufficient for interaction.
Interaction begins only when a mechanism connecting the agents is introduced.
This naturally leads to the next question explored in AW003.