Hex-grid agent simulation with genetics, food/starvation, trade/steal, and a semantic language layer. Optional OpenAI calls for trait invention and language adoption; without a key the sim runs in mock mode.
Design notes (broader vision): GeneralIdea.md.
- Python 3.11, Flask UI (
src/web_server.py+ canvas frontend) - Optional:
openaiwhenOPENAI_API_KEYis set - Docker / docker-compose
python -m venv venv
# Windows: venv\Scripts\activate
pip install -r requirements.txt
python src/web_server.pyCLI tick loop (no UI):
python src/main.pycp .env.example .env
# put OPENAI_API_KEY=sk-... in .env (never commit .env)Docker:
docker compose up --buildPass the key via compose env (see docker-compose.yml). UI shows mockup testing vs real testing.
src/
agent.py genetics.py grid.py engine.py language.py
main.py web_server.py
static/ # hex canvas UI
data/ # runtime agent JSON (gitignored)
API keys must come from the environment only. If a key was ever committed, revoke it in the OpenAI dashboard.