AW000 → AW001 → AW002 → AW003
In AW002, we introduced the first transfer between two agents and observed that interaction became possible.
This notebook asks the next question.
What changes when agents remember previous interactions?
To answer this question, we extend the previous world by introducing memory while keeping everything else unchanged.
The purpose is not yet to study learning, trust, or strategy.
Instead, we examine how repeated interactions become connected through memory.
As in the previous notebooks, we begin by defining what exists before writing any Python code.
Compared with AW002, this notebook introduces only one new entity.
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 transfer part of its energy to the other. |
| Memory | A record of previous interactions maintained by each agent. |
To answer the question, we extend the previous artificial world by introducing memory.
This artificial world now contains
Each interaction is recorded in the memory of the participating agents.
No learning, decision-making, communication, or adaptation has yet been introduced.
By intentionally introducing only one new element, we isolate the effect of memory 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("Initial state")
print(agent_1.name, agent_1.money)
print(agent_2.name, agent_2.money)
for interaction in range(1, 4):
agent_1.give_money(agent_2, 20)
print()
print(f"After interaction {interaction}")
print(agent_1.name, agent_1.money)
print(agent_2.name, agent_2.money)
Initial state Agent 1 100 Agent 2 200 After interaction 1 Agent 1 80 Agent 2 220 After interaction 2 Agent 1 60 Agent 2 240 After interaction 3 Agent 1 40 Agent 2 260
Run the simulation once and observe the repeated interactions and the memory of each agent.
The simulation shows that previous interactions can now persist through memory.
Although the transfer mechanism remains unchanged, each agent records the history of its interactions.
The current state of the artificial world therefore depends not only on the present interaction but also on the accumulated history stored in memory.
Repeated interactions are shown explicitly in this notebook because the sequence is short and forms part of the scientific demonstration.
In future Artificial Worlds, the number of repeated interactions may become much larger.
Displaying every interaction explicitly would make the diagrams unnecessarily long.
When the same interaction is repeated many times without introducing a new mechanism, we may use the following abbreviated notation.
The abbreviated diagram does not introduce a new mechanism.
It represents repeated occurrences of the same interaction through time.
Only visual repetition is compressed; no conceptual information is omitted.
Memory allows interactions to persist beyond the present moment.
The artificial world now contains not only agents and interactions but also a history of those interactions.
This naturally leads to the next question explored in AW004.