Artificial Worlds is a step-by-step exploration of the smallest possible world from which increasingly complex systems can emerge.
Rather than beginning with a realistic economy, we begin with the simplest possible question.
Can a single agent exist?
To answer this question, we intentionally construct the smallest possible artificial world.
This notebook introduces a single agent and the minimum set of elements required for its existence.
Everything else—interaction, transfer, memory, natural resources, and society—will be introduced gradually in later notebooks.
In the Artificial Worlds series, ontology means a description of what exists in an artificial world. Before writing any Python code, we first define the entities that exist in the world and the relationships among them.
This notebook contains only the following entities.
| Entity | Description |
|---|---|
| Universe | The environment in which the agent exists. |
| Agent | The only active entity in this world. |
| Energy | The internal state of the agent. |
To answer the question, we construct the smallest possible artificial world.
This artificial world contains only two entities:
The universe provides the environment in which the agent exists, but contains no other agents, objects, or resources.
The agent is the only active entity in this world. It possesses identity, an internal state, and behavior, but has no interaction with anything else.
This artificial world is intentionally simple so that the existence of a single agent can be examined without additional complexity.
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
agent_1 = Agent(name="Agent 1", money=100)
print(agent_1.name)
print(agent_1.money)
agent_1.receive_money(10)
print(agent_1.money)
Agent 1 100 110
Run the simulation once and observe the behavior of the agent.
The simulation shows that a single isolated agent can repeatedly execute its behavior while maintaining its own internal state. No interaction occurs because no other entities exist in the world.
A single agent can exist and evolve through time while maintaining its own internal state.
However, interaction requires more than one agent.
This naturally leads to the next question explored in AW001.