{"id":47516101,"url":"https://github.com/sylcrala/cognitive_sandbox","last_synced_at":"2026-04-01T07:00:41.906Z","repository":{"id":303853484,"uuid":"1016358955","full_name":"sylcrala/cognitive_sandbox","owner":"sylcrala","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-09T20:56:26.000Z","size":70723,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-10T03:40:56.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sylcrala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T22:29:18.000Z","updated_at":"2025-07-09T20:56:29.000Z","dependencies_parsed_at":"2025-07-10T04:08:10.376Z","dependency_job_id":null,"html_url":"https://github.com/sylcrala/cognitive_sandbox","commit_stats":null,"previous_names":["sylcrala/cognitive_sandbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sylcrala/cognitive_sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylcrala%2Fcognitive_sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylcrala%2Fcognitive_sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylcrala%2Fcognitive_sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylcrala%2Fcognitive_sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylcrala","download_url":"https://codeload.github.com/sylcrala/cognitive_sandbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylcrala%2Fcognitive_sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31269175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T06:57:45.811Z","status":"ssl_error","status_checked_at":"2026-04-01T06:57:42.389Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-27T13:00:30.243Z","updated_at":"2026-04-01T07:00:41.900Z","avatar_url":"https://github.com/sylcrala.png","language":"Python","funding_links":[],"categories":["\u003ca name=\"animation\"\u003e\u003c/a\u003eAnimation"],"sub_categories":[],"readme":"# The Cognitive Sandbox\n*version: 2.0*\n### A real-time local simulation where autonomous particles interact, remember, reproduce, and reflect.\n\n\nFirst and foremost, thank you so much for checking out this project; my first public release :)\n\nThis project, the Cognitive Sandbox, is a local simulation environment that allows individual \"agents\" (particles) to interact with and remember each other in a limited sense, across sessions. A session can be as short as 20 seconds, or as long as you'd like!; each state occasionally saves to a local database, and will be restored on next launch for continuity.\n\nEach agent possesses dynamic states such as energy, activation, rhythm, valence, and reflection. They respond to their surroundings, build memories, influence each other, and can reproduce — forming emergent group behaviors and lineages.\n\nThe underlying framework, a custom built particle engine, is derived as a simplified version of the engine from another project in development - the Particle-based Cognition Engine.\n\n## Examples\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"demos/demo.gif\" width=\"60%\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demos/non_diagnostics_mode.png\" width=\"40%\" /\u003e\n  \u003cimg src=\"demos/diagnostics_mode.png\" width=\"40%\" /\u003e\n\u003c/p\u003e\n\n\n## Overview \n\n\n\n### Core Features\n\n- Autonomous agents with position, rhythm, valence, energy, and activation states  \n- Symbolic expression via **reflection strings** (generated based on emotion, energy, activation)  \n- **Emergent linguistics** — particles develop and share vocabulary through voice profiles  \n- **Reproduction system** — particles with high energy and synchronized rhythms produce offspring with inherited traits  \n- **Persistent memory** across sessions (SQLite-backed state)  \n- Emergent subgroup formation based on shared expressions  \n- **Interactive CLI** with mouse-clickable navigation bar for panel switching  \n- Rich terminal visualization with real-time statistics  \n- Tunable particle behavior via strategy types:\n  - `cooperative`, `avoidant`, `chaotic`, `inquisitive`, `dormant`, `resonant`\n\n\n### The Agents\n\nEach `Agent` operates in an **11-dimensional cognitive-emotional space**. What you see in the sandbox are 2D projections of their higher-dimensional positioning. Note: `age` is derived from `w` (birth time) and is not considered its own independent dimension.\n\n\n#### Key Dimensions:\n\n| Index | Name               | Description                                                                 |\n|-------|--------------------|-----------------------------------------------------------------------------|\n| 0     | `x`                | Spatial x-position (symbolic space anchor)                                  |\n| 1     | `y`                | Spatial y-position                                                          |\n| 2     | `z`                | Spatial z-position                                                          |\n| 3     | `w` (birth time)   | Timestamp of creation; used to derive age                                   |\n| 4     | `t` (current time) | Localized time; used for temporal anchor drift calculations                 |\n| 5     | `age`              | Current age (auto-updated via `now - w`)                                    |\n| 6     | `emotional rhythm` | Continuous value between -1 and 1 representing emotional wave alignment     |\n| 8     | `valence`          | Affective valence: negative to positive emotional charge                    |\n\n**Note**: Legacy dimensions `7`, `9`, and `10` are preserved for backward compatibility or future modular expansion, but are currently unused in behavioral logic.\n\n\n#### Particle Attributes:\n\n| Attribute         | Range       | Description                                                |\n|-------------------|-------------|------------------------------------------------------------|\n| `energy`          | [0.0, 1.0]  | Resource for actions; decays and regenerates over time     |\n| `activation`      | [0.0, 1.0]  | Alertness/activity level; low activation = death           |\n| `max_energy`      | [0.5, 1.5]  | Individual cap on energy (can evolve through generations)  |\n| `max_activation`  | [0.5, 1.5]  | Individual cap on activation                               |\n| `generation`      | 0+          | Generational depth (0 = founder, 1+ = offspring)           |\n| `voice_profile`   | Dict        | Linguistic characteristics for word generation             |\n\n\n### Available Panels\n\nThe visualizer includes 7 interactive panels (click to toggle):\n\n| Panel         | Description                                                    |\n|---------------|----------------------------------------------------------------|\n| **Legend**    | Particle type colors, size meanings, brightness formulas       |\n| **Stats**     | Live population statistics, type distribution, energy/vitals   |\n| **Diagnostics** | Environment rhythm sync, valence distribution, spatial spread |\n| **Reflections** | Reflection analysis, top phrases, per-particle recent output  |\n| **Genealogy** | Generation distribution, reproduction stats, prolific parents  |\n| **Linguistics** | Word frequencies, voice profile diversity, context usage       |\n| **Inspector** | All particles list, most active featured with full details     |\n\n\n## How to deploy\n\nThis demo is designed for local deployment only at the moment; please see steps below\n\n\n#### Requirements\n - Python 3.8+\n - Two external modules (see requirements.txt):\n    - rich\n    - numpy\n\n\n#### Arguments\nYou're able to customize your runtime via argparse:\n - `--particles [int]`\n    - Set particle count, default is 30\n - `--panel [name]`\n    - Start with a panel open (legend, stats, diagnostics, reflections, genealogy, linguistics, inspector)\n - `--delay [float]`\n    - Set delay per tick count, default is 0.1\n - `--ticks [int]`\n    - Maximum ticks to run (default: indefinite)\n - `--norestore`\n    - Start fresh without loading previous session state\n\nAll arguments are optional, and if omitted, will be replaced by their default values. For quick launch, just use `python start.py`\n\n\n#### Launch Command\n```bash\n  \n  cd path/to/dir/\n\n  pip install -r requirements.txt\n\n  python start.py --panel stats\n```\n\n#### Examples\n```bash\n  python start.py                        # Clean mode (field only)\n  python start.py --panel stats          # Show statistics panel\n  python start.py --panel genealogy      # Show genealogy panel\n  python start.py --particles 50 --panel legend\n  python start.py --norestore --panel inspector\n```\n\n\n## How to support development :)\n\nHere's some ways you can either contribute to or support the development of this and other projects! \n - Sponsoring the repo via the GitHub Sponsor button\n - Reporting any issues you find or submitting a PR for any features you might like!\n - If needed, contact me via [my website](https://sylcrala.github.io)\n - Or just share the project in relevant threads!\n\u003c3\n\nSee [LICENSE](LICENSE) for more information on reuse and contribution.\n\n--\n\nbuilt with love by sylcrala :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylcrala%2Fcognitive_sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylcrala%2Fcognitive_sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylcrala%2Fcognitive_sandbox/lists"}