人工生命
| Files | Last commit | Last update |
|---|---|---|
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 17 days ago |
ALife-Platform
Local progress as of 2026-09-21 / 本機進度
ZH:本機文件入口見 最新進度、待辦。9/20:101 tests OK、HTTP 3/3、NCA/Lenia 4/4、接觸轉化敘事 3/3。Mac 已推送 heartbeat/DNA/gemma_web launcher(ad5371d);本合併把 Linux Plan 23–25 進度疊上該遠端基底。
EN: See STATUS and TASKS for local docs. Sep 20: 101 tests OK, HTTP 3/3, NCA/Lenia 4/4, contact-conversion 3/3. Mac pushed heartbeat/DNA/gemma launcher (ad5371d); this merge rebases Linux Plan 23–25 progress onto that remote base.
ALife-Platform is a local-first research and integration repository that combines:
It currently combines:
ASAL: artificial-life search, morphology scoring, narrative phase control, and exported organism artifactsDigital Clone: persona, short-term memory, retrieval, prompt construction, and consistency evaluationGenAI: local LLM integration, multimodal generation scaffolding, and evaluation artifactsGemma Web: a browser prototype that connects ASAL progress, Digital Clone memory, local Gemma inference, and voice interaction into an early artificial life console
This repository is not only planning material. It contains runnable CLI
entrypoints, tests, local web UI code, and tracked runs/ artifacts that show
actual execution state.
Current State
Working now:
- ASAL run artifacts are available under
runs/asal/. - The latest ALife web prototype reads ASAL run summaries and serves organism
images/GIFs through
/api/lifeand/artifacts/asal/.... - Local Gemma inference is wired through
llama.cppsubprocess integration. - The Gemma web UI supports text chat, browser microphone capture, browser speech playback, visible avatar state, and ASAL progress panels.
- Digital Clone memory is used in the web prototype for short local interaction continuity.
- Test coverage exists for LLM cleanup, web service behavior, and ASAL life state indexing.
Still incomplete:
- The visible body is currently ASAL organism artifacts, not a finished human-like avatar.
- Digital Clone is still a lightweight local memory/persona layer, not a production identity system.
- Many subsystems remain baseline-quality; ASAL substrate coverage is still narrow.
- GenAI includes local image/speech adapters; media-quality acceptance remains incomplete.
- Voice input depends on browser/OS runtime support.
Public Repository Rules
runs/ validation/demo artifacts may be tracked when they prove current progress.
docs/ and log/ are local planning/handoff areas (often via .git/info/exclude). Do not publish .venv/, .chroma_db/, models/**/*.gguf, third_party/llama.cpp/ build outputs, or __pycache__/.
Repository Layout
apps/ CLI and local server entrypoints
configs/ YAML configs for ASAL, Digital Clone, and GenAI
context/ Small tracked project context files
core/ Shared config, runtime, logging, storage, tracking
digital_clone/ Persona, memory, retrieval, prompt, evaluation modules
evaluation/ Shared evaluation helpers
foundation_models/ Foundation model adapters
genai/ LLM, multimodal, image, voice, and web service modules
model_specs/ Model metadata/specification files
models/ Local model directory skeleton; large weights stay local
research/asal_engine/ ASAL engine, substrates, scoring, visualization
runs/ Tracked run outputs and validation/demo artifacts
tests/ Unit and integration-style tests
tools/ Runtime helpers and local utility scripts
web/gemma_chat/ Browser UI for the ALife/Gemma prototype
Environment
Create a Python environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
On the current macOS workspace, /usr/bin/python3 is often the safer runtime
for the local web server because an existing checked-in .venv may not match
the host architecture.
Run Tests
Targeted validation used by the current web prototype:
/usr/bin/python3 -m unittest \
tests.test_life_state \
tests.test_gemma_web_service \
tests.test_chat_gemma \
tests.test_llm_adapter
Run the broader test suite:
python -m unittest discover -s tests
Check frontend syntax:
node --check web/gemma_chat/app.js
ASAL
ASAL is the artificial-life search and artifact layer.
Run a baseline ASAL search:
python apps/asal_cli.py --config configs/asal/target_cell.yaml
Run the narrative cell-fusion profile:
python apps/asal_cli.py \
--config configs/asal/target_cell_fusion_narrative.yaml \
--profile cpu_tiny
Run ASAL evaluation:
python apps/eval_cli.py asal \
--config configs/asal/target_cell_eval.yaml
Important outputs:
runs/asal/<run_id>/summary.jsonruns/asal/<run_id>/best.gifruns/asal/<run_id>/best.pngruns/asal/<run_id>/narrative_summary.jsonruns/asal/<run_id>/phase_keyframes/*.png
The current ALife web prototype uses these artifacts as the visible organism body and project-progress source.
Digital Clone
Run the baseline clone workflow:
python apps/clone_cli.py \
--config configs/clone/clone_baseline.yaml
Run clone evaluation:
python apps/eval_cli.py clone
python tools/run_clone_eval.py \
--config configs/clone/clone_eval_dataset.yaml
Current role in the web prototype:
- stores short local interaction memory
- provides retrieved context to the Gemma request
- does not claim full long-term identity or production-grade memory
GenAI And Gemma
Run dummy GenAI baseline:
python apps/genai_cli.py \
--config configs/genai/genai_baseline.yaml
Run local Gemma path:
python apps/genai_cli.py \
--config configs/genai/gemma_llama_cpp.yaml \
--profile cpu_smoke
Run direct Gemma chat:
python tools/chat_gemma.py \
--config configs/genai/gemma_llama_cpp.yaml \
--profile cpu_smoke \
--max-tokens 160 \
--temperature 0.2 \
--save-run
Local model expectations:
- config path:
configs/genai/gemma_llama_cpp.yaml - CLI shim:
tools/llama_completion - default local model path:
models/gemma/gemma.gguf models/gemma/gemma.ggufis local-only and must not be committedthird_party/llama.cpp/build output is local-only and must not be committed
ALife Gemma Web Prototype
Start the local server:
./tools/run_gemma_web \
--config configs/genai/gemma_llama_cpp.yaml \
--profile cpu_smoke \
--host 127.0.0.1 \
--port 8080
Open:
http://127.0.0.1:8080
Useful API endpoints:
GET /api/healthGET /api/lifePOST /api/chatPOST /api/resetPOST /api/transcribeGET /artifacts/asal/<run_id>/<asset_path>
The UI currently shows:
- ASAL organism GIF/image artifact
birth,split, andfusionphase cards- recent ASAL runs
- pending project tasks from tracked context files
- Gemma chat with ASAL/Digital Clone context
- browser voice controls and speech playback
Web server artifacts are stored under:
runs/chat_gemma_web/<timestamp>/
Runs And Artifacts
Tracked run folders are intentional. They are the evidence trail for what the system has actually produced.
Current public artifact categories:
runs/asal/: ASAL organism images, GIFs, summaries, narrative scoresruns/digital_clone/: clone evaluation outputsruns/genai/: GenAI/Gemma outputs and reportsruns/chat_gemma/: direct Gemma chat outputsruns/chat_gemma_web/: local web server metadata, sessions, and voice transcription artifacts
Typical files:
summary.jsonserver_meta.jsonbest.gifbest.pngnarrative_summary.jsontrajectory_morphology.jsongenai_output.jsonreport.md
Runtime Notes
Config files support:
defaultsprofilesactive_profile--profile <name>ALIFE_PROFILE=<name>
Config merge order:
defaults- top-level config body
- selected profile override
The local Gemma web profile currently keeps vector DB disabled for browser prototype memory so the server can run without requiring a persistent ChromaDB setup.
Practical Summary
This repository currently demonstrates an early artificial-life AI shell:
- ASAL generates and scores organism artifacts.
runs/stores those artifacts as public validation state.- Gemma reads the ASAL progress context.
- Digital Clone contributes short local memory.
- The browser UI exposes the combined system through text, voice, and visible organism state.
The prototype is usable as a local research console, but it must not be described as a completed human avatar or finished artificial-life system.