Skip to content

Initialize biomimetic artificial-life package - #1

Open
Spbd1 wants to merge 1 commit into
mainfrom
codex/create-initial-python-package-structure-for-pishiegen
Open

Initialize biomimetic artificial-life package#1
Spbd1 wants to merge 1 commit into
mainfrom
codex/create-initial-python-package-structure-for-pishiegen

Conversation

@Spbd1

@Spbd1 Spbd1 commented May 7, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a minimal, research-oriented Python package that implements core primitives for biomimetic artificial-life experiments (compact genomes, genotype–phenotype mapping, inheritance/mutation, biome-specific fitness, and agent-based simulation).
  • Keep the initial release conservative and extensible with explicit TODOs for empirical validation and literature linkage so model assumptions remain transparent.
  • Enable reproducible CLI-driven experiments and programmatic usage with seeded randomness for deterministic smoke tests.

Description

  • Add package layout and build metadata with pyproject.toml, a console entry point pishiegen, and top-level package pishiegen that re-exports key primitives.
  • Implement genome primitives and operators: Gene and Genome dataclasses, Genome.compact_code()/parse(), random_genome(), mutate_gene(), and breed() with generation tracking and bounded numeric ranges.
  • Implement genotype-to-phenotype expression, biome/environment primitives, and fitness scoring: express_genome() with bounded transform, Biome with normalization, and score_fitness() producing interpretable components and conservative distance-based scoring.
  • Implement a small agent-based simulation engine (Organism, Simulation, SimulationResult), experiment presets (temperate_biome, create_seed_population), text visualization (summarize_fitness), a minimal CLI (generate-organism, decode-genome, breed, simulate-biome), README, docs (docs/model_assumptions.md), example script, and unit test placeholders under tests/.

Testing

  • Ran the unit test suite with python -m pytest, which completed successfully (7 passed).
  • Compiled packages and ran a runtime smoke example with python -m compileall -q pishiegen tests examples && python -m pishiegen.cli simulate-biome --seed 3 --population 5 --generations 2, which produced a valid fitness summary output.
  • Performed an import audit by programmatically importing public modules (pishiegen, pishiegen.cli, pishiegen.genome, pishiegen.phenotype, pishiegen.environment, pishiegen.fitness, pishiegen.simulation, pishiegen.experiments, pishiegen.visualization) and observed success (import audit ok).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant