Full Code of ViciousSquid/Dosidicus for AI

2.6.3.0_LatestVersion f0790c639bd1 cached
190 files
3.0 MB
805.8k tokens
2286 symbols
1 requests
Download .txt
Showing preview only (3,259K chars total). Download the full file or copy to clipboard to get everything.
Repository: ViciousSquid/Dosidicus
Branch: 2.6.3.0_LatestVersion
Commit: f0790c639bd1
Files: 190
Total size: 3.0 MB

Directory structure:
gitextract_di5h6smx/

├── .dockerignore
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── submit_squid.yml
│   └── workflows/
│       ├── build-nuitka.yml
│       └── process_submission.yml
├── CONTRIBUTING.md
├── Dockerfile
├── Docs/
│   ├── Cognitive Sandbox Manifesto - Artificial Life and Transparent Neural Systems.md
│   ├── README.md
│   ├── brain-tool/
│   │   ├── Brain-Designer.md
│   │   ├── Brain-Trainer-Headless.md
│   │   ├── Decisions-Tab.md
│   │   ├── Learning-Tab.md
│   │   ├── Memory-Tab.md
│   │   ├── Network-Tab.md
│   │   ├── Neuron-Laboratory.md
│   │   └── Personality-Tab.md
│   ├── engine/
│   │   ├── Data-Flow-Summary.md
│   │   ├── Decision-Engine.md
│   │   ├── Engine-Overview.md
│   │   ├── Multiplayer.md
│   │   ├── Plugin-Hooks.md
│   │   ├── Plugin-System.md
│   │   ├── Save-File-Format.md
│   │   └── config.ini.md
│   ├── extras/
│   │   ├── Achievements.md
│   │   ├── Decoration-Window.md
│   │   ├── Easter-Eggs.md
│   │   ├── SaveViewer.md
│   │   └── UUID.md
│   ├── getting-started/
│   │   ├── Care-Guide.md
│   │   ├── Changelog.md
│   │   ├── Example-Squids.md
│   │   └── Home.md
│   ├── neural-network/
│   │   ├── AI-Accelerator-Support.md
│   │   ├── Experience-Buffer.md
│   │   ├── Hebbian-Learning.md
│   │   ├── Neurogenesis.md
│   │   ├── Personality.md
│   │   ├── STDP.md
│   │   ├── Technical-Overview.md
│   │   └── Vision-System.md
│   └── source-reference/
│       ├── brain_neuron_hooks.py.md
│       ├── brain_neuron_outputs.py.md
│       ├── brain_render_worker.py.md
│       ├── brain_tool.py.md
│       ├── brain_widget.py.md
│       ├── brain_worker.py.md
│       ├── custom_brain_loader.py.md
│       ├── designer_window.py.md
│       ├── main.py.md
│       ├── memory_manager.py.md
│       ├── neurogenesis_show.py.md
│       ├── squid.py.md
│       ├── tamagotchi_logic.py.md
│       └── vision_worker.py.md
├── LICENSE
├── README.md
├── config.ini
├── custom_brains/
│   ├── Bathtub.json
│   ├── Change_colour_when_see_food.json
│   ├── Dense_connections.json
│   ├── Feed-Forward-Hidden-Layer.json
│   ├── Feeling-Blue.json
│   ├── Grasshopper.json
│   ├── Healthy_Interests.json
│   ├── L'insomniaque.json
│   ├── Minimal.json
│   ├── Plant-Seeker.json
│   └── readme.md
├── docker-compose.yml
├── example_squids/
│   └── readme.md
├── extras/
│   ├── SaveViewer.html
│   ├── SquidBreeder.html
│   ├── StepTrainer.html
│   └── brain_2_keras.py
├── headless/
│   ├── HeadlessLauncher.jsx
│   ├── README.md
│   ├── headless_launcher.html
│   └── headless_trainer.py
├── images/
│   └── decoration/
│       └── DecorationsFolder
├── linux_setup.sh
├── main.py
├── plugins/
│   ├── achievements/
│   │   ├── __init__.py
│   │   ├── achievements_data.py
│   │   ├── display_scaling.py
│   │   └── main.py
│   ├── multiplayer/
│   │   ├── __init__.py
│   │   ├── main.py
│   │   ├── mp_constants.py
│   │   ├── mp_network_node.py
│   │   ├── mp_plugin_logic.py
│   │   ├── multiplayer_config_dialog.py
│   │   ├── multiplayer_events.py
│   │   ├── multiplayer_status_widget.py
│   │   ├── network_utilities.py
│   │   ├── packet_validator.py
│   │   ├── plugin.txt
│   │   ├── remote_entity_manager.py
│   │   ├── squid_multiplayer_autopilot.py
│   │   └── status_bar_component.py
│   ├── readme.md
│   ├── stdp/
│   │   ├── __init__.py
│   │   ├── main.py
│   │   ├── stdp_control_panel.py
│   │   └── stdp_core.py
│   └── whitelist.txt
├── requirements.txt
├── src/
│   ├── __init__.py
│   ├── animation_styles.py
│   ├── brain_about_tab.py
│   ├── brain_base_tab.py
│   ├── brain_constants.py
│   ├── brain_decisions_tab.py
│   ├── brain_designer.py
│   ├── brain_designer_launcher.py
│   ├── brain_dialogs.py
│   ├── brain_learning_tab.py
│   ├── brain_memory_tab.py
│   ├── brain_network_tab.py
│   ├── brain_network_tab_banners.py
│   ├── brain_neuron_hooks.py
│   ├── brain_neuron_outputs.py
│   ├── brain_personality_tab.py
│   ├── brain_render_worker.py
│   ├── brain_state_bridge.py
│   ├── brain_statistics_tab.py
│   ├── brain_tool.py
│   ├── brain_tooltips.py
│   ├── brain_ui_utils.py
│   ├── brain_utils.py
│   ├── brain_widget.py
│   ├── brain_worker.py
│   ├── certificate.py
│   ├── compute_backend.py
│   ├── config_manager.py
│   ├── custom_brain_loader.py
│   ├── decision_engine.py
│   ├── decoration_stats.json
│   ├── designer_canvas.py
│   ├── designer_canvas_utils.py
│   ├── designer_constants.py
│   ├── designer_core.py
│   ├── designer_dialogs.py
│   ├── designer_logging.py
│   ├── designer_network_generator.py
│   ├── designer_outputs_panel.py
│   ├── designer_panels.py
│   ├── designer_sensor_discovery.py
│   ├── designer_templates.py
│   ├── designer_window.py
│   ├── display_scaling.py
│   ├── hidden_imports.txt
│   ├── image_cache.py
│   ├── interactions.py
│   ├── interactions2.py
│   ├── laboratory.py
│   ├── learning.py
│   ├── localisation.py
│   ├── main.py
│   ├── memory_manager.py
│   ├── mental_states.py
│   ├── network_adapter.py
│   ├── network_protocol.py
│   ├── neurogenesis.py
│   ├── neurogenesis_show.py
│   ├── personality.py
│   ├── personality_traits.py
│   ├── plugin_manager.py
│   ├── plugin_manager_dialog.py
│   ├── preferences.py
│   ├── save_manager.py
│   ├── splash_screen.py
│   ├── squid.py
│   ├── squid_facts.py
│   ├── squid_statistics.py
│   ├── statistics_window.py
│   ├── tamagotchi_logic.py
│   ├── task_manager.py
│   ├── tutorial.py
│   ├── ui.py
│   ├── vision.py
│   └── vision_worker.py
├── translations/
│   ├── de.py
│   ├── en.py
│   ├── es.py
│   ├── fr.py
│   ├── ja.py
│   ├── ml.py
│   └── zh.py
└── version

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
.git
.github
__pycache__/
*.pyc
*.pyo
*.pyd
*.swp
*.swo
*.tmp
logs/
saves/
.env
.env.*
*.zip
*.tar
*.tar.gz
*.7z
.vscode/
.idea/
.DS_Store
Thumbs.db

================================================
FILE: .github/ISSUE_TEMPLATE/submit_squid.yml
================================================
name: 🦑 Submit a Squid Save
description: Share your evolved squid! (Must be a .zip containing uuid.txt)
labels: ["squid-submission"]
body:
  - type: input
    id: name
    attributes:
      label: Squid Nickname
      placeholder: Squid
    validations:
      required: true
  - type: input
    id: save_url
    attributes:
      label: Save File (.zip)
      description: Drag and drop your ZIP here, then copy the link.
    validations:
      required: true


================================================
FILE: .github/workflows/build-nuitka.yml
================================================
name: Build (Nuitka)

on:
  workflow_dispatch:

jobs:
  build:

    strategy:
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]

    runs-on: ${{ matrix.os }}

    defaults:
      run:
        shell: bash

    steps:

    - name: Checkout repo
      uses: actions/checkout@v4

    - name: Setup Python
      uses: actions/setup-python@v5
      with:
        python-version: "3.11"
        cache: pip

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install nuitka pyqt5 numpy

    - name: Install macOS icon dependency
      if: runner.os == 'macOS'
      run: pip install imageio

    # Standalone mode produces a folder of files rather than a single
    # self-extracting binary. This avoids Defender false positives on Windows
    # which flag onefile/packed executables as suspicious by default.
    # Defender is also disabled during build to prevent it quarantining
    # Nuitka's intermediate files mid-compile.
    - name: Disable Windows Defender during build
      if: runner.os == 'Windows'
      shell: pwsh
      run: |
        Set-MpPreference -DisableRealtimeMonitoring $true
        Add-MpPreference -ExclusionPath "${{ github.workspace }}"

    - name: Build executable
      run: |
        if [[ "${{ runner.os }}" == "Windows" ]]; then
          ICON_FLAG="--windows-icon-from-ico=images/icons/squidblack.ico"
        elif [[ "${{ runner.os }}" == "Linux" ]]; then
          ICON_FLAG="--linux-icon=images/icons/squidblack.png"
        else
          ICON_FLAG="--macos-app-icon=images/icons/squidblack.png"
        fi

        python -m nuitka \
          --mode=standalone \
          --windows-console-mode=force \
          --assume-yes-for-downloads \
          --enable-plugin=pyqt5 \
          --disable-plugin=options-nanny \
          --output-dir=build \
          --output-filename=Dosidicus \
          --include-package=src \
          --include-package=plugins \
          --include-module=uuid \
          --include-module=src.brain_designer \
          --include-module=src.brain_designer_launcher \
          --include-module=src.brain_state_bridge \
          --include-module=src.designer_canvas \
          --include-module=src.designer_canvas_utils \
          --include-module=src.designer_constants \
          --include-module=src.designer_core \
          --include-module=src.designer_dialogs \
          --include-module=src.designer_logging \
          --include-module=src.designer_network_generator \
          --include-module=src.designer_outputs_panel \
          --include-module=src.designer_panels \
          --include-module=src.designer_sensor_discovery \
          --include-module=src.designer_templates \
          --include-module=src.designer_window \
          $ICON_FLAG \
          main.py

    - name: Show build output
      run: find build -maxdepth 2 | sort

    - name: Create release directory
      run: mkdir release

    - name: Copy repository structure
      run: |
        for item in *; do
          case "$item" in
            release|dist|build|__pycache__|*.spec) ;;
            *) cp -r "$item" release/ 2>/dev/null || true ;;
          esac
        done

    - name: Remove python entrypoint
      run: rm -f release/main.py || true

    - name: Insert compiled executable
      run: |
        if [[ "${{ runner.os }}" == "macOS" ]]; then
          APP=$(find build -maxdepth 1 -name "*.app" | head -1)
          if [ -n "$APP" ]; then
            cp -r "$APP" release/Dosidicus.app
          else
            cp -r build/main.dist/. release/
          fi
        else
          cp -r build/main.dist/. release/
        fi

    # Ad-hoc signing suppresses some Gatekeeper warnings on macOS.
    # This is free but NOT a substitute for full notarization ($99/yr Apple
    # Developer account). Users on macOS will still need to right-click ->
    # Open -> Open Anyway the first time. Document this in your README.
    - name: Ad-hoc sign for macOS
      if: runner.os == 'macOS'
      run: |
        APP=$(find release -maxdepth 1 -name "*.app" | head -1)
        if [ -n "$APP" ]; then
          codesign --deep --force --sign - "$APP"
        else
          codesign --deep --force --sign - release/Dosidicus
        fi

    # ─── Smoke tests ────────────────────────────────────────────────────────────
    # Launch the binary, capture stdout, and look for the startup print from
    # MainWindow.__init__: "📄 Applied language from config:"
    # This fires after Qt initialises and all imports resolve, confirming the
    # build is not silently broken.

    - name: Smoke test (Linux)
      if: runner.os == 'Linux'
      run: |
        QT_QPA_PLATFORM=offscreen ./release/Dosidicus > smoke.log 2>&1 &
        PID=$!
        echo "Started PID $PID"

        # Poll for the expected startup line, up to 30s
        for i in $(seq 1 30); do
          sleep 1
          if grep -q "Applied language from config" smoke.log 2>/dev/null; then
            echo "✅ Startup confirmed at ${i}s"
            echo "--- stdout/stderr ---"
            cat smoke.log
            kill $PID 2>/dev/null || true
            exit 0
          fi
          # Bail early if the process already died
          if ! kill -0 $PID 2>/dev/null; then
            echo "❌ Process exited before printing startup line"
            echo "--- stdout/stderr ---"
            cat smoke.log
            exit 1
          fi
        done

        echo "❌ Startup line not seen after 30s"
        echo "--- stdout/stderr ---"
        cat smoke.log
        kill $PID 2>/dev/null || true
        exit 1

    - name: Smoke test (macOS)
      if: runner.os == 'macOS'
      run: |
        APP=$(find release -maxdepth 1 -name "*.app" | head -1)
        if [ -n "$APP" ]; then
          BIN=$(find "$APP" -type f -perm +111 -name "Dosidicus" | head -1)
        else
          BIN=release/Dosidicus
        fi

        "$BIN" > smoke.log 2>&1 &
        PID=$!
        echo "Started PID $PID"

        for i in $(seq 1 30); do
          sleep 1
          if grep -q "Applied language from config" smoke.log 2>/dev/null; then
            echo "✅ Startup confirmed at ${i}s"
            echo "--- stdout/stderr ---"
            cat smoke.log
            kill $PID 2>/dev/null || true
            exit 0
          fi
          if ! kill -0 $PID 2>/dev/null; then
            echo "❌ Process exited before printing startup line"
            echo "--- stdout/stderr ---"
            cat smoke.log
            exit 1
          fi
        done

        echo "❌ Startup line not seen after 30s"
        echo "--- stdout/stderr ---"
        cat smoke.log
        kill $PID 2>/dev/null || true
        exit 1
    # ────────────────────────────────────────────────────────────────────────────

    # Zip may strip execute permissions - restore them before archiving
    - name: Mark Linux binary executable
      if: runner.os == 'Linux'
      run: chmod +x release/Dosidicus

    - name: Create zip
      run: |
        OS_NAME=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
        python -c "import shutil; shutil.make_archive('Dosidicus${{ github.ref_name }}-${OS_NAME}', 'zip', 'release')"

    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: nuitka-${{ runner.os }}
        path: Dosidicus${{ github.ref_name }}-*.zip


================================================
FILE: .github/workflows/process_submission.yml
================================================
name: Squid Gallery Bot
on:
  issues:
    types: [opened]

jobs:
  add-to-gallery:
    if: contains(github.event.issue.labels.*.name, 'squid-submission')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      issues: write
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Process Squid Save
        env:
          ISSUE_BODY: ${{ github.event.issue.body }}
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ISSUE_NUMBER: ${{ github.event.issue.number }}
        run: |
          # 1. Extract URL and Nickname
          FILE_URL=$(echo "$ISSUE_BODY" | grep -o 'https://github.com/[^)]*' | head -n 1)
          NICKNAME=$(echo "$ISSUE_BODY" | grep -A 1 "Squid Nickname" | tail -n 1 | xargs | tr -d ' ')
          
          mkdir -p gallery
          curl -L $FILE_URL -o "temp_squid.zip"

          # 2. Verify ZIP and extract UUID
          if unzip -l temp_squid.zip | grep -q "uuid.txt"; then
            UUID=$(unzip -p temp_squid.zip uuid.txt | head -n 1 | xargs)
            FINAL_NAME="${NICKNAME}_${UUID}.zip"
            
            mv temp_squid.zip "gallery/${FINAL_NAME}"
            
            # 3. Commit to repo
            git config user.name "SquidBot"
            git config user.email "bot@github.com"
            git add gallery/
            git commit -m "New Squid verified: ${NICKNAME} (${UUID})"
            git push
            
            gh issue comment $ISSUE_NUMBER --body "✅ **Squid Verified!** $NICKNAME has been added to the gallery. UUID: \`$UUID\`"
            gh issue close $ISSUE_NUMBER
          else
            gh issue comment $ISSUE_NUMBER --body "❌ **Validation Failed:** This ZIP does not contain a \`uuid.txt\`. Please check your save file and try again."
            exit 1
          fi


================================================
FILE: CONTRIBUTING.md
================================================
## Contributing to Dosidicus 🦑
Dosidicus isn't just a repository; it’s an open-ended experiment in transparent artificial life. We are building a world where cognition isn't a black box, but a visible, hackable structure. Whether you are a neuro-enthusiast, a Python wizard, or a digital explorer, there is a place for you in the sandbox.

### 🧠 1. Evolve the Core (src/)
The STRINg engine is the beating heart of the project. We’ve avoided heavy frameworks like TensorFlow to keep things "bare metal" and interpretable.

The Challenge: Optimize neural algorithms, refine Hebbian plasticity logic, or enhance the real-time UI.

Goal: Make the simulation faster and the neural dynamics more expressive.

### 🧩 2. Architect New Realities (plugins/)
Dosidicus is designed to be modular. Our plugin system allows you to inject new logic without touching the core engine.

The Challenge: Create a new plugin folder with a plugin.txt descriptor.

Ideas: Environmental stressors, advanced "Achievement" triggers, or even a Twitch-integrated "Chat-controlled Evolution."

### 🧬 3. Map the Connectome (custom_brains/)
Help us build a library of diverse neural starting points. By contributing JSON templates to custom_brains/, you define the "DNA" that users experiment with.

The Challenge: Design a unique neural layout—perhaps a highly recurrent "memory loop" or a sensory-heavy "predator" build.

### 📂 4. Share Your Specimens (example_squids/)
In this sandbox, Structure + Experience = Behavior. No two squids are identical.

The Challenge: Export your .json save files and share them. Did your squid develop a strange obsession with a specific corner of the map? Did it grow a massive neural cluster after a specific training session?

Action: Submit your most interesting "trained" squids as examples for others to study.

### 🌍 5. Bridge the Language Gap (translations/)
We want "visible minds" to be accessible to everyone.

The Challenge: Add a new language file (e.g., fr.py, jp.py) to the translations/ directory. Help us ensure that concepts like Neurogenesis and Activation Patterns translate clearly across cultures.

### 🛠️ 6. Documentation & Educational Outreach
If a newcomer can’t understand how to "read" a squid’s mind, the transparency is lost.

The Challenge: Improve docstrings, write "Field Guides" for new users, or record a video of a specific behavioral emergence.

Goal: Turn complex neuroscience concepts into playable tutorials.

### 🚀 How to Get Started
Check the "Ahead" Forks: See what the community is already building in the Network Graph.

Open an Issue: Have a wild idea for a new neuron type? Let's discuss it first!

Submit a PR: We welcome all PRs, from single-typo fixes to massive engine overhauls.

Every commit is a mutation. Every contribution helps the system grow.


================================================
FILE: Dockerfile
================================================
# syntax=docker/dockerfile:1

FROM python:3.11-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /app

# Install core dependencies needed by ALL targets
RUN python -m pip install --no-cache-dir numpy>=1.21

# ------------------------------
# Headless trainer target
# ------------------------------
FROM base AS headless
# Only copy what is needed for headless training
COPY headless/ ./headless/
COPY custom_brains/ ./custom_brains/

ENTRYPOINT ["python", "headless/headless_trainer.py"]
CMD ["--ticks", "10000", "--output", "trained_brain.json"]

# ------------------------------
# GUI target (requires X11)
# ------------------------------
FROM base AS gui
# Install system libraries for GUI support
RUN apt-get update && apt-get install -y --no-install-recommends \
    libgl1 \
    libgl1-mesa-dri \
    libglib2.0-0 \
    libx11-6 \
    libx11-xcb1 \
    libxkbcommon-x11-0 \
    libxkbcommon0 \
    libxext6 \
    libxrender1 \
    libxrandr2 \
    libxfixes3 \
    libxdamage1 \
    libxi6 \
    libxcomposite1 \
    libxcursor1 \
    libxss1 \
    libxtst6 \
    libfontconfig1 \
    libfreetype6 \
    libnss3 \
    libdbus-1-3 \
    libxcb1 \
    libxcb-icccm4 \
    libxcb-image0 \
    libxcb-keysyms1 \
    libxcb-randr0 \
    libxcb-render0 \
    libxcb-render-util0 \
    libxcb-shape0 \
    libxcb-shm0 \
    libxcb-sync1 \
    libxcb-xfixes0 \
    libxcb-xinerama0 \
    libxcb-xkb1 \
    libxcb-cursor0 \
    libxshmfence1 \
    libwayland-client0 \
    libwayland-cursor0 \
    libwayland-egl1 \
    && rm -rf /var/lib/apt/lists/*

# Install GUI-specific Python dependencies
RUN python -m pip install --no-cache-dir PyQt5>=5.15

# Copy the entire project for the GUI
COPY . .

ENV QT_X11_NO_MITSHM=1
ENTRYPOINT ["python", "main.py"]


================================================
FILE: Docs/Cognitive Sandbox Manifesto - Artificial Life and Transparent Neural Systems.md
================================================

 <img src="https://github.com/user-attachments/assets/309ea7b0-a7c1-49f3-8f44-1b541734954d" width="220">




## 1. Why This Exists

Most artificial intelligence today is powerful, fast, and opaque: Large neural networks are trained on vast datasets producing remarkable outputs.
However the learning process itself is hidden inside millions or billions of parameters.

* You cannot watch a mind form - you can only inspect the result.

Dosidicus was created from a different question:

* What if cognition could be SEEN emerging?

Not as a metaphor or as a visualisation layered on top, but at the level of individual neurons.

## 2. The Cognitive Sandbox

Dosidicus is a cognitive sandbox.

A sandbox is not a finished product.
It is a contained environment where systems interact, evolve, and reveal behaviour.

Each squid:

* Is born with a randomly wired neural architecture
* Starts with 8 neurons
* Learns through Hebbian dynamics
* Grows new structure through neurogenesis
* Forms memories
* Develops behavioural tendencies

No two squids are identical.

Every save file becomes a record of accumulated experience.

The sandbox does not prescribe intelligence, it allows structure to form through interaction.

## 3. Transparency as a Design Principle

Most AI systems are black boxes. Dosidicus rejects opacity as default. Every neuron is:

* Visible
* Inspectable
* Directly stimulatable
* Modifiable

You can see activation values and observe connection strengths change.
You can influence structural growth.

This is not industrial-scale AI, it is intentionally small-scale and transparent.

The goal is not performance but **visibility**.

Transparency transforms AI from a service into an object of study.

## 4. Artificial Life

Dosidicus is not an attempt at AGI. It is a constrained, evolving, micro-organism simulation which exists in a narrow world:

* Hunger
* Interaction
* Stimulus
* Memory
* Simple drives

Yet within these constraints, patterns emerge.

Artificial life is not about scale.
It is about process.

A small system that adapts and accumulates experience over time can evoke something that feels alive — even when it is mechanistic.
This boundary between mechanism and perceived life is intentional.

## 5. Attachment to Visible Minds

Humans bond with simple systems.

We bond with:

* Tamagotchi
* Virtual pets
* Pixel creatures
* Even malfunctioning robots

Dosidicus introduces a twist:

You can see the internal cause of behaviour.

If your squid develops an aversion to something,
you can trace the neural path that led there.

This changes the psychology of attachment.

Instead of caring for a scripted creature you are shaping a developing structure.

* Responsibility becomes more concrete.
* Every interaction leaves a trace.

## 6. Retro as Constraint / computational meta-art

Dosidicus uses minimal animation.
Two tentacle frames.
Hand-drawn sprites.
Deliberately simple presentation.

It is a design constraint.

Complex graphics distract from internal complexity.

The squid is art.

The brain is system.

Together, they create **computational meta-art**:
a drawn creature whose behaviour emerges from real learning dynamics.

 <img src="https://github.com/user-attachments/assets/02119926-47f7-4bfb-96b9-457d470064e4" width="800">

## 7. STRINg: The Simulation Engine

Under the hood runs a [custom engine](https://github.com/ViciousSquid/Dosidicus/wiki/Engine-overview):

[STRINg](https://github.com/ViciousSquid/Dosidicus/wiki/Engine-overview)
`S`imulated `T`amagotchi `R`eactions via `I`nferencing and `N`eurogenesis

Built from scratch using NumPy.

* No TensorFlow.
* No PyTorch.

#### Core properties:

* Explicit neuron-level simulation
* Hebbian plasticity
* Structural growth (neurogenesis)
* Dual memory system (short-term and long-term)
* Headless training capability
* Plugin extensibility

STRINg is optimised for interpretability not scale.

It treats neural networks not as static architectures, but as evolving structures.

## 8. Educational Intent

Dosidicus functions as:

* A learning tool for understanding neural dynamics
* A demonstration of Hebbian learning
* A sandbox for artificial life experimentation
* A way to visualise structural plasticity
* A gateway into neuroscience concepts through play

Instead of teaching neural networks as equations alone, it allows learners to raise one.

Understanding becomes experiential.

## 9. Individuality Through Random Birth

Every squid begins differently.
* Initial wiring is randomised.
* Early experiences alter trajectory.
* Small differences amplify over time.

This models a core biological principle:

_**Structure + experience = behaviour.**_

The system does not claim biological realism.

It demonstrates structural sensitivity.

No two digital lives are identical.

## 10. What This Is Not

* Not Skynet.
* Not a productivity AI.
* Not a chatbot.
* Not a pretrained monolith.
* Not an optimised inference engine.

It is a visible micro-mind.

Contained.
Hackable.
Inspectable.
Evolving.


================================================
FILE: Docs/README.md
================================================

_"What if a Tamagotchi had a neural network and could learn stuff?"_
— [Gigazine](https://gigazine.net/gsc_news/en/20250505-dosidicus-electronicae/)

<p align="left">
  <img src="https://img.shields.io/badge/AI-Neural_Network-9C27B0?style=flat&logo=mindmeister&logoColor=white" height="20" alt="AI">
  <img src="https://img.shields.io/badge/License-GPL_v2-blue.svg?style=flat" height="20" alt="GPL-2.0">
  <img src="https://img.shields.io/badge/Translations-7-228B22?style=flat&logo=google-translate&logoColor=white&labelColor=333333" height="20" alt="Translations">
    <a href="https://buymeacoffee.com/vicioussquid"><img src="https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=flat&logo=buy-me-a-coffee&logoColor=black" height="20" alt="Buy Me A Coffee"></a>
</p>

# _Dosidicus electronicus_

🦑 _A transparent neural sandbox disguised as a digital pet squid with a neural network you can **see thinking**_

Micro neural engine for small autonomous agents that learn via Hebbian dynamics and grow new structure

- Part **educational neuro tool**, part **sim game**, part **fever dream**
- [Build-your-own neural network ](https://github.com/ViciousSquid/Dosidicus/wiki/Brain-Designer) - learn neuroscience by raising a squid that **might develop irrational fears**
- Custom [simulation engine](https://github.com/ViciousSquid/Dosidicus/wiki/Engine-overview) using Numpy - **No Tensorflow or PyTorch**
- Most AI is a **black box**; Dosidicus is **transparent** - every neuron is visible, stimulatable, understandable.
- Starts with 8 neurons — grows via **neurogenesis** and rewires using **Hebbian learning**.
- Includes `achievements` with **50** to collect!

 <img src="https://github.com/user-attachments/assets/23e98046-23a6-44a1-b4c8-a57abfff5501" width="180">
 
- -----------------------------

---

### Getting Started

| Page | Description |
|------|-------------|
| [Home](getting-started/Home.md) | Project overview |
| [Care Guide](getting-started/Care-Guide.md) | How to look after your squid |
| [Example Squids](getting-started/Example-Squids.md) | Pre-made squid configurations |
| [Changelog](getting-started/Changelog.md) | Version history |

---

### STRINg Simulation Engine

| Page | Description |
|------|-------------|
| [Engine Overview](engine/Engine-Overview.md) | High-level architecture |
| [Decision Engine](engine/Decision-Engine.md) | How the squid makes choices |
| [Data Flow Summary](engine/Data-Flow-Summary.md) | How data moves through the system |
| [Plugin System](engine/Plugin-System.md) | Extending Dosidicus with plugins |
| [Plugin Hooks](engine/Plugin-Hooks.md) | Available hook points |
| [Save File Format](engine/Save-File-Format.md) | Structure of `.squid` save files |
| [config.ini](engine/config.ini.md) | Configuration reference |
| [Multiplayer](engine/Multiplayer.md) | Multiplayer support |

---

### Neural Network

| Page | Description |
|------|-------------|
| [Technical Overview](neural-network/Technical-Overview.md) | Neural network architecture |
| [Hebbian Learning](neural-network/Hebbian-Learning.md) | Weight update algorithm |
| [STDP](neural-network/STDP.md) | Spike-Timing-Dependent Plasticity |
| [Neurogenesis](neural-network/Neurogenesis.md) | Creating new neurons at runtime |
| [Experience Buffer](neural-network/Experience-Buffer.md) | Short/long-term memory experiences |
| [Vision System](neural-network/Vision-System.md) | Food detection via vision cone |
| [Personality](neural-network/Personality.md) | The 7 personality types |
| [AI Accelerator Support](neural-network/AI-Accelerator-Support.md) | Hardware acceleration options |

---

### Brain Tool

| Page | Description |
|------|-------------|
| [Brain Designer](brain-tool/Brain-Designer.md) | GUI for designing custom brains |
| [Brain Trainer (Headless)](brain-tool/Brain-Trainer-Headless.md) | CLI training without a GUI |
| [Network Tab](brain-tool/Network-Tab.md) | Visualising the neuron network |
| [Learning Tab](brain-tool/Learning-Tab.md) | Monitoring learning in real time |
| [Memory Tab](brain-tool/Memory-Tab.md) | Inspecting memory contents |
| [Decisions Tab](brain-tool/Decisions-Tab.md) | Watching decision-making live |
| [Personality Tab](brain-tool/Personality-Tab.md) | Adjusting personality traits |
| [Neuron Laboratory](brain-tool/Neuron-Laboratory.md) | Experimenting with individual neurons |

---

### Source Reference

Documentation for individual source files:

| File | File |
|------|------|
| [main.py](source-reference/main.py.md) | [brain_tool.py](source-reference/brain_tool.py.md) |
| [squid.py](source-reference/squid.py.md) | [brain_widget.py](source-reference/brain_widget.py.md) |
| [tamagotchi_logic.py](source-reference/tamagotchi_logic.py.md) | [brain_worker.py](source-reference/brain_worker.py.md) |
| [memory_manager.py](source-reference/memory_manager.py.md) | [brain_render_worker.py](source-reference/brain_render_worker.py.md) |
| [vision_worker.py](source-reference/vision_worker.py.md) | [brain_neuron_hooks.py](source-reference/brain_neuron_hooks.py.md) |
| [custom_brain_loader.py](source-reference/custom_brain_loader.py.md) | [brain_neuron_outputs.py](source-reference/brain_neuron_outputs.py.md) |
| [designer_window.py](source-reference/designer_window.py.md) | [neurogenesis_show.py](source-reference/neurogenesis_show.py.md) |

---

### Extras

| Page | Description |
|------|-------------|
| [Achievements](extras/Achievements.md) | Unlockable achievements |
| [Easter Eggs](extras/Easter-Eggs.md) | Hidden features |
| [Decoration Window](extras/Decoration-Window.md) | Customising the environment |
| [SaveViewer](extras/SaveViewer.md) | Browser-based save file inspector |
| [UUID](extras/UUID.md) | Squid identity system |


================================================
FILE: Docs/brain-tool/Brain-Designer.md
================================================
### Design your own (GPL!) squid brain!

Add new **neurons** / **layers** - see how they affect the squid's ability to process his environment
 
<img src="https://github.com/user-attachments/assets/a488556a-1326-4a07-a0f0-b9c284d94af3" width="70">

Click the brain button in the bottom right of the 
 [network tab](../brain-tool/Network-Tab.md) to swich into Designer mode

<img src="https://github.com/user-attachments/assets/5b2d88f2-53c0-4af8-ab81-7e501cfcfbf1" width="800">

FROM LEFT TO RIGHT:

1. -- Fast-Generate a random network with no prompt
2. -- Generate a random network with controls
3. -- Add a new Custom/Input Neuron
4. -- Export the brain to a .json file
5. -- Clear all connections
6. -- Quick-generate a network from template

--------------------------------------

If designer mode is launched from within the simulation (default behaviour):

* The running brain will be automatically imported into the designer. 
* The purple '**Switch to Game**' button passes the brain from the designer to the running brain tool

```
Some buttons will not be available if the designer is launched standalone (main.py -designer)
```

---------------------------------
#### CONTROLS:

* <img src="https://github.com/user-attachments/assets/0f9eb326-eee9-4ada-a1a9-2d70d4770765" width="100"> to add a neuron


* Mouse wheel on the canvas to zoom in/out, hold right mouse button to drag
* Click on a neuron and hold to drag a connection line - release on another neuron
* Select a link and use the mouse wheel to increase/decrease the connection weight (range: -1.00 to +1.00)
* negative weights are inhibitory (red), positive weights are excitory (green). 
* Press **DEL** to delete a connection link
* **SPACE** to change the direction of a connecting line (indicated with arrows)
* Stronger weights are indicated with thicker lines.
* **Ctrl-click-and drag** to reposition any neuron.
* Use the Layers tab to create more complicated brains with additional layers
* The Sensors tab shows available INPUT neurons
* The Output tab lists Output bindings for bridging neuron activations to game behaviours:

Choose a **source neuron**, a **trigger**, and **behaviour** for that trigger

EXAMPLES:
```
IF .. can_see_food .. THEN .. change colour
IF .. happiness = <30 .. THEN .. pick up a rock
IF .. anxiety = >60 .. THEN .. seek plant
```

These can be combined to create reactive behaviours (simulated _biological drives/**urges**_)

<img src="https://github.com/user-attachments/assets/08f3ab4a-5790-4df6-b5dd-59547039cfe1" width="300">


------------------------

### `Generate sparse network`

The 'generate sparse network' button creates biologically-inspired neural networks using the core 8 neurons. Each generated brain is unique and randomised.


<img src="https://github.com/user-attachments/assets/d15321ca-cc53-44f8-bc45-c4f787995f38" width="300">


================================================
FILE: Docs/brain-tool/Brain-Trainer-Headless.md
================================================
A headless training tool is included in the `headless` folder. This can be used to train brains in a time-accelerated environment 

* **Headless Operation**: No GUI required, runs purely on CPU
* **Accelerated Time**: Runs 25,000-35,000+ ticks per second (vs ~1 tick/second in real-time)
* **Neurogenesis**: Automatic creation of new neurons based on stress/novelty/reward triggers
* **Hebbian Learning**: Continuous weight updates based on co-activation
* **Training Scenarios**: Predefined scenarios for different training goals
* **Export Trained Brains**: Save trained brains back to JSON for use in the main game

Documentation for this tool can be found here: https://github.com/ViciousSquid/Dosidicus/blob/v2.6.1.0__b1218_LatestVersion/headless/README_headless_trainer.md

#### WORK IN PROGRESS, BUGGY, WORK IN PROGRESS, BUGGY, WORK IN PROGRESS, BUGGY


#### `headless_launcher.html` is a user-friendly launcher for this tool: drag and drop or Browse for a brain and then select how to train it and for how long

<img src="https://github.com/user-attachments/assets/3fdc4814-85ca-434f-a7c8-ef311131377b" width="800">

================================================
FILE: Docs/brain-tool/Decisions-Tab.md
================================================

![image](https://github.com/user-attachments/assets/a6b74e77-98db-4e97-b03e-a067b0814c77)

 <p> The <strong>Decisions Tab</strong> provides a fascinating, step-by-step visualization of your squid's thought process. It breaks down how the squid goes from assessing his environment and internal needs to making a final, actionable decision. This view is updated every time the squid makes a new choice. </p> 

Decisions reflected here are made by the [Decision Engine](../engine/Decision-Engine.md) which is driven by the [Neural Network](../neural-network/Technical-Overview.md)



<h4>Interface Elements</h4> <ul> <li> <strong>Thought Process Path:</strong> A vertical flow-chart that visualizes the decision-making pipeline. <ol> <li><strong>📡 Sensing the World:</strong> This step shows the raw inputs the squid is currently processing. This includes his internal stats (hunger, happiness, etc.) and any objects he can see in his environment (food, poop, etc.).</li> 
<li><strong>⚖️ Calculating Base Urges:</strong> Based on the inputs, the tool calculates the initial "weight" or "urge" for each possible action. The action with the highest initial score is listed as the strongest urge.</li> <li><strong>🎭 Applying Personality & Memories:</strong> The base urges are then modified by the squid's personality and recent memories. For example, a "Timid" squid might have his urge to "explore" reduced, while a "Greedy" squid will have his urge to "eat" increased. This step shows how much each score was adjusted.</li> <li><strong>✅ Making the Final Decision:</strong> This step shows the final, adjusted scores for all possible actions. The action with the highest final score is the one the squid chooses.</li> </ol> </li> <li> <strong>Final Action Bar:</strong> A fixed bar at the bottom of the tab that prominently displays the squid's final chosen action (e.g., "Eat", "Sleep", "Explore") and his calculated confidence in that decision. </li> </ul> <hr>

================================================
FILE: Docs/brain-tool/Learning-Tab.md
================================================
<img src="https://github.com/user-attachments/assets/0c76149e-0975-4942-a10c-ca686f1d6f76" width="700">

#### `Hebbian learning` is a principle grounded in the functioning of biological neural networks


<p> The <strong>Learning Tab</strong> is your window into understanding how your squid learns. It focuses on the Hebbian learning principle: "neurons that fire together, wire together." 

This tab visualizes **neuron pairs** that were selected for learning (happens every 30 seconds by default)
 The connection strength between them (weight) was either **strengthened** or **weakened**, meaning they became more or less associated with each other.

 For example: if Hunger and Satisfaction both happened to be firing at the same time (perhaps the squid just had a positive eating experience) these two neurons would have their connection strengthened when the counter reaches zero

Over time the same useful connections will keep strengthening and strong pathways will develop. This is how the squid 'learns' favourable behaviours


----------------------------

#### Further Reading:
External links

* https://medium.com/@reutdayan1/hebbian-learning-biologically-plausible-alternative-to-backpropagation-6ee0a24deb00
* https://informatics.ed.ac.uk/sites/default/files/2024-03/Qiuye%20Zhang%20Lovelace%20Colloquium%20Poster.pdf
* https://en.wikipedia.org/wiki/Hebbian_theory
* https://www.youtube.com/watch?v=TvTQQO5yTa4




================================================
FILE: Docs/brain-tool/Memory-Tab.md
================================================


<img src="https://github.com/user-attachments/assets/3123aea8-0ba8-41a4-abba-7a559e65fac2" width="600">

<p> The <strong>Memory Tab</strong> allows you to explore the memories your squid has formed. It separates memories into short-term (recent events) and long-term (consolidated, important events), giving you insight into what has recently affected your squid and what it has learned to remember. </p> <h4>Interface Elements</h4> <ul> <li> <strong>Memory Sub-Tabs:</strong> <ul> <li><strong>🧠 Short-Term:</strong> Displays recent memories that are still being processed. These are temporary and will decay over time unless they are significant.</li> <li><strong>📚 Long-Term:</strong> Displays memories that have been deemed important enough to be stored permanently. These memories have a lasting impact on the squid's behavior.</li> <li><strong>📊 Overview:</strong> Shows high-level statistics about the memory system, including the total count of short-term and long-term memories and a breakdown of memories by category (e.g., food, interaction, mental\_state).</li> </ul> </li> <li> <strong>Memory Cards:</strong> Both STM and LTM are displayed as a series of cards. Each card is color-coded to indicate its emotional valence: <ul> <li><strong>Pastel Green:</strong> A positive memory (e.g., eating tasty food).</li> <li><strong>Pastel Red:</strong> A negative memory (e.g., being startled).</li> <li><strong>Pastel Yellow:</strong> A neutral memory.</li> </ul> </li> <li><strong>Card Content:</strong> Each card displays the memory's category, its formatted content, and the time it was created. Important memories are marked with a "⭐ Important" indicator. Clicking on a short-term memory card can increase its importance, making it more likely to be transferred to long-term memory.</li> </ul> <hr>

================================================
FILE: Docs/brain-tool/Network-Tab.md
================================================
The <strong>Network Tab</strong> provides a live, visual representation of the overall structure and health of the neural network in real-time. 

<img src="https://github.com/user-attachments/assets/0e5ecc7e-9b15-47d7-a454-276769635b58" width="600">


- Each neural network is unique and randomly generated (with rules) when the squid is hatched
- Red lines represent Excitory (positive) connections between neurons
- Green lines represent Inhibitory (negative) connections
- The thicker the line, the stronger the connection



  <h4>Interface Elements</h4> <ul> <li> <strong>Neural Visualizer:</strong> The main canvas displaying the neurons as nodes and their connections as lines. The pulsing and glowing of neurons and links indicate activity and learning events. </li> <li> <strong>Metrics Bar:</strong> Located at the top, this bar provides at-a-glance statistics: <ul> <li><strong>Neurons:</strong> The total number of neurons currently in the brain.</li> <li><strong>Connections:</strong> The total number of weighted connections between neurons.</li> <li><strong>Network Health:</strong> Overall stability and efficiency of the network, primarily based on average connection strength.</li> </ul> </li> <li> <strong>Hebbian Timer:</strong> A countdown (e.g., "Hebbian: 25") showing the time remaining until the next Hebbian learning cycle is performed. </li> <li> <strong>Control Checkboxes:</strong> <ul> <li><strong>Show links:</strong> Toggles the visibility of the lines connecting the neurons.</li> <li><strong>Show weights:</strong> Toggles the display of the numerical weight on each connection line.</li> <li><strong>Enable pruning:</strong> Toggles the automatic removal of old, weak, or unused neurons to maintain network stability. Disabling this can lead to an unconstrained and potentially unstable network.</li> </ul></ul>

The big button with the brain on it opens the [Brain Designer](../brain-tool/Brain-Designer.md) which allows you to build and edit custom brains and behaviours


================================================
FILE: Docs/brain-tool/Neuron-Laboratory.md
================================================
### **Double click on any neuron** to view the Neuron Laboratory
It can be used to inspect individual neurons. The 'Edit Sandbox' tab allows direct adjustment of the live brain state. 

This window also displays the Neurogenesis Experience buffer and neural patterns (last tab) that determine the squid's learned responses.


<img src="https://github.com/user-attachments/assets/84506732-4613-423a-9268-ce4e474612b2" width="600">

-----------------------------


### Unlocking the 'sandbox' tab allows for full manual control of neuron values:
 


<img src="https://github.com/user-attachments/assets/72f4e759-82b5-4e55-9f2b-23324a91bf82" width="450">



================================================
FILE: Docs/brain-tool/Personality-Tab.md
================================================

![image](https://github.com/user-attachments/assets/fb73ae47-efae-4127-85c7-b2da6236e9c7)

 <p> The <strong>Personality Tab</strong> details the innate character of your squid, which is randomly assigned at the beginning of a new game.
--------------

 This [personality](../neural-network/Personality.md) has a significant and constant influence on its behaviour, decision-making, and needs. </p> <h4>Interface Elements</h4> <ul> <li><strong>Squid Personality:</strong> Displays the name of the determined personality (e.g., Timid, Adventurous, Lazy).</li> <li><strong>Description:</strong> Provides a paragraph explaining the general nature of this personality type.</li> <li><strong>Personality Modifiers:</strong> Lists the specific, hard-coded rules that this personality applies to the squid's brain. For example, it might detail how anxiety increases 50% faster or how curiosity is boosted.</li> <li><strong>Care Tips:</strong> Offers practical advice on how to best care for a squid with this specific personality, helping you keep it happy and healthy.</li> </ul> <hr>

================================================
FILE: Docs/engine/Data-Flow-Summary.md
================================================
## Data Flow Summary

### [Main Loop](../source-reference/main.py.md)

**Game Loop** → [`TamagotchiLogic`](../source-reference/tamagotchi_logic.py.md) feeds stats → `BrainWidget.update_brain_state()`

---

### Central Hub: [BrainWidget](../source-reference/brain_widget.py.md)

| Component | Description |
|-----------|-------------|
| `state` dict | Neuron activations |
| `weights` dict | Connection strengths |
| Coordinates | All subsystems |

---

### Worker Threads

| Worker | Responsibility | Output |
|--------|----------------|--------|
| [**BrainWorker**](../source-reference/brain_worker.py.md) | Hebbian learning, Neurogenesis | Signals → BrainWidget |
| [**BrainRenderWorker**](../source-reference/brain_render_worker.py.md) | Offscreen painting | QImage → paintEvent |
| [**NeuronOutputMonitor**](../source-reference/brain_neuron_outputs.py.md) | Threshold checks | Hooks → Squid behaviors |

---

### Signal Flow
```
BrainWorker ──────────┐
                      │
                      ▼
                 BrainWidget ──────▶ Squid
                      ▲
                      │
BrainRenderWorker ────┘
```

---

### Complete Pipeline

1. **Input Stage**
   - [`BrainNeuronHooks`](../source-reference/brain_neuron_hooks.py.md) converts game events → neuron activations
   - Sensors: `can_see_food`, `plant_proximity`, `is_fleeing`, etc.

2. **Processing Stage**
   - [`BrainWidget`](../source-reference/brain_widget.py.md) updates state dictionary
   - [`BrainWorker`](../source-reference/brain_worker.py.md) performs Hebbian learning (weight updates)
   - [`BrainWorker`](../source-reference/brain_worker.py.md) checks [neurogenesis](../neural-network/Neurogenesis.md) triggers

3. **Output Stage**
   - [`NeuronOutputMonitor`](../source-reference/brain_neuron_outputs.py.md) checks activation thresholds
   - Fires output hooks → game behaviours
   - Actions: `flee`, `seek_food`, `sleep`, `change_colour`, etc.

4. **Rendering Stage**
   - [`BrainRenderWorker`](../source-reference/brain_render_worker.py.md) receives state snapshot
   - Renders to offscreen QImage
   - Main thread blits cached image


================================================
FILE: Docs/engine/Decision-Engine.md
================================================
#### view source: _[decision_engine.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_LatestVersion/src/decision_engine.py)_ _version 2.6.1.2_

## Overview

```
 exploration of emergent behavioural complexity via dynamic, biologically-inspired neural architecture rather than a static state machine. 
```

The **Decision Engine** is the core action-selection system for Dosidicus. It is responsible for selecting and executing behaviour based on the squid’s *current neural state*, *physiological drives*, *memory influences*, and *personality modifiers*. 

Unlike traditional game AI systems (finite-state machines, behaviour trees, or rule stacks), the Decision Engine is **neural-first**: it does not directly reason about the world. Instead, *all perception and context must flow through the brain*.

In practical terms, this means behaviour is not scripted. It **emerges** from continuous internal signals competing for expression.

The engine is designed to be:

* Explainable (full decision traces are recorded)
* Extensible (new drives, memories, or actions integrate naturally)
* Compatible with future learning systems (dopamine, reinforcement, plasticity)

---

## Design Philosophy

### Neural-First Authority

The Decision Engine treats the brain as the **single source of truth**. It does not perform manual world queries (e.g. checking for food, scanning objects) to *decide* what to do. Instead, it consumes:

* Perceptual neuron outputs (via [`BrainNeuronHooks`](../source-reference/brain_neuron_hooks.py.md))
* Internal state neurons (hunger, anxiety, curiosity, etc.)
* Learned and persistent neural values

Direct world interaction is limited to *execution*, not *decision-making*.

### Continuous Competition

Actions are not triggered by rules. Instead, all candidate actions receive **weights** derived from internal signals. These weights compete, and the strongest wins. Small differences matter, enabling hesitation, oscillation, and personality-driven variance.

### Modulation, Not Commands

Memory and personality do not issue instructions. They *bias* behaviour by scaling weights. This ensures:

* Memories influence but do not dominate
* Personalities remain relevant in all contexts
* New behaviours automatically inherit modulation

---

## Decision Pipeline

The decision process is executed in six structured stages.

---

### 1. Perceptual & Brain State Construction

All perceptual input is retrieved via [`BrainNeuronHooks`](../source-reference/brain_neuron_hooks.py.md):

* Temporal sensors are decayed each tick
* No manual perception checks are allowed

The full brain state is constructed from:

* Core neurons
* Learned neurons
* Perceptual inputs (merged defensively)

This combined state represents the squid’s *entire subjective reality* at the moment of decision.

---

### 2. Memory Influence

Active memories are retrieved from the memory manager and converted into **multiplicative biases** on specific actions.

Examples:

* Positive food memories bias eating
* Object interaction memories bias play and throwing
* Startle memories suppress exploration and increase comfort-seeking

Memory effects are:

* Directional (positive or negative bias)
* Non-deterministic
* Stackable

This models habits, preferences, and learned aversions rather than explicit recall.

---

### 3. Physiological Urgency (Nonlinear Drives)

Physiological needs generate **exponential urgency curves**:

* Hunger amplifies eating
* Sleepiness amplifies sleeping

Nonlinear scaling ensures that high-need states *crowd out* other motivations rather than simply increasing priority linearly.

#### Reflex Overrides

Certain extreme states bypass competition entirely:

* Exhaustion → forced sleep
* Active sleep → no decision
* Extreme external stimulus → startle response

These represent **reflex arcs**, not cognitive decisions.

---

### 4. Base Action Weight Construction

Each candidate action receives a base weight derived from the brain state.

Actions include:

* Exploring
* Eating
* Approaching plants (comfort-seeking)
* Playing
* Throwing objects
* Sleeping
* Fleeing

Weights are influenced by:

* Drives (hunger, curiosity, satisfaction)
* Threat and anxiety
* Perceptual confidence (e.g. food visibility)
* Contextual suppressors (illness, external stimuli)

This stage defines *what the squid wants* before learning, memory, or personality intervene.

---

### 5. Memory & Personality Modulation

#### Memory Modifiers

Memory multipliers are applied to relevant actions, biasing selection without enforcing outcomes.

#### Personality Modifiers

[Personalities](../neural-network/Personality.md) act as **gain controls**:

* **Adventurous**: boosts exploration and play
* **Timid**: suppresses exploration, amplifies comfort-seeking
* **Greedy**: amplifies eating
* **Lazy**: suppresses energetic actions
* **Energetic**: boosts play and exploration

Personality does not define behaviour — it shapes *how strongly* drives express themselves.

#### Anxiety Coupling

High anxiety further amplifies comfort-seeking behaviour, creating feedback between affect and action selection.

---

### 6. Stochastic Selection & Confidence

After all modifiers:

* Small stochastic noise is applied to prevent determinism
* The highest-weighted action is selected

#### Confidence Metric

Decision confidence is computed as the relative margin between the top two competing actions.

This signal can be used for:

* Animation blending
* UI visualization
* Learning-rate modulation
* Behavioural hesitation

---

## Execution Phase

Once an action is selected, it is executed via `_execute_neural_decision`.

Key principles:

* Execution respects neural intent
* World scanning is minimized
* Fallback behaviours preserve personality flavour

Execution returns a *descriptive outcome string*, not just an action label, enabling rich UI feedback.

---

## Decision Tracing & Visualization

Each decision produces a full trace containing:

* Raw perceptual inputs
* Brain state snapshot
* Base action weights
* Memory influences
* Urgency multipliers
* Personality modifiers
* Final adjusted weights
* Selected action
* Confidence score

This trace is exposed to the Brain Tool UI for inspection and debugging.

---

## What the Decision Engine Is (and Is Not)

### It Is:

* A neural-modulated action selection system
* Continuous and explainable
* Designed for emergent behaviour
* Compatible with learning extensions

### It Is Not:

* A finite-state machine
* A behaviour tree
* A planner or lookahead system
* A reinforcement learner (yet)

---

## Future Extensions

The Decision Engine is intentionally structured to support:

* Dopaminergic reinforcement signals
* Action-value learning
* Noise modulation by arousal or confidence
* Fully neural affordance perception

The hardest architectural work — unified perception, continuous competition, and traceability — is already in place.

---

## Summary

The Decision Engine forms the behavioural core of Dosidicus. By enforcing neural authority, continuous competition, and modulation-based influence, it produces behaviour that is adaptive, interpretable, and personality-consistent — without relying on brittle scripts or hard-coded modes.

It is not merely a controller, but a foundation for a growing cognitive system.


================================================
FILE: Docs/engine/Engine-Overview.md
================================================
## `S`imulated `T`amagotchi `R`eactions via `I`nferencing and `N`eurogenesis `(STRINg)`

### simulation engine overview:

The architecture of Dosidicus is a "Bottom-Up" sensory system where raw environmental data is distilled into neural inputs, which are then filtered through the squid's [personality](https://github.com/ViciousSquid/Dosidicus/wiki/Personality) to produce behaviour.

Built from scratch using NumPy.

- No TensorFlow.
- No PyTorch.

### Core properties:
* Explicit neuron-level simulation
* Hebbian plasticity
* Structural growth (neurogenesis)
* Dual memory system (short-term and long-term)
* Headless training capability
* Plugin extensibility
* STRINg is optimised for interpretability not scale.

It treats neural networks not as static architectures, but as evolving structures.

---------------------


- Network grows via **[neurogenesis](https://github.com/ViciousSquid/Dosidicus/wiki/Neurogenesis)** and self-trains via **[Hebbian learning](https://github.com/ViciousSquid/Dosidicus/wiki/Hebbian-learning)**

- Automatic **pruning** of redundant neurons and weights (can be turned off)
- [Experience buffer](https://github.com/ViciousSquid/Dosidicus/wiki/Experience-Buffer) records and encodes learned experiences
- [decision_engine](https://github.com/ViciousSquid/Dosidicus/wiki/Decision-Engine) uses neural data to make decisions


------------------

* Beta (and optional) support for [AI accelerators via ONNX Runtime](https://github.com/ViciousSquid/Dosidicus/wiki/AI-accelerator-support)
* _Experimental and a work in progress_
* _Probably not the best way to do this!_ 😃

---------------------------------




## Read Next: [Data flow Summary](https://github.com/ViciousSquid/Dosidicus/wiki/Data-Flow-Summary) overview

#### Further engine studies:

- [Decision Engine](https://github.com/ViciousSquid/Dosidicus/wiki/Decision-Engine)
- [Brain Widget](https://github.com/ViciousSquid/Dosidicus/wiki/brain_widget.py)

External links

* https://medium.com/@reutdayan1/hebbian-learning-biologically-plausible-alternative-to-backpropagation-6ee0a24deb00
* https://informatics.ed.ac.uk/sites/default/files/2024-03/Qiuye%20Zhang%20Lovelace%20Colloquium%20Poster.pdf
* https://en.wikipedia.org/wiki/Hebbian_theory
* https://www.youtube.com/watch?v=TvTQQO5yTa4





================================================
FILE: Docs/engine/Multiplayer.md
================================================
**Basic Multiplayer functionality** has been implemented as a plugin (`plugins/multiplayer`) enabled via the Plugin manager


_source code: https://github.com/ViciousSquid/Dosidicus/tree/2.5.0.0_latest_release/plugins/multiplayer_



When Multiplayer is enabled:

* the client will search for and automatically connect to other running networked clients on LAN

* Squids can **leave their tanks** via an edge and appear in **other tanks** where they may attempt to steal rocks/decorations and bring them back home as trophies

* Squids will automatically return home after a random duration (between 2 and 5 minutes)

* Supports UDP (default) or TCP/IP (experimental, untested) via included control panel  (Plugins>Multiplayer menu)

* 'Dashboard' is included to see connected clients

* Experimental work in progress, please report issues

================================================
FILE: Docs/engine/Plugin-Hooks.md
================================================
The following hooks are available for [plugins](../engine/Plugin-System.md) to subscribe to:

  ### Lifecycle hooks
`on_startup`
-called when the application launches

`on_shutdown`
-called when the application shuts down

`on_new_game`
-called when a new game is started

`on_save_game`
-called when a game is saved
 
`on_load_game`
-called when a game is loaded
        
  ### Simulation hooks
`pre_update`
-called immediately BEFORE the update of a frame (once per 1000 milliseconds)  

`post_update`
-called immediately AFTER the update of a frame  

`on_speed_change`
-called when the game speed is changed 
        
  ### Squid state hooks
`on_squid_state_change`
-called when any of the squid's states change 

`on_hunger_change`
-called every time the value of HUNGER changes 

`on_happiness_change`
-called every time the value of HAPPINESS changes 

`on_cleanliness_change`
-called every time the value of CLEANLINESS changes
  
`on_sleepiness_change`
-called every time the value of SLEEPINESS changes 
 
`on_satisfaction_change`
-called every time the value of SATISFACTION changes 

`on_anxiety_change`
-called every time the value of ANXIETY changes  

`on_curiosity_change`
-called every time the value of ANXIETY changes  
        
  ### Action hooks
`on_feed`
-called when the squid is fed via Actions>Feed

`on_clean`
-called when the tank is cleaned via Actions>Clean

`on_medicine`
-called when squid is administered medicine via Actions>Medicine

`on_sleep`
-squid calls this when going to sleep
 
`on_wake`
-squid calls this when waking up

`on_startle`
-squid calls this upon being startled  
        
 ### Interaction hooks
`on_rock_pickup`
-called when squid picks up a rock
 
`on_rock_throw`
-called when squid throws a rock
 
`on_decoration_interaction`
-called when squid interacts with a decoration item such as rock or plant
  
`on_ink_cloud`
-squid calls this if he is sufficiently startled to produce an ink cloud (rare)  
        
 ### Neural/memory hooks
`on_neurogenesis`
-called when a new neuron is created via neurogenesis
  
`on_memory_created`
-called when a new memory is created  

`on_memory_to_long_term`
-called when a short term memory is transferred to long term memory  
        
 ### UI hooks
`on_menu_creation`
-custom mod submenu (used with `register_menu_actions` [see below])  
`on_message_display`
-Displays a UI message 
        
### Custom menu action hooks
`register_menu_actions`
-Creates a submenu underneath the 'Plugins' menu  

### Designer Hooks

register_neuron_handler(name, handler, plugin_name, metadata) - plugins call this to register custom neurons

================================================
FILE: Docs/engine/Plugin-System.md
================================================
### Hooks


The application can be extended via **HOOKS** which are made available by the simulation engine when certain events occur
* Available hooks are documented here: ../engine/Plugin-Hooks.md

Plugins can subscribe to these hooks by calling the following methods in `src/plugin_manager.py` :

### `register_hook`, `subscribe_to_hook`, `trigger_hook`
<details>
<summary>Show full methods</summary>

```python

def register_hook(self, hook_name: str) -> None:
        """
        Register a new hook that plugins can subscribe to.
        """
        if hook_name not in self.hooks:
            self.hooks[hook_name] = []
            self.logger.debug(f"Registered hook: {hook_name}")

```

-----------------

```python

def subscribe_to_hook(self, hook_name: str, plugin_name: str, callback: Callable) -> bool:
        """
        Subscribe a plugin's callback to a specific hook.
        """
        if hook_name not in self.hooks:
            self.logger.warning(f"Plugin {plugin_name} tried to subscribe to non-existent hook: {hook_name}")
            return False
        
        self.hooks[hook_name].append({
            "plugin": plugin_name,
            "callback": callback
        })
        self.logger.debug(f"Plugin {plugin_name} subscribed to hook: {hook_name}")
        return True

```

--------------------

```python

def trigger_hook(self, hook_name, **kwargs):
        """
        Trigger a hook, calling all subscribed plugin callbacks.
        """
        if hook_name not in self.hooks:
            self.logger.warning(f"Attempted to trigger non-existent hook: {hook_name}")
            return []
        
        results = []
        for subscriber in self.hooks[hook_name]:
            plugin_name = subscriber["plugin"]
            # Only trigger hooks for enabled plugins
            if plugin_name.lower() not in self.enabled_plugins:
                continue
                
            try:
                callback = subscriber["callback"]
                result = callback(**kwargs)
                results.append(result)
            except Exception as e:
                self.logger.error(f"Error in plugin {plugin_name} for hook {hook_name}: {str(e)}", exc_info=True)
        
        return results

```


</details>

--------------------------

### A Quick Guide to Creating a Plugin

#### A really good starting place would be to look at [multiplayer main.py](https://github.com/ViciousSquid/Dosidicus/blob/2.4.5.1_latest_release/plugins/multiplayer/main.py) and [achievements main.py](https://github.com/ViciousSquid/Dosidicus/blob/2.4.5.1_latest_release/plugins/achievements/main.py) and then refer back to this guide

This guide will walk you through the essential steps to create a basic plugin that correctly initializes and registers with the system's `PluginManager` _(src/plugin_manager.py)_

```
The plugin manager expects:
* A folder in plugins/ directory (e.g., plugins/pluginname/)
* A main.py file inside that folder
* Module-level constants: PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_REQUIRES
* An initialize(plugin_manager) function that:

1. Creates the plugin instance
1. Registers it with the plugin manager via plugin_manager.plugins[name] = {..., 'instance': instance}
1. Returns `True` on success
```

### Step 1: Create the Plugin Folder Structure
First, create a new folder for your plugin inside the plugins/ directory. The name of this folder will be your plugin's unique identifier (its key), so choose a simple, lowercase name.

```
Dosidicus/
├── plugins/
│   ├── my_new_plugin/        <-- Your new plugin folder
│   │   └── main.py           <-- Your plugin's entry point
│   ├── auto_care/
│   └── multiplayer/
└── src/
    └── ...
```

### Step 2: Define Plugin Metadata
You must define Module-level constants that the PluginManager uses to identify and load your plugin.

* `PLUGIN_NAME`: (Required) The display name of your plugin.    ### **MUST **BE LOWERCASE!

* `PLUGIN_DESCRIPTION`: A brief description of what your plugin does.

* `PLUGIN_AUTHOR`: Your name or alias.

* `PLUGIN_VERSION`: The version of your plugin.

```python
# plugins/my_new_plugin/main.py

# --- Plugin Metadata --- # PLUGIN_NAME must be lowercase
PLUGIN_NAME = "my new plugin"
PLUGIN_DESCRIPTION = "A simple plugin that demonstrates the basics."
PLUGIN_AUTHOR = "Seymour Butts"
PLUGIN_VERSION = "1.0"
```

### Step 3: Create the Main Plugin Class
It's best practice to encapsulate your plugin's logic within a class. This class will hold the state and functionality of your plugin, such as methods for enabling, disabling, and handling events (hooks).

```python
# plugins/my_new_plugin/main.py

class MyPlugin:
    def __init__(self, plugin_manager, plugin_key):
        self.plugin_manager = plugin_manager
        self.plugin_key = plugin_key # e.g., "my_new_plugin"
        self.is_enabled = False

        # Subscribe to a system event (hook)
        self.plugin_manager.subscribe_to_hook(
            "on_startup",
            self.plugin_key,
            self.on_app_startup
        )

    def enable(self):
        """Called when the user enables the plugin."""
        print(f"[{self.plugin_key}] Plugin Enabled!")
        self.is_enabled = True
        return True # Return True on success

    def disable(self):
        """Called when the user disables the plugin."""
        print(f"[{self.plugin_key}] Plugin Disabled!")
        self.is_enabled = False
        return True # Return True on success

    def on_app_startup(self, **kwargs):
        """Callback for the on_startup hook."""
        if self.is_enabled:
            print(f"[{self.plugin_key}] Application has started up!")
```

### Step 4: Implement the initialize Function
The PluginManager requires a global function named initialize in your main.py. This function's job is to:

1. Get the plugin's unique key (the folder name).

2. Create an instance of your main plugin class.

3. Register the instance with the PluginManager.

This is the crucial step that connects your plugin to the main application.

```python
# plugins/my_new_plugin/main.py
import os

# (Metadata and Class definition from above)
# ...

def initialize(plugin_manager_instance):
    """
    This function is called by the PluginManager to initialize the plugin.
    """
    # Get the plugin's unique key from its directory name
    # os.path.basename(os.path.dirname(__file__)) will return "my_new_plugin"
    plugin_key = os.path.basename(os.path.dirname(__file__))

    try:
        # Create an instance of your main plugin class
        plugin_instance = MyPlugin(plugin_manager_instance, plugin_key)

        # Register the plugin instance with the manager
        # This makes the manager aware of the plugin and its instance
        plugin_manager_instance.plugins[plugin_key] = {
            'instance': plugin_instance,
            'is_enabled_by_default': False # ALWAYS FALSE NEVER CHANGE THIS
        }

        print(f"[{plugin_key}] Plugin initialized successfully.")
        return True # IMPORTANT: Return True on successful initialization

    except Exception as e:
        print(f"[{plugin_key}] Failed to initialize: {e}")
        return False # Return False on failure
```

With these steps, you have a complete, well-structured plugin that the system can discover, load, and run. The user can then enable and disable it manually through the application's plugin management UI.

================================================
FILE: Docs/engine/Save-File-Format.md
================================================
Save and load functionality is handled by the [SaveManager](https://github.com/ViciousSquid/Dosidicus/blob/2.4.4_stable/src/save_manager.py) class. 

It uses a structured approach that packages all game data into a single, portable file. <h4>Save File Location and Types</h4> The SaveManager creates and manages files within a `saves` directory in the application's root folder. It maintains two distinct save slots: <ul> <li><code>`autosave.zip`</code>: This file is used for periodic, automatic saves that occur in the background.</li> <li><code>`save_data.zip`</code>: This file is used when the player manually saves their game through the File menu.</li> </ul> <h4>Save File Structure</h4> When `save_game()` is called, it bundles data into the following internal JSON files within the zip archive: <ul> <li><code>game_state.json</code>: Contains general game state information, such as the squid's core stats (hunger, happiness), and other top-level game variables.</li> <li><code>brain_state.json</code>: Stores the complete state of the neural network, including neurogenesis data and the `pattern buffer` of learned experiences.</li> <li><code>ShortTerm.json</code>: A snapshot of all memories currently in the squid's short-term memory.</li> <li><code>LongTerm.json</code>: A snapshot of all memories that have been consolidated into long-term memory.</li> <li><code>plugin_data.json</code>: Contains any persistent data that active plugins have chosen to save.</li> <li> <code>statistics.json</code>: Stores persistant statistics tracked over time such as squid age, distance swam, foods eaten, etc</li> <li><code>uuid.txt</code>: Unique squid identifier (128bit number)</li></ul> 

------------------------------------------

[SaveViewer.html](../extras/SaveViewer.md) is available for easy viewing and comparisons of save files. 

This tool can also convert old v1 saved games (pre 2.4.5.0) to the new v2 format (2.5.0.0+)



================================================
FILE: Docs/engine/config.ini.md
================================================
The [config.ini](https://github.com/ViciousSquid/Dosidicus/blob/2.4.4_stable/config.ini) file allows for the fine-tuning of various game mechanics without needing to alter the source code. It is structured into sections, each controlling a different aspect of the application's behavior. 

```
NOTE: As of 2.6.1.0 there is a dedicated preferences window that exposes every setting. 
it can be accessed via the View menu  (View>Preferences)
Manual editing of the Config file still works but is not recommended
```

<h4>[General]</h4>

`language`: = `en`  (Default) - Can be `de`, `en`, `es`, `fr`, `ja`, `ml` or `zh`

<h4>[Debug]</h4> 

`multiplayer_debug`  Show debug messages when multiplayer is enabled (Defaults to False) [Developer feature]

<h4>[RockInteractions]</h4> This section controls the logic for how the squid interacts with rock items. <ul> <li><code>pickup_probability</code>: A value from 0.0 to 1.0 representing the chance the squid will decide to pick up a rock it encounters.</li> <li><code>throw_probability</code>: A value from 0.0 to 1.0 representing the chance the squid will throw a rock it is currently carrying.</li> <li><code>min_carry_duration</code>: The minimum time in seconds the squid will carry a rock before considering throwing it.</li> <li><code>max_carry_duration</code>: The maximum time in seconds the squid will carry a rock.</li> <li><code>cooldown_after_throw</code>: Time in seconds the squid must wait after throwing a rock before it can throw another.</li> <li><code>happiness_boost</code>, <code>satisfaction_boost</code>, <code>anxiety\reduction</code>: The numerical amount that the corresponding stats are changed when a positive rock interaction occurs.</li> </ul> <h4>[Neurogenesis]</h4> This is the main section for controlling the creation of new neurons. <ul> <li><code>enabled</code>: A boolean (True/False) that globally enables or disables the neurogenesis feature.</li> <li><code>cooldown</code>: The mandatory waiting period in seconds after a neuron is created before another one can be.</li> <li><code>max_neurons</code>: The maximum number of neurons the brain can have. Neurogenesis stops if this limit is reached and pruning is enabled.</li> </ul> <h5>[Neurogenesis.Novelty], [Neurogenesis.Stress], [Neurogenesis.Reward]</h5> These subsections control the specific triggers for creating new neurons. Each has the following parameters: <ul> <li><code>enabled</code>: Enables or disables this specific pathway for neurogenesis.</li> <li><code>threshold</code>: The value the corresponding counter must exceed to trigger neuron creation.</li> <li><code>decay_rate</code>: The rate at which the counter's value decreases over time (e.g., 0.80 means the counter retains 80% of its value after a decay cycle).</li> <li><code>max_counter</code>: The maximum value the counter can reach.</li> <li><code>*_modifier</code>: Personality-specific multipliers that make it easier or harder for certain personalities to trigger neurogenesis (e.g., adventurous_modifier = 1.2 makes adventurous squids 20% more sensitive to novelty).</li> </ul> <h5>[Neurogenesis.NeuronProperties]</h5> This section defines the default properties for newly created neurons. <ul> <li><code>base_activation</code>: The initial activation value for a new neuron.</li> <li><code>position_variance</code>: Determines the random offset when placing a new neuron on the brain map.</li> <li><code>default_connections</code>: A boolean to enable or disable the automatic creation of pre-wired connections for new neurons.</li> <li><code>connection_strength</code>, <code>reciprocal_strength</code>: The initial weights for the default connections that a new neuron forms.</li> </ul> <h5>[Neurogenesis.Appearance] & [Neurogenesis.VisualEffects]</h5> These sections control the visual feedback for neurogenesis. <ul> <li><code>*_color</code>: Defines the RGB color for each type of new neuron.</li> <li><code>*shape</code>: Defines the shape (triangle, square, circle) for each type of new neuron.</li> <li><code>highlight_duration</code>, <code>highlight_radius</code>: Controls the size and duration of the visual highlight effect when a neuron is created.</li> <li><code>pulse_effect</code>, <code>pulse_speed</code>: Configures the pulsing animation on the new neuron.</li> </ul> <hr>

================================================
FILE: Docs/extras/Achievements.md
================================================
Achievements are implemented via the [achievements plugin](https://github.com/ViciousSquid/Dosidicus/tree/2.5.0.0_latest_release/plugins/achievements) (Enabled by default)


# Achievements List

### **Total Achievements:** **50**         (41 visible, 9 secret)
 Worth 1125 max possible points

---

## 🍽️ Feeding Category (5)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🍽️ | First Bite | Feed the squid for the first time | 10 | 1 |
| 🥄 | Regular Meals | Feed the squid 10 times | 15 | 1 |
| 🍴 | Dedicated Caretaker | Feed the squid 50 times | 25 | 2 |
| 👨‍🍳 | Master Chef | Feed the squid 100 times | 50 | 3 |
| 🌟 | Culinary Legend | Feed the squid 500 times | 100 | 4 |

---

## 🧠 Neurogenesis Category (6)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🧠 | Brain Spark | Create the first neurogenesis neuron | 20 | 1 |
| 🔮 | Neural Network | Create 10 neurons through neurogenesis | 30 | 2 |
| 💫 | Expanding Mind | Create 50 neurons through neurogenesis | 50 | 3 |
| 🌌 | Cerebral Powerhouse | Create 100 neurons through neurogenesis | 75 | 4 |
| ⚡ | Strengthened Synapse | Level up a neuron for the first time | 15 | 1 |
| 🌠 | Peak Performance | Level a neuron to maximum strength | 40 | 3 |

---

## 😴 Sleep Category (3)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 😴 | Sweet Dreams | The squid wakes from its first sleep | 10 | 1 |
| 🛏️ | Well Rested | The squid has slept 10 times | 20 | 2 |
| 💭 | Deep Dreamer | Squid entered REM sleep | 25 | 2 |

---

## 📅 Milestones Category (7)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| ⏰ | One Hour Old | Squid reached 1 hour old | 15 | 1 |
| 📅 | Growing Up | Squid reached 10 hours old | 30 | 2 |
| 🎂 | One Day Wonder | Squid survived for 24 hours | 50 | 3 |
| 🏅 | Week Veteran | Squid has lived for one week | 100 | 4 |
| 🎖️ | Month Veteran | Squid has lived for one month | 150 | 5 |
| 😄 | Pure Bliss | Reach 100% happiness | 20 | 2 |
| ⚖️ | Perfect Balance | All stats above 80% simultaneously | 40 | 3 |

---

## 🧹 Cleaning Category (3)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🧼 | First Scrub | Clean the tank for the first time | 10 | 1 |
| ✨ | Spotless Environment | Clean the tank 25 times | 25 | 2 |
| 🧹 | Germaphobe | Keep cleanliness above 90% for 1 hour straight | 30 | 2 |

---

## 💊 Health Category (3)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 💊 | First Aid | Give medicine for the first time | 10 | 1 |
| 🩺 | Doctor Squid | Give medicine 10 times | 20 | 2 |
| 💪 | Comeback Kid | Recover from critically low health (<20%) to full | 40 | 3 |

---

## 🎯 Interaction Category (14)

### Rocks
| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🪨 | Rock Collector | Pick up a rock for the first time | 10 | 1 |
| ⛰️ | Stone Gatherer | Pick up 10 rocks | 15 | 1 |
| 🏔️ | Boulder Hoarder | Pick up 50 rocks | 30 | 2 |
| 🎯 | Skipping Stones | Throw a rock for the first time | 10 | 1 |
| 🚀 | Rock Launcher | Throw 25 rocks | 20 | 2 |
| 💨 | Catapult Master | Throw 100 rocks | 40 | 3 |

### Decorations & Plants
| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🪴 | Interior Decorator | Push a decoration for the first time | 10 | 1 |
| 🏠 | Furniture Mover | Push decorations 10 times | 15 | 1 |
| 🎨 | Feng Shui Master | Push decorations 50 times | 30 | 2 |
| 🌱 | Green Thumb | Interact with a plant for the first time | 10 | 1 |
| 🌿 | Garden Explorer | Interact with plants 10 times | 15 | 1 |
| 🌳 | Botanist | Interact with plants 50 times | 30 | 2 |

### General Interaction
| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🔍 | Curious Inspector | Investigate 25 different objects | 25 | 2 |
| 🕵️ | Master Detective | Investigate 100 different objects | 50 | 3 |

---

## 💩 Exploration Category (1)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 💩 | Mischief Maker | Squid threw a poop for the first time | 10 | 1 |

---

## 🖤 Ink Category (2)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🖤 | Smoke Screen | Squid releases ink cloud for the first time | 15 | 1 |
| 🌫️ | Ink Master | Release 20 ink clouds | 25 | 2 |

---

## 💾 Memory Category (3)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 💾 | First Memory | Form the first memory | 15 | 1 |
| 🗄️ | Long Term Thinking | Promote a memory to long-term storage | 25 | 2 |
| 📚 | Photographic Memory | Have 50 memories stored | 40 | 3 |

---

## 😊 Emotional Category (4)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🤔 | Curious George | Curiosity reaches 100% | 15 | 1 |
| 🧘 | Zen Master | Keep anxiety below 10% for 30 minutes | 30 | 2 |
| 😱 | Startled! | Startle the squid for the first time | 10 | 1 |
| 😰 | Nervous Wreck | Anxiety reaches 100% | 15 | 2 |

---

## 🔬 Meta Category (3)

| Icon | Name | Condition | Points | Tier |
|------|------|-----------|--------|------|
| 🔬 | Brain Surgeon | Open the brain visualization tool | 10 | 1 |
| ⏩ | Speed Demon | Run simulation at max speed for 10 minutes | 15 | 2 |
| 🏆 | Completionist | Unlock 30 other achievements | 100 | 4 |

---

## 📊 Tier System

The tier system uses 5 levels with different colors:

| Tier | Name | Color | Example Achievements |
|------|------|-------|----------------------|
| 1 | Bronze | #CD7F32 | First Bite, Brain Spark, Sweet Dreams |
| 2 | Silver | #C0C0C0 | Regular Meals, Neural Network, Pure Bliss |
| 3 | Gold | #FFD700 | Master Chef, Peak Performance, Perfect Balance |
| 4 | Platinum | #E5E4E2 | Culinary Legend, Cerebral Powerhouse, Completionist |
| 5 | Diamond | #B9F2FF | Month Veteran |

---

## Summary Statistics

- **Total Achievements:** 50
- **Visible Achievements:** 41
- **Hidden Achievements:** 9
- **Total Points Available:** 1,125
- **Most Common Tier:** Tier 1 (Bronze)
- **Most Common Category:** Interaction (14 achievements)


================================================
FILE: Docs/extras/Decoration-Window.md
================================================

![image](https://github.com/user-attachments/assets/bed7c083-80d3-4ecd-8375-dd6c8746d3d4)

# Press `D` to open the decorations window
*  ## or use the `View > Decorations` menu

------------------------

The <strong>Decorations Window</strong> is your catalog for all the items you can use to furnish your squid's environment. Placing decorations is not just for cosmetic appeal; each item has a unique effect on the squid's mood and well-being, influencing his stats and behavior. This feature allows you to customize the tank and actively manage your squid's environment. </p> <h4>How to Use the Decorations Window</h4> <ol> <li><strong>Opening the Window:</strong> To open the catalog, navigate to the menu bar at the top of the main application window, click on <strong>View</strong>> <strong>Decorations</strong> (`Or simply press T`) 
<li> <strong>Adding an Item:</strong> To place a decoration, <strong>click and hold</strong> the desired item from the Decorations Window, <strong>drag</strong> it over to the main tank area, and <strong>release</strong> to drop it. </li> </ol> <h4>Interacting with Placed Decorations</h4> <p> Once an item has been dropped into the tank, you can manipulate it directly: </p> <ul> <li><strong>Select:</strong> Click on any decoration in the tank to select it. <li><strong>Move:</strong> Click and drag a selected item to move it.</li> <li><strong>Resize:</strong> Select an item use <strong>mouse wheel</strong> to scale it. Note that some items, like rocks, cannot be resized.</li> <li><strong>Delete:</strong> Select an item and press <strong>Delete</strong> to permanently remove it from the tank.</li> </ul> <h4>Decoration Effects</h4> <p> Every decoration has hidden properties defined in  [decoration_stats.json](https://github.com/ViciousSquid/Dosidicus/blob/2.4.4_stable/src/decoration_stats.json) - when the squid interacts with or is near a decoration, these properties can influence his statistics, such as happiness, anxiety, and curiosity. Experiment with different items to see how they affect your squid's mood and development!


================================================
FILE: Docs/extras/Easter-Eggs.md
================================================
<img src="https://github.com/user-attachments/assets/07f2c02f-b8b5-428c-8bf3-37b69cf188c7" width="400">

 On the About tab of the Brain Window, a colour can be selected for the squid.

This colour will be added to your save file and will persist across play sessions

--------------

<img src="https://github.com/user-attachments/assets/901805e2-48c1-4c44-b9bd-0b8e2d363000" width="400">

**ml** (Millennial) is an available language (along with 7 others)

--------------

Resizing the play window will startle the squid


================================================
FILE: Docs/extras/SaveViewer.md
================================================
#### SaveViewer.html

* Quickly and easily open save files and view the contents.
* `Network` tab visualises entire network
* No need to open the game

<img src="https://github.com/user-attachments/assets/2d665825-cf92-42e9-82df-8ce7c8063b7d" width="600">

================================================
FILE: Docs/extras/UUID.md
================================================
When a squid is created at the start of a new game he is assigned a unique fingerprint (also the name of his save file)

It looks like this:
```example
SquidSignature    ab148370-6cd7-4d7e-a3d2-e33b68c4b615
```


This currently serves no purpose but in future it will be used for any/all/none of the following:

* DNA / Genetic code
* Encoding personality traits/behaviours
* Use as node name in multiplayer
* seed to always generate the exact same squid
* Verification (used as a 'magic number' or checksum)

================================================
FILE: Docs/getting-started/Care-Guide.md
================================================
<h3>Care Guide: Nurturing Body and Mind</h3> <p> Caring for your squid is a unique experience that goes beyond simple pet simulation. You are not only responsible for its physical well-being but also for the growth and development of its simulated brain. This guide will walk you through the essentials of caring for your squid's core needs and enriching its environment to foster a healthy, intelligent, and happy companion. </p> <h4>Part 1: Managing Your Squid's Core Needs</h4> <p> Your squid has several fundamental needs that you must monitor and manage. These are handled primarily through the <strong>Actions</strong> menu in the main application window. </p> <ul> <li> <strong>Feeding Your Squid:</strong> <ul> <li><strong>How:</strong> Select <code>Actions > Feed</code> from the menu to drop food into the tank.</li> <li><strong>Why:</strong> Hunger is a primary driver of your squid's behavior. A hungry squid will become anxious and its happiness will decrease. Feeding it not only satisfies hunger but also increases happiness and satisfaction, creating a positive memory.</li> </ul> </li> <li> <strong>Cleaning the Environment:</strong> <ul> <li><strong>How:</strong> As your squid lives in its environment, it will produce poop. Select <code>Actions > Clean</code> or click on a poop and press DEL to delete it.</li> <li><strong>Why:</strong> A dirty environment is a major source of stress and anxiety for your squid. Keeping the tank clean is essential for maintaining high happiness and low stress levels.</li> </ul> </li> <li> <strong>Administering Medicine:</strong> <ul> <li><strong>How:</strong> If your squid becomes sick, select <code>Actions > Medicine</code>.</li> <li><strong>Why:</strong> Sickness can negatively impact all of your squid's stats. Promptly administering medicine is crucial for its recovery and overall health.</li> </ul> </li> </ul> <h4>Part 2: Enriching Your Squid's Mind & Stimulating the Brain</h4> <p> A healthy squid needs more than just food and a clean tank; it needs mental stimulation. Your actions directly influence the development of its neural network through learning (strengthening connections) and neurogenesis (creating new neurons). </p> <h5>Fostering Learning (Strengthening Connections)</h5> <p> Your squid's brain learns by associating events. When two of its neurons are active at the same time, the connection between them gets stronger. You can encourage this process through consistent care. </p> <p> <strong>Example:</strong> When your squid is hungry, its <code>hunger</code> neuron is highly active. When you feed it, its <code>satisfaction</code> neuron becomes active. The brain sees these two events happen together and strengthens the connection between them. Over time, the squid "learns" that eating leads to satisfaction. </p> <h5>Stimulating Neurogenesis (Creating New Neurons)</h5> <p> Neurogenesis is the birth of new neurons and is the key to enriching your squid's mind. You can trigger this process by providing specific types of stimulation that correspond to the three neurogenesis pathways. </p> <ul> <li> <strong>1. Provide Novelty:</strong> <ul> <li><strong>Goal:</strong> To create <code>novel</code> neurons that boost curiosity.</li> <li><strong>How-To:</strong> The best way to provide novelty is to regularly change the squid's environment. Open the <strong>Decorations</strong> window (from the <code>View</code> menu) and drag-and-drop new items like plants or different rocks into the tank. Each new object the squid investigates increases the novelty counter, and when it surpasses its threshold, a new neuron can be born.</li> </ul> </li> <li> <strong>2. Provide Rewards:</strong> <ul> <li><strong>Goal:</strong> To create <code>reward</code> neurons that reinforce happiness and satisfaction.</li> <li><strong>How-To:</strong> Positive reinforcement is key. Consistently feeding the squid when it's hungry, keeping its tank clean, and encouraging play (like interacting with rocks) will increase the reward counter. This teaches the squid which behaviors lead to positive outcomes.</li> </ul> </li> <li> <strong>3. Provide Healthy Challenges:</strong> <ul> <li><strong>Goal:</strong> To create <code>stress</code> neurons that act as coping mechanisms for unpleasant situations.</li> <li><strong>How-To:</strong> While chronic stress is harmful, allowing the squid to experience and overcome small, manageable stressors helps it build resilience. For instance, allowing it to get moderately hungry before feeding it can build the stress counter. When a <code>stress</code> neuron is created, it comes pre-wired with an inhibitory connection to the <code>anxiety</code> neuron, effectively making your squid better at managing anxiety in the future.</li> </ul> </li> </ul> <h5>Cater to Your Squid's Personality</h5> <p> Remember that every squid has a unique personality that affects its needs. Check the <strong>Personality Tab</strong> in the Brain Tool to understand your squid's specific traits and get tailored advice. </p> <p> <strong>Example:</strong> A <strong>Timid</strong> squid's anxiety will decrease significantly when it is near plants, making them an essential decoration for its well-being. In contrast, an <strong>Adventurous</strong> squid will thrive on a constantly changing environment with new decorations to investigate, which will be your primary method for providing novelty. </p>

================================================
FILE: Docs/getting-started/Changelog.md
================================================
### version 2.6.1.2
`23 Feb 2026`

* Optional [hardware AI accelerator support via ONNX Runtime](../neural-network/AI-Accelerator-Support.md) - _Experimental, disabled by default_

* NEW: [brain_to_keras.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_LatestVersion/extras/brain_to_keras.py) (from the dev branch) in the `extras` folder - _attempts to convert a Dosidicus brain.json to Keras v3 (experimental)_

* Improved Brain Tool short-term and long-term memory tabs: **more varied and verbose memories**
* **Random Humboldt squid facts** can occasionally appear in status bar
* FIXED: BrainTool Hebbian timers weren't in sync [(20)](https://github.com/ViciousSquid/Dosidicus/issues/20)
* FIXED squid now properly goes to sleep when sleepiness=max

-------------------------


### version 2.6.1.1
`20 Feb 2026`

### Milestone 2
* Added `linux_setup.sh`
* Code optimisations & bug fixes

-------------------------

### version 2.6.1.0

`21 Jan 2026`

#### build 1219
* Translation files for 7 languages: _English_, _French_, _Spanish_, _German_, _Chinese_, _Japanese_, _Millennial_
* [Stable release for Windows](https://github.com/ViciousSquid/Dosidicus/releases/tag/v2.6.1.0)

`18 Dec 2025`

#### build 1218 **Milestone 2** Release 
* Integrated Designer into Brain Tool
* Added ability to create custom neurons
* NEW: [Headless brain trainer](https://github.com/ViciousSquid/Dosidicus/blob/v2.6.1.0__b1218_LatestVersion/headless/README_headless_trainer.md) with accelerated time epochs
* NEW: Global preferences window
* Added an additional 4 custom brains
* French and Spanish Translations (_does not currently include Designer_)

-------------------

### version 2.6.0.3
`11 Dec 2025`

* Added FEED, CLEAN, MEDICINE buttons to UI
* Added 5 example [custom brains](https://github.com/ViciousSquid/Dosidicus/tree/2.6.0.2_latest_release/custom_brains)
* Neuron/font sizes and other UI elements now configurable via config.ini
* FIXED: missing `update_score` method in `StatisticsWindow`
* [Brain Designer](../brain-tool/Brain-Designer.md) can now import current running brain from Brain Tool
* NEW: Neuron output bindings can be used to create simple IF THEN behaviours for the squid

-------------------

### version 2.6.0.2
`8 Dec 2025`

* NEW: [Brain Designer](../brain-tool/Brain-Designer.md) - create your own custom squid brains!
* NEW: 5 custom brain templates that can be edited however you like [[dir](https://github.com/ViciousSquid/Dosidicus/tree/2.6.0.1_latest_release/custom_brains)]
* NEW: [Example squid](../getting-started/Example-Squids.md) **Miroslav**

-------------------

### version 2.5.0.0
`3 Dec 2025`

* New [Save Viewer](../extras/SaveViewer.md)
* Added 8 additional plant decorations & associated stats
* Brain Network tab now has buttons for Experience Buffer and Neuron Laboratory
* Fixed a bug where the brain state was not being restored properly from save
* Added [showman wrapper](../source-reference/neurogenesis_show.py.md) for Neurogenesis
* Code refactoring and removal of legacy cruft (pre version 2.4.X)
* Feature-complete stable code-base 

-------------------

### version 2.4.5.1 _patch_
`25 Nov 2025`

* [Engine](../engine/Engine-Overview.md) update - Neurogenesis and hebbian calculations now in own thread so UI remains responsive
* **New**: Improved [multiplayer](../engine/Multiplayer.md) plugin!!
* **New**: [Achievements](../extras/Achievements.md) (50 to collect)
* **New**: Full interactive tutorial when starting a new game
* Every squid is born with a `uuid` that stays with him his entire life
* Added [Neuron Laboratory](../brain-tool/Neuron-Laboratory.md) via the View menu or by double clicking any neuron



-------------------

### version 2.4.5.0
`15 Nov 2025`

* Improved [plugin manager](../engine/Plugin-System.md)
* Massively overhauled and [improved](../source-reference/neurogenesis_show.py.md) neurogenesis
* Track statistics such as squid age, distance travelled, total foods eaten, etc
* Improved load/save mechanism (backward compatible with v2.3 saves and earlier)
* Hebbian now trains on 2 active neuron pairs at once
* Redesigned Brain Tool [learning tab](../brain-tool/Learning-Tab.md)
* Global counters now respect game speed
* Arcade-style (High-Score) system
* Animations throughout the UI


-------------------

### version 2.4.4.1
`04 Sept 2025`

* Code cleanup and stability improvements
* WIP: Track statistics such as squid age, distance travelled, total foods eaten, etc
* ADDED: Small chance of squid creating an ink cloud when startled
* ADDED: Experimental [multiplayer](../engine/Multiplayer.md) plugin

-------------------

### version 2.4.3

Milestone 1

**Initial stable release**

### **AUTHOR GOT A TATTOO** to celebrate 1 year of this project!

<img src="https://github.com/user-attachments/assets/fe50e8d8-cb76-4b20-830a-ea6af28bb608" width="250">

  <a href="https://www.buymeacoffee.com/vicioussquid" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

================================================
FILE: Docs/getting-started/Example-Squids.md
================================================
```
The example_squids folder contains saved brains that have already accumulated some experiences:
```
-------------------------


### [b071f720_593e_471f_8412_8ee84172a1b0.zip](https://github.com/ViciousSquid/Dosidicus/blob/2.6.0.0_latest_release/example_squids/b071f720_593e_471f_8412_8ee84172a1b0.zip) 

#### Squid name: Miroslav | Age: 5 | Number of neurons: 12

* Young squid with default brain type (7 core neurons)
* ${\color{red}stress}$ neurons have developed in response to being extremely hungry in the past
* ${\color{yellow}novelty}$ neurons have developed - positive experiences related to investigation/exploration
* many connections (111!) - strong brain, highly responsive, quick to learn (high plasticity)
* `novelty_object_investigation` has extremely high multiplier of 14 suggesting episodes of manic excitement


<img src="https://github.com/user-attachments/assets/4d1381d2-2afc-4893-a101-d2c45e6cf597" width="500">


-------------------------



================================================
FILE: Docs/getting-started/Home.md
================================================
### _A transparent neural sandbox disguised as a digital pet_
A micro neural engine for small autonomous agents that learn via Hebbian dynamics and grow new structure when exposed to novelty.

----------------------------------

##  [Manifesto](https://github.com/ViciousSquid/Dosidicus/wiki/Cognitive-Sandbox-Manifesto-%7C-Artificial-Life-and-Transparent-Neural-Systems) |   [Wiki](https://github.com/ViciousSquid/Dosidicus/wiki) | [Changelog](https://github.com/ViciousSquid/Dosidicus/wiki/changelog) 

----------------------------

## Getting Started
New to Dosidicus? Start here to understand how to interact with your squid.
* **[Care Guide / Getting Started](../getting-started/Care-Guide.md)**
* **[Personalities](../neural-network/Personality.md)** — How different squid types behave.
* **[Decoration Window](../extras/Decoration-Window.md)** — Managing the squid's environment.

---


### Biological Autonomy
* **[Vision System](../neural-network/Vision-System.md)** — Realistic foraging and food detection.
* **[Hebbian Learning](../neural-network/Hebbian-Learning.md)** — The algorithm behind 30-second learning cycles.
* **[Neurogenesis](../neural-network/Neurogenesis.md)** — How the squid creates new neurons based on environment.
* **[Decision Engine](../engine/Decision-Engine.md)** — Making choices based on hunger, sleep, and memory.

### Engine Architecture & Logic
* **[Engine Overview](../engine/Engine-Overview.md)** — High-level system architecture.
* **[main.py](../source-reference/main.py.md)** — The main simulation loop.
* **[tamagotchi_logic.py](../source-reference/tamagotchi_logic.py.md)** — Core needs and health management.
* **[squid.py](../source-reference/squid.py.md)** — The physical squid class.
* **[Memory System](https://github.com/ViciousSquid/Dosidicus/blob/main/Docs/Memory%20System.md)** & **[memory_manager.py](../source-reference/memory_manager.py.md)** — Managing experiences.

---

## Tools & Configuration
Fine-tune the simulation and monitor the squid's neural activity.

### [The Brain Tool](../brain-tool/Network-Tab.md)
* **[Network Tab](../brain-tool/Network-Tab.md)** | **[Learning Tab](../brain-tool/Learning-Tab.md)**
* **[Memory Tab](../brain-tool/Memory-Tab.md)** | **[Decisions Tab](../brain-tool/Decisions-Tab.md)**
* **[Personality Tab](../neural-network/Personality.md-tab)**

### System Settings
* **[config.ini](../engine/config.ini.md)** — Adjusting simulation parameters.
* **[Save File Format](../engine/Save-File-Format.md)** — Structure of persisted data.
* **[Plugin System](../engine/Plugin-System.md)** — Extending the engine's capabilities.


================================================
FILE: Docs/neural-network/AI-Accelerator-Support.md
================================================
#### New in v2.6.1.2 (experimental)

[compute_backend.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_onnx/src/compute_backend.py) facilitates hardware acceleration for neural calculations by changing one line:

in `config.ini`:

```
[Compute]

backend = numpy
```

 Options:
-    `numpy`  - default, no extra dependencies
-    `onnx`   - enables hardware AI accelerator support via ONNX Runtime

auto-selects `DirectML`, `OpenVINO`, `QNN`, or falls back to `numpy` if no runtime is present.

---------------------------------

requires package to be installed (refer to the following list:)

#### Recommended packages by platform:

- **Windows** | _NVIDIA + AMD + Intel GPU + NPU (DirectML)_ | `pip install onnxruntime-directml`

- **Windows** | _NVIDIA only (maximum CUDA performance)_ | `pip install onnxruntime-gpu`

- **Windows** | _Qualcomm 8CX / SQX / Snapdragon (NPU)_ | `pip install onnxruntime-qnn`

- **macOS** | _Apple Silicon and Intel Macs_ | `pip install onnxruntime`

- **Linux** | _NVIDIA GPUs_ | `pip install onnxruntime-gpu`

- **Linux** | _AMD GPUs_ | Use the ROCm/MIGraphX build (see [ONNX Runtime docs](https://onnxruntime.ai/docs/execution-providers/MIGraphX-ExecutionProvider.html))

```

If no package is installed, the default `numpy` will be used (neural calculations performed on CPU)
Any failure conditions will print to the console and we fall back to default `numpy`
Detection should happen automatically.       ONNX SUPPORT IS NEW AND EXPERIMENTAL
```

-------------------------------

The Brain Tool Network Tab displays which backend is being used in (top right)

================================================
FILE: Docs/neural-network/Experience-Buffer.md
================================================

The Experience Buffer is a core component in the system's learning and [neurogenesis](../neural-network/Neurogenesis.md) (neuron creation) module that functions as a memory for recent, significant events. It maintains a time-ordered log of the squid's context and uses this data to identify recurring patterns, which helps the system decide when and how to create new, functionally specialized neurons.

#### How the Experience Buffer Works
The experience buffer is technically implemented as the `ExperienceBuffer` class, which operates in two main ways: maintaining a rolling log and tracking pattern recurrence.

1. Rolling Log (deque): The buffer uses a deque (double-ended queue) to store a fixed, limited number of recent experiences (default maximum is 50 experiences). When a new experience is added, the oldest one is automatically discarded, ensuring the buffer only contains the latest, most relevant context.

2. Pattern Tracking: When an experience is added, it is processed to generate three levels of **pattern signatures**, which are counted to track how often similar events occur:

*  **Specific Pattern**: The most detailed signature, identifying a precise combination of `trigger`, `outcome`, and primary motivational neuron state.

*  **Parent Pattern**: A broader pattern used for hierarchical grouping.

*  **Core Pattern**: A minimal pattern used for "fuzzy matching" or identifying basic event categories.

The system analyses these counts to determine if a situation is a novel event or a recurring pattern, which heavily influences whether a new neuron is created, or if an existing neuron is strengthened.



----------------

#### Example Experiences (ExperienceContext)

<img src="https://github.com/user-attachments/assets/ecd998a9-e4b9-44d2-8f37-9a04df58515c" width="300">

Each recorded experience is captured as an ExperienceContext object, which is a snapshot of the squid's state and environment at the moment a significant event (the trigger) occurs.

* `trigger_type` - The general category of the event: `novelty`, `stress`, or `reward`.
* `outcome`	- The result of the experience: `positive`, `negative`, or `neutral`.
* `active_neurons`	A dictionary of all current neuron activations (e.g., {`hunger`: 20, `anxiety`: 85}).
* `recent_actions`	A list of recent actions taken by the squid (e.g., [`approach_plant`, `hide`]).
* `environmental_state`	Key external facts at the time (e.g., {`food_count`: 0, `has_rock`: True}).




================================================
FILE: Docs/neural-network/Hebbian-Learning.md
================================================
The neural network in Dosidicus does not use traditional backpropagation for training. Instead, it employs a form of <strong>Hebbian learning</strong>, a biologically-inspired principle summarized as "neurons that fire together, wire together." This method allows the network to learn associations and patterns organically based on the squid's concurrent states, without requiring a separate training phase. The entire process is managed within the <code>perform_hebbian_learning</code> and <code>update\_connection</code> methods. </p> <h4>1. The Learning Cycle</h4> <p> Learning is not continuous but occurs in discrete cycles to ensure stability and reduce computational load. </p> <ul> <li> <strong>Timed Trigger:</strong> The learning cycle is initiated by a timer. The interval for this timer is configurable in <code>config.ini</code> under the <code>\[Hebbian\]</code> section's <code>learning_interval</code> parameter (default every 30000 milliseconds). </li> <li> <strong>Pre-Pruning:</strong> Before each learning cycle begins, a pruning function is called to remove extremely weak and old connections from the network. This helps maintain network efficiency by clearing out irrelevant pathways before new learning occurs. </li> </ul> <h4>2. The Core Learning Process</h4> <p> The <code>perform_hebbian_learning</code> method executes a precise sequence of steps to update the network's weights. </p> <ol> <li> <strong>Identify Active Neurons:</strong> The system first scans all neurons in the brain. Any neuron whose activation value is above the <code>active_threshold</code> defined in the configuration is considered "active" for this learning cycle. System-level neurons (e.g., <code>is_eating</code>, <code>direction</code>) are excluded from this process. </li> <li> <strong>Random Pair Sampling:</strong> If fewer than two neurons are active, the learning cycle is aborted. If there are enough active neurons, the system does <em>not</em> update all possible pairs. Instead, it randomly samples a small number of pairs (e.g., two) from the pool of active neurons. This stochastic approach introduces variability and prevents the network from over-stabilizing into rigid patterns. </li> <li> <strong>Update Connection Weight:</strong> For each selected pair, the <code>update_connection</code> method is called. This is where the core weight calculation happens: <ul> <li> <strong>Base Hebbian Rule:</strong> The fundamental change in weight is calculated by multiplying the two neurons' normalized activation values by a learning rate. This reinforces the connection between them. </li> <li> <strong>Dynamic Learning Rate:</strong> The learning rate is not static. If one of the neurons in the pair was recently created via neurogenesis, the learning rate is temporarily boosted (e.g., by a factor of 2.0). This allows new, specialized neurons to integrate into the network more quickly and form meaningful connections. </li> <li> <strong>Weight Decay:</strong> To prevent runaway weight growth and to help the network "forget" insignificant associations, a small decay factor is applied during the update. This factor, configured via <code>weight_decay</code> in <code>config.ini</code>, slightly reduces the magnitude of the connection's weight during each update. </li> <li> <strong>Clamping:</strong> The final calculated weight is always clamped to a range of \[-1.0, 1.0\] to keep it normalized and prevent extreme values from destabilizing the network. </li> </ul> </li> </ol> <h4>3. Visual Feedback</h4> <p> The learning process is tied directly to the application's user interface to provide clear, real-time feedback. </p> <ul> <li> <strong>Activity Log:</strong> In the "Learning" tab of the Brain Tool, a log entry is created for each learning event, explicitly stating which neuron pair had its connection strengthened or weakened and by how much. </li> <li> <strong>Network Animation:</strong> In the "Network" tab, the connection line between the learning pair will briefly glow or pulse. The color of the pulse indicates whether the weight increased (positive reinforcement) or decreased (negative reinforcement), providing an immediate visual cue of the learning event. </li> </ul>

================================================
FILE: Docs/neural-network/Neurogenesis.md
================================================
`neurogenesis.py` is the brains’ stem-cell layer: it decides when, why, and how new neurons appear, makes sure they are immediately functional, keeps the network within size & specialization limits, and cleans up the least useful ones—all through a single, auditable pipeline.

#### Unified neuron creation
* `create_neuron()` – the only public entry-point used by the UI, BrainWorker, save-load, etc.
* `create_functional_neuron()` – internal helper that always produces a FunctionalNeuron.
* All neurons are converted into FunctionalNeuron objects

#### Context-aware experience tracking
* `ExperienceContext` – a snapshot of why the neuron is being made (trigger type, brain state, environment, outcome, recent actions).
* `ExperienceBuffer` – rolling FIFO buffer (≈ 50 experiences) that counts how often each specific / parent / core pattern recurs; used to decide when a neuron should actually be spawned.
* `NeurogenesisTriggerSystem` – state-delta detection (novelty spikes, stress surges, reward rebounds).

#### Functional specialization & wiring
* Every neuron gets a specialization string (feeding_satisfaction, filth_avoidance, object_investigation, …) derived from the context.
* `get_functional_connections()` – returns a weighted connection list to existing neurons so the new cell is immediately useful instead of random.
* `_make_reciprocal_connections()` – guarantees that any outgoing connection ≥ 0.2 gets a matching incoming link so the new neuron can activate/be activated.

#### Placement & visuals
* `_calculate_functional_position()` – places the neuron near the neurons it will influence, not at random.
* `_set_neuron_appearance()` – shape (diamond / square / triangle) and color palette encode type and specialization so users can “read” the brain at a glance.

#### Soft & hard limits
* Per-type caps (max_per_type) – e.g. max 3 stress, 5 novelty, 4 reward.
* Per-specialization caps (max_per_specialization) – prevents 20 identical “hunger_stress_response” clones.
* Global neuron cap (max_neurons) – total network size ceiling.
* Cooldown – minimum seconds between any creation event.
* Pattern-recurrence thresholds – neuron spawns only after a pattern has repeated 2–5× (depending on specificity).

#### Strengthening instead of duplication
If a cap is hit, the system boosts an existing neuron (strength_multiplier, utility_score) rather than creating a redundant one.

#### Pruning & housekeeping
* `intelligent_pruning()` – removes the lowest-utility neuron that is > 5 min old, considering activation recency, uniqueness of specialization, and total synaptic weight.
* `_rebuild_new_neurons_details_for_lab()` – guarantees the Laboratory “newest neurogenesis neurons” card always has origin data.

#### State integration & runtime updates
* `update_neuron_activations()` – every tick, functional neurons compute their value from incoming weights; stress neurons collectively suppress anxiety (bi-directional feedback).
* Emits pulse animations for weights ≥ 0.15 (can be disabled).

#### Persistence & save/load
* `to_dict()` / `from_dict()` – serializes the entire `ExperienceBuffer`, every `FunctionalNeuron`, counters, and creation history.
* `ensure_all_neurons_functional()` – on load, converts any legacy neurons discovered in [brain_widget](../source-reference/brain_widget.py.md) into FunctionalNeuron instances so the system stays unified.

#### Achievement hooks
`set_achievement_callbacks()` – lets the Achievements module receive “neuron created” and “neuron leveled” events for trophies.

================================================
FILE: Docs/neural-network/Personality.md
================================================
Personality affects squid needs and behaviour. A random personality is assigned every time a new squid is born, and could be thought of as a sort of "difficulty level" with 'Lazy' being the easiest and 'Stubborn' being hardest.

There are seven different squid personalities that affect their needs and how they behave: 

* `Timid`: Higher chance of becoming anxious 
* `Adventurous`: Increased curiosity and exploration 
* `Lazy`: Slower movement and energy consumption 
* `Energetic`: Faster movement and higher activity levels 
* `Introvert`: Prefers solitude and quiet environments 
* `Greedy`: More focused on food and resources
* `Stubborn`: Fussy and difficult 

One of these is randomly chosen at launch

A personality type can be forced at launch using the `-p` flag followed by the personality name above (example: `main.py -p lazy`) 

Each personality type presents unique challenges and requirements for the player to manage. Understanding and accommodating the specific needs and behaviors of each personality type is crucial for the player's success in caring for the squid and maintaining its well-being.

Here's a description of the different personality types and their corresponding behaviors in the game:

### `Timid` Personality:

* Tendency to become anxious, especially when not near plants.
* Moves slowly and prefers quiet, solitary environments.
* Curiosity level is lower than other personalities.
* Has a higher chance of becoming startled by decorations or other environmental factors.


### `Adventurous` Personality:

* Curious and exploratory, with a higher chance of entering the "curious" state.
* Moves faster and is more active compared to other personalities.
* Curiosity level is higher, leading to increased exploration and interaction with the environment.


### `Lazy` Personality:

* Moves and consumes energy at a slower pace.
* Takes more time to fulfill their needs, such as eating and sleeping.
* May be less responsive to environmental changes or stimuli.


### `Energetic` Personality:

* Moves and acts at a faster pace.
* Tends to have higher activity levels and may expend energy more quickly.
* May be more prone to restlessness or agitation.


### `Introvert` Personality:

* Prefers solitary environments and is content when alone.
* May become unhappy or anxious when forced to interact with the environment or decorations.
* Curiosity level is balanced, not too high or too low.


### `Greedy` Personality:

* Highly focused on food and resources, becoming anxious and hungry when those needs are not met.
* Curiosity level may be higher, leading to more exploration, but this is primarily driven by the desire for food.
* May become more aggressive or assertive in obtaining food or resources.


### `Stubborn` Personality:

* Only eats its favorite food (sushi), often refusing to consume any other type of food (cheese).
* Displays the message "Fussy squid does not like that type of food!" when presented with non-favorite food.
* Has a chance of refusing to sleep when its sleepiness is high, instead moving randomly.
* Moves slowly and stubbornly when not actively searching for its favorite food.
* Prioritizes sushi over cheese in its vision cone when searching for food.


================================================
FILE: Docs/neural-network/STDP.md
================================================
### Spike‐Timing‐Dependent Plasticity (STDP)

_As of version 2.6.2.0_ this page has moved to the Wiki [[HERE]](https://github.com/ViciousSquid/Dosidicus/wiki/Spike%E2%80%90Timing%E2%80%90Dependent-Plasticity-(STDP))


================================================
FILE: Docs/neural-network/Technical-Overview.md
================================================
<h3>Neural Network Technical Overview</h3> 

<img width="598" height="296" alt="image" src="https://github.com/user-attachments/assets/da9c7b03-9953-4892-9417-17d429d9a2fe" />

<p> The system's neural network is a unique, single-layer, fully-connected network architecture that dynamically grows through a process of neurogenesis.

Traditional backpropagation is not used for learning, instead relying on a pure Hebbian model (../neural-network/Hebbian-Learning.md)

...

<h4>1. Core Architecture</h4> <ul><li>The network starts as a single-layer perceptron with 7 core, named neurons. These neurons represent the fundamental emotional and physical states of the squid:

* Circular (Basic Needs): hunger, happiness, cleanliness, sleepiness
* Square (Complex States): satisfaction, anxiety, curiosity

Each neuron's activation value ranges from 0-100.

 Unlike a typical deep learning model, this network is not structured into distinct input, hidden, and output layers. Instead, all neurons exist on a single plane and are fully interconnected. Each connection between two neurons has a weight, initialized with a random value between -1 and 1, which represents the strength and nature (excitatory or inhibitory) of their relationship.</li> </ul> <h4>2. Learning Mechanism: Hebbian Learning</h4> <p> The network updates its connection weights using a Hebbian learning rule, which follows the principle "neurons that fire together, wire together." </p> <ul> <li><strong>Learning Cycle:</strong> The learning process is not continuous but occurs in discrete cycles, triggered by a timer (by default, every 30 seconds).</li> <li><strong>Activation:</strong> During a learning cycle, any neuron whose activation value exceeds a predefined threshold (e.g., &gt; 50) is considered "active.".</li> <li><strong>Weight Update:</strong> The system randomly selects a few pairs of currently active neurons. The weight between these pairs is then adjusted according to the Hebbian rule: the change in weight is proportional to the product of the two neurons' activation values multiplied by a learning rate. This strengthens the connection between neurons that are concurrently active.</li> <li><strong>Weight Decay:</strong> To ensure network stability and prevent weights from growing indefinitely, a small weight decay is applied over time, gradually weakening all connections.</li> </ul> <h4>3. Dynamic Architecture: Neurogenesis</h4> <p> The network's most advanced feature is its ability to create new neurons, a process called neurogenesis. This allows the brain's architecture to grow and adapt based on the squid's experiences. </p> <ul> <li> <strong>Triggers:</strong> Neurogenesis is initiated by one of three counters exceeding a set threshold: <ol> <li><strong>Novelty:</strong> Increases when the squid encounters new objects or experiences.</li> <li><strong>Stress:</strong> Increases during stressful events.</li> <li><strong>Reward:</strong> Increases when the squid experiences a positive outcome.</li> </ol> </li> <li> <strong>Creation Process:</strong> When a counter surpasses its threshold and a cooldown period has passed, a new neuron is created. <ul> <li>The neuron is named based on its trigger (e.g., <code>novel\_0</code>, <code>stress\_0</code>).</li> <li>It is positioned visually on the network graph near other currently active neurons.</li> <li>Crucially, it is immediately connected to the existing network with a set of default weights. For example, a new 'reward' neuron automatically forms a strong positive connection to 'satisfaction' and 'happiness'.</li> </ul> </li> <li><strong>Dynamic Thresholds:</strong> The thresholds required to trigger neurogenesis are not static. They scale upwards as the network grows in size, preventing runaway neuron creation and promoting stability in a mature network.</li> </ul> <h4>4. Network Stability and Pruning</h4> <p> To manage the complexity of a dynamically growing network, the system employs pruning mechanisms to remove inefficient or irrelevant components. This feature is critical for long-term network health and is enabled by default. </p> <ul> <li><strong>Connection Pruning:</strong> The system can periodically remove connections whose absolute weight falls below a very low threshold, cleaning up insignificant links.</li> <li><strong>Neuron Pruning:</strong> When the network approaches its configured maximum neuron limit, it can trigger the pruning of entire neurons. This process targets newly created (non-core) neurons that have failed to form strong connections or remain largely inactive.</li> </ul>

================================================
FILE: Docs/neural-network/Vision-System.md
================================================
<p> The squid's ability to "see" and react to his environment is not based on simple proximity but on a simulated line-of-sight mechanic. This system is composed of two main parts: the <strong>View Cone</strong>, which is an attribute of the squid itself and represents his field of view, and the <strong>Vision Window</strong> (from <code>vision.py</code>), which is a debug tool that provides a first-person visualization of what the squid is currently perceiving.

![image](https://github.com/user-attachments/assets/8bbb87ac-fef9-4093-bb22-a921ff0bc23f)


 </p> <h4>1. The View Cone: The Mechanism of Sight</h4> <p> The core of the vision system is the "View Cone." This is not a visual effect but an invisible geometric shape (specifically, a <code>QPolygonF</code>) that is mathematically projected from the squid's current position and orientation. </p> <ul> <li> <strong>Dynamic and Directional:</strong> The View Cone is not static. It is recalculated every frame to match the squid's state. When the squid moves, the cone moves with it. More importantly, when the squid turns to face left, right, or up, the cone rotates accordingly. This ensures the squid can only perceive objects that are genuinely in his line of sight. </li> <li> <strong>Object Detection via Intersection:</strong> The system determines what the squid "sees" by performing a continuous series of geometric intersection tests. The logic iterates through every object in the environment (decorations, food, poop, etc.) and checks if that object's bounding box intersects with the squid's View Cone polygon. </li> <li> <strong>Informing the Brain:</strong> If an intersection is detected, the object is officially considered "seen." This information is critical as it is fed directly into the squid's <strong>Decision Engine</strong>. For example, if "food" is seen, the desire to "eat" will likely increase. This allows the squid to make intelligent, context-aware decisions based on his immediate surroundings. The `has_food_visible` and `plant_proximity` inputs feed this system. </li> </ul> <h4>2. The Vision Window (vision.py)</h4> 

![image](https://github.com/user-attachments/assets/2d733297-acda-42d9-9a96-7591f1c3de12)

<p> The Vision Window is a powerful debugging tool that renders the output of the View Cone, allowing you to see the world from the squid's perspective. </p> <h5>How It Works</h5> <p> The update_vision() method is the heart of this window and performs the following steps on each refresh: </p> <ol> <li><strong>Clear the Scene:</strong> It first clears its own display to ensure no leftover artifacts from the previous frame.</li> <li><strong>Get the View Cone:</strong> It fetches the squid's current View Cone polygon from the main game logic.</li> <li><strong>Draw the Cone:</strong> It draws a visual representation of the cone shape itself within its window, so you can see the precise boundaries of the squid's perception.</li> <li><strong>Render Seen Objects:</strong> It then performs the same intersection logic as the main decision engine. For every object whose bounding box intersects with the View Cone, it creates a copy of that object's pixmap and draws it inside the Vision Window. It also draws the bounding box of the seen object for clarity.</li> 

================================================
FILE: Docs/source-reference/brain_neuron_hooks.py.md
================================================
#### brain_neuron_hooks.py
The **sensory input** system that bridges game events to neuron activations. It maintains a registry of handler functions that calculate activation values for input neurons based on the current game state. This is where environmental awareness enters the neural network—when the squid sees food, gets startled, or detects a nearby plant, these hooks translate those game conditions into numerical activations that propagate through the network.

#### Handler Registry:

* Maps neuron names to calculation functions
* Built-in handlers for: `external_stimulus`, `can_see_food`, `plant_proximity`, `threat_level`, `is_eating`, `is_sleeping`, `is_fleeing`, `is_startled`, `pursuing_food`, `is_sick`

#### Plugin Integration:

* `register_handler(name, callable)` — allows plugins to add custom input neurons
* `unregister_handler(name)` — removes custom handlers (built-ins protected)
* Merges plugin handlers with built-in ones at runtime

#### Event Tracking:

* Maintains `event_tracker` dictionary for temporal calculations
* Tracks window resizes, object spawns, user interactions with decay over time
* `update_decay()` — decays event intensities each simulation tick

#### Key Method:

* `get_input_neuron_values()` — returns current activation values for all registered input sensors

================================================
FILE: Docs/source-reference/brain_neuron_outputs.py.md
================================================
#### brain_neuron_outputs.py
**output system** that bridges neuron activations to game behaviours (bindings)

When neurons fire above configurable thresholds, this system triggers corresponding game actions (hooks) like fleeing, seeking food, or changing colour. It completes the sensorimotor loop—inputs flow in through hooks, propagate through the network, and outputs emerge here to drive the squid's behaviour.

#### NeuronOutputBinding Dataclass:

* Binds a neuron to an output hook with threshold, trigger mode, and cooldown
* Trigger modes: `THRESHOLD_RISING`, `THRESHOLD_FALLING`, `THRESHOLD_ABOVE`, `THRESHOLD_BELOW`, `ON_CHANGE`
Serializable to/from dict for save/load support

#### Standard Output Hooks:

* Movement: `flee`, `seek_food`, `seek_plant`, `approach_rock`, `wander`
* Actions: `throw_rock`, `pick_up_rock`, `ink_cloud`, `eat`, `change_color`
* State Changes: `sleep`, `wake`, `startle`, `calm`
* Stat Modifications: `boost_happiness`, `boost_curiosity`, `reduce_anxiety`

#### NeuronOutputMonitor Class:

* `monitor(activations)` — checks all bindings against current values, fires those meeting conditions
* Respects cooldown timers to prevent rapid-fire triggering
* Integrates with plugin system's hook dispatcher
* Includes floating `NeuronLogWindow` for debugging fired outputs

================================================
FILE: Docs/source-reference/brain_render_worker.py.md
================================================
_Not to be confused with [brain_worker.py](../source-reference/brain_worker.py.md)_

#### brain_render_worker.py (938 lines)
An offscreen rendering engine running in its own QThread that paints the entire brain visualization to a QImage buffer. The main thread simply blits this cached image during paintEvent, dramatically improving UI responsiveness. The worker receives immutable state snapshots and handles all the complex drawing logic—connections with animated pulses, neurons with various shapes, localized labels, and visual effects for learning events.

#### RenderState Dataclass:

* Immutable snapshot containing positions, states, colors, weights, and animation parameters
* Created on main thread via `create_render_state_from_widget()` helper
* Includes pre-calculated localized neuron labels to avoid i18n lookups during render

#### Rendering Pipeline:

`request_render(state)` — throttled to 10 FPS
* Draws and animates neurons and connections


================================================
FILE: Docs/source-reference/brain_tool.py.md
================================================
#### Responsibilities

* Builds the multi-tab window (Network, Learning, Memory, Decisions, Statistics, …).
* Hosts the [BrainWidget](../source-reference/brain_widget.py.md) in the “Network” tab.
* Exposes buttons, sliders, tables to stimulate neurons, export data, change learning rate, force a learning cycle, etc.
* Persists / loads the whole brain state (weights, positions, neurogenesis history) to JSON.
* Owns the [BrainWorker](../source-reference/brain_worker.py.md) thread instance (wraps the one inside BrainWidget) and restarts it if it crashes.
* Bridges between the squid logic ([tamagotchi_logic](../source-reference/tamagotchi_logic.py.md)) and the brain widget:


 – every few seconds it copies the squid’s current `hunger`, `happiness`, `anxiety`… into the widget’s state so the network mirrors the squid.

 – when the network learns new weights, the squid can query them for [decision-making](../engine/Decision-Engine.md).



#### Key internal objects

* `self.brain_widget` – canvas widget ([brain_widget.py](../source-reference/brain_widget.py.md))
* `self.tabs` – QTabWidget with all the inspector tabs
* `self.config_manager` – central place for thresholds, intervals, colours, etc.
* `self.tamagotchi_logic` – reference to the actual pet simulation (runs in the main game loop)

================================================
FILE: Docs/source-reference/brain_widget.py.md
================================================
### brain_widget.py
This is the main neural network visualization and coordination hub. It serves as the central controller that owns the authoritative brain state, coordinates background worker threads, and integrates all the subsystems that make the neural network function. Everything flows through this widget—stat updates from the game, rendering requests, learning signals, and neurogenesis events all converge here before being dispatched to the appropriate handlers.

#### Core State Management:

* Maintains the authoritative `state` dictionary with all neuron activations (hunger, happiness, anxiety, etc.)
* Manages `weights` dictionary for connection strengths between neurons
* Tracks `neuron_positions` for [visualization](../brain-tool/Network-Tab.md) layout

#### Worker Coordination:

* Receives an external [`BrainWorker`](../source-reference/brain_worker.py.md) via `set_brain_worker()` (avoids duplicate thread creation)
* Owns a [`BrainRenderWorker`](../source-reference/brain_render_worker.py.md) for offscreen rendering
* Coordinates signal/slot connections between workers and UI

#### Subsystems Integrated:

* [`EnhancedNeurogenesis`](../neural-network/Neurogenesis.md) for dynamic neuron creation
* [`ExperienceBuffer`](../neural-network/Experience-Buffer.md) for tracking learning experiences
* `EnhancedBrainTooltips` for hover information
* Theming with animation styles (Vibrant, Subtle, etc.)
* Brain state bridge for [designer](../brain-tool/Brain-Designer.md) synchronization

#### Key Methods:

* `update_brain_state(stats_dict)` — main entry point for stat updates from the game
* `set_brain_worker()` — accepts external [worker](../source-reference/brain_worker.py.md) instance
* `export_brain_state_for_designer()` — syncs state with the Brain Designer tool

================================================
FILE: Docs/source-reference/brain_worker.py.md
================================================
_Not to be confused with [brain_render_worker.py](../source-reference/brain_render_worker.py.md)_

#### brain_worker.py
A background QThread dedicated to handling computationally expensive brain logic that would otherwise block the UI. It operates on cached snapshots of brain state, processes tasks from a thread-safe queue, and emits results back to the main thread via signals. This separation keeps the simulation responsive even during complex Hebbian learning calculations or neurogenesis evaluations.

#### Task Queue System:

* Uses thread-safe `Queue` for task dispatch
* Processes three task types: [`neurogenesis`](../neural-network/Neurogenesis.md), [`hebbian`](../neural-network/Hebbian-Learning.md), `state_update`
* Supports pause/resume for game state changes

#### Neurogenesis Checks:

* Evaluates stress/novelty/reward triggers against configurable thresholds
* Emits `neurogenesis_result` signal with creation recommendations
* Handles emergency stress neuron creation when anxiety exceeds 90

#### Hebbian Learning:

* Selects top-k neuron pairs based on co-activation scores
* Includes anti-loop mechanisms (randomization, cooldown penalties on recently-used pairs)
* Can create new connections between previously unconnected co-active neurons
* Emits weight updates back to main thread for application

#### State Decay Processing:

* Applies temporal decay toward baseline for non-input neurons
* Adds small random noise for organic feel
* Propagates connection effects through the network

================================================
FILE: Docs/source-reference/custom_brain_loader.py.md
================================================
 #### custom_brain_loader.py
The brain architecture import/export system that allows custom neural network designs from the Brain Designer tool to be loaded into the live simulation. It handles parsing various brain file formats, applying the architecture to the running BrainWidget, and integrating with the save/load system so custom brains persist across game sessions. This is what makes the Brain Designer's output actually playable.

#### Global State Tracking:

* Tracks currently loaded custom brain name, definition, and source file path
* `has_custom_brain()` / `get_custom_brain_name()` — API for querying current state

#### BrainLoader Class:

* `show_dialog()` — opens brain selection UI
* `_parse(raw_data)` — normalizes different brain file formats into consistent structure
* `_apply(parsed_brain)` — applies positions, weights, and output bindings to live BrainWidget
* `reset_positions_to_default()` — restores original layout while preserving network structure

#### Save/Load Integration:

* `get_custom_brain_save_data()` — packages custom brain definition for game saves
* `restore_custom_brain_from_save()` — restores custom brain when loading a save
* `validate_custom_brain_save()` — checks if a save file's custom brain can be loaded
* `show_custom_brain_load_warning()` — warns user when loading saves with custom brains

#### BrainSelectDialog:

* File browser UI for .json brain files in the brains folder
* Shows metadata preview (neuron count, connection count, description)
* Supports browsing to external files or opening the brains folder

================================================
FILE: Docs/source-reference/designer_window.py.md
================================================
#### designer_window.py
This is the primary application shell for the neural network Designer.

#### Core Responsibilities:
* **Application Orchestration**: Manages the main window, menus, toolbars, and the splitter layout containing the canvas and property panels.
* **State Management**: Holds the active `BrainDesign` instance and coordinates "Undo/Redo" style refreshes across all sub-panels.
* **Live Game Bridge**: If the game is running, it allows the user to "Sync from Game" (import the current brain) or "Push to Game" (export the design to the live squid).
* **Network Generation**: Provides entry points for "Chaos Mode" or preset-based automated network generation using the `SparseNetworkGenerator`.

#### Key Functions:

* `setup_ui()` - Initializes the `BrainCanvas` and the vertical tabbed panels (Layers, Sensors, Properties, Connections, Outputs).
* `push_to_game()` - Converts the visual design into a format the game understands and sends it via the `brain_state_bridge`.
* `instant_random_generate()` - Triggers an instant "Chaos" shuffle of neuron positions and randomizes connections.
* `load_from_brain_widget_state()` - Allows the editor to be opened mid-game by importing the current state of the squid's brain.

#### Key internal objects:
`ScrollingTicker`: A specialized UI widget that scrolls rich-text help messages and shortcuts.
`BrainDesignerWindow`: The `QMainWindow` class that coordinates the canvas, side panels, and the bridge to the live game.

================================================
FILE: Docs/source-reference/main.py.md
================================================
### The Simulation Loop (main.py)
The simulation loop is driven by a QTimer from the PyQt5 framework, which "ticks" at a consistent rate. Each tick represents one frame of the simulation.

The loop has two key responsibilities:

**State Update**: On each tick, it calls the `update_game_state()` method. This function is responsible for everything that changes over time without direct user input. This includes:

* Decrementing the squid's needs (hunger, cleanliness, etc.).

* Calling the neural network to get the squid's next autonomous action.

* Executing the squid's chosen action (e.g., moving, interacting with an object).

* Updating animations.

**Rendering**: After the state has been updated, the loop tells the GUI to repaint itself, ensuring that the user always sees the most current state of the simulation.

================================================
FILE: Docs/source-reference/memory_manager.py.md
================================================
`MemoryManager` is designed to simulate a simple cognitive memory system with two main components:

#### Data Persistence and Initialization
* File Storage: Memory is persisted in two JSON files within a _memory directory: `ShortTerm.json` and `LongTerm.json`.

* `__init__` Method: Initializes memory paths, loads existing memory using _load_and_convert_timestamps, and sets operational limits:

* `self.short_term_limit` = 50: Maximum number of items in short-term memory (STM).

* `self.short_term_duration` = 300 (5 minutes): The lifespan for a short-term memory item before it's considered for cleanup or transfer.

* `_load_and_convert_timestamps`: A crucial helper method that handles loading memory from JSON. It's robust, attempting to convert string-based _ISO 8601_ timestamps (used for storage) into floating-point Unix timestamps (used for internal operations) to enable easy time-based comparisons.
* `save_memory`: The counterpart to the loading function. It takes the in-memory list and converts the internal float timestamps back to _ISO 8601_ strings before saving to the JSON file with indentation (indent=4).

-------------------------------

#### Short-Term Memory (STM) Management
STM is dynamic, time-limited, and its items have calculated metrics to determine their longevity.

`add_short_term_memory`: Adds a new memory item. If an item with the same category and key already exists, it reinforces the memory by increasing its importance by 0.5 and updating its timestamp.

It checks for immediate promotion: if importance reaches 3.0, it calls `transfer_to_long_term_memory`.

It enforces the `self.short_term_limit` by dropping the oldest memory (`pop(0)`) when the limit is exceeded (FIFO - First In, First Out).

`get_short_term_memory`: Retrieves a memory by category and key. It verifies the memory is still within the `self.short_term_duration`. A successful access increases the memory's `access_count`.

`cleanup_short_term_memory`: Removes expired memories (older than `self.short_term_duration`). If the list is still over the limit, it prunes based on a combined score of importance and access_count.

`get_active_memories_data`: Retrieves and formats memories that are still valid, sorting them by a combination of importance and access_count in descending order.

---------------------

#### Long-Term Memory (LTM) Management
LTM is for permanent or reinforced memories and is primarily concerned with deduplication.

`add_long_term_memory`: Adds a memory. It checks for duplicates based on category and key. If a memory already exists, it is not duplicated; instead, its timestamp is updated to reflect the reinforcement.

`get_all_long_term_memories`: Retrieves all LTM items, with an optional filter by category.

---------------


#### Transfer and Review Logic
This section defines the "learning" or "consolidation" process where temporary memories become permanent.

* `review_and_transfer_memories`: The core decay and promotion loop. It iterates through expired STM items.

* If an expired item meets the criteria in `should_transfer_to_long_term`, it's promoted using `transfer_to_long_term_memory`.

* Otherwise, the expired memory is simply removed from the STM.

* `periodic_memory_management`: A simple rate limiter that calls review_and_transfer_memories only if 30 seconds have passed since the last cleanup.

* `should_transfer_to_long_term`: Defines the promotion criteria:

1. importance >= 7 OR

1. access_count >= 3 OR

1. (importance >= 5 AND access_count >= 2)

* `transfer_to_long_term_memory`: Moves a memory from STM to LTM (using `add_long_term_memory` to handle LTM deduplication) and then removes it from the STM.


-------------------

#### Utility and Formatting
* `clear_short_term_memory` / `clear_all_memories`: Provides methods to reset one or both memory stores.

* `update_memory_importance`: Allows external logic to manually adjust the importance of an STM item.

* `format_memory`: A presentation method that takes a memory dictionary and returns an HTML-formatted string, color-coding the memory's interaction type (Positive/Negative/Neutral) based on its raw_value or category/key.

================================================
FILE: Docs/source-reference/neurogenesis_show.py.md
================================================
`neurogenesis_show.py` is the **“showman” layer** that wraps the real `EnhancedNeurogenesis` engine and adds **player-facing spectacle** without touching any of the underlying biology, caps, or cooldown logic. The wrapper is enabled by default (via config.ini) and is meant to make neurogenesis more fun/game-like versus biologically accurate. 

Disable the wrapper and neurogenesis will behave in a **more scientifically accurate way** (better suited for actual biological/neuro experiments)

#### 1. Guarantee the player *sees* a neuron

- If the real engine **would** create a neuron, this wrapper **always lets it spawn** (respects the same caps/cooldowns).  
- If the real engine **would NOT** create one, the showman can still **force an extra “dramatic” neuron** when something cool happens—**but only if showmanship is enabled in config**.


#### 2. Detect “cool moments”

`NeurogenesisEvent` enum + `_detect_dramatic_moment()`  
Monitors every experience context for **visually obvious milestones**:

| Event | Typical Threshold |
|---|---|
| `ANXIETY_SPIKE` | anxiety ≥ 70 |
| `CURIOSITY_EXPLOSION` | curiosity ≥ 75 |
| `HUNGER_SATISFIED` | reward trigger + eating action |
| `MAX_HAPPINESS` | happiness ≥ 85 |
| `SPOTLESS_TANK` | cleanliness ≥ 90 |
| `FIRST_DECORATION_PUSH` | “decoration” or “push” in recent actions |

These are **intentionally permissive**—the goal is “player smiles,” not “perfect biology.”


#### 3. Manual event triggers (achievement integration)

`trigger_event(NeurogenesisEvent.FOO)`  
Lets **external systems** (achievements, tutorials, Easter-egg code) **request** a showman neuron.  
Returns `True` if one was actually spawned (respects cooldown & config flag).


#### 4. Cosmetic upgrades

- **_rename_for_drama()** – replaces auto-generated names like `stress_anxiety_regulation_3` with cinematic ones:  
  `trauma`, `wonder_trigger`, `satisfaction_burst`, `discovery_rush`, …  
- **_burst_color()** – gives the newborn neuron a **10-second gold/crimson/mint “super-pulse”** instead of the normal 5-second blink.  
- **_migrate_neuron()** – atomically renames **every dictionary key, animation tracker, visible set, weight tuple, etc.** so the new pretty name is safe everywhere.


#### 5. Achievement callbacks

`set_callbacks(on_dramatic_neuron=…, on_event_triggered=…)`  
Fires when:  
- a showman neuron is actually spawned, or  
- any `NeurogenesisEvent` is recorded

#### 6. Config-aware passthrough

- Reads `[Neurogenesis] showmanship = True/False` **each time** (hot-switchable).  
- When disabled the class becomes a **transparent proxy**: every call falls straight through to the real engine with zero overhead.  
- Public API surface **mirrors** `EnhancedNeurogenesis` (`create_neuron`, `should_create_neuron`, `get_global_cooldown_remaining`, …) so the rest of the codebase never knows a wrapper exists.


#### 7. Bookkeeping

- `last_showman_creation` – 15-second **cosmetic cooldown** (independent of the real engine’s 60-second biological cooldown).  
- `_triggered_events` set – prevents **exact duplicate** “first” events within the same session.  
- `reset_events()` – clears history for **new game** or **load save**.


### TL;DR
`neurogenesis_show.py` is the **marketing department** of the neuron factory: it **sprinkles confetti** (dramatic names, longer pulses, extra neurons on cool moments) while **never overruling** the real biologist downstairs—unless the player explicitly turns off the show, in which case it **vanishes silently**.

================================================
FILE: Docs/source-reference/squid.py.md
================================================
`squid.py` file defines the Squid class, integrating various functionalities to simulate a living creature. It handles its own visual rendering and animation, calculates its movement, makes decisions based on its internal states and personality, and interacts with objects like food and decorations.

#### Core Responsibilities:

* **Physical Simulation**: Handles movement, animation frames, collision with boundaries, and "Inking" behaviors.
* **Internal State**: Tracks "Needs" (Hunger, Happiness, etc.) and "Goal Neurons" (Satisfaction, Anxiety, Curiosity).
* **Interaction Engine**: Manages picking up/throwing rocks, eating food, and reacting to other squids in a multiplayer environment.
* **Perception**: Acts as the primary interface for the VisionWorker, translating raw geometric vision data into behavioral triggers.

#### Key Functions:

* `update_view_direction()` - Makes the squid "scan" the tank; includes a "Hunger Bias" that forces it to look toward food.
* `eat()` - Processes food consumption, applies stat changes, and starts the "Poop Timer".
* `check_boundary_exit()` - Detects if the squid has swum off-screen to transition to a neighbour's tank in multiplayer mode.
* `startle_awake()` - Handles the logic for a rude awakening, including anxiety spikes and potential ink cloud creation.

#### Key internal objects:
* `self.mental_state_manager` – boolean flags + cooldowns
* `self.memory_manager` – short-term & long-term memory lists
* `self._decision_engine` – Q-learning / weight-based action picker
* `self.statistics` – personal lifetime counters (age, food eaten, rocks thrown…)

================================================
FILE: Docs/source-reference/tamagotchi_logic.py.md
================================================
View source: [tamagotchi_logic.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_LatestVersion/src/tamagotchi_logic.py) version 2.6.1.2

A **god-object** serving as the central game logic controller. Its primary purpose is to manage the core simulation loop, handle the squid's behaviour and needs, facilitate interactions with the environment, and integrate various game systems, including the neural network, memory, and save/load functionalities.


#### Responsibilities
* Owns the live pet simulation loop (`hunger`, `happiness`, `sickness`, `sleep`, etc.).
* Spawns and manages world objects: food, poop, decorations, rocks.
* Runs every-frame update (movement, collisions, timers, cooldowns).
* Handles user actions: feed, clean, medicine, speed changes, window resize.
* Coordinates save / load of the entire game state (squid, memories, decorations, brain).
* Hosts the [plugin](../engine/Plugin-System.md) system (achievements, multiplayer, etc.) and fires hooks.
* Owns statistics & scoring (distance swam, food eaten, startles, ink clouds…).
* Bridges pet ← → brain:
1. – copies squid stats into the neural network so the network mirrors the pet.
2. – reads learned weights back from the network to influence future decisions.


#### Key internal objects
* `self.squid` – the pet instance ([squid.py](../source-reference/squid.py.md))
* `self.brain_window` – the debug UI ([brain_tool.py](../source-reference/brain_tool.py.md))
* `self.food_items` / `poop_items` / `rock_items` – lists of QGraphicsItems
* `self.neurogenesis_triggers` – counters that tell the brain when to grow new neurons
* `self.plugin_manager` – loads & runs plugins (multiplayer, achievements, …)


----------------------------------

* `TamagotchiLogic.__init__()` constructs the Squid and keeps a reference.
* Squid receives a back-reference (`self.tamagotchi_logic`) so it can:
1. – ask for nearby decorations / food
2. – tell the logic when it threw a rock (for RL reward)
3. – trigger plugin hooks

#### Data flow every frame:
* `TamagotchiLogic.update_simulation`()
* → calls `squid.move_squid`()
* → copies `squid.hunger` / `happiness` / `anxiety` … into a dict
* → sends dict to `brain_window.update_brain`() (neural network)
* Neural network learns, may create new neurons, returns updated weights.
* `TamagotchiLogic` reads those weights and/or calls `squid.make_decision`() which uses them.
* Save / load
* `TamagotchiLogic.save_game`() asks `squid.save_state`() for the pet slice, then bundles it with brain data, memories, decorations, achievements.
On load the reverse happens; afterwards `sync_state_from_squid`() is called so the squid remains the single source of truth for core stats.

#### Plugin hooks:
Any time a Squid property changes (via its setters) it fires tamagotchi_logic.plugin_manager.trigger_hook("on_hunger_change", …)
so plugins (achievements, multiplayer, etc.) can react.

================================================
FILE: Docs/source-reference/vision_worker.py.md
================================================
#### vision_worker.py
This is the computational engine of the squid's perception. It runs as a background thread (QThread) to ensure that geometric calculations do not "freeze" the main game animations.

#### Core Responsibilities:
* **Asynchronous Calculation**: Performs vision cone and proximity checks at a fixed frequency (20Hz) **independently of the main game loop**.
* **Vision Cone Logic**: Determines if objects (food, rocks, plants) are within the squid's 80-degree field of view by calculating the angular difference between the squid's gaze and the object's position.
* **Proximity Sensing**: Calculates "tactile" proximity to plants. Unlike the vision cone, this uses bounding-box edge distances to detect if the squid is touching or near a plant (0–100 range).
* **Change Detection**: It monitors the environment and only "alerts" the squid via signals when something meaningful changes (e.g., food just appeared in view).

#### Key Functions:

* `_calculate_visibility()` - The math core; checks every scene object against the vision cone and calculates distances.
* `update_squid_state()` - Receives the squid's current X/Y and gaze angle from the main thread.
* `update_scene_objects()` - Receives a lightweight list of all items currently in the tank.
* `_check_and_emit_changes()` - Fires signals like `food_visibility_changed` or `plant_proximity_changed` only when state shifts.

#### Key internal objects

* `SquidVisionState`: A data class containing a snapshot of the squid's position, size, and gaze angle.
* `SceneObject`: A lightweight representation of a world object (food, plant, rock) used for visibility checks.
* `VisionResult`: A container for the output of a vision cycle, listing visible items and proximity values.
* `VisionWorker`: The QThread subclass that constantly calculates what is inside the vision cone.


----------------------

#### "Producer-Consumer" model:

1.  **Input**: [`Squid.py`](../source-reference/squid.py.md) periodically sends its position to the `VisionWorker`.
2.  **Processing**: `VisionWorker` (in the background) identifies what is visible and sends a `VisionResult` back to the Squid.
3.  **Behaviour**: The Squid uses that result to decide if it should chase food or feel calm near a plant.
4.  **Display**: If the VisionWindow is open, it reads those same results to display the "Visible Objects" list to the user.

* **Note:** The VisionWorker includes a "Circuit Breaker" logic to prevent the squid from chasing "ghost food" that was just eaten but hasn't been cleared from the background thread's cache yet.

================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


================================================
FILE: README.md
================================================

_"What if a Tamagotchi had a neural network and could learn stuff?"_ - [Gigazine](https://gigazine.net/gsc_news/en/20250505-dosidicus-electronicae/) , [Hackaday](https://hackaday.com/2025/04/26/digital-squids-behavior-shaped-by-neural-network/)

<p align="left">
  <img src="https://img.shields.io/badge/AI-Neural_Network-9C27B0?style=flat&logo=mindmeister&logoColor=white" height="20" alt="AI">
  <img src="https://img.shields.io/badge/License-GPL_v2-blue.svg?style=flat" height="20" alt="GPL-2.0">
  <img src="https://img.shields.io/badge/Translations-7-228B22?style=flat&logo=google-translate&logoColor=white&labelColor=333333" height="20" alt="Translations">
    <a href="https://buymeacoffee.com/vicioussquid"><img src="https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=flat&logo=buy-me-a-coffee&logoColor=black" height="20" alt="Buy Me A Coffee"></a>
</p>

# _Dosidicus electronicus_

_A transparent cognitive sandbox disguised as a digital pet squid with a neural network you can **see thinking**_

- Part **educational neuro tool**, part **sim game**, part **fever dream**
- A unique intersection of 1990s retro-gaming aesthetic and modern computational neuroscience.
- [Build-your-own neural network](https://github.com/ViciousSquid/Dosidicus/wiki/Brain-Designer) - learn how an NN works  by **raising one as a pet**

### Compiled binaries for Windows, Mac and Linux: [see Releases](https://github.com/ViciousSquid/Dosidicus/releases) page

```bash
curl -sSL https://raw.githubusercontent.com/ViciousSquid/Dosidicus/2.6.2.0_LatestVersion/linux_setup.sh | bash
```

<img width="2482" height="980" alt="image" src="https://github.com/user-attachments/assets/02119926-47f7-4bfb-96b9-457d470064e4" />
<img src="https://github.com/user-attachments/assets/496cec0d-0810-4f47-8618-11165e0dd50d" width="380">

---

## [Manifesto](https://github.com/ViciousSquid/Dosidicus/wiki/Cognitive-Sandbox-Manifesto-%7C-Artificial-Life-and-Transparent-Neural-Systems) | [Wiki](https://github.com/ViciousSquid/Dosidicus/wiki) | [Changelog](https://github.com/ViciousSquid/Dosidicus/wiki/changelog)

---

## **Myth & Mechanism**

Dosidicus is a digital squid born with a randomly wired brain.

Feed him, stimulate neurons, watch him learn.

- He starts with 8 neurons.
- He grows new structure via **neurogenesis** and rewires using **Hebbian learning**
- He forms memories.
- He develops quirks.

Every squid is different.
Every save file is a cognitive history.

#### Under the hood runs [**STRINg** simulation engine](https://github.com/ViciousSquid/Dosidicus/wiki/Engine-overview):

* Built from scratch in NumPy
* No TensorFlow. No PyTorch. No NEAT.
* Fully visible neuron activations
* Structural growth over time
* Dual memory system
* Headless training mode
* Most AI is a black box: Dosidicus lets you see the mind forming - every neuron is visible, stimulatable, understandable.

The squid serves as a digital pioneer in our quest to understand the mechanisms of thought and the evolution of autonomy in a synthetic world.

Want the full conceptual philosophy behind Dosidicus? Read the [Cognitive Sandbox Manifesto](https://github.com/ViciousSquid/Dosidicus/wiki/Cognitive-Sandbox-Manifesto-%7C-Artificial-Life-and-Transparent-Neural-Systems)

---

## Share Your Squid

No two squids are wired the same.

Early interactions permanently alter their structure.
Tiny differences amplify.
Habits form. Fears emerge. Personalities drift.

Your squid's brain is a cognitive history - shaped by you.

So share it.

- Export save files and let others explore your squid's neural structure.
- Post screenshots of strange activation patterns and unexpected growth.
- Show bizarre learned behaviors (Why is yours afraid of poop?)
- Compare cognitive histories and trace how experience shaped structure.

- Did yours grow 40 neurons?
- Did it develop a persistent avoidance loop?
- Did you accidentally create a neurotic reward spiral?

Every squid is an experiment.

---

## Docker

Two targets are provided: `headless` (CLI trainer) and `gui` (PyQt5 app with X11).

Headless (recommended for containers):
```bash
docker build -t dosidicus:headless --target headless .
docker run --rm -v ${PWD}/headless_output:/app/output dosidicus:headless --ticks 10000 --output /app/output/trained_brain.json
```

GUI (Linux host with X11 or WSLg):
```bash
docker build -t dosidicus:gui --target gui .
docker run --rm \
  -e DISPLAY=$DISPLAY \
  -e QT_X11_NO_MITSHM=1 \
  -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
  -v ${PWD}/saves:/app/saves \
  -v ${PWD}/logs:/app/logs \
  dosidicus:gui
```

Compose:
```bash
docker compose up --build
docker compose --profile gui up --build
```

WSLg note: If the GUI fails to start with a Qt platform plugin error, try:
```bash
export QT_QPA_PLATFORM=wayland
docker compose --profile gui up --build
```

Note: On Windows without WSLg, you will need an X server and a valid `DISPLAY` value to run the GUI container.

Note: Attempting to build the Docker container on Windows ARM64 will fail because there is no pyqt5 wheel [[32]](https://github.com/ViciousSquid/Dosidicus/pull/32) -  Use the prebuilt binary from [releases](https://github.com/ViciousSquid/Dosidicus/releases/tag/v2.6.2.0) instead

Troubleshooting (quick):
- If `DISPLAY` is empty in WSL: WSLg is not active. Use WSLg or run an X server on Windows.
- If Docker errors mention `docker_engine`/pipe not found: start Docker Desktop and ensure WSL integration is enabled.
- If GUI still exits with Qt plugin errors: rebuild the image (`docker compose --profile gui build --no-cache`) and retry.

---

## Project Overview

-  41,636 lines, one developer, 28 months, GPL 2.0 license

- **Dependencies:**
  - Python ^3.9
  - PyQt5 ^5.15 (GUI framework)
  - numpy ^1.21 (neural network computations)
  - **OPTIONAL** onnxruntime or onnxruntime-directml ([more info](https://github.com/ViciousSquid/Dosidicus/wiki/AI-accelerator-support))
- **Core Structure:** Modular codebase in `src/` including brain designer, decision engine, learning algorithms, personality traits, memory management, UI components, and interaction systems. Entry point via `main.py`.

### Key Project Components
- **Plugin System:** Extensible architecture with built-in plugins for achievements (tracking milestones) and multiplayer (networked interactions).
- **Save System:** Persistent saves in `saves/` for pet states, autosaves, and achievement logs.
- **Headless Mode:** Standalone training and simulation in `headless/` for GUI-less operation, ideal for background training or server environments (experimental)
- **Custom Brains:** Library of pre-configured neural networks in `custom_brains/` (e.g., "Plant-Seeker", "Insomniac") for quick behavior setup.
- **Memory Management:** Dual memory system (`_memory/`) with long-term and short-term storage for learning persistence.
- **Examples and Tools:** Example squids, configuration files (`config.ini`), and version tracking.

---

### A year ago I got a **tattoo of this project** to celebrate its first development milestone!

<img src="https://github.com/user-attachments/assets/fe50e8d8-cb76-4b20-830a-ea6af28bb608" width="250">

---

![Visitors](https://api.visitorbadge.io/api/visitors?path=ViciousSquid&label=UNIQUE%20VISITORS&countColor=%2326313f&style=flat)


================================================
FILE: config.ini
================================================
[General]
language = en

[Debug]
multiplayer_debug = False

[Compute]
backend = numpy

[Display]
neuron_label_font_size = 8
neuron_radius = 14
connection_line_width = 1.5
button_font_size = 16
button_width = 140
button_height = 50
button_spacing = 20

[RockInteractions]
pickup_probability = 0.7
throw_probability = 0.4
min_carry_duration = 4.0
max_carry_duration = 10.0
cooldown_after_throw = 10.0
happiness_boost = 9
satisfaction_boost = 11
anxiety_reduction = 9
memory_decay_rate = 0.98
max_rock_memories = 10

[Neurogenesis]
enabled = True
showmanship = True
pruning_enabled = True
cooldown = 60.0
per_type_cooldown = 30.0
max_novelty_neurons = 5
pattern_threshold = 3
experience_buffer_size = 50
min_utility_for_keep = 0.2
max_neurons = 128
initial_neuron_count = 7
max_hebbian_pairs = 2

[Neurogenesis.Novelty]
enabled = True
threshold = 3.0
decay_rate = 0.85
max_counter = 10.0
min_curiosity = 0.3
adventurous_modifier = 1.2
timid_modifier = 0.8

[Neurogenesis.Stress]
enabled = True
threshold = 2.0
decay_rate = 0.85
max_counter = 10.0
min_anxiety = 0.4
timid_modifier = 1.5
energetic_modifier = 0.7

[Neurogenesis.Reward]
enabled = True
threshold = 2.5
decay_rate = 0.85
max_counter = 8.0
min_satisfaction = 0.5
boost_multiplier = 1.1

[Neurogenesis.SpecialisationCaps]
novelty_object_investigation = 8

[Neurogenesis.NeuronProperties]
base_activation = 0.5
position_variance = 75
default_connections = True
connection_strength = 0.35
reciprocal_strength = 0.15
randomize_start_positions = True
canvas_padding = 60
centering_force = 0.02
force_bounds = True

[Neurogenesis.VisualEffects]
highlight_duration = 5.0
highlight_radius = 40
pulse_effect = True
pulse_speed = 0.5
animation_style = pattern_1

[Neurogenesis.Appearance]
novelty_color = 255,255,150
stress_color = 255,150,150
reward_color = 150,255,150
novelty_shape = triangle
stress_shape = square
reward_shape = circle

[Hebbian]
learning_interval = 30
base_learning_rate = 0.12
weight_decay = 0.01
min_weight = -1.0
max_weight = 1.0
max_hebbian_pairs = 2

[LinkBlink]
interval_min = 8.0
interval_max = 20.0
blink_duration = 2.0

[Animation]
style = vibrant

[Designer]
designer_min_neuron_distance = 90
designer_max_neuron_distance = 200

[Facts]
enabled = True
interval_minutes = 6
display_seconds = 12

[Sleep]
recovery_per_second = 28.0
happiness_boost = 0.45
satisfaction_boost = 0.35
sink_speed = 0.58
bottom_padding = 25
bob_amount = 1.2




================================================
FILE: custom_brains/Bathtub.json
================================================
{
  "version": "2.0",
  "format": "dosidicus",
  "metadata": {
    "name": "Bathtub",
    "description": "",
    "author": "Rufus Pearce",
    "version": "1.0",
    "created": "10-12-25",
    "modified": ""
  },
  "neurons": {
    "hunger": {
      "position": [
        127.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "happiness": {
      "position": [
        392.0,
        63.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "cleanliness": {
      "position": [
        627.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "sleepiness": {
      "position": [
        840.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "satisfaction": {
      "position": [
        271.0,
        380.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "anxiety": {
      "position": [
        491.0,
        389.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "curiosity": {
      "position": [
        701.0,
        386.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "can_see_food": {
      "position": [
        260.0,
        151.0
      ],
      "type": "sensor",
      "is_binary": true,
      "is_core": false,
      "is_sensor": true,
      "activation": 0.0
    }
  },
  "connections": {
    "sleepiness->anxiety": 0.125,
    "hunger->satisfaction": -0.344,
    "cleanliness->happiness": 0.296,
    "sleepiness->happiness": -0.355,
    "can_see_food->hunger": 0.25,
    "happiness->satisfaction": 0.164,
    "anxiety->curiosity": -0.375,
    "sleepiness->curiosity": -0.17,
    "satisfaction->hunger": -0.064,
    "curiosity->happiness": 0.299,
    "satisfaction->anxiety": -0.34,
    "can_see_food->curiosity": 0.191,
    "anxiety->happiness": -0.418,
    "hunger->happiness": -0.189,
    "happiness->anxiety": -0.228,
    "anxiety->satisfaction": -0.13,
    "satisfaction->happiness": 0.364,
    "anxiety->sleepiness": 0.096
  },
  "state": {
    "hunger": 50.0,
    "happiness": 50.0,
    "cleanliness": 50.0,
    "sleepiness": 50.0,
    "satisfaction": 50.0,
    "anxiety": 50.0,
    "curiosity": 50.0,
    "can_see_food": false
  },
  "excluded_neurons": [],
  "neuron_positions": {
    "hunger": [
      127.0,
      81.0
    ],
    "happiness": [
      392.0,
      63.0
    ],
    "cleanliness": [
      627.0,
      81.0
    ],
    "sleepiness": [
      840.0,
      81.0
    ],
    "satisfaction": [
      271.0,
      380.0
    ],
    "anxiety": [
      491.0,
      389.0
    ],
    "curiosity": [
      701.0,
      386.0
    ],
    "can_see_food": [
      260.0,
      151.0
    ]
  },
  "weights": {
    "sleepiness|anxiety": 0.125,
    "hunger|satisfaction": -0.344,
    "cleanliness|happiness": 0.296,
    "sleepiness|happiness": -0.355,
    "can_see_food|hunger": 0.25,
    "happiness|satisfaction": 0.164,
    "anxiety|curiosity": -0.375,
    "sleepiness|curiosity": -0.17,
    "satisfaction|hunger": -0.064,
    "curiosity|happiness": 0.299,
    "satisfaction|anxiety": -0.34,
    "can_see_food|curiosity": 0.191,
    "anxiety|happiness": -0.418,
    "hunger|happiness": -0.189,
    "happiness|anxiety": -0.228,
    "anxiety|satisfaction": -0.13,
    "satisfaction|happiness": 0.364,
    "anxiety|sleepiness": 0.096
  },
  "layer_structure": [],
  "neuron_details": {
    "hunger": {
      "name": "hunger",
      "neuron_type": "core",
      "position": [
        127.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "happiness": {
      "name": "happiness",
      "neuron_type": "core",
      "position": [
        392.0,
        63.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "cleanliness": {
      "name": "cleanliness",
      "neuron_type": "core",
      "position": [
        627.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "sleepiness": {
      "name": "sleepiness",
      "neuron_type": "core",
      "position": [
        840.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "satisfaction": {
      "name": "satisfaction",
      "neuron_type": "core",
      "position": [
        271.0,
        380.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "anxiety": {
      "name": "anxiety",
      "neuron_type": "core",
      "position": [
        491.0,
        389.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "curiosity": {
      "name": "curiosity",
      "neuron_type": "core",
      "position": [
        701.0,
        386.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core"
    },
    "can_see_food": {
      "name": "can_see_food",
      "neuron_type": "sensor",
      "position": [
        260.0,
        151.0
      ],
      "layer_index": 0,
      "color": [
        100,
        180,
        100
      ],
      "description": "Required neuron",
      "is_binary": true,
      "category": "required"
    }
  },
  "sensors_used": [
    "can_see_food"
  ],
  "required_complete": true
}

================================================
FILE: custom_brains/Change_colour_when_see_food.json
================================================
{
  "version": "2.0",
  "format": "dosidicus",
  "metadata": {
    "name": "Change_colour_when_see_food",
    "description": "Green when food is visible / red when not",
    "author": "Rufus Pearce",
    "version": "1.0",
    "created": "",
    "modified": ""
  },
  "neurons": {
    "can_see_food": {
      "position": [
        50.0,
        200.0
      ],
      "type": "sensor",
      "is_binary": true,
      "is_core": false,
      "is_sensor": true,
      "activation": 0.0
    },
    "hunger": {
      "position": [
        127.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "happiness": {
      "position": [
        361.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "cleanliness": {
      "position": [
        627.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "sleepiness": {
      "position": [
        840.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "satisfaction": {
      "position": [
        271.0,
        380.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "anxiety": {
      "position": [
        491.0,
        389.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "curiosity": {
      "position": [
        701.0,
        386.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "activation": 50.0
    },
    "novelty_object_investigation": {
      "position": [
        515.2635423006693,
        185.04889429904628
      ],
      "type": "hidden",
      "is_binary": false,
      "is_core": false,
      "is_sensor": false,
      "activation": 0.0
    }
  },
  "connections": {
    "cleanliness->happiness": 0.141,
    "satisfaction->happiness": 0.37,
    "can_see_food->satisfaction": 0.24,
    "can_see_food->hunger": 0.29,
    "curiosity->satisfaction": 0.212,
    "satisfaction->curiosity": 0.36463690000000004,
    "novelty_object_investigation->hunger": -0.7280000000000001,
    "novelty_object_investigation->happiness": 0.5152000000000035,
    "novelty_object_investigation->satisfaction": 0.8,
    "novelty_object_investigation->curiosity": 0.7,
    "novelty_object_investigation->anxiety": -0.4,
    "hunger->novelty_object_investigation": -0.7280000000000001,
    "happiness->novelty_object_investigation": 0.5152000000000035,
    "satisfaction->novelty_object_investigation": 0.98308,
    "curiosity->novelty_object_investigation": 0.7,
    "anxiety->novelty_object_investigation": -0.4,
    "can_see_food->can_see_food": -0.8,
    "novelty_object_investigation->novelty_object_investigation": -0.8
  },
  "state": {
    "can_see_food": false,
    "hunger": 50.0,
    "happiness": 50.0,
    "cleanliness": 50.0,
    "sleepiness": 50.0,
    "satisfaction": 50.0,
    "anxiety": 50.0,
    "curiosity": 50.0,
    "novelty_object_investigation": 0.0
  },
  "neuron_shapes": {
    "can_see_food": "square",
    "hunger": "circle",
    "happiness": "circle",
    "cleanliness": "circle",
    "sleepiness": "circle",
    "satisfaction": "circle",
    "anxiety": "circle",
    "curiosity": "circle",
    "novelty_object_investigation": "diamond"
  },
  "excluded_neurons": [],
  "output_bindings": [
    {
      "neuron_name": "can_see_food",
      "output_hook": "neuron_output_change_color",
      "threshold": 90.0,
      "trigger_mode": "above",
      "cooldown": 1.0,
      "enabled": true,
      "hook_params": {
        "red": 170,
        "green": 255,
        "blue": 127
      }
    },
    {
      "neuron_name": "can_see_food",
      "output_hook": "neuron_output_change_color",
      "threshold": 40.0,
      "trigger_mode": "below",
      "cooldown": 1.0,
      "enabled": true,
      "hook_params": {
        "red": 255,
        "green": 255,
        "blue": 255
      }
    }
  ],
  "neuron_positions": {
    "can_see_food": [
      50.0,
      200.0
    ],
    "hunger": [
      127.0,
      81.0
    ],
    "happiness": [
      361.0,
      81.0
    ],
    "cleanliness": [
      627.0,
      81.0
    ],
    "sleepiness": [
      840.0,
      81.0
    ],
    "satisfaction": [
      271.0,
      380.0
    ],
    "anxiety": [
      491.0,
      389.0
    ],
    "curiosity": [
      701.0,
      386.0
    ],
    "novelty_object_investigation": [
      515.2635423006693,
      185.04889429904628
    ]
  },
  "weights": {
    "cleanliness|happiness": 0.141,
    "satisfaction|happiness": 0.37,
    "can_see_food|satisfaction": 0.24,
    "can_see_food|hunger": 0.29,
    "curiosity|satisfaction": 0.212,
    "satisfaction|curiosity": 0.36463690000000004,
    "novelty_object_investigation|hunger": -0.7280000000000001,
    "novelty_object_investigation|happiness": 0.5152000000000035,
    "novelty_object_investigation|satisfaction": 0.8,
    "novelty_object_investigation|curiosity": 0.7,
    "novelty_object_investigation|anxiety": -0.4,
    "hunger|novelty_object_investigation": -0.7280000000000001,
    "happiness|novelty_object_investigation": 0.5152000000000035,
    "satisfaction|novelty_object_investigation": 0.98308,
    "curiosity|novelty_object_investigation": 0.7,
    "anxiety|novelty_object_investigation": -0.4,
    "can_see_food|can_see_food": -0.8,
    "novelty_object_investigation|novelty_object_investigation": -0.8
  },
  "layer_structure": [],
  "neuron_details": {
    "can_see_food": {
      "name": "can_see_food",
      "neuron_type": "sensor",
      "position": [
        50.0,
        200.0
      ],
      "layer_index": 0,
      "color": [
        100,
        180,
        100
      ],
      "description": "",
      "is_binary": true,
      "category": "required",
      "shape": "square"
    },
    "hunger": {
      "name": "hunger",
      "neuron_type": "core",
      "position": [
        127.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "happiness": {
      "name": "happiness",
      "neuron_type": "core",
      "position": [
        361.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "cleanliness": {
      "name": "cleanliness",
      "neuron_type": "core",
      "position": [
        627.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "sleepiness": {
      "name": "sleepiness",
      "neuron_type": "core",
      "position": [
        840.0,
        81.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "satisfaction": {
      "name": "satisfaction",
      "neuron_type": "core",
      "position": [
        271.0,
        380.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "anxiety": {
      "name": "anxiety",
      "neuron_type": "core",
      "position": [
        491.0,
        389.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "curiosity": {
      "name": "curiosity",
      "neuron_type": "core",
      "position": [
        701.0,
        386.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "core",
      "shape": "circle"
    },
    "novelty_object_investigation": {
      "name": "novelty_object_investigation",
      "neuron_type": "hidden",
      "position": [
        515.2635423006693,
        185.04889429904628
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "",
      "is_binary": false,
      "category": "custom",
      "shape": "diamond"
    }
  },
  "sensors_used": [
    "can_see_food"
  ],
  "required_complete": true
}

================================================
FILE: custom_brains/Dense_connections.json
================================================
{
  "version": "2.0",
  "format": "dosidicus",
  "metadata": {
    "name": "Dense connections",
    "description": "Many many young connections",
    "author": "Rufus Pearce",
    "version": "1.0",
    "created": "22-12-25",
    "modified": ""
  },
  "neurons": {
    "hunger": {
      "position": [
        95.0,
        46.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "happiness": {
      "position": [
        361.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "cleanliness": {
      "position": [
        627.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "sleepiness": {
      "position": [
        840.0,
        81.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "satisfaction": {
      "position": [
        271.0,
        380.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "anxiety": {
      "position": [
        491.0,
        389.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "curiosity": {
      "position": [
        701.0,
        386.0
      ],
      "type": "core",
      "is_binary": false,
      "is_core": true,
      "is_sensor": false,
      "is_custom": false,
      "activation": 50.0
    },
    "can_see_food": {
      "position": [
        50.0,
        200.0
      ],
      "type": "sensor",
      "is_binary": true,
      "is_core": false,
      "is_sensor": true,
      "is_custom": false,
      "activation": 0.0
    }
  },
  "connections": {
    "happiness->anxiety": -0.2,
    "can_see_food->curiosity": 0.27,
    "sleepiness->curiosity": -0.309,
    "can_see_food->anxiety": -0.137,
    "hunger->can_see_food": -0.035,
    "satisfaction->anxiety": -0.216,
    "happiness->satisfaction": 0.32,
    "cleanliness->satisfaction": 0.035,
    "hunger->anxiety": 0.333,
    "hunger->curiosity": 0.204,
    "happiness->curiosity": 0.227,
    "happiness->can_see_food": -0.297,
    "cleanliness->anxiety": -0.141,
    "satisfaction->curiosity": 0.187,
    "cleanliness->happiness": 0.391,
    "anxiety->can_see_food": 0.206,
    "anxiety->happiness": -0.229,
    "satisfaction->cleanliness": -0.207,
    "curiosity->hunger": -0.142,
    "curiosity->happiness": 0.082,
    "sleepiness->anxiety": -0.025,
    "can_see_food->hunger": 0.347,
    "curiosity->sleepiness": 0.084,
    "anxiety->curiosity": -0.309,
    "anxiety->satisfaction": 0.257,
    "happiness->cleanliness": -0.187,
    "satisfaction->happiness": -0.313,
    "curiosity->satisfaction": -0.173,
    "hunger->satisfaction": -0.42,
    "anxiety->sleepiness": 0.197,
    "anxiety->hunger": -0.239,
    "happiness->sleepiness": -0.025,
    "hunger->happiness": -0.131,
    "curiosity->can_see_food": -0.256,
    "sleepiness->satisfaction": -0.229,
    "anxiety->cleanliness": 0.156,
    "satisfaction->hunger": 0.046,
    "sleepiness->happiness": -0.246,
    "can_see_food->happiness": 0.232,
    "curiosity->anxiety": -0.037,
    "satisfaction->sleepiness": 0.066
  },
  "state": {
    "hunger": 50.0,
    "happiness": 50.0,
    "cleanliness": 50.0,
    "sleepiness": 50.0,
    "satisfaction": 50.0,
    "anxiety": 50.0,
    "curiosity": 50.0,
    "can_see_food": false
  },
  "neuron_shapes": {
    "hunger": "circle",
    "happiness": "circle",
    "cleanliness": "circle",
    "sleepiness": "circle",
    "satisfaction": "circle",
    "anxiety": "circle",
    "curiosity": "circle",
    "can_see_food": "square"
  },
  "excluded_neurons": [],
  "output_bindings": [],
  "neuron_positions": {
    "hunger": [
      95.0,
      46.0
    ],
    "happiness": [
      361.0,
      81.0
    ],
    "cleanliness": [
      627.0,
      81.0
    ],
    "sleepiness": [
      840.0,
      81.0
    ],
    "satisfaction": [
      271.0,
      380.0
    ],
    "anxiety": [
      491.0,
      389.0
    ],
    "curiosity": [
      701.0,
      386.0
    ],
    "can_see_food": [
      50.0,
      200.0
    ]
  },
  "weights": {
    "happiness|anxiety": -0.2,
    "can_see_food|curiosity": 0.27,
    "sleepiness|curiosity": -0.309,
    "can_see_food|anxiety": -0.137,
    "hunger|can_see_food": -0.035,
    "satisfaction|anxiety": -0.216,
    "happiness|satisfaction": 0.32,
    "cleanliness|satisfaction": 0.035,
    "hunger|anxiety": 0.333,
    "hunger|curiosity": 0.204,
    "happiness|curiosity": 0.227,
    "happiness|can_see_food": -0.297,
    "cleanliness|anxiety": -0.141,
    "satisfaction|curiosity": 0.187,
    "cleanliness|happiness": 0.391,
    "anxiety|can_see_food": 0.206,
    "anxiety|happiness": -0.229,
    "satisfaction|cleanliness": -0.207,
    "curiosity|hunger": -0.142,
    "curiosity|happiness": 0.082,
    "sleepiness|anxiety": -0.025,
    "can_see_food|hunger": 0.347,
    "curiosity|sleepiness": 0.084,
    "anxiety|curiosity": -0.309,
    "anxiety|satisfaction": 0.257,
    "happiness|cleanliness": -0.187,
    "satisfaction|happiness": -0.313,
    "curiosity|satisfaction": -0.173,
    "hunger|satisfaction": -0.42,
    "anxiety|sleepiness": 0.197,
    "anxiety|hunger": -0.239,
    "happiness|sleepiness": -0.025,
    "hunger|happiness": -0.131,
    "curiosity|can_see_food": -0.256,
    "sleepiness|satisfaction": -0.229,
    "anxiety|cleanliness": 0.156,
    "satisfaction|hunger": 0.046,
    "sleepiness|happiness": -0.246,
    "can_see_food|happiness": 0.232,
    "curiosity|anxiety": -0.037,
    "satisfaction|sleepiness": 0.066
  },
  "layer_structure": [],
  "neuron_details": {
    "hunger": {
      "name": "hunger",
      "neuron_type": "core",
      "position": [
        95.0,
        46.0
      ],
      "layer_index": 0,
      "color": [
        150,
        150,
        220
      ],
      "description": "Required neuron",
      "is_binary": false,
      "category": "core",
      "shape": "circle",
      "is_custom": false,
      "bias": 0.0
    },
    "happiness": {
      "name":
Download .txt
gitextract_di5h6smx/

├── .dockerignore
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── submit_squid.yml
│   └── workflows/
│       ├── build-nuitka.yml
│       └── process_submission.yml
├── CONTRIBUTING.md
├── Dockerfile
├── Docs/
│   ├── Cognitive Sandbox Manifesto - Artificial Life and Transparent Neural Systems.md
│   ├── README.md
│   ├── brain-tool/
│   │   ├── Brain-Designer.md
│   │   ├── Brain-Trainer-Headless.md
│   │   ├── Decisions-Tab.md
│   │   ├── Learning-Tab.md
│   │   ├── Memory-Tab.md
│   │   ├── Network-Tab.md
│   │   ├── Neuron-Laboratory.md
│   │   └── Personality-Tab.md
│   ├── engine/
│   │   ├── Data-Flow-Summary.md
│   │   ├── Decision-Engine.md
│   │   ├── Engine-Overview.md
│   │   ├── Multiplayer.md
│   │   ├── Plugin-Hooks.md
│   │   ├── Plugin-System.md
│   │   ├── Save-File-Format.md
│   │   └── config.ini.md
│   ├── extras/
│   │   ├── Achievements.md
│   │   ├── Decoration-Window.md
│   │   ├── Easter-Eggs.md
│   │   ├── SaveViewer.md
│   │   └── UUID.md
│   ├── getting-started/
│   │   ├── Care-Guide.md
│   │   ├── Changelog.md
│   │   ├── Example-Squids.md
│   │   └── Home.md
│   ├── neural-network/
│   │   ├── AI-Accelerator-Support.md
│   │   ├── Experience-Buffer.md
│   │   ├── Hebbian-Learning.md
│   │   ├── Neurogenesis.md
│   │   ├── Personality.md
│   │   ├── STDP.md
│   │   ├── Technical-Overview.md
│   │   └── Vision-System.md
│   └── source-reference/
│       ├── brain_neuron_hooks.py.md
│       ├── brain_neuron_outputs.py.md
│       ├── brain_render_worker.py.md
│       ├── brain_tool.py.md
│       ├── brain_widget.py.md
│       ├── brain_worker.py.md
│       ├── custom_brain_loader.py.md
│       ├── designer_window.py.md
│       ├── main.py.md
│       ├── memory_manager.py.md
│       ├── neurogenesis_show.py.md
│       ├── squid.py.md
│       ├── tamagotchi_logic.py.md
│       └── vision_worker.py.md
├── LICENSE
├── README.md
├── config.ini
├── custom_brains/
│   ├── Bathtub.json
│   ├── Change_colour_when_see_food.json
│   ├── Dense_connections.json
│   ├── Feed-Forward-Hidden-Layer.json
│   ├── Feeling-Blue.json
│   ├── Grasshopper.json
│   ├── Healthy_Interests.json
│   ├── L'insomniaque.json
│   ├── Minimal.json
│   ├── Plant-Seeker.json
│   └── readme.md
├── docker-compose.yml
├── example_squids/
│   └── readme.md
├── extras/
│   ├── SaveViewer.html
│   ├── SquidBreeder.html
│   ├── StepTrainer.html
│   └── brain_2_keras.py
├── headless/
│   ├── HeadlessLauncher.jsx
│   ├── README.md
│   ├── headless_launcher.html
│   └── headless_trainer.py
├── images/
│   └── decoration/
│       └── DecorationsFolder
├── linux_setup.sh
├── main.py
├── plugins/
│   ├── achievements/
│   │   ├── __init__.py
│   │   ├── achievements_data.py
│   │   ├── display_scaling.py
│   │   └── main.py
│   ├── multiplayer/
│   │   ├── __init__.py
│   │   ├── main.py
│   │   ├── mp_constants.py
│   │   ├── mp_network_node.py
│   │   ├── mp_plugin_logic.py
│   │   ├── multiplayer_config_dialog.py
│   │   ├── multiplayer_events.py
│   │   ├── multiplayer_status_widget.py
│   │   ├── network_utilities.py
│   │   ├── packet_validator.py
│   │   ├── plugin.txt
│   │   ├── remote_entity_manager.py
│   │   ├── squid_multiplayer_autopilot.py
│   │   └── status_bar_component.py
│   ├── readme.md
│   ├── stdp/
│   │   ├── __init__.py
│   │   ├── main.py
│   │   ├── stdp_control_panel.py
│   │   └── stdp_core.py
│   └── whitelist.txt
├── requirements.txt
├── src/
│   ├── __init__.py
│   ├── animation_styles.py
│   ├── brain_about_tab.py
│   ├── brain_base_tab.py
│   ├── brain_constants.py
│   ├── brain_decisions_tab.py
│   ├── brain_designer.py
│   ├── brain_designer_launcher.py
│   ├── brain_dialogs.py
│   ├── brain_learning_tab.py
│   ├── brain_memory_tab.py
│   ├── brain_network_tab.py
│   ├── brain_network_tab_banners.py
│   ├── brain_neuron_hooks.py
│   ├── brain_neuron_outputs.py
│   ├── brain_personality_tab.py
│   ├── brain_render_worker.py
│   ├── brain_state_bridge.py
│   ├── brain_statistics_tab.py
│   ├── brain_tool.py
│   ├── brain_tooltips.py
│   ├── brain_ui_utils.py
│   ├── brain_utils.py
│   ├── brain_widget.py
│   ├── brain_worker.py
│   ├── certificate.py
│   ├── compute_backend.py
│   ├── config_manager.py
│   ├── custom_brain_loader.py
│   ├── decision_engine.py
│   ├── decoration_stats.json
│   ├── designer_canvas.py
│   ├── designer_canvas_utils.py
│   ├── designer_constants.py
│   ├── designer_core.py
│   ├── designer_dialogs.py
│   ├── designer_logging.py
│   ├── designer_network_generator.py
│   ├── designer_outputs_panel.py
│   ├── designer_panels.py
│   ├── designer_sensor_discovery.py
│   ├── designer_templates.py
│   ├── designer_window.py
│   ├── display_scaling.py
│   ├── hidden_imports.txt
│   ├── image_cache.py
│   ├── interactions.py
│   ├── interactions2.py
│   ├── laboratory.py
│   ├── learning.py
│   ├── localisation.py
│   ├── main.py
│   ├── memory_manager.py
│   ├── mental_states.py
│   ├── network_adapter.py
│   ├── network_protocol.py
│   ├── neurogenesis.py
│   ├── neurogenesis_show.py
│   ├── personality.py
│   ├── personality_traits.py
│   ├── plugin_manager.py
│   ├── plugin_manager_dialog.py
│   ├── preferences.py
│   ├── save_manager.py
│   ├── splash_screen.py
│   ├── squid.py
│   ├── squid_facts.py
│   ├── squid_statistics.py
│   ├── statistics_window.py
│   ├── tamagotchi_logic.py
│   ├── task_manager.py
│   ├── tutorial.py
│   ├── ui.py
│   ├── vision.py
│   └── vision_worker.py
├── translations/
│   ├── de.py
│   ├── en.py
│   ├── es.py
│   ├── fr.py
│   ├── ja.py
│   ├── ml.py
│   └── zh.py
└── version
Download .txt
SYMBOL INDEX (2286 symbols across 93 files)

FILE: extras/brain_2_keras.py
  class HybridActivation (line 14) | class HybridActivation(keras.layers.Layer):
    method __init__ (line 19) | def __init__(self, activation_map, units, **kwargs):
    method call (line 35) | def call(self, inputs):
    method get_config (line 60) | def get_config(self):
  class BrainCell (line 68) | class BrainCell(keras.layers.Layer):
    method __init__ (line 72) | def __init__(self, input_units, state_units,
    method build (line 87) | def build(self, input_shape):
    method call (line 113) | def call(self, inputs, states):
    method get_config (line 130) | def get_config(self):
  function load_brain_json (line 147) | def load_brain_json(filepath):
  function parse_design (line 153) | def parse_design(data):
  function convert_to_keras_model (line 282) | def convert_to_keras_model(json_path, output_path):

FILE: headless/HeadlessLauncher.jsx
  function HeadlessLauncher (line 12) | function HeadlessLauncher() {

FILE: headless/headless_trainer.py
  class Personality (line 54) | class Personality(Enum):
  class TrainingConfig (line 68) | class TrainingConfig:
    method from_dict (line 94) | def from_dict(cls, data: Dict) -> 'TrainingConfig':
  class TrainingScenario (line 99) | class TrainingScenario:
  class HeadlessSquid (line 172) | class HeadlessSquid:
    method __init__ (line 175) | def __init__(self, personality: Personality = None):
    method get_state_dict (line 212) | def get_state_dict(self) -> Dict[str, Any]:
    method update (line 237) | def update(self, dt: float = 1.0):
    method feed (line 307) | def feed(self):
    method startle (line 316) | def startle(self):
    method clean (line 324) | def clean(self):
  class HeadlessBrain (line 334) | class HeadlessBrain:
    method __init__ (line 340) | def __init__(self, config: TrainingConfig = None):
    method _initialize_default_state (line 376) | def _initialize_default_state(self):
    method load_brain (line 411) | def load_brain(self, brain_data: Dict) -> bool:
    method load_brain_file (line 497) | def load_brain_file(self, filepath: str) -> bool:
    method export_brain (line 507) | def export_brain(self) -> Dict:
    method save_brain (line 551) | def save_brain(self, filepath: str) -> bool:
    method update_state (line 563) | def update_state(self, squid_state: Dict[str, Any]):
    method propagate (line 572) | def propagate(self):
    method perform_hebbian_learning (line 593) | def perform_hebbian_learning(self) -> List[Tuple[str, str]]:
    method check_neurogenesis (line 666) | def check_neurogenesis(self, squid_state: Dict, tick: int) -> Optional...
    method _create_neuron (line 705) | def _create_neuron(self, neuron_type: str, context: Dict) -> str:
    method _get_neuron_value (line 755) | def _get_neuron_value(self, val) -> float:
    method get_statistics (line 763) | def get_statistics(self) -> Dict:
  class HeadlessSimulation (line 781) | class HeadlessSimulation:
    method __init__ (line 787) | def __init__(self, config: TrainingConfig = None):
    method load_brain (line 817) | def load_brain(self, filepath: str) -> bool:
    method load_scenario (line 821) | def load_scenario(self, scenario_name: str) -> bool:
    method run (line 843) | def run(self, ticks: int = 1000, progress_interval: int = 100) -> Dict:
    method _simulation_step (line 897) | def _simulation_step(self):
    method _update_environment (line 928) | def _update_environment(self):
    method _process_events (line 956) | def _process_events(self):
    method _execute_event (line 968) | def _execute_event(self, event: Dict):
    method _report_progress (line 997) | def _report_progress(self, tps: float):
    method stop (line 1009) | def stop(self):
  function main (line 1018) | def main():

FILE: main.py
  function launch_brain_designer_process (line 37) | def launch_brain_designer_process():
  function setup_logging_configuration (line 42) | def setup_logging_configuration():
  function perform_cleanup_and_exit (line 53) | def perform_cleanup_and_exit():
  function global_exception_handler (line 76) | def global_exception_handler(exctype, value, tb):
  class TeeStream (line 84) | class TeeStream:
    method __init__ (line 86) | def __init__(self, original_stream, file_stream):
    method write (line 90) | def write(self, data):
    method flush (line 95) | def flush(self):
  class TimedMessageBox (line 99) | class TimedMessageBox(QtWidgets.QDialog):
    method __init__ (line 101) | def __init__(self, parent, title, message, timeout_seconds=5):
    method update_countdown (line 142) | def update_countdown(self):
    method accept_yes (line 151) | def accept_yes(self):
    method reject_no (line 157) | def reject_no(self):
    method get_result (line 163) | def get_result(self):
  class MainWindow (line 169) | class MainWindow(QtWidgets.QMainWindow):
    method __init__ (line 170) | def __init__(self, specified_personality=None, debug_mode=False, neuro...
    method preload_brain_window_tabs (line 304) | def preload_brain_window_tabs(self):
    method setup_logging (line 362) | def setup_logging(self):
    method setup_facts_timer (line 372) | def setup_facts_timer(self):
    method show_random_squid_fact (line 381) | def show_random_squid_fact(self):
    method initialize_game (line 404) | def initialize_game(self):
    method delayed_tutorial_check (line 455) | def delayed_tutorial_check(self):
    method create_new_game (line 471) | def create_new_game(self, specified_personality=None):
    method check_tutorial_preference (line 500) | def check_tutorial_preference(self):
    method position_and_show_decoration_window (line 519) | def position_and_show_decoration_window(self):
    method start_new_game (line 534) | def start_new_game(self):
    method load_game (line 665) | def load_game(self):
    method save_game (line 669) | def save_game(self):
    method _restore_achievements_data (line 674) | def _restore_achievements_data(self, achievements_data):
    method closeEvent (line 693) | def closeEvent(self, event):
    method show_splash_screen (line 719) | def show_splash_screen(self):
    method show_feeding_hint (line 777) | def show_feeding_hint(self):
    method _start_splash_with_reveals (line 781) | def _start_splash_with_reveals(self):
    method _reveal_neuron_for_frame (line 792) | def _reveal_neuron_for_frame(self, frame_index):
    method show_hatching_notification (line 817) | def show_hatching_notification(self):
    method start_simulation (line 821) | def start_simulation(self):
    method show_tutorial_overlay (line 848) | def show_tutorial_overlay(self):
    method open_initial_windows (line 857) | def open_initial_windows(self):
    method cleanup_duplicate_squids (line 869) | def cleanup_duplicate_squids(self):
    method initialize_multiplayer_manually (line 911) | def initialize_multiplayer_manually(self):
  function main (line 954) | def main():

FILE: plugins/achievements/achievements_data.py
  class AchievementCategory (line 14) | class AchievementCategory(Enum):
  class Achievement (line 31) | class Achievement:
    method to_dict (line 42) | def to_dict(self) -> dict:
  class UnlockedAchievement (line 47) | class UnlockedAchievement:
    method to_dict (line 53) | def to_dict(self) -> dict:
    method from_dict (line 57) | def from_dict(cls, data: dict) -> 'UnlockedAchievement':
  function get_achievement (line 481) | def get_achievement(achievement_id: str) -> Achievement | None:
  function get_achievements_by_category (line 486) | def get_achievements_by_category(category: str) -> Dict[str, Achievement]:
  function get_visible_achievements (line 494) | def get_visible_achievements() -> Dict[str, Achievement]:
  function get_total_points (line 502) | def get_total_points() -> int:
  function get_achievement_count (line 507) | def get_achievement_count() -> int:

FILE: plugins/achievements/display_scaling.py
  class DisplayScaling (line 8) | class DisplayScaling:
    method initialize (line 20) | def initialize(cls, current_width: int, current_height: int) -> None:
    method scale (line 33) | def scale(cls, value: int | float) -> int:
    method font_size (line 38) | def font_size(cls, size: int) -> int:
    method get_scale_factor (line 43) | def get_scale_factor(cls) -> float:
    method scale_css (line 47) | def scale_css(cls, css_string: str) -> str:

FILE: plugins/achievements/main.py
  function _scale_size (line 17) | def _scale_size(pt: int) -> int:
  class AchievementNotification (line 62) | class AchievementNotification(QtWidgets.QWidget):
    method __init__ (line 65) | def __init__(self, achievement: Achievement, parent=None):
    method _setup_ui (line 71) | def _setup_ui(self):
    method _setup_animation (line 164) | def _setup_animation(self):
    method show_notification (line 183) | def show_notification(self, duration_ms=4000):
  class AchievementsWindow (line 189) | class AchievementsWindow(QtWidgets.QDialog):
    method __init__ (line 192) | def __init__(self, plugin: 'AchievementsPlugin', parent=None):
    method _setup_ui (line 199) | def _setup_ui(self):
    method _create_list (line 241) | def _create_list(self, category_filter: Optional[str]) -> QtWidgets.QS...
    method _create_card (line 264) | def _create_card(self, ach: Achievement, unlocked: bool, progress: int...
  class AchievementsPlugin (line 336) | class AchievementsPlugin:
    method __init__ (line 339) | def __init__(self):
    method _log_unlock_to_text_file (line 372) | def _log_unlock_to_text_file(self, ach: Achievement) -> None:
    method setup (line 386) | def setup(self, plugin_manager, tamagotchi_logic) -> bool:
    method _subscribe_to_hooks (line 432) | def _subscribe_to_hooks(self):
    method _hook_on_feed (line 474) | def _hook_on_feed(self, **kwargs):
    method _hook_on_wake (line 477) | def _hook_on_wake(self, **kwargs):
    method _hook_on_sleep (line 480) | def _hook_on_sleep(self, **kwargs):
    method _hook_on_neurogenesis (line 483) | def _hook_on_neurogenesis(self, **kwargs):
    method _hook_on_clean (line 486) | def _hook_on_clean(self, **kwargs):
    method _hook_on_medicine (line 489) | def _hook_on_medicine(self, **kwargs):
    method _hook_on_rock_pickup (line 492) | def _hook_on_rock_pickup(self, **kwargs):
    method _hook_on_rock_throw (line 495) | def _hook_on_rock_throw(self, **kwargs):
    method _hook_on_decoration_interaction (line 498) | def _hook_on_decoration_interaction(self, **kwargs):
    method _hook_on_ink_cloud (line 503) | def _hook_on_ink_cloud(self, **kwargs):
    method _hook_on_startle (line 506) | def _hook_on_startle(self, **kwargs):
    method _hook_on_memory_created (line 509) | def _hook_on_memory_created(self, **kwargs):
    method _hook_on_memory_to_long_term (line 512) | def _hook_on_memory_to_long_term(self, **kwargs):
    method _hook_on_curiosity_change (line 515) | def _hook_on_curiosity_change(self, **kwargs):
    method _hook_on_anxiety_change (line 520) | def _hook_on_anxiety_change(self, **kwargs):
    method _hook_on_speed_change (line 531) | def _hook_on_speed_change(self, **kwargs):
    method on_squid_fed (line 544) | def on_squid_fed(self):
    method on_squid_woke (line 560) | def on_squid_woke(self):
    method on_neuron_created (line 569) | def on_neuron_created(self):
    method on_neuron_leveled (line 584) | def on_neuron_leveled(self):
    method on_poop_thrown (line 589) | def on_poop_thrown(self):
    method on_tank_cleaned (line 594) | def on_tank_cleaned(self):
    method on_medicine_given (line 603) | def on_medicine_given(self):
    method on_rock_picked_up (line 619) | def on_rock_picked_up(self):
    method on_rock_thrown (line 633) | def on_rock_thrown(self):
    method on_decoration_interacted (line 645) | def on_decoration_interacted(self, decoration=None, interaction_type='...
    method _on_object_investigated (line 677) | def _on_object_investigated(self):
    method on_ink_cloud_released (line 688) | def on_ink_cloud_released(self):
    method on_squid_startled (line 697) | def on_squid_startled(self):
    method on_memory_formed (line 702) | def on_memory_formed(self):
    method on_memory_promoted (line 711) | def on_memory_promoted(self):
    method on_brain_tool_opened (line 716) | def on_brain_tool_opened(self):
    method _check_age_achievements (line 725) | def _check_age_achievements(self):
    method _check_stat_achievements (line 761) | def _check_stat_achievements(self):
    method unlock_achievement (line 817) | def unlock_achievement(self, achievement_id: str, silent: bool = False...
    method manually_trigger (line 849) | def manually_trigger(self, event_name: str):
    method get_total_points (line 873) | def get_total_points(self) -> int:
    method _increment_stat (line 880) | def _increment_stat(self, name: str, amount: int = 1):
    method _update_progress (line 883) | def _update_progress(self, achievement_id: str, value: int):
    method _queue_notification (line 890) | def _queue_notification(self, achievement: Achievement):
    method _show_next_notification (line 895) | def _show_next_notification(self):
    method _setup_timers (line 922) | def _setup_timers(self):
    method _install_hooks (line 932) | def _install_hooks(self):
    method _uninstall_hooks (line 1048) | def _uninstall_hooks(self):
    method enable (line 1064) | def enable(self) -> bool:
    method disable (line 1088) | def disable(self):
    method shutdown (line 1102) | def shutdown(self):
    method _get_save_path (line 1110) | def _get_save_path(self) -> str:
    method get_save_data (line 1114) | def get_save_data(self) -> dict:
    method load_save_data (line 1125) | def load_save_data(self, data: dict):
    method show_achievements_window (line 1140) | def show_achievements_window(self):
    method register_menu_actions (line 1144) | def register_menu_actions(self, main_window: QtWidgets.QMainWindow, me...
  function initialize (line 1154) | def initialize(plugin_manager) -> bool:

FILE: plugins/multiplayer/main.py
  function initialize (line 62) | def initialize(plugin_manager_instance): # plugin_manager_instance is th...

FILE: plugins/multiplayer/mp_network_node.py
  class NetworkNode (line 16) | class NetworkNode:
    method __init__ (line 17) | def __init__(self, node_id=None, logger=None):
    method _get_local_ip (line 80) | def _get_local_ip(self):
    method _get_all_send_ips (line 158) | def _get_all_send_ips(self):
    method initialize_socket_structure (line 208) | def initialize_socket_structure(self):
    method _listen_for_multicast (line 295) | def _listen_for_multicast(self):
    method is_listening (line 342) | def is_listening(self):
    method watchdog_check (line 346) | def watchdog_check(self) -> bool:
    method start_listening (line 376) | def start_listening(self):
    method stop_listening (line 402) | def stop_listening(self):
    method try_reconnect (line 425) | def try_reconnect(self):
    method send_message (line 446) | def send_message(self, message_type: str, payload: dict):
    method send_message_batch (line 513) | def send_message_batch(self, messages: list):
    method receive_messages (line 572) | def receive_messages(self):
    method process_messages (line 701) | def process_messages(self, plugin_manager_ref):
    method close (line 756) | def close(self):

FILE: plugins/multiplayer/mp_plugin_logic.py
  class MultiplayerPlugin (line 33) | class MultiplayerPlugin:
    method __init__ (line 34) | def __init__(self):
    method _initialize_remote_entity_manager (line 96) | def _initialize_remote_entity_manager(self):
    method debug_autopilot_status (line 138) | def debug_autopilot_status(self):
    method disable (line 257) | def disable(self):
    method setup (line 278) | def setup(self, plugin_manager_instance, tamagotchi_logic_instance):
    method _process_network_node_queue (line 419) | def _process_network_node_queue(self, **kwargs):
    method setup_minimal_network (line 429) | def setup_minimal_network(self):
    method update_remote_squid_image (line 443) | def update_remote_squid_image(self, remote_squid_display_data: Dict, d...
    method handle_squid_interaction (line 471) | def handle_squid_interaction(self, local_squid, remote_node_id, remote...
    method attempt_gift_exchange (line 488) | def attempt_gift_exchange(self, local_squid, remote_node_id: str):
    method _remove_gifted_item_from_scene (line 523) | def _remove_gifted_item_from_scene(self, item_to_remove):
    method create_stolen_rocks (line 532) | def create_stolen_rocks(self, local_squid, num_rocks: int, entry_posit...
    method apply_foreign_object_tint (line 594) | def apply_foreign_object_tint(self, q_graphics_item: QtWidgets.QGraphi...
    method show_network_dashboard (line 613) | def show_network_dashboard(self):
    method initialize_status_ui (line 694) | def initialize_status_ui(self):
    method initialize_status_bar (line 728) | def initialize_status_bar(self): # Added stub, assuming it was missing
    method _find_tamagotchi_logic (line 746) | def _find_tamagotchi_logic(self, search_object, depth=0, visited_ids=N...
    method _animate_remote_squid_entry (line 792) | def _animate_remote_squid_entry(self, squid_graphics_item, status_text...
    method get_opposite_direction (line 813) | def get_opposite_direction(self, direction_str: str) -> str:
    method create_entry_effect (line 818) | def create_entry_effect(self, center_x: float, center_y: float, direct...
    method _setup_controller_immediately (line 844) | def _setup_controller_immediately(self, node_id: str, squid_initial_da...
    method handle_squid_exit_message (line 883) | def handle_squid_exit_message(self, node: Any, message: Dict, addr: tu...
    method _setup_controller_creation_timer (line 962) | def _setup_controller_creation_timer(self):
    method _process_pending_controller_creations (line 973) | def _process_pending_controller_creations(self):
    method update_remote_controllers (line 994) | def update_remote_controllers(self):
    method calculate_entry_position (line 1027) | def calculate_entry_position(self, entry_side_direction: str) -> tuple:
    method apply_remote_experiences (line 1045) | def apply_remote_experiences(self, local_squid, activity_summary: Dict):
    method create_exit_effect (line 1079) | def create_exit_effect(self, center_x: float, center_y: float, directi...
    method _show_exit_arrow (line 1092) | def _show_exit_arrow(self, exit_direction: str):
    method handle_squid_return (line 1149) | def handle_squid_return(self, node: NetworkNode, message: Dict, addr: ...
    method recreate_carried_items_in_tank (line 1208) | def recreate_carried_items_in_tank(self, local_squid, carried_items_da...
    method _create_arrival_animation (line 1342) | def _create_arrival_animation(self, graphics_item: QtWidgets.QGraphics...
    method _reset_remote_squid_style (line 1364) | def _reset_remote_squid_style(self, node_id_or_item):
    method register_menu_actions (line 1408) | def register_menu_actions(self, main_ui_window: QtWidgets.QMainWindow,...
    method update_menu_states (line 1444) | def update_menu_states(self):
    method show_about_dialog (line 1450) | def show_about_dialog(self):
    method show_config_dialog (line 1473) | def show_config_dialog(self):
    method toggle_connection_lines (line 1506) | def toggle_connection_lines(self, checked_state: bool):
    method refresh_connections (line 1531) | def refresh_connections(self):
    method initialize_remote_representation (line 1569) | def initialize_remote_representation(self):
    method cleanup_stale_nodes (line 1587) | def cleanup_stale_nodes(self):
    method update_connection_lines (line 1620) | def update_connection_lines(self):
    method _register_hooks (line 1685) | def _register_hooks(self):
    method pre_update (line 1727) | def pre_update(self, *args, **kwargs):
    method start_sync_timer (line 1734) | def start_sync_timer(self):
    method sync_game_state (line 1776) | def sync_game_state(self):
    method _get_squid_state (line 1807) | def _get_squid_state(self) -> Dict:
    method get_actual_view_direction (line 1840) | def get_actual_view_direction(self, squid_instance) -> float:
    method get_squid_color (line 1855) | def get_squid_color(self) -> tuple:
    method _get_objects_state (line 1880) | def _get_objects_state(self) -> List[Dict]:
    method _determine_object_type (line 1899) | def _determine_object_type(self, scene_item: QtWidgets.QGraphicsItem) ...
    method handle_object_sync (line 1923) | def handle_object_sync(self, node: NetworkNode, message: Dict, addr: t...
    method process_remote_object (line 1984) | def process_remote_object(self, remote_obj_data: Dict, source_node_id:...
    method handle_heartbeat (line 2103) | def handle_heartbeat(self, node: NetworkNode, message: Dict, addr: tup...
    method update_remote_squid (line 2137) | def update_remote_squid(self, remote_node_id: str, squid_data_dict: Di...
    method _create_enhanced_arrival_animation (line 2248) | def _create_enhanced_arrival_animation(self, squid_visual_item: QtWidg...
    method handle_remote_squid_return (line 2264) | def handle_remote_squid_return(self, remote_node_id: str, controller: ...
    method complete_remote_squid_return (line 2304) | def complete_remote_squid_return(self, remote_node_id: str, activity_s...
    method update_remote_view_cone (line 2334) | def update_remote_view_cone(self, remote_node_id: str, remote_squid_da...
    method _remove_view_cone_for_squid (line 2409) | def _remove_view_cone_for_squid(self, remote_node_id: str):
    method create_gift_decoration (line 2421) | def create_gift_decoration(self, from_remote_node_id: str) -> QtWidget...
    method remove_remote_squid (line 2501) | def remove_remote_squid(self, node_id_to_remove: str):
    method remove_remote_object (line 2532) | def remove_remote_object(self, full_clone_id: str):
    method throw_rock_network (line 2551) | def throw_rock_network(self, rock_graphics_item: QtWidgets.QGraphicsPi...
    method cleanup (line 2577) | def cleanup(self):
    method handle_squid_move (line 2667) | def handle_squid_move(self, node: NetworkNode, message: Dict, addr: tu...
    method handle_rock_throw (line 2700) | def handle_rock_throw(self, node: NetworkNode, message: Dict, addr: tu...
    method handle_state_update (line 2748) | def handle_state_update(self, node: NetworkNode, message: Dict, addr: ...

FILE: plugins/multiplayer/multiplayer_config_dialog.py
  class MultiplayerConfigDialog (line 6) | class MultiplayerConfigDialog(QtWidgets.QDialog):
    method __init__ (line 11) | def __init__(self, plugin_instance, parent=None, initial_settings=None):
    method _build_ui (line 22) | def _build_ui(self, cfg):
    method _new_slider (line 69) | def _new_slider(self, val, minv, maxv, step, label):
    method _on_ok (line 78) | def _on_ok(self):
    method load_settings (line 92) | def load_settings(self, cfg):

FILE: plugins/multiplayer/multiplayer_events.py
  class MultiplayerEventDispatcher (line 4) | class MultiplayerEventDispatcher(QtCore.QObject):
    method __init__ (line 17) | def __init__(self, parent=None):
    method register_handler (line 22) | def register_handler(self, event_type: str, handler: Callable):
    method dispatch_event (line 43) | def dispatch_event(self, event_type: str, *args, **kwargs):

FILE: plugins/multiplayer/multiplayer_status_widget.py
  class MultiplayerStatusWidget (line 4) | class MultiplayerStatusWidget(QtWidgets.QWidget):
    method __init__ (line 5) | def __init__(self, plugin_manager=None, parent=None): # MODIFIED: Adde...
    method setup_ui (line 26) | def setup_ui(self):
    method add_activity (line 107) | def add_activity(self, message):
    method toggle_expanded (line 114) | def toggle_expanded(self):
    method update_connection_status (line 136) | def update_connection_status(self, is_connected, node_id=None):
    method update_peers (line 155) | def update_peers(self, peers_data):
    method update_display (line 181) | def update_display(self):
    method refresh_peers_list (line 196) | def refresh_peers_list(self):
    method update_status (line 212) | def update_status(self, status_text, is_enabled):
    method set_ip_address (line 232) | def set_ip_address(self, ip_address_text):
    method update_icon (line 248) | def update_icon(self, is_enabled):

FILE: plugins/multiplayer/network_utilities.py
  class NetworkUtilities (line 15) | class NetworkUtilities:
    method get_local_ip (line 22) | def get_local_ip() -> str:
    method compress_message (line 51) | def compress_message(message: Dict[str, Any]) -> bytes:
    method decompress_message (line 102) | def decompress_message(compressed_msg: bytes) -> Union[Dict[str, Any],...
    method generate_node_id (line 160) | def generate_node_id(prefix: str = "squid") -> str:
    method is_node_active (line 166) | def is_node_active(last_seen_time: float, threshold: float = 30.0) -> ...

FILE: plugins/multiplayer/packet_validator.py
  class PacketValidator (line 7) | class PacketValidator:
    method validate_message (line 11) | def validate_message(message: Dict[str, Any]) -> Tuple[bool, Optional[...
    method validate_squid_exit (line 60) | def validate_squid_exit(payload: Dict[str, Any]) -> Tuple[bool, Option...
    method validate_object_sync (line 91) | def validate_object_sync(payload: Dict[str, Any]) -> Tuple[bool, Optio...
    method sanitize_object_data (line 120) | def sanitize_object_data(objects: List[Dict[str, Any]]) -> List[Dict[s...

FILE: plugins/multiplayer/remote_entity_manager.py
  class AnimatableGraphicsItem (line 10) | class AnimatableGraphicsItem(QtWidgets.QGraphicsPixmapItem, QtCore.QObje...
    method __init__ (line 11) | def __init__(self, pixmap=None, parent=None):
    method scale_factor (line 16) | def scale_factor(self): return self._scale
    method scale_factor (line 18) | def scale_factor(self, value):
  class ObjectPool (line 23) | class ObjectPool:
    method __init__ (line 24) | def __init__(self, factory_func, initial_size=10):
    method acquire (line 29) | def acquire(self):
    method release (line 33) | def release(self, obj):
    method clear (line 37) | def clear(self):
  class RemoteEntityManager (line 50) | class RemoteEntityManager:
    method __init__ (line 51) | def __init__(self, scene, window_width, window_height, debug_mode=Fals...
    method _get_image_file_name_and_direction (line 93) | def _get_image_file_name_and_direction(self, payload_direction_key: Op...
    method _get_scaled_pixmap (line 146) | def _get_scaled_pixmap(self, image_file_name: str) -> tuple[QtGui.QPix...
    method _update_dependent_items_position (line 159) | def _update_dependent_items_position(self, remote_squid_info, new_visu...
    method _update_visuals_once_per_second (line 165) | def _update_visuals_once_per_second(self):
    method _handle_new_squid_arrival (line 196) | def _handle_new_squid_arrival(self, node_id, squid_data_payload, entry...
    method _handle_re_arriving_squid (line 260) | def _handle_re_arriving_squid(self, node_id, squid_data_payload, remot...
    method _handle_existing_squid_update (line 309) | def _handle_existing_squid_update(self, node_id, squid_data_payload, r...
    method update_remote_squid (line 376) | def update_remote_squid(self, node_id, squid_data_payload, is_new_arri...
    method calculate_entry_position (line 427) | def calculate_entry_position(self, exit_data: dict) -> tuple[float, fl...
    method get_last_calculated_entry_details (line 451) | def get_last_calculated_entry_details(self, node_id: str) -> dict | No...
    method update_settings (line 452) | def update_settings(self, opacity=None, show_labels=None, show_connect...
    method update_remote_view_cone (line 467) | def update_remote_view_cone(self, node_id, squid_data):
    method _create_arrival_animation (line 490) | def _create_arrival_animation(self, visual_item):
    method _reset_remote_squid_style (line 493) | def _reset_remote_squid_style(self, visual_item_or_node_id): # Full me...
    method remove_remote_squid (line 509) | def remove_remote_squid(self, node_id): # Full method
    method cleanup_stale_entities (line 520) | def cleanup_stale_entities(self, timeout=20.0): # Full method
    method remove_remote_object (line 529) | def remove_remote_object(self, obj_id): # Full method
    method cleanup_all (line 535) | def cleanup_all(self): # Full method
    method update_connection_lines (line 544) | def update_connection_lines(self, local_squid_pos_tuple): # Full method

FILE: plugins/multiplayer/squid_multiplayer_autopilot.py
  class RemoteSquidController (line 9) | class RemoteSquidController:
    method __init__ (line 12) | def __init__(self, squid_data, scene, plugin_instance=None, debug_mode...
    method _log_decision (line 89) | def _log_decision(self, decision_text: str):
    method _capture_item_properties (line 103) | def _capture_item_properties(self, game_item_object) -> dict | None:
    method update (line 129) | def update(self, delta_time=None):
    method explore (line 182) | def explore(self):
    method seek_food (line 245) | def seek_food(self):
    method interact_with_object (line 278) | def interact_with_object(self):
    method return_home (line 351) | def return_home(self):
    method move_in_direction (line 377) | def move_in_direction(self, direction):
    method move_toward (line 432) | def move_toward(self, target_x, target_y):
    method find_nearby_food (line 455) | def find_nearby_food(self):
    method find_nearby_stealable_item (line 543) | def find_nearby_stealable_item(self):
    method get_food_items_from_scene (line 570) | def get_food_items_from_scene(self):
    method get_stealable_items_from_scene (line 604) | def get_stealable_items_from_scene(self):
    method is_in_vision_range (line 640) | def is_in_vision_range(self, item):
    method animate_movement (line 648) | def animate_movement(self, squid_data, remote_visual):
    method eat_food (line 651) | def eat_food(self, food_item):
    method interact_with_rock (line 664) | def interact_with_rock(self, rock_item): # Legacy, use interact_with_o...
    method is_stealable_target (line 669) | def is_stealable_target(self, item_obj):
    method is_object_valid (line 692) | def is_object_valid(self, obj):
    method get_object_position (line 749) | def get_object_position(self, obj): # Gets top-left
    method get_object_center_position (line 756) | def get_object_center_position(self, obj):
    method distance_between (line 771) | def distance_between(self, pos1, pos2):
    method get_window_width (line 778) | def get_window_width(self):
    method get_window_height (line 785) | def get_window_height(self):
    method is_at_boundary (line 792) | def is_at_boundary(self, direction_moving_towards: str):
    method determine_home_direction (line 809) | def determine_home_direction(self):
    method get_summary (line 834) | def get_summary(self):

FILE: plugins/multiplayer/status_bar_component.py
  class StatusBarComponent (line 3) | class StatusBarComponent:
    method __init__ (line 4) | def __init__(self, main_window):
    method create_indicators (line 23) | def create_indicators(self):
    method update_plugins_status (line 40) | def update_plugins_status(self, plugin_manager):
    method update_network_status (line 59) | def update_network_status(self, connected, node_id=None):
    method update_peers_count (line 71) | def update_peers_count(self, count):
    method add_message (line 79) | def add_message(self, message, duration=5000):
    method add_to_message_queue (line 83) | def add_to_message_queue(self, message):
    method rotate_messages (line 88) | def rotate_messages(self):

FILE: plugins/stdp/main.py
  class DisplayScaling (line 43) | class DisplayScaling:
    method font_size (line 45) | def font_size(cls, size): return size
    method scale_css (line 47) | def scale_css(cls, css): return css
  class STDPPlugin (line 76) | class STDPPlugin:
    method __init__ (line 86) | def __init__(self):
    method setup (line 142) | def setup(self, plugin_manager, tamagotchi_logic) -> bool:
    method cleanup (line 219) | def cleanup(self):
    method shutdown (line 252) | def shutdown(self):
    method _resolve_brain_references (line 260) | def _resolve_brain_references(self) -> bool:
    method _install_hebbian_patch (line 300) | def _install_hebbian_patch(self):
    method _restore_hebbian_patch (line 332) | def _restore_hebbian_patch(self):
    method _inject_ui_banner (line 342) | def _inject_ui_banner(self):
    method _refresh_banner_stats (line 430) | def _refresh_banner_stats(self):
    method _run_stdp_hebbian (line 449) | def _run_stdp_hebbian(self, worker):
    method _get_neuron_value (line 614) | def _get_neuron_value(raw) -> float:
    method _sample_spikes (line 626) | def _sample_spikes(self):
    method apply_reward (line 677) | def apply_reward(self, signal: float, reason: str = ""):
    method _subscribe_hooks (line 718) | def _subscribe_hooks(self):
    method _on_feed (line 742) | def _on_feed(self, **kwargs):
    method _on_clean (line 745) | def _on_clean(self, **kwargs):
    method _on_medicine (line 748) | def _on_medicine(self, **kwargs):
    method _on_sleep (line 751) | def _on_sleep(self, **kwargs):
    method _on_wake (line 754) | def _on_wake(self, **kwargs):
    method _on_startle (line 758) | def _on_startle(self, **kwargs):
    method _periodic_cleanup (line 765) | def _periodic_cleanup(self):
    method get_stats (line 774) | def get_stats(self) -> dict:
    method set_stdp_weight (line 783) | def set_stdp_weight(self, weight: float):
    method enable (line 791) | def enable(self):
    method disable (line 796) | def disable(self):
    method set_enabled (line 801) | def set_enabled(self, enabled: bool):
    method reset_stats (line 816) | def reset_stats(self):
    method register_menu_actions (line 824) | def register_menu_actions(self, main_window: QtWidgets.QMainWindow,
    method show_control_panel (line 841) | def show_control_panel(self, parent=None):
  function initialize (line 859) | def initialize(plugin_manager) -> bool:

FILE: plugins/stdp/stdp_control_panel.py
  class _Slider (line 177) | class _Slider(QtWidgets.QWidget):
    method __init__ (line 181) | def __init__(self, label: str, min_val: float, max_val: float,
    method _on_change (line 209) | def _on_change(self, raw: int):
    method value (line 214) | def value(self) -> float:
    method setValue (line 217) | def setValue(self, v: float):
  class STDPControlPanel (line 221) | class STDPControlPanel(QtWidgets.QDialog):
    method __init__ (line 226) | def __init__(self, plugin: "STDPPlugin", parent=None):
    method _build_ui (line 260) | def _build_ui(self):
    method _set_cfg (line 389) | def _set_cfg(self, attr: str, value: float):
    method _reset_stats (line 394) | def _reset_stats(self):
    method _refresh_stats (line 402) | def _refresh_stats(self):
    method _browse_dir (line 422) | def _browse_dir(self):
    method _toggle_logging (line 431) | def _toggle_logging(self):
    method _start_logging (line 437) | def _start_logging(self):
    method _stop_logging (line 473) | def _stop_logging(self):
    method _export_snapshot (line 498) | def _export_snapshot(self):
    method record_spike (line 544) | def record_spike(self, neuron: str, activation: float,
    method record_encoding (line 558) | def record_encoding(self, pre: str, post: str,
    method _default_log_dir (line 579) | def _default_log_dir() -> str:
    method closeEvent (line 582) | def closeEvent(self, event):

FILE: plugins/stdp/stdp_core.py
  class SpikeEvent (line 35) | class SpikeEvent:
  class STDPConfig (line 43) | class STDPConfig:
  class SpikeTracker (line 79) | class SpikeTracker:
    method __init__ (line 87) | def __init__(self, config: Optional[STDPConfig] = None):
    method record_activation (line 102) | def record_activation(self, neuron_name: str, activation: float,
    method record_batch (line 163) | def record_batch(self, state: Dict[str, float], timestamp: Optional[fl...
    method get_last_spike_time (line 186) | def get_last_spike_time(self, neuron_name: str) -> Optional[float]:
    method get_recent_spikes (line 193) | def get_recent_spikes(self, neuron_name: str, window: Optional[float] ...
    method _get_recent_spikes_nolock (line 200) | def _get_recent_spikes_nolock(self, neuron_name: str, window: float) -...
    method is_bursting (line 207) | def is_bursting(self, neuron_name: str) -> bool:
    method _is_bursting_nolock (line 212) | def _is_bursting_nolock(self, neuron_name: str) -> bool:
    method cleanup_old_spikes (line 217) | def cleanup_old_spikes(self, max_age: Optional[float] = None):
    method get_spike_stats (line 243) | def get_spike_stats(self) -> Dict:
    method to_dict (line 259) | def to_dict(self) -> Dict:
    method from_dict (line 274) | def from_dict(self, data: Dict):
  class STDPLearner (line 287) | class STDPLearner:
    method __init__ (line 295) | def __init__(self, config: Optional[STDPConfig] = None):
    method record_activation (line 308) | def record_activation(self, neuron_name: str, activation: float,
    method record_state (line 313) | def record_state(self, state: Dict[str, float], timestamp: Optional[fl...
    method compute_stdp_delta (line 317) | def compute_stdp_delta(self, pre_neuron: str, post_neuron: str,
    method compute_symmetric_stdp (line 380) | def compute_symmetric_stdp(self, neuron1: str, neuron2: str,
    method update_eligibility_trace (line 410) | def update_eligibility_trace(self, pre_neuron: str, post_neuron: str,
    method get_eligibility_trace (line 448) | def get_eligibility_trace(self, pre_neuron: str, post_neuron: str,
    method apply_reward_modulation (line 471) | def apply_reward_modulation(self, reward_signal: float) -> Dict[Tuple[...
    method compute_combined_learning (line 511) | def compute_combined_learning(self, neuron1: str, neuron2: str,
    method cleanup (line 563) | def cleanup(self):
    method get_stats (line 577) | def get_stats(self) -> Dict:
    method reset_stats (line 590) | def reset_stats(self):
    method to_dict (line 597) | def to_dict(self) -> Dict:
    method from_dict (line 613) | def from_dict(self, data: Dict):
  function create_stdp_learner (line 632) | def create_stdp_learner(

FILE: src/animation_styles.py
  class AnimationStyleName (line 6) | class AnimationStyleName(Enum):
  class AnimationStyle (line 16) | class AnimationStyle:
  class VibrantStyle (line 127) | class VibrantStyle(AnimationStyle):
  class SubtleStyle (line 153) | class SubtleStyle(AnimationStyle):
  class NeuralStyle (line 188) | class NeuralStyle(AnimationStyle):
  class DesignerStyle (line 215) | class DesignerStyle(AnimationStyle):
  class NoneStyle (line 266) | class NoneStyle(AnimationStyle):
  function get_animation_style (line 364) | def get_animation_style(name: str) -> AnimationStyle:
  function get_available_styles (line 384) | def get_available_styles() -> list:
  function get_style_info (line 389) | def get_style_info() -> list:

FILE: src/brain_about_tab.py
  class AboutTab (line 15) | class AboutTab(BrainBaseTab):
    method __init__ (line 16) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method update_from_brain_state (line 22) | def update_from_brain_state(self, state):
    method initialize_ui (line 69) | def initialize_ui(self):
    method open_color_picker (line 254) | def open_color_picker(self):
    method edit_name (line 263) | def edit_name(self):
    method show_certificate (line 282) | def show_certificate(self):
    method show_care_tips (line 299) | def show_care_tips(self, personality_type_raw):
    method get_care_tips (line 344) | def get_care_tips(self, personality_type):
    method get_version_info (line 349) | def get_version_info(self):

FILE: src/brain_base_tab.py
  class BrainBaseTab (line 4) | class BrainBaseTab(QtWidgets.QWidget):
    method __init__ (line 5) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method set_tamagotchi_logic (line 22) | def set_tamagotchi_logic(self, tamagotchi_logic):
    method update_from_brain_state (line 27) | def update_from_brain_state(self, state):
    method create_button (line 31) | def create_button(self, text, callback, color):

FILE: src/brain_constants.py
  function is_core_neuron (line 153) | def is_core_neuron(name: str) -> bool:
  function is_required_neuron (line 157) | def is_required_neuron(name: str) -> bool:
  function is_input_sensor (line 161) | def is_input_sensor(name: str) -> bool:
  function is_any_sensor (line 165) | def is_any_sensor(name: str) -> bool:
  function is_binary_neuron (line 169) | def is_binary_neuron(name: str) -> bool:
  function is_protected_neuron (line 173) | def is_protected_neuron(name: str) -> bool:
  function get_neuron_category (line 177) | def get_neuron_category(name: str) -> str:
  function get_all_standard_neurons (line 188) | def get_all_standard_neurons() -> dict:
  function get_missing_required (line 194) | def get_missing_required(existing_neurons: set) -> list:

FILE: src/brain_decisions_tab.py
  class DecisionsTab (line 8) | class DecisionsTab(BrainBaseTab):
    method __init__ (line 9) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method initialize_ui (line 14) | def initialize_ui(self):
    method _create_path_step_widget (line 102) | def _create_path_step_widget(self, step_number, title, icon):
    method update_path_with_placeholder (line 134) | def update_path_with_placeholder(self):
    method update_from_brain_state (line 143) | def update_from_brain_state(self, state):
    method update_decision_path (line 150) | def update_decision_path(self, data):
    method _translate_object (line 167) | def _translate_object(self, obj_name):
    method _translate_action (line 173) | def _translate_action(self, action_name):
    method _update_state_step (line 179) | def _update_state_step(self, inputs):
    method _update_urges_step (line 209) | def _update_urges_step(self, weights):
    method _update_modifiers_step (line 224) | def _update_modifiers_step(self, data):
    method _update_final_decision_step (line 246) | def _update_final_decision_step(self, data, final_decision):
    method _create_arrow (line 267) | def _create_arrow(self):

FILE: src/brain_designer.py
  function perform_cleanup_and_exit (line 19) | def perform_cleanup_and_exit():
  function show_error_dialog (line 43) | def show_error_dialog(title: str, message: str):
  function check_dependencies (line 68) | def check_dependencies():
  function main (line 88) | def main():

FILE: src/brain_designer_launcher.py
  function launch_brain_designer_process (line 12) | def launch_brain_designer_process(debug_mode: bool = False):

FILE: src/brain_dialogs.py
  class StimulateDialog (line 8) | class StimulateDialog(QtWidgets.QDialog):
    method __init__ (line 9) | def __init__(self, brain_widget, parent=None):
    method validate_and_accept (line 94) | def validate_and_accept(self):
    method get_stimulation_values (line 116) | def get_stimulation_values(self):
  class RecentThoughtsDialog (line 132) | class RecentThoughtsDialog(QtWidgets.QDialog):
    method __init__ (line 133) | def __init__(self, thought_log, parent=None):
    method save_selected_thoughts (line 166) | def save_selected_thoughts(self):
    method clear_all_logs (line 180) | def clear_all_logs(self):
  class LogWindow (line 195) | class LogWindow(QtWidgets.QWidget):
    method __init__ (line 196) | def __init__(self, parent=None):
    method update_log (line 212) | def update_log(self, text):
    method export_log (line 215) | def export_log(self):
  class DiagnosticReportDialog (line 222) | class DiagnosticReportDialog(QtWidgets.QDialog):
    method __init__ (line 223) | def __init__(self, brain_widget, parent=None):
    method create_connections_tab (line 251) | def create_connections_tab(self):
    method create_neurons_tab (line 301) | def create_neurons_tab(self):
    method create_balance_tab (line 325) | def create_balance_tab(self):
    method create_history_section (line 346) | def create_history_section(self):
    method toggle_history_graph (line 364) | def toggle_history_graph(self, checked):

FILE: src/brain_learning_tab.py
  class DisplayScaling (line 10) | class DisplayScaling:
    method font_size (line 12) | def font_size(cls, size): return size
    method scale_css (line 14) | def scale_css(cls, css): return css
  class NeuralNetworkVisualizerTab (line 16) | class NeuralNetworkVisualizerTab(BrainBaseTab):
    method __init__ (line 17) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method pre_load_data (line 50) | def pre_load_data(self):
    method setup_ui (line 73) | def setup_ui(self):
    method _create_educational_card (line 295) | def _create_educational_card(self, title, content, bg_color):
    method _create_info_card (line 328) | def _create_info_card(self, title, description, color):
    method _create_learning_pair_card (line 353) | def _create_learning_pair_card(self, pair, weight, weight_change=None,...
    method create_custom_button (line 511) | def create_custom_button(self, text, callback, color, font_size=14):
    method darken_color (line 534) | def darken_color(self, hex_color, percent):
    method add_log_entry (line 543) | def add_log_entry(self, message, pair=None, weight_change=None, stdp_m...
    method clear_log (line 572) | def clear_log(self):
    method update_educational_content (line 592) | def update_educational_content(self, pair=None, tab_name=None):
    method update_from_brain_state (line 596) | def update_from_brain_state(self, state):
    method update_hebbian_label_learning (line 617) | def update_hebbian_label_learning(self, value):
    method _blink_hebbian_label (line 646) | def _blink_hebbian_label(self):

FILE: src/brain_memory_tab.py
  class MemoryTab (line 8) | class MemoryTab(BrainBaseTab):
    method __init__ (line 9) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method initialize_ui (line 15) | def initialize_ui(self):
    method update_from_brain_state (line 79) | def update_from_brain_state(self, state):
    method set_tamagotchi_logic (line 88) | def set_tamagotchi_logic(self, tamagotchi_logic):
    method update_memory_display (line 110) | def update_memory_display(self):
    method _clear_layout (line 175) | def _clear_layout(self, layout):
    method _is_displayable_memory (line 183) | def _is_displayable_memory(self, memory):
    method add_test_memory (line 251) | def add_test_memory(self):
    method _make_thumbnail (line 275) | def _make_thumbnail(self, image_path, size, angle_deg=0, invert=False):
    method _make_effect_pills (line 332) | def _make_effect_pills(self, effects, scale_fn, font_size_fn):
    method _card_meta (line 366) | def _card_meta(self, memory):
    method _create_memory_widget (line 534) | def _create_memory_widget(self, memory, target_layout):
    method _tint_scene_plant (line 653) | def _tint_scene_plant(self, filename):
    method _untint_scene_plant (line 673) | def _untint_scene_plant(self, filename):
    method _find_scene_decoration (line 685) | def _find_scene_decoration(self, filename):
    method _get_memory_color (line 696) | def _get_memory_color(self, memory):
    method _create_memory_tooltip (line 779) | def _create_memory_tooltip(self, memory):
    method _update_overview_stats (line 815) | def _update_overview_stats(self, stm, ltm):
    method _update_memory_importance (line 877) | def _update_memory_importance(self, memory):
    method _should_transfer_to_long_term (line 917) | def _should_transfer_to_long_term(self, memory):
    method _on_memory_card_clicked (line 945) | def _on_memory_card_clicked(self, memory):

FILE: src/brain_network_tab.py
  class NetworkTab (line 15) | class NetworkTab(BrainBaseTab):
    method __init__ (line 16) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=None,
    method initialize_ui (line 38) | def initialize_ui(self):
    method showEvent (line 222) | def showEvent(self, event):
    method hideEvent (line 226) | def hideEvent(self, event):
    method _clear_layout_recursively (line 233) | def _clear_layout_recursively(self, layout_to_clear):
    method _open_brain_designer (line 247) | def _open_brain_designer(self):
    method _change_animation_style (line 267) | def _change_animation_style(self, index):
    method _on_neuron_created (line 291) | def _on_neuron_created(self, neuron_name: str):
    method _restore_links_checkbox (line 311) | def _restore_links_checkbox(self):
    method _update_backend_label (line 315) | def _update_backend_label(self):
    method setup_timers (line 319) | def setup_timers(self):
    method _on_every_second (line 329) | def _on_every_second(self):
    method update_hebbian_timer (line 342) | def update_hebbian_timer(self):
    method update_hebbian_label (line 347) | def update_hebbian_label(self):
    method update_metrics_display (line 373) | def update_metrics_display(self):
    method update_from_brain_state (line 422) | def update_from_brain_state(self, state):
    method _update_global_cooldown_label (line 432) | def _update_global_cooldown_label(self):
    method _create_functional_stats_area (line 448) | def _create_functional_stats_area(self):
    method flash_emergency_creation (line 539) | def flash_emergency_creation(self, neuron_name):
    method _toggle_neuron_laboratory (line 547) | def _toggle_neuron_laboratory(self):
    method _update_functional_neuron_stats (line 563) | def _update_functional_neuron_stats(self):
    method preload (line 609) | def preload(self):
    method toggle_pruning (line 617) | def toggle_pruning(self, state):
    method stimulate_brain (line 624) | def stimulate_brain(self):
    method save_brain_state (line 635) | def save_brain_state(self):
    method load_brain_state (line 651) | def load_brain_state(self):
    method show_diagnostic_report (line 673) | def show_diagnostic_report(self):
    method create_button (line 679) | def create_button(self, text, callback, color_hex):
    method _show_experience_buffer (line 695) | def _show_experience_buffer(self):
    method _show_decorations (line 715) | def _show_decorations(self):
  class ExperienceBufferDialog (line 737) | class ExperienceBufferDialog(QtWidgets.QDialog):
    method __init__ (line 740) | def __init__(self, brain_widget, parent=None):
    method setup_ui (line 750) | def setup_ui(self):
    method refresh_data (line 809) | def refresh_data(self):

FILE: src/brain_network_tab_banners.py
  class BindingOverlay (line 3) | class BindingOverlay(QtWidgets.QWidget):
    method __init__ (line 9) | def __init__(self, network_tab, target_widget):
    method _perform_auto_collapse (line 90) | def _perform_auto_collapse(self):
    method update_bindings (line 95) | def update_bindings(self, bindings_list):
    method align_to_target (line 197) | def align_to_target(self):
    method eventFilter (line 226) | def eventFilter(self, source, event):
    method mousePressEvent (line 231) | def mousePressEvent(self, event):
    method animate_toggle (line 237) | def animate_toggle(self):
    method paintEvent (line 270) | def paintEvent(self, event):
  class PlaceholderBanner (line 286) | class PlaceholderBanner(QtWidgets.QWidget):
    method __init__ (line 292) | def __init__(self, network_tab, target_widget):
    method set_message (line 341) | def set_message(self, text):
    method align_to_target (line 347) | def align_to_target(self):
    method eventFilter (line 359) | def eventFilter(self, source, event):
    method mousePressEvent (line 364) | def mousePressEvent(self, event):
    method animate_toggle (line 368) | def animate_toggle(self):
    method paintEvent (line 391) | def paintEvent(self, event):

FILE: src/brain_neuron_hooks.py
  class BrainNeuronHooks (line 7) | class BrainNeuronHooks:
    method __init__ (line 15) | def __init__(self, tamagotchi_logic):
    method register_handler (line 47) | def register_handler(self, neuron_name: str, handler: Callable[[], flo...
    method unregister_handler (line 65) | def unregister_handler(self, neuron_name: str) -> bool:
    method get_registered_neurons (line 83) | def get_registered_neurons(self) -> list:
    method _get_plugin_handlers (line 87) | def _get_plugin_handlers(self) -> Dict[str, Callable]:
    method calculate_pursuing_food (line 101) | def calculate_pursuing_food(self) -> float:
    method calculate_is_sick (line 107) | def calculate_is_sick(self) -> float:
    method calculate_is_startled (line 113) | def calculate_is_startled(self) -> float:
    method calculate_is_fleeing (line 121) | def calculate_is_fleeing(self) -> float:
    method get_input_neuron_values (line 131) | def get_input_neuron_values(self) -> Dict[str, float]:
    method on_window_resize (line 172) | def on_window_resize(self, width_change: int, height_change: int, new_...
    method on_object_spawned (line 178) | def on_object_spawned(self, object_type: str):
    method on_user_interaction (line 191) | def on_user_interaction(self, action: str):
    method update_decay (line 203) | def update_decay(self):
    method calculate_external_stimulus (line 212) | def calculate_external_stimulus(self) -> float:
    method calculate_can_see_food (line 242) | def calculate_can_see_food(self) -> float:
    method calculate_plant_proximity (line 254) | def calculate_plant_proximity(self) -> float:
    method calculate_threat_level (line 333) | def calculate_threat_level(self) -> float:
    method calculate_is_eating (line 350) | def calculate_is_eating(self) -> float:
    method calculate_is_sleeping (line 356) | def calculate_is_sleeping(self) -> float:

FILE: src/brain_neuron_outputs.py
  class OutputTriggerMode (line 27) | class OutputTriggerMode(Enum):
  class NeuronOutputBinding (line 37) | class NeuronOutputBinding:
    method to_dict (line 58) | def to_dict(self) -> dict:
    method from_dict (line 71) | def from_dict(cls, data: dict) -> 'NeuronOutputBinding':
    method should_fire (line 84) | def should_fire(self, current_activation: float, current_time: float) ...
  class NeuronLogWindow (line 129) | class NeuronLogWindow(QtWidgets.QWidget):
    method __init__ (line 132) | def __init__(self):
    method _position_at_bottom_center (line 169) | def _position_at_bottom_center(self):
    method log (line 183) | def log(self, message: str):
    method log (line 194) | def log(self, msg): print(msg)
    method show (line 195) | def show(self): pass
  class NeuronLogWindow (line 192) | class NeuronLogWindow:
    method __init__ (line 132) | def __init__(self):
    method _position_at_bottom_center (line 169) | def _position_at_bottom_center(self):
    method log (line 183) | def log(self, message: str):
    method log (line 194) | def log(self, msg): print(msg)
    method show (line 195) | def show(self): pass
  class NeuronOutputMonitor (line 308) | class NeuronOutputMonitor:
    method __init__ (line 315) | def __init__(self, tamagotchi_logic):
    method _ensure_log_window (line 330) | def _ensure_log_window(self):
    method _log (line 337) | def _log(self, message: str):
    method _register_default_handlers (line 347) | def _register_default_handlers(self):
    method monitor (line 392) | def monitor(self, neuron_activations: Dict[str, float], current_time: ...
    method add_binding (line 415) | def add_binding(self, binding: NeuronOutputBinding) -> bool:
    method remove_binding (line 421) | def remove_binding(self, neuron_name: str, output_hook: str) -> bool:
    method get_bindings_for_neuron (line 430) | def get_bindings_for_neuron(self, neuron_name: str) -> List[NeuronOutp...
    method clear_bindings (line 434) | def clear_bindings(self):
    method load_bindings_from_brain (line 438) | def load_bindings_from_brain(self, brain_data: dict):
    method export_bindings (line 450) | def export_bindings(self) -> List[dict]:
    method process_outputs (line 458) | def process_outputs(self):
    method _get_neuron_activation (line 487) | def _get_neuron_activation(self, brain_widget, neuron_name: str) -> Op...
    method _fire_binding (line 516) | def _fire_binding(self, binding: NeuronOutputBinding, activation: floa...
    method _handle_flee (line 544) | def _handle_flee(self, neuron_name, activation, squid, **kwargs):
    method _handle_seek_food (line 551) | def _handle_seek_food(self, neuron_name, activation, squid, tamagotchi...
    method _handle_seek_plant (line 558) | def _handle_seek_plant(self, neuron_name, activation, squid, tamagotch...
    method _handle_ink_cloud (line 577) | def _handle_ink_cloud(self, neuron_name, activation, squid, **kwargs):
    method _handle_change_color (line 583) | def _handle_change_color(self, neuron_name, activation, squid, **kwargs):
    method _handle_startle (line 614) | def _handle_startle(self, neuron_name, activation, squid, **kwargs):
    method _handle_calm (line 618) | def _handle_calm(self, neuron_name, activation, squid, **kwargs):
    method _handle_sleep (line 626) | def _handle_sleep(self, neuron_name, activation, squid, **kwargs):
    method _handle_wake (line 631) | def _handle_wake(self, neuron_name, activation, squid, **kwargs):
    method _handle_boost_happiness (line 636) | def _handle_boost_happiness(self, neuron_name, activation, squid, **kw...
    method _handle_reduce_anxiety (line 641) | def _handle_reduce_anxiety(self, neuron_name, activation, squid, **kwa...
    method _handle_wander (line 646) | def _handle_wander(self, neuron_name, activation, squid, **kwargs):
    method _handle_approach_rock (line 652) | def _handle_approach_rock(self, neuron_name, activation, squid, tamago...
    method _handle_throw_rock (line 665) | def _handle_throw_rock(self, neuron_name, activation, squid, **kwargs):
    method _handle_pick_up_rock (line 671) | def _handle_pick_up_rock(self, neuron_name, activation, squid, tamagot...
    method _handle_eat (line 680) | def _handle_eat(self, neuron_name, activation, squid, **kwargs):
    method _handle_boost_curiosity (line 684) | def _handle_boost_curiosity(self, neuron_name, activation, squid, **kw...
  function get_available_output_hooks (line 690) | def get_available_output_hooks() -> Dict[str, dict]:
  function get_output_hooks_by_category (line 694) | def get_output_hooks_by_category() -> Dict[str, Dict[str, dict]]:

FILE: src/brain_personality_tab.py
  class PersonalityTab (line 7) | class PersonalityTab(BrainBaseTab):
    method __init__ (line 8) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method initialize_ui (line 13) | def initialize_ui(self):
    method init_personality_section (line 38) | def init_personality_section(self):
    method update_from_brain_state (line 110) | def update_from_brain_state(self, state):
    method update_personality_display (line 115) | def update_personality_display(self, personality):
    method get_personality_description (line 135) | def get_personality_description(self, personality):
    method get_personality_modifier (line 139) | def get_personality_modifier(self, personality):
    method get_care_tips (line 143) | def get_care_tips(self, personality):
    method get_personality_modifiers (line 147) | def get_personality_modifiers(self, personality):

FILE: src/brain_render_worker.py
  class RenderState (line 25) | class RenderState:
  class BrainRenderWorker (line 111) | class BrainRenderWorker(QThread):
    method __init__ (line 123) | def __init__(self, parent=None):
    method stop (line 149) | def stop(self):
    method request_render (line 156) | def request_render(self, state: RenderState):
    method get_cached_image (line 175) | def get_cached_image(self) -> Optional[QImage]:
    method get_stats (line 180) | def get_stats(self) -> Dict[str, Any]:
    method run (line 189) | def run(self):
    method _render_frame (line 236) | def _render_frame(self, state: RenderState) -> QImage:
    method _draw_layers (line 279) | def _draw_layers(self, painter: QPainter, state: RenderState, scale: f...
    method _get_neuron_animation_color (line 309) | def _get_neuron_animation_color(self, state: RenderState, neuron_name:...
    method _draw_connections (line 337) | def _draw_connections(self, painter: QPainter, state: RenderState, sca...
    method _draw_neurons (line 552) | def _draw_neurons(self, painter: QPainter, state: RenderState, scale: ...
    method _draw_polygon (line 788) | def _draw_polygon(self, painter: QPainter, x: float, y: float,
  function create_render_state_from_widget (line 808) | def create_render_state_from_widget(brain_widget) -> RenderState:

FILE: src/brain_state_bridge.py
  function get_bridge_directory (line 21) | def get_bridge_directory() -> Path:
  function get_state_file_path (line 29) | def get_state_file_path() -> Path:
  function get_lock_file_path (line 34) | def get_lock_file_path() -> Path:
  function export_brain_state (line 43) | def export_brain_state(
  function set_game_running (line 119) | def set_game_running(running: bool = True) -> None:
  function update_brain_state_from_widget (line 149) | def update_brain_state_from_widget(brain_widget) -> bool:
  function is_game_running (line 178) | def is_game_running() -> bool:
  function import_brain_state_for_designer (line 217) | def import_brain_state_for_designer() -> Optional[Dict]:
  function convert_to_brain_design (line 244) | def convert_to_brain_design(live_state: Dict) -> Optional['BrainDesign']:
  function get_import_file_path (line 358) | def get_import_file_path() -> Path:
  function export_design_to_game (line 363) | def export_design_to_game(design_data: Dict) -> bool:
  function consume_pending_import (line 388) | def consume_pending_import() -> Optional[Dict]:
  function cleanup_bridge_files (line 421) | def cleanup_bridge_files() -> None:

FILE: src/brain_statistics_tab.py
  class StatisticsTab (line 7) | class StatisticsTab(BrainBaseTab):
    method __init__ (line 8) | def __init__(self, parent=None, tamagotchi_logic=None, brain_widget=No...
    method showEvent (line 50) | def showEvent(self, event):
    method hideEvent (line 60) | def hideEvent(self, event):
    method set_logic (line 65) | def set_logic(self, logic):
    method _sync_from_squid_statistics (line 69) | def _sync_from_squid_statistics(self):
    method _increment_squid_stat (line 97) | def _increment_squid_stat(self, stat_name, amount=1):
    method update_current_neurons (line 130) | def update_current_neurons(self, count):
    method _on_neuron_created_update_stats (line 147) | def _on_neuron_created_update_stats(self, neuron_name: str):
    method track_distance (line 151) | def track_distance(self, distance):
    method initialize_ui (line 159) | def initialize_ui(self):
    method update_from_brain_state (line 236) | def update_from_brain_state(self, state):
    method update_statistics (line 260) | def update_statistics(self):
    method update_display (line 288) | def update_display(self):
    method increment_stat (line 307) | def increment_stat(self, stat_name, amount=1):
    method reset_statistics (line 320) | def reset_statistics(self):
    method export_statistics (line 337) | def export_statistics(self):
    method save_statistics (line 379) | def save_statistics(self):
    method load_statistics (line 387) | def load_statistics(self):

FILE: src/brain_tool.py
  class SquidBrainWindow (line 55) | class SquidBrainWindow(QtWidgets.QMainWindow):
    method __init__ (line 56) | def __init__(self, tamagotchi_logic, debug_mode=False, config=None, sh...
    method set_tamagotchi_logic (line 175) | def set_tamagotchi_logic(self, tamagotchi_logic):
    method _check_bridge_import (line 202) | def _check_bridge_import(self):
    method setup_decorations_shortcut (line 229) | def setup_decorations_shortcut(self):
    method show_decorations_window (line 238) | def show_decorations_window(self):
    method _keep_worker_alive (line 243) | def _keep_worker_alive(self):
    method set_debug_mode (line 250) | def set_debug_mode(self, enabled):
    method check_worker_health (line 267) | def check_worker_health(self):
    method _restart_brain_worker (line 293) | def _restart_brain_worker(self):
    method _on_worker_activity (line 333) | def _on_worker_activity(self, result):
    method _on_worker_error (line 339) | def _on_worker_error(self, error_msg):
    method is_worker_healthy (line 344) | def is_worker_healthy(self):
    method on_neurogenesis_result (line 353) | def on_neurogenesis_result(self, result):
    method on_hebbian_result (line 359) | def on_hebbian_result(self, result):
    method on_state_update_result (line 364) | def on_state_update_result(self, result):
    method on_worker_error (line 369) | def on_worker_error(self, error_msg):
    method closeEvent (line 376) | def closeEvent(self, event):
    method on_hebbian_countdown_finished (line 387) | def on_hebbian_countdown_finished(self):
    method set_pause_state (line 391) | def set_pause_state(self, is_paused):
    method switch_to_designer_mode (line 416) | def switch_to_designer_mode(self):
    method _force_designer_refresh (line 557) | def _force_designer_refresh(self):
    method switch_to_game_mode (line 572) | def switch_to_game_mode(self):
    method apply_designer_state (line 624) | def apply_designer_state(self, data):
    method init_inspector (line 690) | def init_inspector(self):
    method show_inspector (line 695) | def show_inspector(self):
    method debug_print (line 703) | def debug_print(self, message):
    method toggle_debug_mode (line 707) | def toggle_debug_mode(self, enabled):
    method init_tabs (line 714) | def init_tabs(self):
    method get_brain_state (line 764) | def get_brain_state(self):
    method set_brain_state (line 811) | def set_brain_state(self, state):
    method _load_legacy_functional_neurons (line 937) | def _load_legacy_functional_neurons(self, state):
    method _direct_load_functional_neurons (line 954) | def _direct_load_functional_neurons(self, functional_neurons_data):
    method _force_rebuild_neurogenesis_neurons (line 1005) | def _force_rebuild_neurogenesis_neurons(self, state=None):
    method sync_state_from_squid (line 1137) | def sync_state_from_squid(self, squid):
    method init_timers (line 1169) | def init_timers(self):
    method update_randomness_factors (line 1191) | def update_randomness_factors(self, randomness):
    method create_thought_node (line 1207) | def create_thought_node(self, text):
    method draw_connection (line 1226) | def draw_connection(self, start, end, label):
    method _get_memory_colors (line 1242) | def _get_memory_colors(self, memory):
    method update_memory_tab (line 1252) | def update_memory_tab(self):
    method _update_overview_stats (line 1258) | def _update_overview_stats(self, stm, ltm):
    method _clear_layout (line 1307) | def _clear_layout(self, layout):
    method set_pause_state (line 1315) | def set_pause_state(self, is_paused):
    method _create_memory_card (line 1372) | def _create_memory_card(self, memory):
    method _get_card_style (line 1417) | def _get_card_style(self, memory):
    method _format_memory_content (line 1451) | def _format_memory_content(self, memory):
    method _create_memory_tooltip (line 1486) | def _create_memory_tooltip(self, memory):
    method _get_stm (line 1517) | def _get_stm(self):
    method _get_ltm (line 1523) | def _get_ltm(self):
    method _is_displayable (line 1529) | def _is_displayable(self, memory):
    method _update_memory_stats (line 1569) | def _update_memory_stats(self, short_term_memories, long_term_memories):
    method add_thought (line 1629) | def add_thought(self, thought):
    method clear_thoughts (line 1645) | def clear_thoughts(self):
    method init_decisions_tab (line 1648) | def init_decisions_tab(self):
    method update_decisions_tab (line 1669) | def update_decisions_tab(self, decision, decision_inputs):
    method init_associations_tab (line 1678) | def init_associations_tab(self):
    method toggle_explanation (line 1714) | def toggle_explanation(self, state):
    method update_associations (line 1717) | def update_associations(self):
    method generate_association_summary (line 1726) | def generate_association_summary(self, neuron1, neuron2, weight):
    method get_neuron_display_name (line 1755) | def get_neuron_display_name(self, neuron):
    method update_countdown (line 1770) | def update_countdown(self):
    method check_memory_decay (line 1806) | def check_memory_decay(self):
    method clear_learning_data (line 1855) | def clear_learning_data(self):
    method update_learning_interval (line 1861) | def update_learning_interval(self, seconds):
    method deduce_weight_change_reason (line 1882) | def deduce_weight_change_reason(self, pair, value1, value2, prev_weigh...
    method get_neuron_value (line 1940) | def get_neuron_value(self, value):
    method update_learning_data_table (line 1951) | def update_learning_data_table(self):
    method export_learning_data (line 1966) | def export_learning_data(self):
    method export_learning_tab_contents (line 1984) | def export_learning_tab_contents(self):
    method export_associations (line 2001) | def export_associations(self):
    method update_personality_effects (line 2008) | def update_personality_effects(self, personality, weights, adjusted_we...
    method update_brain (line 2029) | def update_brain(self, state):
    method train_hebbian (line 2047) | def train_hebbian(self):
    method init_training_data_tab (line 2064) | def init_training_data_tab(self):
    method toggle_overview (line 2099) | def toggle_overview(self, state):
    method toggle_capture_training_data (line 2105) | def toggle_capture_training_data(self, state):
    method update_training_data_table (line 2110) | def update_training_data_table(self):
    method save_brain_state (line 2124) | def save_brain_state(self):
    method load_brain_state (line 2130) | def load_brain_state(self):
    method export_brain_weights_text (line 2137) | def export_brain_weights_text(self):
    method export_hebbian_json (line 2146) | def export_hebbian_json(self):
    method export_decision_engine_json (line 2156) | def export_decision_engine_json(self):
    method init_console (line 2169) | def init_console(self):
    method create_button (line 2175) | def create_button(self, text, callback, color):
    method stimulate_brain (line 2182) | def stimulate_brain(self):
    method update_neural_visualization (line 2194) | def update_neural_visualization(self, inputs):
    method update_brain_weights (line 2263) | def update_brain_weights(self, weights_data):
    method animate_decision_process (line 2281) | def animate_decision_process(self, decision_data):
    method highlight_decision_in_ui (line 2297) | def highlight_decision_in_ui(self, decision):
    method update_learning_status (line 2312) | def update_learning_status(self, is_active):
    method update_learning_interval (line 2336) | def update_learning_interval(self, seconds):
    method trigger_learning_cycle (line 2363) | def trigger_learning_cycle(self):
    method update_connection_table (line 2413) | def update_connection_table(self):
    method filter_connections (line 2501) | def filter_connections(self):
    method show_connection_details (line 2505) | def show_connection_details(self):
    method apply_neurogenesis_settings (line 2588) | def apply_neurogenesis_settings(self):
    method trigger_neurogenesis (line 2623) | def trigger_neurogenesis(self):
    method update_heatmap (line 2714) | def update_heatmap(self):
    method _draw_heatmap_legend (line 2787) | def _draw_heatmap_legend(self, x, y):
    method get_center_position (line 2809) | def get_center_position(self):
    method update_paused_overlay (line 2815) | def update_paused_overlay(self):
    method update_learning_statistics (line 2823) | def update_learning_statistics(self):
    method zoom_heatmap (line 3017) | def zoom_heatmap(self, value):
    method export_learning_data (line 3030) | def export_learning_data(self):
    method export_learning_data_html (line 3053) | def export_learning_data_html(self, file_name):
    method export_learning_data_csv (line 3218) | def export_learning_data_csv(self, file_name):
    method export_learning_data_text (line 3253) | def export_learning_data_text(self, file_name):
    method clear_learning_log (line 3292) | def clear_learning_log(self):
  class NeuronInspector (line 3313) | class NeuronInspector(QtWidgets.QDialog):
    method __init__ (line 3314) | def __init__(self, brain_tool_window, brain_widget_ref, parent=None): ...
    method update_neuron_list (line 3406) | def update_neuron_list(self):
    method inspect_neuron_by_name (line 3419) | def inspect_neuron_by_name(self, neuron_name):
    method update_info_from_combo (line 3433) | def update_info_from_combo(self):
    method update_info (line 3437) | def update_info(self):

FILE: src/brain_tooltips.py
  class EnhancedBrainTooltips (line 7) | class EnhancedBrainTooltips:
    method __init__ (line 10) | def __init__(self, brain_widget):
    method _get_creation_time (line 19) | def _get_creation_time(self, func_neuron):
    method _get_last_activated (line 24) | def _get_last_activated(self, func_neuron):
    method _get_neuron_type (line 27) | def _get_neuron_type(self, func_neuron):
    method show_tooltip_for_position (line 37) | def show_tooltip_for_position(self, event):
    method show_tooltip_for_neuron (line 50) | def show_tooltip_for_neuron(self, neuron_name, _unused_pos):
    method hide_tooltip (line 97) | def hide_tooltip(self):
    method _generate_tooltip (line 101) | def _generate_tooltip(self, neuron_name):
    method _generate_functional_tooltip (line 113) | def _generate_functional_tooltip(self, neuron_name):
    method _is_binary_neuron (line 127) | def _is_binary_neuron(self, neuron_name):
    method _generate_basic_tooltip (line 184) | def _generate_basic_tooltip(self, neuron_name):
    method _get_connection_summary (line 210) | def _get_connection_summary(self, neuron_name):
    method _get_utility_color (line 247) | def _get_utility_color(self, utility):
    method _get_activation_color (line 256) | def _get_activation_color(self, activation):
    method _get_utility_indicator (line 260) | def _get_utility_indicator(self, utility):

FILE: src/brain_ui_utils.py
  class UiUtils (line 4) | class UiUtils:
    method create_styled_button (line 6) | def create_styled_button(text, callback, color, size=(200, 50), font_s...
    method format_memory_display (line 26) | def format_memory_display(memory):
    method _is_displayable_memory (line 83) | def _is_displayable_memory(self, memory):
    method create_memory_card (line 107) | def create_memory_card(memory):
    method get_memory_colors (line 133) | def get_memory_colors(memory):
    method create_info_box (line 144) | def create_info_box(title, content, icon_path=None, bg_color="#f8f9fa"):
  function darken_color (line 182) | def darken_color(color, amount=20):

FILE: src/brain_utils.py
  class ConsoleOutput (line 3) | class ConsoleOutput:
    method __init__ (line 4) | def __init__(self, text_edit):
    method write (line 7) | def write(self, text):
    method flush (line 22) | def flush(self):

FILE: src/brain_widget.py
  class BrainWidget (line 65) | class BrainWidget(QtWidgets.QWidget):
    method __init__ (line 71) | def __init__(self, config=None, debug_mode=False, tamagotchi_logic=None,
    method set_brain_worker (line 343) | def set_brain_worker(self, worker):
    method showEvent (line 369) | def showEvent(self, event):
    method export_brain_state_for_designer (line 377) | def export_brain_state_for_designer(self):
    method cleanup_brain_bridge (line 395) | def cleanup_brain_bridge(self):
    method closeEvent (line 407) | def closeEvent(self, event):
    method set_debug_mode (line 415) | def set_debug_mode(self, enabled):
    method _request_render_if_dirty (line 442) | def _request_render_if_dirty(self):
    method _has_active_animations (line 447) | def _has_active_animations(self) -> bool:
    method _request_render (line 464) | def _request_render(self):
    method _on_render_complete (line 482) | def _on_render_complete(self, image: QImage, render_time: float):
    method mark_render_dirty (line 488) | def mark_render_dirty(self):
    method _cleanup_render_worker (line 492) | def _cleanup_render_worker(self):
    method _build_animation_palette (line 506) | def _build_animation_palette(self):
    method is_binary_neuron (line 610) | def is_binary_neuron(self, neuron_name: str) -> bool:
    method get_animation_style (line 625) | def get_animation_style(self) -> str:
    method get_animation_style_info (line 629) | def get_animation_style_info(self) -> tuple:
    method set_animation_style (line 634) | def set_animation_style(self, style_name: str) -> bool:
    method get_available_animation_styles (line 669) | def get_available_animation_styles() -> list:
    method get_animation_styles_info (line 674) | def get_animation_styles_info() -> list:
    method _init_style_animation_state (line 678) | def _init_style_animation_state(self):
    method _get_or_create_ambient_pulse (line 702) | def _get_or_create_ambient_pulse(self, conn_key):
    method _update_ambient_pulses (line 718) | def _update_ambient_pulses(self, dt):
    method _spawn_comm_glow (line 743) | def _spawn_comm_glow(self, source, target):
    method find_orphan_neurons (line 778) | def find_orphan_neurons(self):
    method _update_comm_glows (line 800) | def _update_comm_glows(self, dt):
    method _spawn_activity_glows (line 826) | def _spawn_activity_glows(self, current_time):
    method _draw_comm_glows_for_connection (line 858) | def _draw_comm_glows_for_connection(self, painter, scale, conn_key, st...
    method _spawn_neural_pulse (line 949) | def _spawn_neural_pulse(self, source, target, color=None):
    method _update_neural_pulses (line 981) | def _update_neural_pulses(self, current_time):
    method _spawn_neural_pulses_from_activity (line 1001) | def _spawn_neural_pulses_from_activity(self, current_time):
    method _draw_neural_connections (line 1020) | def _draw_neural_connections(self, painter, scale):
    method _on_neurogenesis_complete (line 1118) | def _on_neurogenesis_complete(self, result: dict):
    method _on_hebbian_complete (line 1194) | def _on_hebbian_complete(self, result: dict):
    method _on_state_update_complete (line 1280) | def _on_state_update_complete(self, result: dict):
    method _on_worker_error (line 1333) | def _on_worker_error(self, error_msg: str):
    method _update_worker_cache (line 1337) | def _update_worker_cache(self):
    method stop_worker (line 1360) | def stop_worker(self):
    method is_neuron_revealed (line 1372) | def is_neuron_revealed(self, name):
    method _advance_link_fades (line 1387) | def _advance_link_fades(self):
    method update_animations (line 1421) | def update_animations(self):
    method _get_cached_font (line 1528) | def _get_cached_font(self, size, bold=False):
    method _get_cached_pen (line 1538) | def _get_cached_pen(self, color_tuple, width=1):
    method reveal_neuron (line 1548) | def reveal_neuron(self, neuron_name):
    method _enable_links_after_reveal (line 1590) | def _enable_links_after_reveal(self):
    method reveal_all_core_neurons (line 1615) | def reveal_all_core_neurons(self):
    method _reveal_connections_for_neuron (line 1631) | def _reveal_connections_for_neuron(self, neuron_name):
    method _update_network_metrics (line 1649) | def _update_network_metrics(self):
    method finish_reveal_animation (line 1659) | def finish_reveal_animation(self):
    method add_weight_animation (line 1683) | def add_weight_animation(self, neuron1, neuron2, old_weight, new_weight,
    method is_neurogenesis_neuron (line 1781) | def is_neurogenesis_neuron(self, neuron_name: str) -> bool:
    method _periodic_neurogenesis_check (line 1797) | def _periodic_neurogenesis_check(self):
    method toggle_pruning (line 1843) | def toggle_pruning(self, enabled):
    method get_stress_neuron_count (line 1856) | def get_stress_neuron_count(self):
    method stop_hebbian_learning (line 1860) | def stop_hebbian_learning(self):
    method start_hebbian_learning (line 1866) | def start_hebbian_learning(self, duration_seconds=30):
    method _update_communication_events (line 1873) | def _update_communication_events(self):
    method get_neuron_value (line 1884) | def get_neuron_value(self, value):
    method is_new_neuron (line 1904) | def is_new_neuron(self, neuron_name, newness_duration_sec=300): # 300s...
    method update_connection (line 1919) | def update_connection(self, neuron1, neuron2, value1, value2):
    method is_connector_neuron (line 1997) | def is_connector_neuron(self, neuron_name: str) -> bool:
    method get_neuron_degree (line 2021) | def get_neuron_degree(self, neuron_name: str) -> int:
    method prune_weak_connections (line 2029) | def prune_weak_connections(self, threshold=0.05, min_age_sec=600):
    method perform_hebbian_learning (line 2065) | def perform_hebbian_learning(self):
    method _perform_hebbian_learning_sync (line 2093) | def _perform_hebbian_learning_sync(self):
    method get_recently_updated_neurons (line 2201) | def get_recently_updated_neurons(self):
    method resizeEvent (line 2206) | def resizeEvent(self, event):
    method closeEvent (line 2242) | def closeEvent(self, event):
    method save_brain_state (line 2274) | def save_brain_state(self):
    method load_brain_state (line 2284) | def load_brain_state(self, state):
    method create_initial_state (line 2324) | def create_initial_state(self):
    method reset_animation_state (line 2354) | def reset_animation_state(self):
    method initialize_connections (line 2374) | def initialize_connections(self):
    method sync_connections_from_weights (line 2379) | def sync_connections_from_weights(self):
    method initialize_weights (line 2384) | def initialize_weights(self):
    method get_neuron_count (line 2398) | def get_neuron_count(self):
    method get_edge_count (line 2402) | def get_edge_count(self):
    method get_weakest_connections (line 2406) | def get_weakest_connections(self, n=3):
    method get_extreme_neurons (line 2414) | def get_extreme_neurons(self, n=3):
    method get_unbalanced_connections (line 2422) | def get_unbalanced_connections(self, n=3):
    method calculate_network_health (line 2431) | def calculate_network_health(self):
    method calculate_network_efficiency (line 2438) | def calculate_network_efficiency(self):
    method log_neurogenesis_event (line 2450) | def log_neurogenesis_event(self, neuron_name, event_type, reason=None,...
    method update_state (line 2487) | def update_state(self, new_state=None):
    method _perform_state_update_sync (line 2579) | def _perform_state_update_sync(self):
    method _fast_apply_external_state (line 2646) | def _fast_apply_external_state(self, new_state):
    method _perform_state_update_sync (line 2658) | def _perform_state_update_sync(self):
    method provide_outcome_feedback (line 2692) | def provide_outcome_feedback(self, outcome_value: float):
    method check_neurogenesis_triggers (line 2713) | def check_neurogenesis_triggers(self, state):
    method get_neurogenesis_threshold (line 2775) | def get_neurogenesis_threshold(self, trigger_type):
    method stimulate_brain (line 2783) | def stimulate_brain(self, stimulation_values):
    method get_adjusted_threshold (line 2793) | def get_adjusted_threshold(self, base_threshold, trigger_type):
    method prune_weak_neurons (line 2807) | def prune_weak_neurons(self):
    method apply_repulsion_force (line 2861) | def apply_repulsion_force(self, iterations=15, strength=0.6, threshold...
    method update_weights (line 2939) | def update_weights(self):
    method freeze_weights (line 2951) | def freeze_weights(self):
    method unfreeze_weights (line 2954) | def unfreeze_weights(self):
    method strengthen_connection (line 2957) | def strengthen_connection(self, neuron1, neuron2, amount):
    method capture_training_data (line 2981) | def capture_training_data(self, state):
    method train_hebbian (line 2986) | def train_hebbian(self):
    method get_association_strength (line 2994) | def get_association_strength(self, neuron1, neuron2):
    method draw_layers (line 2999) | def draw_layers(self, painter, scale):
    method draw_connections (line 3048) | def draw_connections(self, painter, scale):
    method _get_logical_coords (line 3365) | def _get_logical_coords(self, widget_pos):
    method get_connection_at_pos (line 3392) | def get_connection_at_pos(self, widget_pos):
    method _draw_connection_highlight (line 3419) | def _draw_connection_highlight(self, painter):
    method _dist_to_segment_squared (line 3484) | def _dist_to_segment_squared(self, p, v, w):
    method get_neuron_at_pos (line 3493) | def get_neuron_at_pos(self, widget_pos):
    method is_binary_neuron (line 3507) | def is_binary_neuron(self, name: str) -> bool:
    method paintEvent (line 3517) | def paintEvent(self, event):
    method _draw_overlays (line 3565) | def _draw_overlays(self, painter):
    method _draw_tutorial_glow (line 3588) | def _draw_tutorial_glow(self, painter):
    method _draw_neurogenesis_highlight (line 3598) | def _draw_neurogenesis_highlight(self, painter):
    method _draw_drag_preview (line 3631) | def _draw_drag_preview(self, painter):
    method draw_neurons (line 3689) | def draw_neurons(self, painter, scale=1.0):
    method _draw_standard_label (line 3861) | def _draw_standard_label(self, painter, name, x, y, scale, font_size=N...
    method _draw_neuron_label (line 3926) | def _draw_neuron_label(self, painter, x, y, name, radius, scale, alpha...
    method _draw_neuron_label (line 3956) | def _draw_neuron_label(self, painter, x, y, name, radius, scale, alpha...
    method _draw_standard_label (line 4022) | def _draw_standard_label(self, painter, name, x, y, scale, font_size=N...
    method draw_binary_neuron (line 4081) | def draw_binary_neuron(self, painter, x, y, value, label, scale=1.0):
    method draw_circular_neuron (line 4090) | def draw_circular_neuron(self, painter, name, pos, value, scale=1.0, v...
    method draw_triangular_neuron (line 4110) | def draw_triangular_neuron(self, painter, x, y, radius, label, scale=1...
    method draw_hexagon_neuron (line 4115) | def draw_hexagon_neuron(self, painter, x, y, radius, label, scale=1.0,...
    method show_diagnostic_report (line 4158) | def show_diagnostic_report(self):
    method _draw_polygon_neuron (line 4162) | def _draw_polygon_neuron(self, painter, x, y, sides, radius, color, la...
    method _draw_neuron_label (line 4188) | def _draw_neuron_label(self, painter, x, y, name, radius, scale, alpha...
    method draw_neurogenesis_highlights (line 4249) | def draw_neurogenesis_highlights(self, painter, scale):
    method draw_square_neuron (line 4257) | def draw_square_neuron(self, painter, x, y, radius, label, scale=1.0, ...
    method draw_diamond_neuron (line 4262) | def draw_diamond_neuron(self, painter, x, y, radius, label, scale=1.0,...
    method toggle_links (line 4267) | def toggle_links(self, state):
    method toggle_weights (line 4308) | def toggle_weights(self, state):
    method toggle_capture_training_data (line 4313) | def toggle_capture_training_data(self, state):
    method mousePressEvent (line 4316) | def mousePressEvent(self, event):
    method handle_neuron_clicked (line 4346) | def handle_neuron_clicked(self, neuron_name):
    method show_diagnostic_report (line 4349) | def show_diagnostic_report(self):
    method mouseMoveEvent (line 4353) | def mouseMoveEvent(self, event):
    method leaveEvent (line 4390) | def leaveEvent(self, event):
    method mouseDoubleClickEvent (line 4399) | def mouseDoubleClickEvent(self, event):
    method mouseReleaseEvent (line 4431) | def mouseReleaseEvent(self, event):
    method draw_strength_multiplier (line 4449) | def draw_strength_multiplier(self, painter, scale):
    method _is_click_on_neuron (line 4517) | def _is_click_on_neuron(self, point, neuron_pos, scale):
    method is_point_inside_neuron (line 4522) | def is_point_inside_neuron(self, point, neuron_pos, scale):
    method reset_positions (line 4527) | def reset_positions(self):
    method _randomize_all_positions (line 4537) | def _randomize_all_positions(self):
    method start_tutorial_glow (line 4553) | def start_tutorial_glow(self, duration_ms=5000):
    method stop_tutorial_glow (line 4575) | def stop_tutorial_glow(self):
    method get_tutorial_glow_opacity (line 4586) | def get_tutorial_glow_opacity(self):
    method set_tutorial_glow_opacity (line 4590) | def set_tutorial_glow_opacity(self, value):
  class PerformanceProfiler (line 4600) | class PerformanceProfiler:
    method __init__ (line 4603) | def __init__(self):
    method start (line 4607) | def start(self, name):
    method stop (line 4614) | def stop(self):
    method report (line 4622) | def report(self):
  class NetworkRenderingMixin (line 4639) | class NetworkRenderingMixin:
    method draw_connections (line 4646) | def draw_connections(self, painter, scale):
    method draw_neurons_static (line 4896) | def draw_neurons_static(
    method draw_layers_static (line 4999) | def draw_layers_static(painter, layers, scale=1.0):

FILE: src/brain_worker.py
  class BrainWorker (line 11) | class BrainWorker(QThread):
    method __init__ (line 25) | def __init__(self, brain_widget=None):
    method update_cache (line 54) | def update_cache(self, state, weights, positions, config, excluded_neu...
    method queue_neurogenesis_check (line 73) | def queue_neurogenesis_check(self, state_context):
    method queue_hebbian_learning (line 76) | def queue_hebbian_learning(self):
    method queue_state_update (line 80) | def queue_state_update(self, update_data):
    method _add_task (line 83) | def _add_task(self, task_type, data):
    method stop (line 88) | def stop(self):
    method pause (line 94) | def pause(self):
    method resume (line 99) | def resume(self):
    method run (line 106) | def run(self):
    method _perform_neurogenesis_check (line 153) | def _perform_neurogenesis_check(self, data):
    method _perform_hebbian_learning (line 197) | def _perform_hebbian_learning(self):
    method _process_state_update (line 335) | def _process_state_update(self, data):
    method _get_neuron_value (line 397) | def _get_neuron_value(self, val):

FILE: src/certificate.py
  class SquidCertificateWindow (line 11) | class SquidCertificateWindow(QtWidgets.QDialog):
    method __init__ (line 12) | def __init__(self, parent=None, tamagotchi_logic=None):
    method update_certificate (line 32) | def update_certificate(self):
    method print_certificate (line 211) | def print_certificate(self):

FILE: src/compute_backend.py
  class ComputeBackend (line 37) | class ComputeBackend:
    method zeros (line 40) | def zeros(self, shape: tuple):
    method forward (line 44) | def forward(self, weights_matrix, inputs):
    method hebbian (line 48) | def hebbian(self, associations, sample: list, learning_rate: float):
    method get_value (line 60) | def get_value(self, matrix, i: int, j: int) -> float:
    method name (line 65) | def name(self) -> str:
  class NumpyBackend (line 73) | class NumpyBackend(ComputeBackend):
    method __init__ (line 79) | def __init__(self):
    method zeros (line 86) | def zeros(self, shape: tuple):
    method forward (line 89) | def forward(self, weights_matrix, inputs):
    method hebbian (line 92) | def hebbian(self, associations, sample: list, learning_rate: float):
    method get_value (line 103) | def get_value(self, matrix, i: int, j: int) -> float:
    method name (line 107) | def name(self) -> str:
  class ONNXBackend (line 115) | class ONNXBackend(ComputeBackend):
    method __init__ (line 140) | def __init__(self):
    method _build_session (line 172) | def _build_session(self, rows: int, cols: int):
    method zeros (line 206) | def zeros(self, shape: tuple):
    method forward (line 209) | def forward(self, weights_matrix, inputs):
    method hebbian (line 226) | def hebbian(self, associations, sample: list, learning_rate: float):
    method get_value (line 242) | def get_value(self, matrix, i: int, j: int) -> float:
    method name (line 246) | def name(self) -> str:
  function get_backend (line 259) | def get_backend(backend_name: str | None = None) -> ComputeBackend:
  function reset_backend (line 289) | def reset_backend():
  function _read_backend_from_config (line 299) | def _read_backend_from_config() -> str:

FILE: src/config_manager.py
  class ConfigManager (line 8) | class ConfigManager:
    method __init__ (line 19) | def __init__(self, config_filename="config.ini"):
    method load_config (line 35) | def load_config(self):
    method create_default_config (line 40) | def create_default_config(self):
    method get_hebbian_pairs_per_cycle (line 232) | def get_hebbian_pairs_per_cycle(self):
    method get_showmanship_enabled (line 239) | def get_showmanship_enabled(self):
    method get_facts_enabled (line 249) | def get_facts_enabled(self):
    method get_fact_interval_ms (line 252) | def get_fact_interval_ms(self):
    method get_fact_display_ms (line 256) | def get_fact_display_ms(self):
    method get_rock_config (line 260) | def get_rock_config(self):
    method get_poop_config (line 274) | def get_poop_config(self):
    method get_decorations_config (line 296) | def get_decorations_config(self):
    method get_specialisation_caps (line 305) | def get_specialisation_caps(self):
    method get_neurogenesis_config (line 313) | def get_neurogenesis_config(self):
    method get_hebbian_config (line 398) | def get_hebbian_config(self):
    method get_linkblink_config (line 409) | def get_linkblink_config(self):
    method get_random_carry_duration (line 417) | def get_random_carry_duration(self):
    method _parse_config_value (line 422) | def _parse_config_value(self, value):
    method get_animation_style (line 447) | def get_animation_style(self) -> str:
    method set_animation_style (line 457) | def set_animation_style(self, style_name: str) -> bool:
    method get_animation_config (line 480) | def get_animation_config(self, style_name: str = None) -> dict:
    method get_available_animation_styles (line 581) | def get_available_animation_styles(self) -> list:
    method get_display_config (line 585) | def get_display_config(self):
    method is_designer_position_valid (line 597) | def is_designer_position_valid(self, x, y, existing_positions, center_...
    method _save_config (line 635) | def _save_config(self):
    method get_language (line 643) | def get_language(self):

FILE: src/custom_brain_loader.py
  function add_load_brain_button (line 17) | def add_load_brain_button(network_tab, checkbox_layout):
  function get_custom_brain_save_data (line 96) | def get_custom_brain_save_data() -> Optional[Dict]:
  function has_custom_brain (line 116) | def has_custom_brain() -> bool:
  function get_custom_brain_name (line 121) | def get_custom_brain_name() -> Optional[str]:
  function validate_custom_brain_save (line 126) | def validate_custom_brain_save(save_data: Dict) -> tuple[bool, str]:
  function restore_custom_brain_from_save (line 153) | def restore_custom_brain_from_save(save_data: Dict, brain_widget) -> tup...
  function show_custom_brain_load_warning (line 205) | def show_custom_brain_load_warning(parent, save_data: Dict) -> bool:
  class BrainLoader (line 263) | class BrainLoader:
    method __init__ (line 266) | def __init__(self, network_tab):
    method _find_brains_folder (line 271) | def _find_brains_folder(self) -> Path:
    method show_dialog (line 287) | def show_dialog(self):
    method load_file (line 293) | def load_file(self, filepath: str) -> bool:
    method reset_to_default (line 392) | def reset_to_default(self):
    method _parse (line 443) | def _parse(self, data: Dict) -> Optional[Dict]:
    method _apply (line 498) | def _apply(self, brain: dict):
    method _update_worker (line 623) | def _update_worker(self):
    method reset_positions_to_default (line 669) | def reset_positions_to_default(self):
  class BrainSelectDialog (line 694) | class BrainSelectDialog(QtWidgets.QDialog):
    method __init__ (line 697) | def __init__(self, brains_folder: Path, parent=None):
    method _setup_ui (line 706) | def _setup_ui(self):
    method _refresh (line 751) | def _refresh(self):
    method _on_select (line 766) | def _on_select(self, row):
    method _browse (line 787) | def _browse(self):
    method _open_folder (line 795) | def _open_folder(self):
    method accept (line 805) | def accept(self):

FILE: src/decision_engine.py
  class DecisionEngine (line 10) | class DecisionEngine:
    method __init__ (line 17) | def __init__(self, squid):
    method get_decision_data (line 21) | def get_decision_data(self):
    method make_decision (line 25) | def make_decision(self):
    method _execute_neural_decision (line 239) | def _execute_neural_decision(self, decision: str, brain_state: dict):

FILE: src/designer_canvas.py
  class SmartConnectionItem (line 29) | class SmartConnectionItem(QGraphicsItem):
    method __init__ (line 32) | def __init__(self, source_pos, target_pos, weight=0.5, source_name="",...
    method boundingRect (line 60) | def boundingRect(self):
    method shape (line 69) | def shape(self):
    method hoverEnterEvent (line 81) | def hoverEnterEvent(self, event):
    method hoverLeaveEvent (line 86) | def hoverLeaveEvent(self, event):
    method advance_animation (line 91) | def advance_animation(self):
    method paint (line 120) | def paint(self, painter, option, widget):
  class ConnectorNeuronItem (line 156) | class ConnectorNeuronItem(QGraphicsItem):
    method __init__ (line 162) | def __init__(self, x, y, radius, name, parent=None):
    method boundingRect (line 175) | def boundingRect(self):
    method shape (line 180) | def shape(self):
    method hoverEnterEvent (line 194) | def hoverEnterEvent(self, event):
    method hoverLeaveEvent (line 199) | def hoverLeaveEvent(self, event):
    method paint (line 204) | def paint(self, painter, option, widget):
  class NeuronItem (line 248) | class NeuronItem(QGraphicsEllipseItem):
    method __init__ (line 254) | def __init__(self, x, y, radius, name, neuron_type=None, parent=None):
    method event (line 269) | def event(self, event):
    method hoverEnterEvent (line 274) | def hoverEnterEvent(self, event):
    method hoverLeaveEvent (line 279) | def hoverLeaveEvent(self, event):
    method paint (line 284) | def paint(self, painter, option, widget):
  class DesignerConfig (line 299) | class DesignerConfig:
    method __init__ (line 301) | def __init__(self, config_path=None):
    method _load_config (line 309) | def _load_config(self):
    method save (line 317) | def save(self):
    method get (line 323) | def get(self, key, default=None):
    method set (line 326) | def set(self, key, value):
  class ConfirmDeleteDialog (line 331) | class ConfirmDeleteDialog(QDialog):
    method __init__ (line 333) | def __init__(self, source, target, parent=None):
    method accept (line 354) | def accept(self):
  class ConnectionWeightDialog (line 359) | class ConnectionWeightDialog(QDialog):
    method __init__ (line 361) | def __init__(self, source, target, current_weight, config, parent=None):
    method on_delete_clicked (line 405) | def on_delete_clicked(self):
    method get_weight (line 419) | def get_weight(self):
  class BrainCanvas (line 423) | class BrainCanvas(QGraphicsView):
    method __init__ (line 445) | def __init__(self, design: BrainDesign, parent=None):
    method drawBackground (line 482) | def drawBackground(self, painter, rect):
    method animate_network (line 524) | def animate_network(self):
    method rebuild (line 535) | def rebuild(self):
    method draw_layers (line 618) | def draw_layers(self):
    method draw_single_neuron (line 642) | def draw_single_neuron(self, name, neuron):
    method draw_neurons (line 767) | def draw_neurons(self):
    method center_on_neurons (line 771) | def center_on_neurons(self):
    method get_neuron_at (line 790) | def get_neuron_at(self, pos):
    method get_connection_at (line 798) | def get_connection_at(self, pos):
    method mousePressEvent (line 806) | def mousePressEvent(self, event):
    method mouseDoubleClickEvent (line 843) | def mouseDoubleClickEvent(self, event):
    method mouseMoveEvent (line 854) | def mouseMoveEvent(self, event):
    method mouseReleaseEvent (line 894) | def mouseReleaseEvent(self, event):
    method keyPressEvent (line 926) | def keyPressEvent(self, event):
    method wheelEvent (line 949) | def wheelEvent(self, event):
    method select_neuron (line 978) | def select_neuron(self, name):
    method select_connection (line 984) | def select_connection(self, source, target):
    method clear_selection (line 990) | def clear_selection(self):
    method start_connection_drag (line 995) | def start_connection_drag(self, neuron_name, scene_pos):
    method is_valid_connection (line 1004) | def is_valid_connection(self, src_name, tgt_name):
    method reverse_selected_connection (line 1013) | def reverse_selected_connection(self):
    method open_weight_dialog (line 1030) | def open_weight_dialog(self, source, target):
    method adjust_connection_weight_by_key (line 1048) | def adjust_connection_weight_by_key(self, event):
    method adjust_connection_weight_page (line 1062) | def adjust_connection_weight_page(self, event):
  class PolygonNeuronItem (line 1077) | class PolygonNeuronItem(QGraphicsItem):
    method __init__ (line 1083) | def __init__(self, x, y, radius, name, sides=4, rotation=0, color=(150...
    method boundingRect (line 1098) | def boundingRect(self):
    method shape (line 1103) | def shape(self):
    method paint (line 1118) | def paint(self, painter, option, widget):
    method hoverEnterEvent (line 1152) | def hoverEnterEvent(self, event):
    method hoverLeaveEvent (line 1157) | def hoverLeaveEvent(self, event):

FILE: src/designer_canvas_utils.py
  class WiringPreviewItem (line 20) | class WiringPreviewItem(QGraphicsItem):
    method __init__ (line 26) | def __init__(self, start_pos: QPointF, parent=None):
    method set_end (line 40) | def set_end(self, pos: QPointF, is_valid: bool = False,
    method boundingRect (line 49) | def boundingRect(self) -> QRectF:
    method paint (line 52) | def paint(self, painter, option, widget):
  class ActivationBadge (line 131) | class ActivationBadge(QGraphicsItem):
    method __init__ (line 136) | def __init__(self, center: QPointF, value: float,
    method boundingRect (line 147) | def boundingRect(self) -> QRectF:
    method paint (line 150) | def paint(self, painter, option, widget):
  class ConnectionStrengthIndicator (line 190) | class ConnectionStrengthIndicator(QGraphicsItem):
    method __init__ (line 195) | def __init__(self, pos: QPointF, weight: float, parent=None):
    method boundingRect (line 201) | def boundingRect(self) -> QRectF:
    method paint (line 204) | def paint(self, painter, option, widget):
  class NeuronHighlightRing (line 242) | class NeuronHighlightRing(QGraphicsEllipseItem):
    method __init__ (line 247) | def __init__(self, center: QPointF, radius: float,
    method advance_pulse (line 265) | def advance_pulse(self):
    method paint (line 271) | def paint(self, painter, option, widget):
  function get_weight_color (line 302) | def get_weight_color(weight: float) -> QColor:
  function format_neuron_name (line 322) | def format_neuron_name(name: str) -> str:

FILE: src/designer_constants.py
  class NeuronType (line 5) | class NeuronType(Enum):
  function is_core_neuron (line 64) | def is_core_neuron(name): return name in CORE_NEURONS
  function is_required_neuron (line 65) | def is_required_neuron(name): return name in REQUIRED_NEURONS
  function is_input_sensor (line 66) | def is_input_sensor(name): return name in INPUT_SENSORS
  function is_binary_neuron (line 67) | def is_binary_neuron(name): return name in BINARY_NEURONS
  function is_protected_neuron (line 68) | def is_protected_neuron(name): return is_required_neuron(name)
  function get_neuron_category (line 69) | def get_neuron_category(name):
  function get_missing_required (line 74) | def get_missing_required(existing): return [n for n in REQUIRED_NEURONS ...
  function get_default_connections_for_sensor (line 90) | def get_default_connections_for_sensor(sensor_name: str) -> list:

FILE: src/designer_core.py
  class DesignerLayer (line 15) | class DesignerLayer:
    method to_dict (line 21) | def to_dict(self) -> dict:
    method from_dict (line 30) | def from_dict(cls, data: dict) -> 'DesignerLayer':
  class DesignerNeuron (line 44) | class DesignerNeuron:
    method __post_init__ (line 54) | def __post_init__(self):
    method is_core (line 93) | def is_core(self) -> bool: return is_core_neuron(self.name)
    method is_required (line 95) | def is_required(self) -> bool: return is_required_neuron(self.name)
    method is_sensor (line 97) | def is_sensor(self) -> bool:
    method is_protected (line 100) | def is_protected(self) -> bool: return self.is_required
    method category (line 102) | def category(self) -> str: return get_neuron_category(self.name)
    method to_dict (line 104) | def to_dict(self) -> dict:
    method from_dict (line 118) | def from_dict(cls, data: dict) -> 'DesignerNeuron':
  class DesignerConnection (line 151) | class DesignerConnection:
    method to_dict (line 156) | def to_dict(self) -> dict:
    method from_dict (line 160) | def from_dict(cls, data: dict) -> 'DesignerConnection':
  class BrainDesign (line 163) | class BrainDesign:
    method __init__ (line 164) | def __init__(self):
    method remove_optional_sensors (line 176) | def remove_optional_sensors(self) -> int:
    method _validate_and_fix_position (line 188) | def _validate_and_fix_position(self, position: any) -> Tuple[float, fl...
    method _generate_custom_position (line 203) | def _generate_custom_position(self) -> Tuple[float, float]:
    method add_neuron (line 211) | def add_neuron(self, neuron: DesignerNeuron) -> bool:
    method remove_neuron (line 217) | def remove_neuron(self, name: str) -> Tuple[bool, str]:
    method rename_neuron (line 225) | def rename_neuron(self, old_name: str, new_name: str) -> Tuple[bool, s...
    method get_neuron (line 237) | def get_neuron(self, name: str) -> Optional[DesignerNeuron]:
    method add_connection (line 240) | def add_connection(self, source: str, target: str, weight: float = 0.5...
    method remove_connection (line 249) | def remove_connection(self, source: str, target: str) -> bool:
    method get_connection (line 256) | def get_connection(self, source: str, target: str) -> Optional[Designe...
    method add_layer (line 261) | def add_layer(self, layer: DesignerLayer) -> bool:
    method remove_layer (line 266) | def remove_layer(self, index: int) -> bool:
    method get_missing_required_neurons (line 272) | def get_missing_required_neurons(self) -> List[str]:
    method has_all_required_neurons (line 275) | def has_all_required_neurons(self) -> bool:
    method add_missing_required_neurons (line 278) | def add_missing_required_neurons(self) -> int:
    method add_missing_core_neurons (line 288) | def add_missing_core_neurons(self) -> int:
    method get_orphan_neurons (line 297) | def get_orphan_neurons(self) -> List[str]:
    method get_island_neurons (line 306) | def get_island_neurons(self) -> List[Set[str]]:
    method auto_fix_connectivity (line 336) | def auto_fix_connectivity(self) -> Tuple[int, List[str]]:
    method add_sensor (line 397) | def add_sensor(self, name: str, create_default_connections: bool = Tru...
    method add_all_sensors (line 414) | def add_all_sensors(self) -> int:
    method get_sensors_in_design (line 420) | def get_sensors_in_design(self) -> List[str]:
    method validate (line 423) | def validate(self, auto_fix: bool = True) -> Tuple[bool, List[str], int]:
    method get_stats (line 450) | def get_stats(self) -> Dict:
    method to_dosidicus_format (line 465) | def to_dosidicus_format(self) -> dict:
    method to_designer_format (line 509) | def to_designer_format(self) -> dict:
    method from_designer_format (line 539) | def from_designer_format(cls, data: dict) -> 'BrainDesign':
    method from_dosidicus_format (line 564) | def from_dosidicus_format(cls, data: dict) -> 'BrainDesign':
    method save (line 634) | def save(self, filepath: str, format: str = 'designer') -> Tuple[bool,...
    method load (line 650) | def load(cls, filepath: str) -> 'BrainDesign':
    method export_dosidicus (line 654) | def export_dosidicus(self, filepath):

FILE: src/designer_dialogs.py
  class SparseNetworkDialog (line 18) | class SparseNetworkDialog(QDialog):
    method __init__ (line 21) | def __init__(self, design, parent=None):
    method setup_ui (line 35) | def setup_ui(self):
    method on_preset_changed (line 204) | def on_preset_changed(self, index):
    method load_preset (line 208) | def load_preset(self, key):
    method generate_preview (line 237) | def generate_preview(self):
    method apply_generation (line 282) | def apply_generation(self):
    method get_result_summary (line 300) | def get_result_summary(self) -> str:
  class ActivationEditorDialog (line 305) | class ActivationEditorDialog(QDialog):
    method __init__ (line 308) | def __init__(self, neuron_name: str, current_activation: float,
    method setup_ui (line 320) | def setup_ui(self, current_value):
    method set_binary (line 400) | def set_binary(self, is_on: bool):
    method accept_value (line 405) | def accept_value(self):
    method get_value (line 412) | def get_value(self) -> float:

FILE: src/designer_logging.py
  class NullHandler (line 20) | class NullHandler(logging.Handler):
    method emit (line 22) | def emit(self, record):
  class CrashReporter (line 26) | class CrashReporter:
    method __init__ (line 29) | def __init__(self, enable_logging: bool = False):
    method set_error_dialog_callback (line 33) | def set_error_dialog_callback(self, callback):
    method report_crash (line 37) | def report_crash(self, exc_type, exc_value, exc_tb):
  function get_log_directory (line 52) | def get_log_directory() -> str:
  function initialize_error_handling (line 61) | def initialize_error_handling(enable_logging: bool = False) -> CrashRepo...
  function get_logger (line 128) | def get_logger(name: str = None) -> logging.Logger:
  function OperationLogger (line 150) | def OperationLogger(operation_name: str, logger: logging.Logger = None):
  function log_exceptions (line 183) | def log_exceptions(func):
  function safe_call (line 203) | def safe_call(func, *args, default=None, **kwargs):

FILE: src/designer_network_generator.py
  class ConnectionTemplate (line 17) | class ConnectionTemplate:
  class SparseNetworkGenerator (line 118) | class SparseNetworkGenerator:
    method __init__ (line 123) | def __init__(self, seed: Optional[int] = None):
    method set_seed (line 134) | def set_seed(self, seed: int):
    method _generate_weight (line 139) | def _generate_weight(self, template: ConnectionTemplate) -> float:
    method perturb_positions (line 149) | def perturb_positions(self, design, variance: float = 0.3,
    method add_random_sensors (line 193) | def add_random_sensors(self, design, probability: float = 0.3):
    method _should_create_connection (line 231) | def _should_create_connection(self, template: ConnectionTemplate,
    method generate_connections (line 237) | def generate_connections(self,
    method generate_for_design (line 306) | def generate_for_design(self, design,
    method get_preset_styles (line 390) | def get_preset_styles(self) -> Dict[str, Dict]:
  function generate_sparse_core_network (line 454) | def generate_sparse_core_network(density: float = 1.0,
  function describe_connection (line 463) | def describe_connection(source: str, target: str, weight: float) -> str:

FILE: src/designer_outputs_panel.py
  class OutputBindingDialog (line 36) | class OutputBindingDialog(QDialog):
    method __init__ (line 39) | def __init__(self, design, existing_binding=None, parent=None):
    method setup_ui (line 57) | def setup_ui(self):
    method _populate_neurons (line 167) | def _populate_neurons(self):
    method _populate_hooks (line 196) | def _populate_hooks(self):
    method _on_hook_changed (line 216) | def _on_hook_changed(self):
    method _update_param_ui (line 232) | def _update_param_ui(self, hook_name):
    method _update_color_preview (line 242) | def _update_color_preview(self):
    method _pick_color (line 254) | def _pick_color(self):
    method _reset_color (line 272) | def _reset_color(self):
    method _populate_from_binding (line 279) | def _populate_from_binding(self, binding: NeuronOutputBinding):
    method accept (line 307) | def accept(self):
  class NeuronOutputsPanel (line 336) | class NeuronOutputsPanel(QWidget):
    method __init__ (line 345) | def __init__(self, design, parent=None):
    method setup_ui (line 354) | def setup_ui(self):
    method refresh (line 411) | def refresh(self):
    method add_binding (line 468) | def add_binding(self):
    method edit_binding (line 479) | def edit_binding(self):
    method remove_binding (line 493) | def remove_binding(self):
    method load_bindings (line 511) | def load_bindings(self, bindings_data: list):
    method export_bindings (line 522) | def export_bindings(self) -> list:
    method validate_bindings (line 526) | def validate_bindings(self) -> list:

FILE: src/designer_panels.py
  function get_all_available_sensors (line 21) | def get_all_available_sensors():
  function is_plugin_sensor (line 29) | def is_plugin_sensor(name):
  class AddNeuronDialog (line 32) | class AddNeuronDialog(QDialog):
    method __init__ (line 33) | def __init__(self, design: BrainDesign, position=None, parent=None):
    method setup_ui (line 43) | def setup_ui(self):
    method select_type (line 97) | def select_type(self, t):
    method populate_sensor_list (line 107) | def populate_sensor_list(self):
    method accept_sensor (line 149) | def accept_sensor(self):
    method accept_custom (line 161) | def accept_custom(self):
  class NeuronPropertiesPanel (line 171) | class NeuronPropertiesPanel(QWidget):
    method __init__ (line 173) | def __init__(self, design: BrainDesign, parent=None):
    method setup_ui (line 179) | def setup_ui(self):
    method set_neuron (line 211) | def set_neuron(self, name):
    method on_name_changed (line 240) | def on_name_changed(self):
    method on_type_changed (line 248) | def on_type_changed(self, t):
    method on_pos_changed (line 253) | def on_pos_changed(self):
    method on_delete (line 258) | def on_delete(self):
  class LayersPanel (line 263) | class LayersPanel(QWidget):
    method __init__ (line 265) | def __init__(self, design, parent=None):
    method setup_ui (line 270) | def setup_ui(self):
    method refresh (line 279) | def refresh(self):
    method add_layer (line 284) | def add_layer(self):
  class SensorsPanel (line 291) | class SensorsPanel(QWidget):
    method __init__ (line 300) | def __init__(self, design, parent=None):
    method setup_ui (line 307) | def setup_ui(self):
    method _populate_sensors (line 336) | def _populate_sensors(self):
    method rebuild_sensor_list (line 393) | def rebuild_sensor_list(self):
    method refresh (line 398) | def refresh(self):
    method toggled (line 406) | def toggled(self, state):
  class ConnectionsTable (line 414) | class ConnectionsTable(QWidget):
    method __init__ (line 416) | def __init__(self, design, parent=None):
    method refresh (line 427) | def refresh(self):

FILE: src/designer_sensor_discovery.py
  function tr (line 24) | def tr(key, **kwargs):
  function get_plugin_manager (line 28) | def get_plugin_manager() -> Optional[Any]:
  function get_builtin_sensors (line 47) | def get_builtin_sensors() -> Dict[str, Dict]:
  function get_plugin_sensors (line 103) | def get_plugin_sensors() -> Dict[str, Dict]:
  function get_all_available_sensors (line 135) | def get_all_available_sensors() -> Dict[str, Dict]:
  function get_sensors_by_category (line 161) | def get_sensors_by_category() -> Dict[str, Dict[str, Dict]]:
  function refresh_plugin_sensors (line 180) | def refresh_plugin_sensors():
  function is_plugin_sensor (line 192) | def is_plugin_sensor(sensor_name: str) -> bool:

FILE: src/designer_templates.py
  class TemplateManager (line 5) | class TemplateManager:
    method get_templates (line 7) | def get_templates() -> dict:
    method create_template (line 20) | def create_template(key: str) -> BrainDesign:

FILE: src/designer_window.py
  class ScrollingTicker (line 53) | class ScrollingTicker(QWidget):
    method __init__ (line 56) | def __init__(self, text, parent=None):
    method showEvent (line 87) | def showEvent(self, event):
    method hideEvent (line 94) | def hideEvent(self, event):
    method scroll_text (line 99) | def scroll_text(self):
    method paintEvent (line 106) | def paintEvent(self, event):
  class BrainDesignerWindow (line 142) | class BrainDesignerWindow(QMainWindow):
    method __init__ (line 148) | def __init__(self, parent=None, embedded_mode=False):
    method setup_ui (line 196) | def setup_ui(self):
    method create_canvas_toolbar (line 280) | def create_canvas_toolbar(self) -> QFrame:
    method create_help_bar (line 421) | def create_help_bar(self) -> QFrame:
    method setup_menus (line 454) | def setup_menus(self):
    method setup_toolbar (line 550) | def setup_toolbar(self):
    method push_to_game (line 572) | def push_to_game(self):
    method load_from_brain_widget_state (line 605) | def load_from_brain_widget_state(self, state):
    method get_current_design_state (line 650) | def get_current_design_state(self):
    method refresh_all (line 669) | def refresh_all(self):
    method update_status (line 684) | def update_status(self):
    method generate_initial_network (line 707) | def generate_initial_network(self):
    method _try_import_from_game (line 735) | def _try_import_from_game(self) -> bool:
    method _show_import_notification (line 784) | def _show_import_notification(self):
    method _show_sync_button (line 818) | def _show_sync_button(self):
    method sync_from_running_game (line 856) | def sync_from_running_game(self):
    method show_sparse_network_dialog (line 897) | def show_sparse_network_dialog(self):
    method quick_generate (line 903) | def quick_generate(self, style_key):
    method instant_random_generate (line 943) | def instant_random_generate(self):
    method clear_all_connections (line 997) | def clear_all_connections(self):
    method clear_all_outputs (line 1012) | def clear_all_outputs(self):
    method on_design_changed (line 1039) | def on_design_changed(self):
    method on_neuron_selected (line 1055) | def on_neuron_selected(self, name):
    method show_add_neuron_dialog (line 1062) | def show_add_neuron_dialog(self, x=None, y=None):
    method on_connection_created (line 1069) | def on_connection_created(self, source, target):
    method on_connection_selected (line 1086) | def on_connection_selected(self, source, target):
    method on_weight_changed (line 1094) | def on_weight_changed(self, source, target, new_weight):
    method on_connection_deleted (line 1101) | def on_connection_deleted(self, source, target):
    method new_design (line 1110) | def new_design(self):
    method run_auto_fix (line 1122) | def run_auto_fix(self):
    method save_design (line 1138) | def save_design(self):
    method export_design (line 1166) | def export_design(self):
    method open_design (line 1194) | def open_design(self):
    method show_template_menu (line 1219) | def show_template_menu(self):
    method load_template (line 1238) | def load_template(self):
    method check_status (line 1248) | def check_status(self):
  function main (line 1286) | def main():

FILE: src/display_scaling.py
  class DisplayScaling (line 2) | class DisplayScaling:
    method initialize (line 11) | def initialize(cls, current_width, current_height):
    method scale (line 24) | def scale(cls, value):
    method font_size (line 28) | def font_size(cls, size):
    method get_scale_factor (line 33) | def get_scale_factor(cls):
    method scale_css (line 37) | def scale_css(cls, css_string):

FILE: src/image_cache.py
  class ImageCache (line 3) | class ImageCache:
    method get_pixmap (line 8) | def get_pixmap(cls, path):
    method clear (line 16) | def clear(cls):

FILE: src/interactions.py
  class RockInteractionManager (line 10) | class RockInteractionManager:
    method __init__ (line 11) | def __init__(self, squid, logic, scene, message_callback, config_manag...
    method setup_multiplayer_integration (line 41) | def setup_multiplayer_integration(self):
    method is_valid_rock (line 63) | def is_valid_rock(self, item):
    method can_pick_up_rock (line 70) | def can_pick_up_rock(self, rock):
    method attach_rock_to_squid (line 82) | def attach_rock_to_squid(self, rock):
    method check_rock_hold_time (line 127) | def check_rock_hold_time(self):
    method decide_rock_action (line 137) | def decide_rock_action(self):
    method drop_rock (line 149) | def drop_rock(self):
    method start_rock_test (line 163) | def start_rock_test(self, rock=None):
    method highlight_rock (line 195) | def highlight_rock(self, rock):
    method animate_highlight (line 204) | def animate_highlight(self, highlight_effect):
    method throw_rock (line 213) | def throw_rock(self, direction="right"):
    method update_rock_test (line 299) | def update_rock_test(self):
    method update_throw_animation (line 339) | def update_throw_animation(self):
    method cleanup (line 391) | def cleanup(self):
    method cleanup_after_throw (line 405) | def cleanup_after_throw(self):
    method setup_timers (line 433) | def setup_timers(self, interval=100):
    method handle_remote_rock_throw (line 440) | def handle_remote_rock_throw(self, source_node_id, rock_data):
    method _find_or_create_remote_rock (line 479) | def _find_or_create_remote_rock(self, filename, pos):
    method _simulate_remote_rock_throw (line 550) | def _simulate_remote_rock_throw(self, rock, direction):
    method _check_rock_collision_path (line 604) | def _check_rock_collision_path(self, rock, direction, source_node_id):

FILE: src/interactions2.py
  class PoopInteractionManager (line 9) | class PoopInteractionManager:
    method __init__ (line 10) | def __init__(self, squid, logic, scene, message_callback, config_manag...
    method setup_multiplayer_integration (line 40) | def setup_multiplayer_integration(self):
    method is_valid_poop (line 62) | def is_valid_poop(self, item):
    method can_pick_up_poop (line 69) | def can_pick_up_poop(self, poop):
    method attach_poop_to_squid (line 82) | def attach_poop_to_squid(self, poop):
    method check_poop_hold_time (line 120) | def check_poop_hold_time(self):
    method decide_poop_action (line 130) | def decide_poop_action(self):
    method drop_poop (line 142) | def drop_poop(self):
    method start_poop_test (line 156) | def start_poop_test(self, poop=None):
    method throw_poop (line 183) | def throw_poop(self, direction="right"):
    method update_poop_test (line 259) | def update_poop_test(self):
    method update_throw_animation (line 280) | def update_throw_animation(self):
    method cleanup (line 318) | def cleanup(self):
    method cleanup_after_throw (line 332) | def cleanup_after_throw(self):
    method setup_timers (line 357) | def setup_timers(self, interval=100):

FILE: src/laboratory.py
  function badge (line 25) | def badge(text, color="#333", bg="#eee"):
  class NeuronLaboratory (line 34) | class NeuronLaboratory(QDialog):
    method __init__ (line 35) | def __init__(self, brain_widget, parent=None):
    method _build_overview_tab (line 131) | def _build_overview_tab(self):
    method _build_inspector_tab (line 139) | def _build_inspector_tab(self):
    method _build_edit_tab (line 157) | def _build_edit_tab(self):
    method _refresh (line 175) | def _refresh(self):
    method select_neuron_by_name (line 193) | def select_neuron_by_name(self, neuron_name: str):
    method _paint_overview (line 220) | def _paint_overview(self):
    method _inspect_neuron (line 273) | def _inspect_neuron(self, name):
    method _paint_edit (line 369) | def _paint_edit(self):
    method update_debug_info (line 427) | def update_debug_info(self):
    method _toggle_lock (line 430) | def _toggle_lock(self, name, button):
    method _set_neuron (line 444) | def _set_neuron(self, name, value):
    method _apply_forced_values (line 449) | def _apply_forced_values(self):
    method _toggle_live (line 482) | def _toggle_live(self, on):
    method _unlock_editing (line 485) | def _unlock_editing(self, on):
    method _force_neurogenesis (line 496) | def _force_neurogenesis(self, typ):
    method _progress_bar (line 504) | def _progress_bar(self, pct):
    method _progress_widget (line 512) | def _progress_widget(self, title, cur, maxi):
    method _influence_badge (line 522) | def _influence_badge(self, w, incoming=False):
    method _compute_impacts (line 532) | def _compute_impacts(self, name):
    method _educational_tip (line 543) | def _educational_tip(self, name):
  class DummyBW (line 586) | class DummyBW:
    method perform_hebbian_learning (line 607) | def perform_hebbian_learning(self):
    method update (line 610) | def update(self):

FILE: src/learning.py
  class HebbianLearning (line 9) | class HebbianLearning:
    method __init__ (line 10) | def __init__(self, squid, brain_window, config=None):
    method get_learning_data (line 68) | def get_learning_data(self):
    method export_learning_data (line 71) | def export_learning_data(self, file_name):
    method learn_from_eating (line 77) | def learn_from_eating(self):
    method learn_from_decoration_interaction (line 108) | def learn_from_decoration_interaction(self, decoration_category):
    method learn_from_organization (line 143) | def learn_from_organization(self):
    method learn_from_sickness (line 170) | def learn_from_sickness(self):
    method update_personality (line 197) | def update_personality(self, new_personality):
    method learn_from_curiosity (line 213) | def learn_from_curiosity(self):
    method learn_from_anxiety (line 241) | def learn_from_anxiety(self):
    method strengthen_connection (line 269) | def strengthen_connection(self, neuron1, neuron2, base_learning_rate):
    method apply_personality_learning_modifiers (line 329) | def apply_personality_learning_modifiers(self, neuron1, neuron2, learn...
    method generate_learning_explanation (line 354) | def generate_learning_explanation(self, neuron1, neuron2, learning_rate):
    method log_learning_event (line 368) | def log_learning_event(self, event_details):
    method save_learning_log (line 404) | def save_learning_log(self):
    method export_learning_log (line 412) | def export_learning_log(self, filename=None):
    method capture_network_state (line 434) | def capture_network_state(self):
    method analyze_network_evolution (line 459) | def analyze_network_evolution(self):
    method export_network_evolution (line 500) | def export_network_evolution(self, filename=None):
    method update_learning_rate (line 515) | def update_learning_rate(self, novelty_factor):
    method update_weights (line 527) | def update_weights(self):
    method check_neurogenesis_conditions (line 536) | def check_neurogenesis_conditions(self, brain_state):
    method create_new_neuron (line 553) | def create_new_neuron(self, neuron_type, trigger_data):
    method end_neurogenesis_boost (line 587) | def end_neurogenesis_boost(self):
  class LearningConfig (line 590) | class LearningConfig:
    method __init__ (line 591) | def __init__(self):
    method load_from_config (line 621) | def load_from_config(self):

FILE: src/localisation.py
  class Localisation (line 7) | class Localisation:
    method instance (line 11) | def instance(cls):
    method __init__ (line 17) | def __init__(self):
    method load_language (line 23) | def load_language(self, lang_code):
    method get (line 49) | def get(self, key, default=None, **kwargs):
    method set_language (line 81) | def set_language(self, lang_code):
    method get_available_languages (line 85) | def get_available_languages(self):
    method get_language_name (line 105) | def get_language_name(self, lang_code, fallback=True):
    method get_personality_name (line 139) | def get_personality_name(self, personality):
    method get_personality_description (line 144) | def get_personality_description(self, personality):
    method get_personality_modifier_text (line 149) | def get_personality_modifier_text(self, personality):
    method get_personality_modifiers (line 154) | def get_personality_modifiers(self, personality):
    method get_care_tips (line 159) | def get_care_tips(self, personality):
  function loc (line 166) | def loc(key, default=None, **kwargs):
  function set_language (line 170) | def set_language(lang_code):

FILE: src/main.py
  function launch_brain_designer_process (line 36) | def launch_brain_designer_process():
  function setup_logging_configuration (line 47) | def setup_logging_configuration():
  function perform_cleanup_and_exit (line 58) | def perform_cleanup_and_exit():
  function global_exception_handler (line 81) | def global_exception_handler(exctype, value, tb):
  class TeeStream (line 89) | class TeeStream:
    method __init__ (line 91) | def __init__(self, original_stream, file_stream):
    method write (line 95) | def write(self, data):
    method flush (line 100) | def flush(self):
  class TimedMessageBox (line 104) | class TimedMessageBox(QtWidgets.QDialog):
    method __init__ (line 106) | def __init__(self, parent, title, message, timeout_seconds=5):
    method update_countdown (line 147) | def update_countdown(self):
    method accept_yes (line 156) | def accept_yes(self):
    method reject_no (line 162) | def reject_no(self):
    method get_result (line 168) | def get_result(self):
  class MainWindow (line 174) | class MainWindow(QtWidgets.QMainWindow):
    method __init__ (line 175) | def __init__(self, specified_personality=None, debug_mode=False, neuro...
    method preload_brain_window_tabs (line 309) | def preload_brain_window_tabs(self):
    method setup_logging (line 367) | def setup_logging(self):
    method setup_facts_timer (line 377) | def setup_facts_timer(self):
    method show_random_squid_fact (line 386) | def show_random_squid_fact(self):
    method initialize_game (line 409) | def initialize_game(self):
    method delayed_tutorial_check (line 460) | def delayed_tutorial_check(self):
    method create_new_game (line 476) | def create_new_game(self, specified_personality=None):
    method check_tutorial_preference (line 505) | def check_tutorial_preference(self):
    method position_and_show_decoration_window (line 524) | def position_and_show_decoration_window(self):
    method start_new_game (line 539) | def start_new_game(self):
    method load_game (line 670) | def load_game(self):
    method save_game (line 674) | def save_game(self):
    method _restore_achievements_data (line 679) | def _restore_achievements_data(self, achievements_data):
    method closeEvent (line 698) | def closeEvent(self, event):
    method show_splash_screen (line 724) | def show_splash_screen(self):
    method show_feeding_hint (line 782) | def show_feeding_hint(self):
    method _start_splash_with_reveals (line 786) | def _start_splash_with_reveals(self):
    method _reveal_neuron_for_frame (line 797) | def _reveal_neuron_for_frame(self, frame_index):
    method show_hatching_notification (line 822) | def show_hatching_notification(self):
    method start_simulation (line 826) | def start_simulation(self):
    method show_tutorial_overlay (line 853) | def show_tutorial_overlay(self):
    method open_initial_windows (line 862) | def open_initial_windows(self):
    method cleanup_duplicate_squids (line 874) | def cleanup_duplicate_squids(self):
    method initialize_multiplayer_manually (line 916) | def initialize_multiplayer_manually(self):
  function main (line 959) | def main():

FILE: src/memory_manager.py
  class MemoryManager (line 6) | class MemoryManager:
    method __init__ (line 7) | def __init__(self):
    method _load_and_convert_timestamps (line 21) | def _load_and_convert_timestamps(self, file_path):
    method save_memory (line 51) | def save_memory(self, memory, file_path):
    method add_short_term_memory (line 73) | def add_short_term_memory(self, category, key, value, importance=1.0, ...
    method cleanup_short_term_memory (line 97) | def cleanup_short_term_memory(self):
    method add_long_term_memory (line 104) | def add_long_term_memory(self, category, key, value):
    method get_short_term_memory (line 118) | def get_short_term_memory(self, category, key, default=None):
    method get_all_short_term_memories (line 128) | def get_all_short_term_memories(self, raw=False):
    method get_all_long_term_memories (line 138) | def get_all_long_term_memories(self, category=None):
    method get_active_memories_data (line 144) | def get_active_memories_data(self, count=None):
    method review_and_transfer_memories (line 163) | def review_and_transfer_memories(self):
    method periodic_memory_management (line 175) | def periodic_memory_management(self):
    method transfer_to_long_term_memory (line 180) | def transfer_to_long_term_memory(self, category, key):
    method should_transfer_to_long_term (line 198) | def should_transfer_to_long_term(self, memory):
    method clear_short_term_memory (line 204) | def clear_short_term_memory(self):
    method update_memory_importance (line 208) | def update_memory_importance(self, category, key, importance_change):
    method clear_all_memories (line 215) | def clear_all_memories(self):
    method _format_memory_for_display (line 222) | def _format_memory_for_display(self, memory):
    method format_memory (line 225) | def format_memory(self, memory):

FILE: src/mental_states.py
  class MentalState (line 6) | class MentalState:
    method __init__ (line 7) | def __init__(self, name, icon_filename):
  class MentalStateManager (line 13) | class MentalStateManager:
    method __init__ (line 14) | def __init__(self, squid, scene):
    method set_mental_states_enabled (line 27) | def set_mental_states_enabled(self, enabled):
    method set_state (line 32) | def set_state(self, state_name, is_active):
    method update_mental_state_icons (line 38) | def update_mental_state_icons(self):
    method update_icon_state (line 43) | def update_icon_state(self, state):
    method update_icon_position (line 56) | def update_icon_position(self, icon_item):
    method update_positions (line 60) | def update_positions(self):
    method is_state_active (line 63) | def is_state_active(self, state_name):
    method clear_optional_states (line 68) | def clear_optional_states(self):

FILE: src/network_adapter.py
  class NetworkAdapter (line 38) | class NetworkAdapter:
    method __init__ (line 55) | def __init__(self,
    method state (line 89) | def state(self) -> Dict[str, float]:
    method state (line 94) | def state(self, value: Dict[str, float]):
    method neuron_positions (line 99) | def neuron_positions(self) -> Dict[str, Tuple[float, float]]:
    method neuron_positions (line 107) | def neuron_positions(self, value: Dict[str, Tuple[float, float]]):
    method weights (line 114) | def weights(self) -> Dict[Tuple[str, str], float]:
    method weights (line 122) | def weights(self, value: Dict[Tuple[str, str], float]):
    method excluded_neurons (line 133) | def excluded_neurons(self) -> Set[str]:
    method excluded_neurons (line 138) | def excluded_neurons(self, value: Set[str]):
    method config (line 143) | def config(self) -> BrainConfig:
    method neurogenesis_data (line 148) | def neurogenesis_data(self) -> Dict[str, Any]:
    method neurogenesis_data (line 153) | def neurogenesis_data(self, value: Dict[str, Any]):
    method get_neuron (line 161) | def get_neuron(self, name: str) -> Optional[NeuronData]:
    method get_all_neurons (line 174) | def get_all_neurons(self) -> List[NeuronData]:
    method get_connections_for_neuron (line 186) | def get_connections_for_neuron(self, name: str) -> List[ConnectionData]:
    method add_neuron (line 198) | def add_neuron(self, neuron: NeuronData, initial_activation: float = 5...
    method add_connection (line 215) | def add_connection(self, source: str, target: str, weight: float) -> b...
    method set_neuron_activation (line 225) | def set_neuron_activation(self, name: str, value: float) -> None:
    method get_layer_structure (line 230) | def get_layer_structure(self) -> List[LayerDefinition]:
    method initialize_connections (line 238) | def initialize_connections(self) -> List[Tuple[str, str]]:
    method initialize_weights (line 242) | def initialize_weights(self) -> None:
    method connections (line 247) | def connections(self) -> List[Tuple[str, str]]:
    method connections (line 252) | def connections(self, value: List[Tuple[str, str]]):
    method original_neuron_positions (line 258) | def original_neuron_positions(self) -> Dict[str, Tuple[float, float]]:
    method original_neurons (line 266) | def original_neurons(self) -> List[str]:
    method visible_neurons (line 272) | def visible_neurons(self) -> Set[str]:
    method visible_neurons (line 277) | def visible_neurons(self, value: Set[str]):
    method neuron_shapes (line 282) | def neuron_shapes(self) -> Dict[str, str]:
    method to_dict (line 298) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 327) | def from_dict(cls, data: Dict[str, Any]) -> 'NetworkAdapter':
    method save (line 380) | def save(self, filepath: str) -> bool:
    method load (line 391) | def load(cls, filepath: str) -> Optional['NetworkAdapter']:
    method _sync_config_to_network (line 405) | def _sync_config_to_network(self):
    method set_layer_structure (line 412) | def set_layer_structure(self, layers: List[LayerDefinition]):
    method get_underlying_network (line 416) | def get_underlying_network(self) -> 'Network':
  class DosidictusDefaultBrain (line 421) | class DosidictusDefaultBrain(NetworkAdapter):
    method __init__ (line 431) | def __init__(self):

FILE: src/network_protocol.py
  class NeuronData (line 16) | class NeuronData:
    method to_dict (line 23) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 32) | def from_dict(cls, data: Dict[str, Any]) -> 'NeuronData':
  class ConnectionData (line 42) | class ConnectionData:
    method to_dict (line 48) | def to_dict(self) -> Dict[str, Any]:
  class LayerDefinition (line 57) | class LayerDefinition:
    method to_dict (line 64) | def to_dict(self) -> Dict[str, Any]:
  class BrainProtocol (line 74) | class BrainProtocol(Protocol):
    method state (line 88) | def state(self) -> Dict[str, float]:
    method neuron_positions (line 93) | def neuron_positions(self) -> Dict[str, Tuple[float, float]]:
    method weights (line 98) | def weights(self) -> Dict[Tuple[str, str], float]:
    method excluded_neurons (line 103) | def excluded_neurons(self) -> Set[str]:
    method config (line 108) | def config(self) -> Any:
    method get_neuron (line 116) | def get_neuron(self, name: str) -> Optional[NeuronData]:
    method get_all_neurons (line 120) | def get_all_neurons(self) -> List[NeuronData]:
    method get_connections_for_neuron (line 124) | def get_connections_for_neuron(self, name: str) -> List[ConnectionData]:
    method add_neuron (line 128) | def add_neuron(self, neuron: NeuronData, initial_activation: float = 5...
    method add_connection (line 132) | def add_connection(self, source: str, target: str, weight: float) -> b...
    method set_neuron_activation (line 136) | def set_neuron_activation(self, name: str, value: float) -> None:
    method get_layer_structure (line 140) | def get_layer_structure(self) -> List[LayerDefinition]:
    method to_dict (line 148) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 153) | def from_dict(cls, data: Dict[str, Any]) -> 'BrainProtocol':
    method save (line 157) | def save(self, filepath: str) -> bool:
    method load (line 162) | def load(cls, filepath: str) -> Optional['BrainProtocol']:
  class BrainConfig (line 167) | class BrainConfig:
    method __init__ (line 174) | def __init__(self):
    method to_dict (line 221) | def to_dict(self) -> Dict[str, Any]:
    method from_dict (line 228) | def from_dict(cls, data: Dict[str, Any]) -> 'BrainConfig':

FILE: src/neurogenesis.py
  function loc (line 21) | def loc(key, default=None, **kwargs):
  class ExperienceContext (line 26) | class ExperienceContext:
    method get_pattern_signature (line 34) | def get_pattern_signature(self) -> str:
    method get_core_pattern (line 56) | def get_core_pattern(self) -> str:
    method get_parent_pattern (line 66) | def get_parent_pattern(self) -> str:
  class ExperienceBuffer (line 80) | class ExperienceBuffer:
    method __init__ (line 81) | def __init__(self, max_size=50):
    method add_experience (line 88) | def add_experience(self, context: ExperienceContext):
    method _prune_pattern_counts_if_needed (line 98) | def _prune_pattern_counts_if_needed(self):
    method get_pattern_recurrence (line 109) | def get_pattern_recurrence(self, context: ExperienceContext) -> Tuple[...
    method to_dict (line 124) | def to_dict(self):
    method from_dict (line 143) | def from_dict(cls, data):
  class FunctionalNeuron (line 160) | class FunctionalNeuron:
    method __init__ (line 161) | def __init__(self, name: str, neuron_type: str, creation_context: Expe...
    method display_name (line 172) | def display_name(self) -> str:
    method from_dict (line 185) | def from_dict(cls, data):
    method to_dict (line 207) | def to_dict(self):
    method _determine_specialization (line 226) | def _determine_specialization(self):
    method get_functional_connections (line 244) | def get_functional_connections(self, all_neurons: List[str]) -> Dict[s...
    method _get_specialization_connections (line 260) | def _get_specialization_connections(self, all_neurons: List[str]) -> D...
    method calculate_activation (line 298) | def calculate_activation(self, brain_state: Dict[str, float], weights:...
    method update_utility_score (line 312) | def update_utility_score(self, outcome_value: float):
  class EnhancedNeurogenesis (line 316) | class EnhancedNeurogenesis:
    method __init__ (line 317) | def __init__(self, brain_widget, config):
    method _get_stress_neuron_count (line 333) | def _get_stress_neuron_count(self) -> int:
    method _get_anxiety_cap (line 338) | def _get_anxiety_cap(self) -> float:
    method _get_scaled_relief (line 354) | def _get_scaled_relief(self, base_amount: float, is_emergency: bool = ...
    method _apply_anxiety_relief (line 377) | def _apply_anxiety_relief(self, base_drop: float, source: str = "stres...
    method enforce_anxiety_cap (line 420) | def enforce_anxiety_cap(self) -> None:
    method create_neuron (line 444) | def create_neuron(self, neuron_type: str, context: Optional[Experience...
    method _make_reciprocal_connections (line 451) | def _make_reciprocal_connections(self, new_neuron: str):
    method create_functional_neuron (line 462) | def create_functional_neuron(self, ctx: ExperienceContext, is_emergenc...
    method _build_context (line 465) | def _build_context(self, trigger_type: str, brain_state: Dict[str, flo...
    method _create_neuron_internal (line 474) | def _create_neuron_internal(self, ctx: ExperienceContext, trigger_valu...
    method _record_neurogenesis_memory (line 551) | def _record_neurogenesis_memory(self, neuron_name: str):
    method _on_neuron_created (line 568) | def _on_neuron_created(self, neuron_name: str, neuron_type: str):
    method _get_unique_neuron_name (line 571) | def _get_unique_neuron_name(self, base_name: str) -> str:
    method _rebuild_new_neurons_details (line 579) | def _rebuild_new_neurons_details(self):
    method _rebuild_new_neurons_details_for_lab (line 588) | def _rebuild_new_neurons_details_for_lab(self):
    method _preview_specialization (line 591) | def _preview_specialization(self, ctx: ExperienceContext) -> str:
    method _calculate_functional_position (line 608) | def _calculate_functional_position(self, func_neuron: FunctionalNeuron...
    method rescue_orphan (line 631) | def rescue_orphan(self, orphan_name: str):
    method _set_neuron_appearance (line 669) | def _set_neuron_appearance(self, name: str, func_neuron: FunctionalNeu...
    method _log_neuron_creation (line 684) | def _log_neuron_creation(self, name: str, trigger_type: str, spec: str...
    method _strengthen_existing_neuron (line 688) | def _strengthen_existing_neuron(self, trigger_type: str, specializatio...
    method _ensure_functional_neuron (line 722) | def _ensure_functional_neuron(self, name: str, neuron_type: str = None...
    method ensure_all_neurons_functional (line 737) | def ensure_all_neurons_functional(self, force_sync=False):
    method set_achievement_callbacks (line 774) | def set_achievement_callbacks(self, on_created=None, on_leveled=None):
    method get_global_cooldown_remaining (line 778) | def get_global_cooldown_remaining(self) -> float:
    method track_action (line 787) | def track_action(self, action: str):
    method track_state_change (line 790) | def track_state_change(self, state: dict):
    method check_and_capture_experience (line 793) | def check_and_capture_experience(self, brain_state: dict, environment:...
    method _detect_trigger_type (line 798) | def _detect_trigger_type(self, brain_state: dict, environment: dict) -...
    method capture_experience_context (line 811) | def capture_experience_context(self, trigger_type: str, brain_state: d...
    method should_create_neuron (line 825) | def should_create_neuron(self, ctx: ExperienceContext) -> bool:
    method update_neuron_activations (line 848) | def update_neuron_activations(self, brain_state: Dict[str, float]) -> ...
    method _hsv_to_rgb (line 970) | def _hsv_to_rgb(self, h, s, v):
    method intelligent_pruning (line 983) | def intelligent_pruning(self) -> Optional[str]:
    method to_dict (line 1012) | def to_dict(self) -> dict:
    method from_dict (line 1022) | def from_dict(self, data: dict):
    method reset_state (line 1035) | def reset_state(self):
  class NeurogenesisTriggerSystem (line 1045) | class NeurogenesisTriggerSystem:
    method __init__ (line 1046) | def __init__(self, tamagotchi_logic):
    method track_action (line 1051) | def track_action(self, action: str):
    method track_state_change (line 1054) | def track_state_change(self, state: Dict[str, float]):
    method check_for_significant_experience (line 1057) | def check_for_significant_experience(self) -> Optional[Tuple[str, Expe...
    method _detect_novelty_experience (line 1077) | def _detect_novelty_experience(self, current, previous) -> bool:
    method _detect_stress_experience (line 1087) | def _detect_stress_experience(self, current, previous) -> bool:
    method _detect_reward_experience (line 1098) | def _detect_reward_experience(self, current, previous) -> bool:
    method _build_context (line 1118) | def _build_context(self, trigger_type: str, current_state: Dict) -> Ex...

FILE: src/neurogenesis_show.py
  class NeurogenesisEvent (line 15) | class NeurogenesisEvent(Enum):
  class ShowmanNeurogenesis (line 32) | class ShowmanNeurogenesis:
    method __init__ (line 41) | def __init__(self, real_enhanced_neurogenesis):
    method _check_showmanship_enabled (line 99) | def _check_showmanship_enabled(self) -> bool:
    method is_showmanship_enabled (line 121) | def is_showmanship_enabled(self) -> bool:
    method set_callbacks (line 125) | def set_callbacks(self, on_dramatic_neuron=None, on_event_triggered=No...
    method get_global_cooldown_remaining (line 132) | def get_global_cooldown_remaining(self) -> float:
    method capture_experience_context (line 139) | def capture_experience_context(self, trigger, state, actions, env):
    method should_create_neuron (line 143) | def should_create_neuron(self, ctx) -> bool:
    method create_functional_neuron (line 163) | def create_functional_neuron(self, ctx, is_emergency: bool = False) ->...
    method _detect_dramatic_moment (line 206) | def _detect_dramatic_moment(self, ctx) -> Optional[NeurogenesisEvent]:
    method _fire_event (line 236) | def _fire_event(self, event: NeurogenesisEvent):
    method trigger_event (line 246) | def trigger_event(self, event: NeurogenesisEvent) -> bool:
    method _moment_deserves_neuron (line 304) | def _moment_deserves_neuron(self, ctx) -> bool:
    method _rename_for_drama (line 312) | def _rename_for_drama(self, trigger: str, old: str) -> str:
    method _migrate_neuron (line 335) | def _migrate_neuron(self, old_name: str, new_name: str):
    method _burst_color (line 414) | def _burst_color(self, trigger: str) -> tuple:
    method get_triggered_events (line 432) | def get_triggered_events(self) -> set:
    method reset_events (line 436) | def reset_events(self):
    method __getattr__ (line 442) | def __getattr__(self, item):

FILE: src/personality.py
  class Personality (line 3) | class Personality(Enum):

FILE: src/personality_traits.py
  function register_personality (line 6) | def register_personality(name, decision_function, attribute_modifiers):
  function register_all_personalities (line 72) | def register_all_personalities():

FILE: src/plugin_manager.py
  class ANSI (line 9) | class ANSI:
  class ColoredFormatter (line 16) | class ColoredFormatter(logging.Formatter):
    method __init__ (line 30) | def __init__(self, fmt="%(levelname)s:%(name)s:%(message)s", datefmt=N...
    method format (line 34) | def format(self, record):
  class PluginManager (line 60) | class PluginManager:
    method __new__ (line 63) | def __new__(cls, *args, **kwargs):
    method __init__ (line 70) | def __init__(self, plugin_directory="plugins"):
    method _initialize_hooks (line 118) | def _initialize_hooks(self):
    method register_all_sensors (line 207) | def register_all_sensors(self, tamagotchi_logic):
    method register_hook (line 263) | def register_hook(self, hook_name: str) -> None:
    method subscribe_to_hook (line 271) | def subscribe_to_hook(self, hook_name: str, plugin_name: str, callback...
    method unsubscribe_from_hook (line 286) | def unsubscribe_from_hook(self, hook_name: str, plugin_name: str) -> b...
    method trigger_hook (line 299) | def trigger_hook(self, hook_name, **kwargs):
    method discover_plugins (line 323) | def discover_plugins(self) -> Dict[str, Dict]:
    method load_plugin (line 386) | def load_plugin(self, plugin_name: str) -> bool:
    method load_all_plugins (line 464) | def load_all_plugins(self) -> Dict[str, bool]:
    method unload_plugin (line 505) | def unload_plugin(self, plugin_name: str) -> bool:
    method unload_all_plugins (line 535) | def unload_all_plugins(self) -> None:
    method reload_all_plugins (line 542) | def reload_all_plugins(self) -> Dict[str, bool]:
    method enable_plugin (line 561) | def enable_plugin(self, plugin_key: str) -> bool:
    method disable_plugin (line 636) | def disable_plugin(self, plugin_name: str) -> bool:
    method get_plugin_info (line 659) | def get_plugin_info(self, plugin_name: str) -> Dict | None:
    method get_loaded_plugins (line 664) | def get_loaded_plugins(self) -> List[str]:
    method get_enabled_plugins (line 668) | def get_enabled_plugins(self) -> List[str]:
    method check_dependencies (line 678) | def check_dependencies(self, plugin_name_to_check: str) -> bool:
    method set_tamagotchi_logic (line 697) | def set_tamagotchi_logic(self, tamagotchi_logic_instance):
    method register_neuron_handler (line 706) | def register_neuron_handler(
    method unregister_neuron_handler (line 767) | def unregister_neuron_handler(self, neuron_name: str, plugin_name: str...
    method get_neuron_handlers (line 796) | def get_neuron_handlers(self) -> Dict[str, Callable]:
    method get_neuron_handler_info (line 811) | def get_neuron_handler_info(self, neuron_name: str) -> Dict | None:
    method get_all_neuron_handler_info (line 820) | def get_all_neuron_handler_info(self) -> Dict[str, Dict]:
    method get_plugin_neuron_handlers (line 829) | def get_plugin_neuron_handlers(self, plugin_name: str) -> List[str]:

FILE: src/plugin_manager_dialog.py
  class PluginManagerDialog (line 4) | class PluginManagerDialog(QtWidgets.QDialog):
    method __init__ (line 5) | def __init__(self, plugin_manager, parent=None):
    method setup_ui (line 14) | def setup_ui(self):
    method load_plugin_data (line 112) | def load_plugin_data(self):
    method get_status_icon (line 151) | def get_status_icon(self, status):
    method on_plugin_selected (line 173) | def on_plugin_selected(self, current, previous):
    method clear_plugin_details (line 211) | def clear_plugin_details(self):
    method enable_selected_plugin (line 223) | def enable_selected_plugin(self):
    method disable_selected_plugin (line 267) | def disable_selected_plugin(self):

FILE: src/preferences.py
  class PreferencesWindow (line 15) | class PreferencesWindow(QtWidgets.QDialog):
    method __init__ (line 35) | def __init__(self, parent=None):
    method _apply_styles (line 75) | def _apply_styles(self):
    method _get_available_languages (line 224) | def _get_available_languages(self):
    method init_ui (line 257) | def init_ui(self):
    method _create_general_tab (line 316) | def _create_general_tab(self):
    method _create_interactions_tab (line 401) | def _create_interactions_tab(self):
    method _create_neurogenesis_tab (line 571) | def _create_neurogenesis_tab(self):
    method _create_neurogenesis_general (line 616) | def _create_neurogenesis_general(self):
    method _create_neurogenesis_triggers (line 683) | def _create_neurogenesis_triggers(self):
    method _create_neurogenesis_appearance (line 773) | def _create_neurogenesis_appearance(self):
    method _create_neurogenesis_advanced (line 808) | def _create_neurogenesis_advanced(self):
    method _create_hebbian_tab (line 840) | def _create_hebbian_tab(self):
    method _create_color_button (line 899) | def _create_color_button(self):
    method _pick_color (line 909) | def _pick_color(self):
    method _create_display_tab (line 917) | def _create_display_tab(self):
    method _create_designer_tab (line 966) | def _create_designer_tab(self):
    method _on_change (line 998) | def _on_change(self):
    method load_current_config (line 1003) | def load_current_config(self):
    method _set_color_button (line 1123) | def _set_color_button(self, button, rgb_list):
    method save_and_restart (line 1128) | def save_and_restart(self):
    method _save_all_settings (line 1147) | def _save_all_settings(self):
    method _restart_application (line 1223) | def _restart_application(self):

FILE: src/save_manager.py
  class DateTimeEncoder (line 8) | class DateTimeEncoder(json.JSONEncoder):
    method default (line 9) | def default(self, obj):
  class SaveManager (line 16) | class SaveManager:
    method __init__ (line 17) | def __init__(self, save_directory="saves"):
    method save_exists (line 28) | def save_exists(self, autosave=False):
    method get_latest_save (line 35) | def get_latest_save(self):
    method _get_manual_save_path (line 58) | def _get_manual_save_path(self):
    method _get_save_path_for_uuid (line 73) | def _get_save_path_for_uuid(self, uuid_str, is_autosave=False):
    method save_game (line 91) | def save_game(self, save_data: dict, is_autosave: bool = False) -> str...
    method _are_saves_identical (line 160) | def _are_saves_identical(self, save1, save2):
    method _load_single_save (line 183) | def _load_single_save(self, path):
    method cleanup_duplicate_saves (line 199) | def cleanup_duplicate_saves(self):
    method load_game (line 265) | def load_game(self) -> dict | None:
    method delete_save (line 289) | def delete_save(self, is_autosave: bool = False) -> bool:
    method get_save_timestamp (line 300) | def get_save_timestamp(self, is_autosave: bool = False) -> float | None:
    method get_save_size (line 308) | def get_save_size(self, is_autosave: bool = False) -> int | None:

FILE: src/splash_screen.py
  class SplashScreen (line 6) | class SplashScreen(QtWidgets.QWidget):
    method __init__ (line 11) | def __init__(self, parent=None):
    method start_animation (line 52) | def start_animation(self):
    method next_frame (line 57) | def next_frame(self):
    method end_animation (line 69) | def end_animation(self):
    method showEvent (line 82) | def showEvent(self, event):

FILE: src/squid.py
  class Squid (line 28) | class Squid:
    method __init__ (line 30) | def __init__(self, user_interface, tamagotchi_logic=None, personality=...
    method carrying_rock (line 159) | def carrying_rock(self):
    method carrying_rock (line 163) | def carrying_rock(self, value):
    method current_rock (line 167) | def current_rock(self):
    method current_rock (line 171) | def current_rock(self, value):
    method hunger (line 175) | def hunger(self):
    method hunger (line 179) | def hunger(self, value):
    method happiness (line 203) | def happiness(self):
    method happiness (line 207) | def happiness(self, value):
    method cleanliness (line 231) | def cleanliness(self):
    method cleanliness (line 235) | def cleanliness(self, value):
    method sleepiness (line 259) | def sleepiness(self):
    method sleepiness (line 263) | def sleepiness(self, value):
    method satisfaction (line 287) | def satisfaction(self):
    method satisfaction (line 291) | def satisfaction(self, value):
    method anxiety (line 315) | def anxiety(self):
    method anxiety (line 319) | def anxiety(self, value):
    method curiosity (line 343) | def curiosity(self):
    method curiosity (line 347) | def curiosity(self, value):
    method _on_food_visibility_changed (line 370) | def _on_food_visibility_changed(self, can_see: bool, food_positions: l...
    method _update_scene_objects (line 388) | def _update_scene_objects(self):
    method mark_scene_objects_dirty (line 438) | def mark_scene_objects_dirty(self):
    method _update_vision_worker (line 442) | def _update_vision_worker(self):
    method _on_plant_proximity_changed (line 462) | def _on_plant_proximity_changed(self, proximity: float, plant_position...
    method _on_visibility_update (line 472) | def _on_visibility_update(self, result: VisionResult):
    method _has_personality_starter_neuron (line 483) | def _has_personality_starter_neuron(self) -> bool:
    method update_view_direction (line 507) | def update_view_direction(self):
    method apply_tint (line 571) | def apply_tint(self, color):
    method set_animation_speed (line 576) | def set_animation_speed(self, speed):
    method finish_eating (line 579) | def finish_eating(self):
    method load_images (line 599) | def load_images(self):
    method show_startled_icon (line 672) | def show_startled_icon(self):
    method hide_startled_icon (line 680) | def hide_startled_icon(self):
    method show_neurogenesis_icon (line 686) | def show_neurogenesis_icon(self):
    method hide_neurogenesis_icon (line 694) | def hide_neurogenesis_icon(self):
    method update_neurogenesis_icon_position (line 700) | def update_neurogenesis_icon_position(self):
    method update_startled_icon_position (line 708) | def update_startled_icon_position(self):
    method load_poop_images (line 716) | def load_poop_images(self):
    method initialize_attributes (line 724) | def initialize_attributes(self):
    method update_preferred_vertical_range (line 744) | def update_preferred_vertical_range(self):
    method handle_window_resize (line 747) | def handle_window_resize(self, event):
    method update_needs (line 762) | def update_needs(self):
    method make_decision (line 766) | def make_decision(self):
    method handle_squid_click (line 774) | def handle_squid_click(self, event):
    method startle_awake (line 780) | def startle_awake(self):
    method end_ink_flee (line 825) | def end_ink_flee(self):
    method end_startled_transition (line 834) | def end_startled_transition(self):
    method reduce_startle_anxiety (line 841) | def reduce_startle_anxiety(self):
    method check_boundary_exit (line 850) | def check_boundary_exit(self):
    method _get_squid_color (line 952) | def _get_squid_color(self):
    method _notify_boundary_exit (line 989) | def _notify_boundary_exit(self, direction):
    method determine_startle_reason (line 1059) | def determine_startle_reason(self, current_state):
    method is_near_decorations (line 1088) | def is_near_decorations(self, category):
    method search_for_favorite_food (line 1095) | def search_for_favorite_food(self):
    method get_favorite_food (line 1108) | def get_favorite_food(self):
    method is_favorite_food (line 1115) | def is_favorite_food(self, food_item):
    method load_state (line 1118) | def load_state(self, state):
    method push_decoration (line 1156) | def push_decoration(self, decoration, direction):
    method _on_push_complete (line 1184) | def _on_push_complete(self, decoration):
    method record_startle_reason (line 1224) | def record_startle_reason(self, reason):
    method handle_rock_interaction (line 1230) | def handle_rock_interaction(self, target_rock=None):
    method move_erratically (line 1237) | def move_erratically(self):
    method move_slowly (line 1242) | def move_slowly(self):
    method explore_environment (line 1247) | def explore_environment(self):
    method search_for_food (line 1252) | def search_for_food(self):
    method get_visible_objects (line 1266) | def get_visible_objects(self, object_list):
    method get_visible_food (line 1287) | def get_visible_food(self):
    method _get_visible_food_sync (line 1315) | def _get_visible_food_sync(self):
    method can_see_food (line 1334) | def can_see_food(self) -> bool:
    method get_plant_proximity (line 1343) | def get_plant_proximity(self) -> float:
    method get_visible_plants (line 1352) | def get_visible_plants(self):
    method is_in_vision_cone (line 1371) | def is_in_vision_cone(self, x, y):
    method change_view_cone_direction (line 1429) | def change_view_cone_direction(self):
    method cleanup_vision_worker (line 1432) | def cleanup_vision_worker(self):
    method move_squid (line 1442) | def move_squid(self):
    method move_towards (line 1553) | def move_towards(self, x, y):
    method move_towards_position (line 1562) | def move_towards_position(self, target_pos):
    method eat (line 1573) | def eat(self, food_item):
    method eat_greedily (line 1662) | def eat_greedily(self, food_item):
    method react_stubborn_eating (line 1704) | def react_stubborn_eating(self):
    method check_for_more_food (line 1711) | def check_for_more_food(self):
    method is_food_nearby (line 1717) | def is_food_nearby(self, food_item):
    method process_squid_detection (line 1724) | def process_squid_detection(self, remote_node_id, is_visible=True):
    method react_to_rock_throw (line 1777) | def react_to_rock_throw(self, source_node_id, is_target=False):
    method investigate_food (line 1823) | def investigate_food(self, food_item):
    method consume_food (line 1836) | def consume_food(self, food_item):
    method start_poop_timer (line 1859) | def start_poop_timer(self):
    method create_poop (line 1867) | def create_poop(self):
    method show_eating_effect (line 1873) | def show_eating_effect(self):
    method is_debug_mode (line 1895) | def is_debug_mode(self):
    method change_to_rps_image (line 1899) | def change_to_rps_image(self):
    method restore_normal_image (line 1903) | def restore_normal_image(self):
    method should_hoard_decorations (line 1906) | def should_hoard_decorations(self):
    method organize_decorations (line 1910) | def organize_decorations(self):
    method go_to_sleep (line 1939) | def go_to_sleep(self):
    method wake_up (line 1959) | def wake_up(self):
    method update_squid_image (line 1968) | def update_squid_image(self):
    method current_image (line 1971) | def current_image(self):
    method move_randomly (line 2021) | def move_randomly(self):
    method get_food_position (line 2025) | def get_food_position(self):
    method distance_to (line 2033) | def distance_to(self, x, y):
    method change_direction (line 2036) | def change_direction(self):
    method toggle_view_cone (line 2043) | def toggle_view_cone(self):
    method update_view_cone (line 2050) | def update_view_cone(self):
    method remove_view_cone (line 2081) | def remove_view_cone(self):
    method show_sick_icon (line 2086) | def show_sick_icon(self):
    method hide_sick_icon (line 2094) | def hide_sick_icon(self):
    method update_sick_icon_position (line 2099) | def update_sick_icon_position(self):
    method is_near_plant (line 2104) | def is_near_plant(self):
    method move_towards_plant (line 2111) | def move_towards_plant(self):
    method should_organize_decorations (line 2124) | def should_organize_decorations(self):
    method organize_decorations (line 2129) | def organize_decorations(self):
    method interact_with_rocks (line 2143) | def interact_with_rocks(self):
    method can_pick_up_rock (line 2153) | def can_pick_up_rock(self, rock_item):
    method pick_up_rock (line 2178) | def pick_up_rock(self, item):
    method throw_rock (line 2184) | def throw_rock(self, direction):
    method update_rock_throw (line 2221) | def update_rock_throw(self):
    method check_rock_interaction (line 2264) | def check_rock_interaction(self):
    method check_poop_interaction (line 2301) | def check_poop_interaction(self):
    method get_center (line 2338) | def get_center(self):
    method move_toward_position (line 2343) | def move_toward_position(self, target_pos):

FILE: src/squid_facts.py
  function get_random_fact (line 19) | def get_random_fact():

FILE: src/squid_statistics.py
  class SquidStatistics (line 7) | class SquidStatistics:
    method __init__ (line 8) | def __init__(self, squid):
    method get_total_age_seconds (line 42) | def get_total_age_seconds(self):
    method update_distance (line 47) | def update_distance(self, dx, dy):
    method get_distance_display (line 63) | def get_distance_display(self):
    method get_squid_age (line 69) | def get_squid_age(self):
    method load_statistics (line 91) | def load_statistics(self, data):
    method update (line 134) | def update(self):
    method get_sleep_time (line 171) | def get_sleep_time(self):

FILE: src/statistics_window.py
  class StatBox (line 6) | class StatBox(QtWidgets.QWidget):
    method __init__ (line 8) | def __init__(self, label_key, parent=None):
    method set_value (line 49) | def set_value(self, value):
    method get_value (line 53) | def get_value(self):
    method set_editable (line 56) | def set_editable(self, editable):
    method update_label (line 60) | def update_label(self):
  class StatisticsWindow (line 65) | class StatisticsWindow(QtWidgets.QWidget):
    method __init__ (line 66) | def __init__(self, squid, arcade_font_path=None, show_decorations_call...
    method setup_decorations_shortcut (line 206) | def setup_decorations_shortcut(self):
    method _tick (line 215) | def _tick(self):
    method award (line 234) | def award(self, base):
    method set_score (line 252) | def set_score(self, value):
    method update_score (line 258) | def update_score(self):
    method add_score_for_food_eaten (line 263) | def add_score_for_food_eaten(self):
    method add_score_for_neuron_creation (line 266) | def add_score_for_neuron_creation(self):
    method deduct_score_for_startle (line 269) | def deduct_score_for_startle(self):
    method add_score_for_poop_cleaned (line 272) | def add_score_for_poop_cleaned(self, count):
    method update_statistics (line 276) | def update_statistics(self):
    method _update_state_pill (line 284) | def _update_state_pill(self):
    method set_debug_mode (line 336) | def set_debug_mode(self, enabled):
    method apply_changes (line 342) | def apply_changes(self):
    method closeEvent (line 349) | def closeEvent(self, event):

FILE: src/tamagotchi_logic.py
  class TamagotchiLogic (line 37) | class TamagotchiLogic:
    method __init__ (line 39) | def __init__(self, user_interface, squid, brain_window):
    method handle_vision_update (line 257) | def handle_vision_update(self, result):
    method _on_neurogenesis_icon_and_memory (line 263) | def _on_neurogenesis_icon_and_memory(self, neuron_name: str):
    method _initialize_plugins (line 286) | def _initialize_plugins(self):
    method update_squid_age (line 328) | def update_squid_age(self):
    method track_poop_thrown (line 335) | def track_poop_thrown(self):
    method update_highest_anxiety (line 339) | def update_highest_anxiety(self, value):
    method update_lowest_happiness (line 346) | def update_lowest_happiness(self, value):
    method update_max_memories (line 353) | def update_max_memories(self):
    method set_squid (line 364) | def set_squid(self, squid):
    method set_brain_window (line 367) | def set_brain_window(self, brain_window):
    method set_mental_states_enabled (line 370) | def set_mental_states_enabled(self, enabled):
    method get_health_history (line 374) | def get_health_history(self, limit=100):
    method reset_squid_status (line 393) | def reset_squid_status(self):
    method get_decision_data (line 409) | def get_decision_data(self):
    method give_rl_reward (line 524) | def give_rl_reward(self, reward):
    method get_active_memories (line 542) | def get_active_memories(self):
    method get_available_actions (line 547) | def get_available_actions(self):
    method get_recent_learning (line 550) | def get_recent_learning(self):
    method get_current_state (line 561) | def get_current_state(self):
    method get_active_memories (line 576) | def get_active_memories(self):
    method get_available_actions (line 580) | def get_available_actions(self):
    method update_from_brain (line 589) | def update_from_brain(self, brain_state):   # Communication between br...
    method update_decoration_learning (line 609) | def update_decoration_learning(self, effects):
    method _log_thought (line 647) | def _log_thought(self, thought):
    method check_for_decoration_attraction (line 651) | def check_for_decoration_attraction(self):
    method get_nearby_decorations (line 680) | def get_nearby_decorations(self, x, y, radius=100):
    method invalidate_decoration_cache (line 710) | def invalidate_decoration_cache(self):
    method investigate_object (line 716) | def investigate_object(self):
    method check_collision_with_cheese (line 737) | def check_collision_with_cheese(self, cheese_item):
    method move_decoration (line 746) | def move_decoration(self, decoration, dx):
    method apply_decoration_effects (line 771) | def apply_decoration_effects(self, active_decorations):
    method check_decoration_startle (line 822) | def check_decoration_startle(self, active_decorations):
    method show_decoration_message (line 841) | def show_decoration_message(self, decoration):
    method setup_speed_menu (line 863) | def setup_speed_menu(self):
    method set_simulation_speed (line 880) | def set_simulation_speed(self, speed):
    method setup_timers (line 919) | def setup_timers(self, scene=None, message_callback=None):
    method update_timers (line 965) | def update_timers(self):
    method stop (line 1016) | def stop(self):
    method check_for_startle (line 1061) | def check_for_startle(self):
    method startle_squid (line 1084) | def startle_squid(self, source="unknown"):
    method end_fleeing (line 1203) | def end_fleeing(self, previous_status="roaming"):
    method create_ink_cloud (line 1239) | def create_ink_cloud(self):
    method force_remove_ink_cloud (line 1288) | def force_remove_ink_cloud(self, ink_cloud_item):
    method remove_ink_cloud (line 1293) | def remove_ink_cloud(self, ink_cloud_item):
    method remove_ink_cloud_safety (line 1301) | def remove_ink_cloud_safety(self):
    method end_startle (line 1311) | def end_startle(self):
    method track_food_consumed (line 1317) | def track_food_consumed(self, food_item):
    method track_poop_created (line 1325) | def track_poop_created(self):
    method track_rock_thrown (line 1335) | def track_rock_thrown(self):
    method track_plant_interaction (line 1340) | def track_plant_interaction(self):
    method track_startle (line 1345) | def track_startle(self):
    method update_simulation (line 1354) | def update_simulation(self):
    method _get_cached_decorations (line 1538) | def _get_cached_decorations(self):
    method apply_input_neurons_to_brain (line 1551) | def apply_input_neurons_to_brain(self):
    method _check_decorations_message (line 1602) | def _check_decorations_message(self):
    method update_squid_brain (line 1623) | def update_squid_brain(self):
    method _normalize_action_name (line 1696) | def _normalize_action_name(self, status: str) -> str:
    method check_for_curiosity (line 1741) | def check_for_curiosity(self):
    method track_neuron_creation (line 1757) | def track_neuron_creation(self, neuron_type):
    method track_neuron_counts (line 1771) | def track_neuron_counts(self, current_count, max_count):
    method track_neurogenesis_triggers (line 1777) | def track_neurogenesis_triggers(self):
    method _normalize_action_name (line 1823) | def _normalize_action_name(self, status_string):
    method make_squid_curious (line 1898) | def make_squid_curious(self):
    method end_curious (line 1923) | def end_curious(self):
    method curious_interaction (line 1929) | def curious_interaction(self):
    method update_curiosity (line 1946) | def update_curiosity(self):
    method move_objects (line 1966) | def move_objects(self):
    method move_squid_to_bottom_left (line 1970) | def move_squid_to_bottom_left(self, callback):      # Force the squid ...
    method start_rps_game (line 2006) | def start_rps_game(self):
    method give_medicine (line 2010) | def give_medicine(self):
    method delayed_sleep_after_medicine (line 2051) | def delayed_sleep_after_medicine(self):
    method display_needle_image (line 2057) | def display_needle_image(self):
    method remove_needle_image (line 2082) | def remove_needle_image(self):
    method move_foods (line 2087) | def move_foods(self):
    method get_food_item_at (line 2094) | def get_food_item_at(self, x, y):
    method move_cheese (line 2100) | def move_cheese(self, cheese_item):
    method move_sushi (line 2116) | def move_sushi(self, sushi_item):
    method is_sushi (line 2132) | def is_sushi(self, food_item):
    method remove_food (line 2135) | def remove_food(self, food_item):
    method move_poops (line 2144) | def move_poops(self):
    method update_statistics (line 2154) | def update_statistics(self):
    method handle_window_resize (line 2226) | def handle_window_resize(self, event):
    method allow_initial_startle (line 2256) | def allow_initial_startle(self):
    method handle_window_resize_event (line 2262) | def handle_window_resize_event(self, width_change, height_change, new_...
    method track_action (line 2309) | def track_action(self, action_name):
    method feed_squid (line 2315) | def feed_squid(self):
    method spawn_food (line 2345) | def spawn_food(self, is_sushi=False):
    method clean_environment (line 2371) | def clean_environment(self):
    method update_cleaning (line 2413) | def update_cleaning(self):
    method finish_cleaning (line 2446) | def finish_cleaning(self):
    method show_message (line 2474) | def show_message(self, message):
    method show_thought (line 2519) | def show_thought(self, text):
    method update_score (line 2524) | def update_score(self):
    method toggle_debug_mode (line 2533) | def toggle_debug_mode(self):
    method update_cleanliness_overlay (line 2565) | def update_cleanliness_overlay(self):
    method spawn_sushi (line 2573) | def spawn_sushi(self):
    method spawn_poop (line 2593) | def spawn_poop(self, x, y):
    method animate_poops (line 2605) | def animate_poops(self):
    method game_over (line 2611) | def game_over(self):
    method reset_game (line 2629) | def reset_game(self):
    method load_game (line 2679) | def load_game(self) -> bool:
    method save_game (line 2798) | def save_game(self, is_autosave=False):
    method _restore_achievements_data (line 2982) | def _restore_achievements_data(self, achievements_data):
    method _apply_save_data (line 2997) | def _apply_save_data(self, save_data):
    method _get_pixmap_data (line 3093) | def _get_pixmap_data(self, item):
    method start_autosave (line 3106) | def start_autosave(self):
    method autosave (line 3109) | def autosave(self):
    method update_satisfaction (line 3114) | def update_satisfaction(self):
    method update_anxiety (line 3126) | def update_anxiety(self):
    method update_curiosity (line 3143) | def update_curiosity(self):
    method trigger_rock_test (line 3160) | def trigger_rock_test(self):
    method is_valid_rock (line 3196) | def is_valid_rock(self, item):
    method update_rock_interaction (line 3207) | def update_rock_interaction(self):
    method update_rock_test (line 3240) | def update_rock_test(self):
    method update_status_bar (line 3245) | def update_status_bar(self):
    method setup_poop_interaction (line 3269) | def setup_poop_interaction(self):
    method check_poop_interaction (line 3297) | def check_poop_interaction(self):

FILE: src/task_manager.py
  class TaskManagerWindow (line 9) | class TaskManagerWindow(QWidget):
    method __init__ (line 12) | def __init__(self, brain_worker, parent=None):
    method brain_worker (line 47) | def brain_worker(self):
    method update_worker_reference (line 53) | def update_worker_reference(self, new_worker):
    method _refresh_display (line 58) | def _refresh_display(self):
    method _update_threads (line 66) | def _update_threads(self):
    method _update_timers (line 98) | def _update_timers(self):
    method closeEvent (line 118) | def closeEvent(self, event):

FILE: src/tutorial.py
  class TutorialManager (line 7) | class TutorialManager:
    method __init__ (line 10) | def __init__(self, ui_reference, main_window):
    method get_tutorial_font_sizes (line 19) | def get_tutorial_font_sizes(self, base_title_size=12, base_body_size=11):
    method start_tutorial (line 33) | def start_tutorial(self):
    method show_first_tutorial (line 57) | def show_first_tutorial(self):
    method show_second_tutorial (line 122) | def show_second_tutorial(self):
    method show_neurogenesis_tutorial (line 210) | def show_neurogenesis_tutorial(self):
    method show_learning_tutorial (line 275) | def show_learning_tutorial(self):
    method show_decisions_tutorial (line 356) | def show_decisions_tutorial(self):
    method show_decorations_tutorial (line 431) | def show_decorations_tutorial(self):
    method show_final_tutorial (line 511) | def show_final_tutorial(self):
    method check_brain_window_ready (line 575) | def check_brain_window_ready(self):
    method advance_to_next_step (line 584) | def advance_to_next_step(self):
    method _flash_brain_window_background (line 627) | def _flash_brain_window_background(self, window, flash_colour="#00FFFF...
    method end_tutorial (line 650) | def end_tutorial(self):
    method start_auto_dismiss_timer (line 663) | def start_auto_dismiss_timer(self, ms_duration):
    method cancel_auto_dismiss_timer (line 672) | def cancel_auto_dismiss_timer(self):
    method clear_tutorial_elements (line 678) | def clear_tutorial_elements(self):
    method create_tutorial_example_neurons (line 689) | def create_tutorial_example_neurons(self):
    method clear_tutorial_example_neurons (line 716) | def clear_tutorial_example_neurons(self):

FILE: src/ui.py
  class ActionButton (line 26) | class ActionButton(QtWidgets.QPushButton):
    method __init__ (line 28) | def __init__(self, text, hover_color, pressed_color, font_size=16, par...
    method update_style (line 37) | def update_style(self):
    method enterEvent (line 59) | def enterEvent(self, event):
    method leaveEvent (line 64) | def leaveEvent(self, event):
    method mousePressEvent (line 69) | def mousePressEvent(self, event):
    method mouseReleaseEvent (line 75) | def mouseReleaseEvent(self, event):
  class DecorationItem (line 82) | class DecorationItem(QtWidgets.QLabel):
    method __init__ (line 83) | def __init__(self, pixmap, filename):
    method mousePressEvent (line 96) | def mousePressEvent(self, event):
  class ResizablePixmapItem (line 107) | class ResizablePixmapItem(QtWidgets.QGraphicsPixmapItem):
    method __init__ (line 108) | def __init__(self, pixmap=None, filename=None, category=None, parent=N...
    method boundingRect (line 140) | def boundingRect(self):
    method wheelEvent (line 143) | def wheelEvent(self, event):
    method paint (line 165) | def paint(self, painter, option, widget):
    method mousePressEvent (line 179) | def mousePressEvent(self, event):
    method mouseMoveEvent (line 185) | def mouseMoveEvent(self, event):
    method mouseReleaseEvent (line 205) | def mouseReleaseEvent(self, event):
    method get_decoration_info (line 210) | def get_decoration_info(self):
  class DecorationWindow (line 227) | class DecorationWindow(QtWidgets.QWidget):
    method __init__ (line 228) | def __init__(self, parent=None):
    method add_decoration_item (line 246) | def add_decoration_item(self, item):
    method load_decorations (line 249) | def load_decorations(self):
  class ComputeBackendOverlay (line 272) | class ComputeBackendOverlay:
    method __init__ (line 292) | def __init__(self, scene, window_width: int, window_height: int):
    method _style_for (line 332) | def _style_for(backend_name: str):
    method show_colored_message (line 361) | def show_colored_message(self, text, color="#FFFFFF", duration=5000):
  class Ui (line 370) | class Ui:
    method __init__ (line 371) | def __init__(self, window, debug_mode=False):
    method setup_neurogenesis_debug_shortcut (line 450) | def setup_neurogenesis_debug_shortcut(self):
    method show_neurogenesis_debug (line 457) | def show_neurogenesis_debug(self):
    method show_neuron_laboratory (line 470) | def show_neuron_laboratory(self):
    method _get_exports_dir (line 486) | def _get_exports_dir(self):
    method _exports_timestamp (line 493) | def _exports_timestamp(self):
    method export_memory (line 496) | def export_memory(self, mode):
    method export_weights (line 551) | def export_weights(self, fmt):
    method export_neurons (line 589) | def export_neurons(self):
    method setup_decorations_shortcut (line 626) | def setup_decorations_shortcut(self):
    method show_decorations_window (line 633) | def show_decorations_window(self):
    method optimize_animations (line 638) | def optimize_animations(self):
    method set_tamagotchi_logic (line 642) | def set_tamagotchi_logic(self, logic):
    method show_tutorial_overlay (line 652) | def show_tutorial_overlay(self):
    method remove_tutorial_overlay (line 655) | def remove_tutorial_overlay(self):
    method show_second_tutorial_banner (line 658) | def show_second_tutorial_banner(self):
    method close_tutorial_completely (line 710) | def close_tutorial_completely(self):
    method show_experience_buffer (line 718) | def show_experience_buffer(self):
    method open_brain_designer (line 747) | def open_brain_designer(self):
    method setup_plugin_menu (line 796) | def setup_plugin_menu(self, plugin_manager_instance):
    method create_multiplayer_menu (line 807) | def create_multiplayer_menu(self):
    method apply_plugin_menu_registrations (line 813) | def apply_plugin_menu_registrations(self, plugin_manager):
    method toggle_plugin (line 893) | def toggle_plugin(self, plugin_name, enable_flag):
    method show_plugin_manager (line 921) | def show_plugin_manager(self, plugin_manager):
    method setup_ui_elements (line 926) | def setup_ui_elements(self):
    method custom_wheel_event (line 970) | def custom_wheel_event(self, event):
    method create_action_buttons (line 982) | def create_action_buttons(self):
    method connect_action_buttons (line 1026) | def connect_action_buttons(self):
    method update_dirty_text (line 1035) | def update_dirty_text(self, cleanliness):
    method clear_dirty_text (line 1085) | def clear_dirty_text(self):
    method check_neurogenesis (line 1092) | def check_neurogenesis(self, state):
    method _create_neuron (line 1135) | def _create_neuron(self, neuron_type, trigger_data):
    method trigger_neurogenesis (line 1173) | def trigger_neurogenesis(self):
    method toggle_decoration_window (line 1234) | def toggle_decoration_window(self, checked):
    method show_pause_message (line 1241) | def show_pause_message(self, is_paused):
    method _remove_all_pause_elements (line 1293) | def _remove_all_pause_elements(self):
    method _redraw_pause_message (line 1300) | def _redraw_pause_message(self):
    method handle_window_resize (line 1348) | def handle_window_resize(self, event):
    method show_message (line 1382) | def show_message(self, message):
    method update_points (line 1430) | def update_points(self, points):
    method get_nearby_decorations (line 1433) | def get_nearby_decorations(self, x, y, radius=100):
    method move_decoration (line 1443) | def move_decoration(self, decoration, dx):
    method dragEnterEvent (line 1457) | def dragEnterEvent(self, event):
    method dragMoveEvent (line 1463) | def dragMoveEvent(self, event):
    method dropEvent (line 1469) | def dropEvent(self, event):
    method keyPressEvent (line 1509) | def keyPressEvent(self, event):
    method show_preferences (line 1515) | def show_preferences(self):
    method direct_create_neuron (line 1523) | def direct_create_neuron(self):
    method delete_selected_items (line 1569) | def delete_selected_items(self):
    method show_floating_score (line 1584) | def show_floating_score(self, item, text, color=QtGui.QColor(50, 205, ...
    method setup_menu_bar (line 1622) | def setup_menu_bar(self):
    method show_neuron_output_monitor (line 1772) | def show_neuron_output_monitor(self):
    method show_task_manager (line 1783) | def show_task_manager(self):
    method show_vision_window (line 1790) | def show_vision_window(self):
    method set_simulation_speed (line 1801) | def set_simulation_speed(self, speed):
    method toggle_debug_mode (line 1815) | def toggle_debug_mode(self):
    method trigger_rock_test (line 1846) | def trigger_rock_test(self):
    method start_rps_game (line 1868) | def start_rps_game(self):
    method test_rock_interaction (line 1874) | def test_rock_interaction(self):
    method show_neuron_inspector (line 1885) | def show_neuron_inspector(self):
    method toggle_statistics_window (line 1919) | def toggle_statistics_window(self):
    method create_statistics_window (line 1930) | def create_statistics_window(self):
    method toggle_brain_window (line 1938) | def toggle_brain_window(self, checked):
    method toggle_designer_mode (line 1944) | def toggle_designer_mode(self, checked=None):
    method connect_view_cone_action (line 1968) | def connect_view_cone_action(self, toggle_function):
    method get_decorations_data (line 1971) | def get_decorations_data(self):
    method load_decorations_data (line 1998) | def load_decorations_data(self, decorations_data):
    method get_pixmap_data (line 2032) | def get_pixmap_data(self, item):
    method closeEvent (line 2040) | def closeEvent(self, event):
    method get_rock_items (line 2046) | def get_rock_items(self):
    method highlight_rock (line 2051) | def highlight_rock(self, rock, highlight=True):
    method reset_all_rock_states (line 2057) | def reset_all_rock_states(self):

FILE: src/vision.py
  class VisionWindow (line 5) | class VisionWindow(QtWidgets.QDialog):
    method __init__ (line 6) | def __init__(self, tamagotchi_logic, parent=None):
    method initialize_ui (line 24) | def initialize_ui(self):
    method toggle_view_cone (line 84) | def toggle_view_cone(self):
    method closeEvent (line 89) | def closeEvent(self, event):
    method update_view (line 95) | def update_view(self):

FILE: src/vision_worker.py
  class SquidVisionState (line 25) | class SquidVisionState:
  class SceneObject (line 46) | class SceneObject:
  class VisionResult (line 58) | class VisionResult:
  class VisionWorker (line 77) | class VisionWorker(QThread):
    method __init__ (line 103) | def __init__(self, parent=None):
    method stop (line 132) | def stop(self):
    method pause (line 139) | def pause(self):
    method resume (line 143) | def resume(self):
    method update_squid_state (line 150) | def update_squid_state(self, state: SquidVisionState):
    method update_scene_objects (line 160) | def update_scene_objects(self, objects: List[SceneObject]):
    method get_last_result (line 170) | def get_last_result(self) -> Optional[VisionResult]:
    method get_stats (line 175) | def get_stats(self) -> Dict[str, Any]:
    method run (line 183) | def run(self):
    method _calculate_visibility (line 236) | def _calculate_visibility(self, squid: SquidVisionState,
    method _check_and_emit_changes (line 387) | def _check_and_emit_changes(self, result: VisionResult):
  function extract_scene_objects (line 404) | def extract_scene_objects(scene, food_items: List,
  function create_squid_vision_state (line 491) | def create_squid_vision_state(squid) -> SquidVisionState:
Condensed preview — 190 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,409K chars).
[
  {
    "path": ".dockerignore",
    "chars": 148,
    "preview": ".git\n.github\n__pycache__/\n*.pyc\n*.pyo\n*.pyd\n*.swp\n*.swo\n*.tmp\nlogs/\nsaves/\n.env\n.env.*\n*.zip\n*.tar\n*.tar.gz\n*.7z\n.vscode"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/submit_squid.yml",
    "chars": 460,
    "preview": "name: 🦑 Submit a Squid Save\ndescription: Share your evolved squid! (Must be a .zip containing uuid.txt)\nlabels: [\"squid-"
  },
  {
    "path": ".github/workflows/build-nuitka.yml",
    "chars": 7382,
    "preview": "name: Build (Nuitka)\n\non:\n  workflow_dispatch:\n\njobs:\n  build:\n\n    strategy:\n      matrix:\n        os: [windows-latest,"
  },
  {
    "path": ".github/workflows/process_submission.yml",
    "chars": 1802,
    "preview": "name: Squid Gallery Bot\non:\n  issues:\n    types: [opened]\n\njobs:\n  add-to-gallery:\n    if: contains(github.event.issue.l"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2804,
    "preview": "## Contributing to Dosidicus 🦑\nDosidicus isn't just a repository; it’s an open-ended experiment in transparent artificia"
  },
  {
    "path": "Dockerfile",
    "chars": 1816,
    "preview": "# syntax=docker/dockerfile:1\n\nFROM python:3.11-slim AS base\nENV PYTHONDONTWRITEBYTECODE=1 \\\n    PYTHONUNBUFFERED=1 \\\n   "
  },
  {
    "path": "Docs/Cognitive Sandbox Manifesto - Artificial Life and Transparent Neural Systems.md",
    "chars": 5019,
    "preview": "\n <img src=\"https://github.com/user-attachments/assets/309ea7b0-a7c1-49f3-8f44-1b541734954d\" width=\"220\">\n\n\n\n\n## 1. Why "
  },
  {
    "path": "Docs/README.md",
    "chars": 5737,
    "preview": "\n_\"What if a Tamagotchi had a neural network and could learn stuff?\"_\n— [Gigazine](https://gigazine.net/gsc_news/en/2025"
  },
  {
    "path": "Docs/brain-tool/Brain-Designer.md",
    "chars": 2863,
    "preview": "### Design your own (GPL!) squid brain!\n\nAdd new **neurons** / **layers** - see how they affect the squid's ability to p"
  },
  {
    "path": "Docs/brain-tool/Brain-Trainer-Headless.md",
    "chars": 1123,
    "preview": "A headless training tool is included in the `headless` folder. This can be used to train brains in a time-accelerated en"
  },
  {
    "path": "Docs/brain-tool/Decisions-Tab.md",
    "chars": 1961,
    "preview": "\n![image](https://github.com/user-attachments/assets/a6b74e77-98db-4e97-b03e-a067b0814c77)\n\n <p> The <strong>Decisions T"
  },
  {
    "path": "Docs/brain-tool/Learning-Tab.md",
    "chars": 1427,
    "preview": "<img src=\"https://github.com/user-attachments/assets/0c76149e-0975-4942-a10c-ca686f1d6f76\" width=\"700\">\n\n#### `Hebbian l"
  },
  {
    "path": "Docs/brain-tool/Memory-Tab.md",
    "chars": 1810,
    "preview": "\n\n<img src=\"https://github.com/user-attachments/assets/3123aea8-0ba8-41a4-abba-7a559e65fac2\" width=\"600\">\n\n<p> The <stro"
  },
  {
    "path": "Docs/brain-tool/Network-Tab.md",
    "chars": 2007,
    "preview": "The <strong>Network Tab</strong> provides a live, visual representation of the overall structure and health of the neura"
  },
  {
    "path": "Docs/brain-tool/Neuron-Laboratory.md",
    "chars": 653,
    "preview": "### **Double click on any neuron** to view the Neuron Laboratory\nIt can be used to inspect individual neurons. The 'Edit"
  },
  {
    "path": "Docs/brain-tool/Personality-Tab.md",
    "chars": 1078,
    "preview": "\n![image](https://github.com/user-attachments/assets/fb73ae47-efae-4127-85c7-b2da6236e9c7)\n\n <p> The <strong>Personality"
  },
  {
    "path": "Docs/engine/Data-Flow-Summary.md",
    "chars": 2122,
    "preview": "## Data Flow Summary\n\n### [Main Loop](../source-reference/main.py.md)\n\n**Game Loop** → [`TamagotchiLogic`](../source-ref"
  },
  {
    "path": "Docs/engine/Decision-Engine.md",
    "chars": 7319,
    "preview": "#### view source: _[decision_engine.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_LatestVersion/src/decisio"
  },
  {
    "path": "Docs/engine/Engine-Overview.md",
    "chars": 2292,
    "preview": "## `S`imulated `T`amagotchi `R`eactions via `I`nferencing and `N`eurogenesis `(STRINg)`\n\n### simulation engine overview:"
  },
  {
    "path": "Docs/engine/Multiplayer.md",
    "chars": 839,
    "preview": "**Basic Multiplayer functionality** has been implemented as a plugin (`plugins/multiplayer`) enabled via the Plugin mana"
  },
  {
    "path": "Docs/engine/Plugin-Hooks.md",
    "chars": 2618,
    "preview": "The following hooks are available for [plugins](../engine/Plugin-System.md) to subscribe to:\n\n  ### Lifecycle hooks\n`on_"
  },
  {
    "path": "Docs/engine/Plugin-System.md",
    "chars": 7434,
    "preview": "### Hooks\n\n\nThe application can be extended via **HOOKS** which are made available by the simulation engine when certain"
  },
  {
    "path": "Docs/engine/Save-File-Format.md",
    "chars": 1937,
    "preview": "Save and load functionality is handled by the [SaveManager](https://github.com/ViciousSquid/Dosidicus/blob/2.4.4_stable/"
  },
  {
    "path": "Docs/engine/config.ini.md",
    "chars": 4310,
    "preview": "The [config.ini](https://github.com/ViciousSquid/Dosidicus/blob/2.4.4_stable/config.ini) file allows for the fine-tuning"
  },
  {
    "path": "Docs/extras/Achievements.md",
    "chars": 6223,
    "preview": "Achievements are implemented via the [achievements plugin](https://github.com/ViciousSquid/Dosidicus/tree/2.5.0.0_latest"
  },
  {
    "path": "Docs/extras/Decoration-Window.md",
    "chars": 2085,
    "preview": "\n![image](https://github.com/user-attachments/assets/bed7c083-80d3-4ecd-8375-dd6c8746d3d4)\n\n# Press `D` to open the deco"
  },
  {
    "path": "Docs/extras/Easter-Eggs.md",
    "chars": 521,
    "preview": "<img src=\"https://github.com/user-attachments/assets/07f2c02f-b8b5-428c-8bf3-37b69cf188c7\" width=\"400\">\n\n On the About t"
  },
  {
    "path": "Docs/extras/SaveViewer.md",
    "chars": 255,
    "preview": "#### SaveViewer.html\n\n* Quickly and easily open save files and view the contents.\n* `Network` tab visualises entire netw"
  },
  {
    "path": "Docs/extras/UUID.md",
    "chars": 508,
    "preview": "When a squid is created at the start of a new game he is assigned a unique fingerprint (also the name of his save file)\n"
  },
  {
    "path": "Docs/getting-started/Care-Guide.md",
    "chars": 5407,
    "preview": "<h3>Care Guide: Nurturing Body and Mind</h3> <p> Caring for your squid is a unique experience that goes beyond simple pe"
  },
  {
    "path": "Docs/getting-started/Changelog.md",
    "chars": 5046,
    "preview": "### version 2.6.1.2\n`23 Feb 2026`\n\n* Optional [hardware AI accelerator support via ONNX Runtime](../neural-network/AI-Ac"
  },
  {
    "path": "Docs/getting-started/Example-Squids.md",
    "chars": 969,
    "preview": "```\nThe example_squids folder contains saved brains that have already accumulated some experiences:\n```\n----------------"
  },
  {
    "path": "Docs/getting-started/Home.md",
    "chars": 2617,
    "preview": "### _A transparent neural sandbox disguised as a digital pet_\nA micro neural engine for small autonomous agents that lea"
  },
  {
    "path": "Docs/neural-network/AI-Accelerator-Support.md",
    "chars": 1607,
    "preview": "#### New in v2.6.1.2 (experimental)\n\n[compute_backend.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_onnx/sr"
  },
  {
    "path": "Docs/neural-network/Experience-Buffer.md",
    "chars": 2466,
    "preview": "\nThe Experience Buffer is a core component in the system's learning and [neurogenesis](../neural-network/Neurogenesis.md"
  },
  {
    "path": "Docs/neural-network/Hebbian-Learning.md",
    "chars": 4219,
    "preview": "The neural network in Dosidicus does not use traditional backpropagation for training. Instead, it employs a form of <st"
  },
  {
    "path": "Docs/neural-network/Neurogenesis.md",
    "chars": 3537,
    "preview": "`neurogenesis.py` is the brains’ stem-cell layer: it decides when, why, and how new neurons appear, makes sure they are "
  },
  {
    "path": "Docs/neural-network/Personality.md",
    "chars": 3235,
    "preview": "Personality affects squid needs and behaviour. A random personality is assigned every time a new squid is born, and coul"
  },
  {
    "path": "Docs/neural-network/STDP.md",
    "chars": 216,
    "preview": "### Spike‐Timing‐Dependent Plasticity (STDP)\n\n_As of version 2.6.2.0_ this page has moved to the Wiki [[HERE]](https://g"
  },
  {
    "path": "Docs/neural-network/Technical-Overview.md",
    "chars": 4589,
    "preview": "<h3>Neural Network Technical Overview</h3> \n\n<img width=\"598\" height=\"296\" alt=\"image\" src=\"https://github.com/user-atta"
  },
  {
    "path": "Docs/neural-network/Vision-System.md",
    "chars": 3275,
    "preview": "<p> The squid's ability to \"see\" and react to his environment is not based on simple proximity but on a simulated line-o"
  },
  {
    "path": "Docs/source-reference/brain_neuron_hooks.py.md",
    "chars": 1315,
    "preview": "#### brain_neuron_hooks.py\nThe **sensory input** system that bridges game events to neuron activations. It maintains a r"
  },
  {
    "path": "Docs/source-reference/brain_neuron_outputs.py.md",
    "chars": 1306,
    "preview": "#### brain_neuron_outputs.py\n**output system** that bridges neuron activations to game behaviours (bindings)\n\nWhen neuro"
  },
  {
    "path": "Docs/source-reference/brain_render_worker.py.md",
    "chars": 961,
    "preview": "_Not to be confused with [brain_worker.py](../source-reference/brain_worker.py.md)_\n\n#### brain_render_worker.py (938 li"
  },
  {
    "path": "Docs/source-reference/brain_tool.py.md",
    "chars": 1301,
    "preview": "#### Responsibilities\n\n* Builds the multi-tab window (Network, Learning, Memory, Decisions, Statistics, …).\n* Hosts the "
  },
  {
    "path": "Docs/source-reference/brain_widget.py.md",
    "chars": 1795,
    "preview": "### brain_widget.py\nThis is the main neural network visualization and coordination hub. It serves as the central control"
  },
  {
    "path": "Docs/source-reference/brain_worker.py.md",
    "chars": 1513,
    "preview": "_Not to be confused with [brain_render_worker.py](../source-reference/brain_render_worker.py.md)_\n\n#### brain_worker.py\n"
  },
  {
    "path": "Docs/source-reference/custom_brain_loader.py.md",
    "chars": 1573,
    "preview": " #### custom_brain_loader.py\nThe brain architecture import/export system that allows custom neural network designs from "
  },
  {
    "path": "Docs/source-reference/designer_window.py.md",
    "chars": 1483,
    "preview": "#### designer_window.py\nThis is the primary application shell for the neural network Designer.\n\n#### Core Responsibiliti"
  },
  {
    "path": "Docs/source-reference/main.py.md",
    "chars": 824,
    "preview": "### The Simulation Loop (main.py)\nThe simulation loop is driven by a QTimer from the PyQt5 framework, which \"ticks\" at a"
  },
  {
    "path": "Docs/source-reference/memory_manager.py.md",
    "chars": 4161,
    "preview": "`MemoryManager` is designed to simulate a simple cognitive memory system with two main components:\n\n#### Data Persistenc"
  },
  {
    "path": "Docs/source-reference/neurogenesis_show.py.md",
    "chars": 3504,
    "preview": "`neurogenesis_show.py` is the **“showman” layer** that wraps the real `EnhancedNeurogenesis` engine and adds **player-fa"
  },
  {
    "path": "Docs/source-reference/squid.py.md",
    "chars": 1610,
    "preview": "`squid.py` file defines the Squid class, integrating various functionalities to simulate a living creature. It handles i"
  },
  {
    "path": "Docs/source-reference/tamagotchi_logic.py.md",
    "chars": 2899,
    "preview": "View source: [tamagotchi_logic.py](https://github.com/ViciousSquid/Dosidicus/blob/2.6.1.2_LatestVersion/src/tamagotchi_l"
  },
  {
    "path": "Docs/source-reference/vision_worker.py.md",
    "chars": 2581,
    "preview": "#### vision_worker.py\nThis is the computational engine of the squid's perception. It runs as a background thread (QThrea"
  },
  {
    "path": "LICENSE",
    "chars": 18092,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
  },
  {
    "path": "README.md",
    "chars": 7275,
    "preview": "\n_\"What if a Tamagotchi had a neural network and could learn stuff?\"_ - [Gigazine](https://gigazine.net/gsc_news/en/2025"
  },
  {
    "path": "config.ini",
    "chars": 2549,
    "preview": "[General]\r\nlanguage = en\r\n\r\n[Debug]\r\nmultiplayer_debug = False\r\n\r\n[Compute]\r\nbackend = numpy\r\n\r\n[Display]\r\nneuron_label_"
  },
  {
    "path": "custom_brains/Bathtub.json",
    "chars": 6865,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Bathtub\",\r\n    \"description\": \"\",\r\n    \""
  },
  {
    "path": "custom_brains/Change_colour_when_see_food.json",
    "chars": 9360,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Change_colour_when_see_food\",\r\n    \"desc"
  },
  {
    "path": "custom_brains/Dense_connections.json",
    "chars": 9701,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Dense connections\",\r\n    \"description\": "
  },
  {
    "path": "custom_brains/Feed-Forward-Hidden-Layer.json",
    "chars": 12746,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Feed-Forward-Hidden-Layer\",\r\n    \"descri"
  },
  {
    "path": "custom_brains/Feeling-Blue.json",
    "chars": 8321,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Feeling-Blue\",\r\n    \"description\": \"Turn"
  },
  {
    "path": "custom_brains/Grasshopper.json",
    "chars": 6797,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Grasshopper\",\r\n    \"description\": \"\",\r\n "
  },
  {
    "path": "custom_brains/Healthy_Interests.json",
    "chars": 7316,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Healthy interests\",\r\n    \"description\": "
  },
  {
    "path": "custom_brains/L'insomniaque.json",
    "chars": 6668,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"L'insomniaque\",\r\n    \"description\": \"\",\r"
  },
  {
    "path": "custom_brains/Minimal.json",
    "chars": 6234,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Minimal\",\r\n    \"description\": \"\",\r\n    \""
  },
  {
    "path": "custom_brains/Plant-Seeker.json",
    "chars": 7799,
    "preview": "{\r\n  \"version\": \"2.0\",\r\n  \"format\": \"dosidicus\",\r\n  \"metadata\": {\r\n    \"name\": \"Untitled\",\r\n    \"description\": \"\",\r\n    "
  },
  {
    "path": "custom_brains/readme.md",
    "chars": 4675,
    "preview": "# Custom brains:\n\nIncluded in this folder:\n\n\n## \"Dense connections\" (The Reactive Brain)\nThis brain is characterized by "
  },
  {
    "path": "docker-compose.yml",
    "chars": 609,
    "preview": "services:\n  headless:\n    build:\n      context: .\n      target: headless\n    volumes:\n      - ./headless_output:/app/out"
  },
  {
    "path": "example_squids/readme.md",
    "chars": 248,
    "preview": "### `Example_squids` folder\n\nput these example squids in the `saves` folder and launch the simulation\n\nONLY ONE squid ca"
  },
  {
    "path": "extras/SaveViewer.html",
    "chars": 48528,
    "preview": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-w"
  },
  {
    "path": "extras/SquidBreeder.html",
    "chars": 9785,
    "preview": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>Squid Breeder</title>\r\n\r\n<script src=\"https://"
  },
  {
    "path": "extras/StepTrainer.html",
    "chars": 33544,
    "preview": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-w"
  },
  {
    "path": "extras/brain_2_keras.py",
    "chars": 12778,
    "preview": "import json\nimport numpy as np\nimport os\nimport argparse\n\n# Try to import keras, handle if not installed\ntry:\n    import"
  },
  {
    "path": "headless/HeadlessLauncher.jsx",
    "chars": 13068,
    "preview": "import { useState, useEffect } from 'react';\n\nconst scenarios = {\n  none: { name: '⚙️ Custom', desc: 'Use manual setting"
  },
  {
    "path": "headless/README.md",
    "chars": 5311,
    "preview": "## Headless Brain Trainer\nA standalone training system for Dosidicus neural network brains that runs without GUI overhea"
  },
  {
    "path": "headless/headless_launcher.html",
    "chars": 36437,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width"
  },
  {
    "path": "headless/headless_trainer.py",
    "chars": 42177,
    "preview": "#!/usr/bin/env python3\n\"\"\"\nDosidicus-2 Headless Brain Trainer\n\nAllows training custom neural network brains without GUI "
  },
  {
    "path": "images/decoration/DecorationsFolder",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "linux_setup.sh",
    "chars": 5764,
    "preview": "#!/usr/bin/env bash\n# =============================================================\n#  Dosidicus - Linux Setup & Launch "
  },
  {
    "path": "main.py",
    "chars": 44368,
    "preview": "# Dosidicus - a digital pet with a neural network   |   2.1.2.0 March 2026\n# main.py Entrypoint \nfrom PyQt5 import QtWid"
  },
  {
    "path": "plugins/achievements/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "plugins/achievements/achievements_data.py",
    "chars": 18599,
    "preview": "# File: achievements_data.py\n# All achievement definitions for the Achievements Plugin\n# Separated from main.py for clea"
  },
  {
    "path": "plugins/achievements/display_scaling.py",
    "chars": 1762,
    "preview": "\"\"\"\r\nPortable copy of DisplayScaling plugins.\r\nKeep this file in the same folder as main.py\r\n\"\"\"\r\n\r\nimport re\r\n\r\nclass D"
  },
  {
    "path": "plugins/achievements/main.py",
    "chars": 47136,
    "preview": "import os\nimport json\nimport time\nimport logging\nfrom datetime import datetime\nfrom typing import Dict, List, Any, Optio"
  },
  {
    "path": "plugins/multiplayer/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "plugins/multiplayer/main.py",
    "chars": 5873,
    "preview": "# File: main.py (Plugin Entry Point)\r\n\r\nimport os\r\nimport sys\r\nimport traceback \r\n\r\n# --- Plugin Metadata ---\r\n# These c"
  },
  {
    "path": "plugins/multiplayer/mp_constants.py",
    "chars": 1404,
    "preview": "# File: mp_constants.py\r\n\r\n# --- Plugin Metadata ---\r\n# These constants describe the plugin to the system and users.\r\nPL"
  },
  {
    "path": "plugins/multiplayer/mp_network_node.py",
    "chars": 42419,
    "preview": "# File: mp_network_node.py\n\nimport uuid\nimport time\nimport socket\nimport queue\nimport zlib\nimport json\nimport traceback\n"
  },
  {
    "path": "plugins/multiplayer/mp_plugin_logic.py",
    "chars": 161038,
    "preview": "# File: mp_plugin_logic.py\r\n\r\nimport os\r\n# import sys # sys.path is handled in main.py\r\nimport inspect # For _find_tamag"
  },
  {
    "path": "plugins/multiplayer/multiplayer_config_dialog.py",
    "chars": 4833,
    "preview": "# multiplayer_config_dialog.py\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom plugins.multiplayer import mp_constants"
  },
  {
    "path": "plugins/multiplayer/multiplayer_events.py",
    "chars": 2993,
    "preview": "from PyQt5 import QtCore\r\nfrom typing import Dict, Any, List, Optional, Callable\r\n\r\nclass MultiplayerEventDispatcher(QtC"
  },
  {
    "path": "plugins/multiplayer/multiplayer_status_widget.py",
    "chars": 11721,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nimport time\r\n\r\nclass MultiplayerStatusWidget(QtWidgets.QWidget):\r\n    def __"
  },
  {
    "path": "plugins/multiplayer/network_utilities.py",
    "chars": 11695,
    "preview": "# In plugins/multiplayer/network_utilities.py\r\n\r\nimport json\r\nimport zlib\r\nimport socket # Make sure socket is imported "
  },
  {
    "path": "plugins/multiplayer/packet_validator.py",
    "chars": 6330,
    "preview": "import re\r\nimport json\r\nimport os\r\nimport time\r\nfrom typing import Dict, Any, Optional, List, Tuple\r\n\r\nclass PacketValid"
  },
  {
    "path": "plugins/multiplayer/plugin.txt",
    "chars": 155,
    "preview": "NAME=Multiplayer\r\nVERSION=1.10\r\nAUTHOR=ViciousSquid\r\nDESCRIPTION=Enables network sync for squids and objects (Experiment"
  },
  {
    "path": "plugins/multiplayer/remote_entity_manager.py",
    "chars": 35118,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nimport os\r\nimport time\r\nimport math\r\nfrom typing import Dict, Any, Optional,"
  },
  {
    "path": "plugins/multiplayer/squid_multiplayer_autopilot.py",
    "chars": 50075,
    "preview": "import random\r\nimport math\r\nimport sys\r\nimport time\r\nimport os\r\nimport threading\r\nfrom PyQt5 import QtCore, QtGui, QtWid"
  },
  {
    "path": "plugins/multiplayer/status_bar_component.py",
    "chars": 4233,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass StatusBarComponent:\r\n    def __init__(self, main_window):\r\n        s"
  },
  {
    "path": "plugins/readme.md",
    "chars": 404,
    "preview": "#### [Achievements](https://github.com/ViciousSquid/Dosidicus/wiki/Achievements)\n\n\n#### [Multiplayer](https://github.com"
  },
  {
    "path": "plugins/stdp/__init__.py",
    "chars": 22,
    "preview": "# STDP Plugin Package\n"
  },
  {
    "path": "plugins/stdp/main.py",
    "chars": 33758,
    "preview": "\"\"\"\nSTDP Plugin for Dosidicus\n\nAugments the existing Hebbian learning system with Spike-Timing-Dependent\nPlasticity (STD"
  },
  {
    "path": "plugins/stdp/stdp_control_panel.py",
    "chars": 20563,
    "preview": "\"\"\"\nSTDP Control Panel\n\nA dockable dialog for tuning STDP parameters and optionally recording\nspike and directional-enco"
  },
  {
    "path": "plugins/stdp/stdp_core.py",
    "chars": 26921,
    "preview": "\"\"\"\nSTDP (Spike-Timing-Dependent Plasticity) Module for Dosidicus-2\n\nThis module implements biologically-inspired STDP l"
  },
  {
    "path": "plugins/whitelist.txt",
    "chars": 119,
    "preview": "# Only these plugins load at startup.\r\n# Add one plugin name per line. Lines starting with # are ignored.\r\nachievements"
  },
  {
    "path": "requirements.txt",
    "chars": 24,
    "preview": "PyQt5>=5.15\nnumpy>=1.21\n"
  },
  {
    "path": "src/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "src/animation_styles.py",
    "chars": 15841,
    "preview": "from dataclasses import dataclass, field\r\nfrom typing import Tuple\r\nfrom enum import Enum\r\n\r\n\r\nclass AnimationStyleName("
  },
  {
    "path": "src/brain_about_tab.py",
    "chars": 16483,
    "preview": "import random\nimport os\nfrom PyQt5 import QtCore, QtGui, QtWidgets\nfrom .brain_base_tab import BrainBaseTab\nfrom .locali"
  },
  {
    "path": "src/brain_base_tab.py",
    "chars": 1650,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\nfrom .display_scaling import DisplayScaling\n\nclass BrainBaseTab(QtWidgets.QWi"
  },
  {
    "path": "src/brain_constants.py",
    "chars": 7097,
    "preview": "\"\"\"\r\nbrain_constants.py - Shared constants for Dosidicus-2 brain system\r\n\r\nThis file defines the canonical neuron catego"
  },
  {
    "path": "src/brain_decisions_tab.py",
    "chars": 13383,
    "preview": "# src/brain_decisions_tab.py\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom .brain_base_tab import BrainBaseTab\r\nfr"
  },
  {
    "path": "src/brain_designer.py",
    "chars": 6750,
    "preview": "#!/usr/bin/env python3\n\"\"\"\nBrain Designer - Visual Neural Network Designer for Dosidicus-2\n\nLaunch the brain designer GU"
  },
  {
    "path": "src/brain_designer_launcher.py",
    "chars": 711,
    "preview": "\"\"\"\r\nBrain Designer Launcher - Spawns the designer in a subprocess\r\n\r\nThis module provides a function to launch the Brai"
  },
  {
    "path": "src/brain_dialogs.py",
    "chars": 15639,
    "preview": "import sys\r\nimport csv\r\nimport os\r\nimport time\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom PyQt5.QtGui import QPix"
  },
  {
    "path": "src/brain_learning_tab.py",
    "chars": 27097,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\nfrom .brain_base_tab import BrainBaseTab\nimport random\nimport time\nfrom .loca"
  },
  {
    "path": "src/brain_memory_tab.py",
    "chars": 40850,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\nfrom .brain_base_tab import BrainBaseTab\nfrom .brain_ui_utils import UiUtils\n"
  },
  {
    "path": "src/brain_network_tab.py",
    "chars": 38131,
    "preview": "import json\nimport time\nimport subprocess\nimport os\nimport sys\nfrom PyQt5 import QtCore, QtGui, QtWidgets\nfrom .brain_ba"
  },
  {
    "path": "src/brain_network_tab_banners.py",
    "chars": 16131,
    "preview": "from PyQt5 import QtWidgets, QtCore, QtGui\r\n\r\nclass BindingOverlay(QtWidgets.QWidget):\r\n    \"\"\"\r\n    Overlay banners tha"
  },
  {
    "path": "src/brain_neuron_hooks.py",
    "chars": 16258,
    "preview": "# brain_neuron_hooks.py\r\nimport math\r\nimport random\r\nimport time\r\nfrom typing import Dict, Callable, Any, Optional\r\n\r\ncl"
  },
  {
    "path": "src/brain_neuron_outputs.py",
    "chars": 27726,
    "preview": "\"\"\"\r\nNeuron Output Binding System\r\n\r\nThis module enables custom neurons in the brain designer to trigger game behaviors\r"
  },
  {
    "path": "src/brain_personality_tab.py",
    "chars": 6441,
    "preview": "# brain_personality_tab.py\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom .brain_base_tab import BrainBaseTab\r\nfrom ."
  },
  {
    "path": "src/brain_render_worker.py",
    "chars": 39636,
    "preview": "\"\"\"\r\nbrain_render_worker.py - Offscreen rendering worker for brain visualization\r\n\r\nRenders the neural network visualiza"
  },
  {
    "path": "src/brain_state_bridge.py",
    "chars": 14544,
    "preview": "\"\"\"\r\nBrain State Bridge - Communication layer between running game and Brain Designer\r\n\r\nThis module provides a mechanis"
  },
  {
    "path": "src/brain_statistics_tab.py",
    "chars": 18488,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom .brain_base_tab import BrainBaseTab\r\nfrom .display_scaling import Displ"
  },
  {
    "path": "src/brain_tool.py",
    "chars": 166374,
    "preview": "import sys\r\nimport csv\r\nimport os\r\nimport time\r\nimport json\r\nimport random\r\nimport numpy as np\r\nfrom datetime import dat"
  },
  {
    "path": "src/brain_tooltips.py",
    "chars": 11280,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom .display_scaling import DisplayScaling\r\nfrom .localisation import loc \r"
  },
  {
    "path": "src/brain_ui_utils.py",
    "chars": 7508,
    "preview": "from datetime import datetime\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass UiUtils:\r\n    @staticmethod\r\n    def "
  },
  {
    "path": "src/brain_utils.py",
    "chars": 712,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass ConsoleOutput:\r\n    def __init__(self, text_edit):\r\n        self.tex"
  },
  {
    "path": "src/brain_widget.py",
    "chars": 216493,
    "preview": "import sys\r\nimport csv\r\nimport os\r\nimport re\r\nimport time\r\nimport math\r\nimport random\r\nimport numpy as np\r\nimport json\r\n"
  },
  {
    "path": "src/brain_worker.py",
    "chars": 15239,
    "preview": "import sys\nimport time\nimport random\nimport traceback\nimport math\nfrom queue import Queue, Empty\nfrom heapq import nlarg"
  },
  {
    "path": "src/certificate.py",
    "chars": 8630,
    "preview": "\"\"\"\r\nOld feature, currently unused - for future reimplementation\r\n\r\nGenerate a certificate with top statistics\r\n\"\"\"\r\n\r\n\r"
  },
  {
    "path": "src/compute_backend.py",
    "chars": 11825,
    "preview": "\"\"\"\r\nOptional NPU / AI Accelerator support via ONNX Runtime\r\n==========================================================="
  },
  {
    "path": "src/config_manager.py",
    "chars": 29824,
    "preview": "import configparser\r\nimport os\r\nimport random\r\nimport sys\r\nfrom PyQt5 import QtCore\r\nfrom ast import literal_eval\r\n\r\ncla"
  },
  {
    "path": "src/custom_brain_loader.py",
    "chars": 33435,
    "preview": "import os\r\nimport json\r\nimport shutil\r\nimport time\r\nfrom pathlib import Path\r\nfrom typing import Optional, Dict\r\nfrom Py"
  },
  {
    "path": "src/decision_engine.py",
    "chars": 13441,
    "preview": "# DECISION ENGINE - https://github.com/ViciousSquid/Dosidicus\r\n# exploration of emergent behavioural complexity via dyna"
  },
  {
    "path": "src/decoration_stats.json",
    "chars": 2855,
    "preview": "{\r\n  \"plant01.png\": {\r\n    \"happiness\": 2,\r\n    \"cleanliness\": 1,\r\n    \"anxiety\": -2,\r\n    \"category\": \"plant\"\r\n  },\r\n  "
  },
  {
    "path": "src/designer_canvas.py",
    "chars": 46025,
    "preview": "\"\"\"\r\nCanvas implementation for Brain Designer.\r\nHandles visual representation and interaction.\r\n\"\"\"\r\n\r\nimport math\r\nimpo"
  },
  {
    "path": "src/designer_canvas_utils.py",
    "chars": 11039,
    "preview": "\"\"\"\r\nEnhanced Canvas Utilities for Brain Designer\r\n\r\nAdditional visual feedback for wiring operations and activation dis"
  },
  {
    "path": "src/designer_constants.py",
    "chars": 3762,
    "preview": "from enum import Enum, auto\r\nimport random\r\n\r\n# --- Enums ---\r\nclass NeuronType(Enum):\r\n    INPUT = auto()\r\n    OUTPUT ="
  },
  {
    "path": "src/designer_core.py",
    "chars": 27790,
    "preview": "import json\r\nimport random\r\nimport time\r\nimport math\r\nfrom typing import Dict, List, Optional, Tuple, Set\r\nfrom dataclas"
  },
  {
    "path": "src/designer_dialogs.py",
    "chars": 15416,
    "preview": "\"\"\"\r\nSparse Network Generation Dialog\r\n\r\nProvides UI for generating random sparse networks with various presets.\r\n\"\"\"\r\n\r"
  },
  {
    "path": "src/designer_logging.py",
    "chars": 6784,
    "preview": "\"\"\"\r\nDesigner Logging - Centralized logging for Brain Designer\r\n\r\nProvides logging utilities that can be enabled/disable"
  },
  {
    "path": "src/designer_network_generator.py",
    "chars": 20474,
    "preview": "\"\"\"\r\nSparse Neural Network Generator\r\n\r\nGenerates realistic, biologically-inspired connections between the core neurons\r"
  },
  {
    "path": "src/designer_outputs_panel.py",
    "chars": 21726,
    "preview": "# designer_outputs_panel.py\r\n\"\"\"\r\nBrain Designer panel for configuring neuron output bindings.\r\n\r\nThis panel allows user"
  },
  {
    "path": "src/designer_panels.py",
    "chars": 16294,
    "preview": "from PyQt5.QtWidgets import (\n    QWidget, QVBoxLayout, QHBoxLayout, QGroupBox, QFormLayout, QListWidget, QListWidgetIte"
  },
  {
    "path": "src/designer_sensor_discovery.py",
    "chars": 6537,
    "preview": "# designer_sensor_discovery.py\r\n\"\"\"\r\nUtility module for discovering available input sensors.\r\n\r\nThis module provides fun"
  },
  {
    "path": "src/designer_templates.py",
    "chars": 7051,
    "preview": "from .designer_core import BrainDesign, DesignerLayer, DesignerNeuron\r\nfrom .designer_constants import NeuronType, REQUI"
  },
  {
    "path": "src/designer_window.py",
    "chars": 52177,
    "preview": "\"\"\"\r\nBrain Designer Window - Main application window for designing custom neural networks.\r\n\r\nThis module provides a vis"
  },
  {
    "path": "src/display_scaling.py",
    "chars": 1557,
    "preview": "\r\nclass DisplayScaling:\r\n    DESIGN_WIDTH = 2880\r\n    DESIGN_HEIGHT = 1920\r\n    _scale_factor = 1.0\r\n    \r\n    # Default"
  },
  {
    "path": "src/hidden_imports.txt",
    "chars": 206,
    "preview": "plugins.achievements.display_scaling\r\nplugins.achievements.achievements_data\r\nuuid\r\nbrain_designer\r\ndesigner_window\r\ndes"
  },
  {
    "path": "src/image_cache.py",
    "chars": 491,
    "preview": "from PyQt5 import QtGui\r\n\r\nclass ImageCache:\r\n    \"\"\"Global image cache to prevent duplicate loading\"\"\"\r\n    _cache = {}"
  },
  {
    "path": "src/interactions.py",
    "chars": 26238,
    "preview": "\r\n# ROCK INTERACTIONS\r\n\r\nimport math\r\nimport time\r\nimport random\r\nimport os\r\nfrom PyQt5 import QtCore, QtWidgets, QtGui\r"
  },
  {
    "path": "src/interactions2.py",
    "chars": 14326,
    "preview": "# POOP INTERACTIONS\r\n\r\nimport math\r\nimport time\r\nimport random\r\nimport os\r\nfrom PyQt5 import QtCore, QtWidgets, QtGui\r\n\r"
  },
  {
    "path": "src/laboratory.py",
    "chars": 26475,
    "preview": "# 2.4.5.1 | rev3_dec25\r\n#  --------------------------------------------------------------\r\n#  NEURON LABORATORY\r\n#  ----"
  },
  {
    "path": "src/learning.py",
    "chars": 28983,
    "preview": "import random\r\nfrom PyQt5 import QtCore\r\nimport csv\r\nimport time\r\nimport json\r\nfrom datetime import datetime\r\nfrom .pers"
  },
  {
    "path": "src/localisation.py",
    "chars": 7145,
    "preview": "# localisation.py\r\nimport json\r\nimport os\r\nimport sys\r\nfrom pathlib import Path\r\n\r\nclass Localisation:\r\n    _instance = "
  },
  {
    "path": "src/main.py",
    "chars": 44371,
    "preview": "# Dosidicus - a digital pet with a neural network\n# main.py Entrypoint \nfrom PyQt5 import QtWidgets, QtCore, QtGui\nimpor"
  },
  {
    "path": "src/memory_manager.py",
    "chars": 12610,
    "preview": "import json\nimport os\nfrom datetime import datetime\nimport time\n\nclass MemoryManager:\n    def __init__(self):\n        se"
  },
  {
    "path": "src/mental_states.py",
    "chars": 3180,
    "preview": "# Mental states\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\nimport os\r\n\r\nclass MentalState:\r\n    def __init__(self, n"
  },
  {
    "path": "src/network_adapter.py",
    "chars": 18603,
    "preview": "\"\"\"\r\nnetwork_adapter.py - Adapter bridging Project 1's Network to Project 2's brain systems\r\n\r\nThis adapter wraps a Netw"
  },
  {
    "path": "src/network_protocol.py",
    "chars": 7728,
    "preview": "\"\"\"\r\nnetwork_protocol.py - Protocol definition for pluggable brain networks\r\n\r\nDefines the interface that any brain impl"
  },
  {
    "path": "src/neurogenesis.py",
    "chars": 62476,
    "preview": "\"\"\"\nNeurogenesis ver3.3_stress_cap\n\n- STRICT 5-neuron cap for 'stress' type.\n- Emergency triggers STRENGTHEN existing ne"
  },
  {
    "path": "src/neurogenesis_show.py",
    "chars": 18591,
    "preview": "\"\"\"\r\nShowmanNeurogenesis v2.5.0\r\n\r\nWrapper around EnhancedNeurogenesis that keeps all the *real* logic\r\nbut guarantees t"
  },
  {
    "path": "src/personality.py",
    "chars": 231,
    "preview": "from enum import Enum \r\n\r\nclass Personality(Enum):\r\n    TIMID = \"timid\"\r\n    ADVENTUROUS = \"adventurous\"\r\n    LAZY = \"la"
  },
  {
    "path": "src/personality_traits.py",
    "chars": 3524,
    "preview": "from enum import Enum\r\nfrom .personality import Personality\r\n\r\npersonality_traits = {}\r\n\r\ndef register_personality(name,"
  },
  {
    "path": "src/plugin_manager.py",
    "chars": 36588,
    "preview": "import os\nimport importlib.util\nimport inspect\nimport logging\nimport sys\nfrom typing import Dict, List, Callable, Any\n\n#"
  },
  {
    "path": "src/plugin_manager_dialog.py",
    "chars": 12707,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nimport os\r\n\r\nclass PluginManagerDialog(QtWidgets.QDialog):\r\n    def __init__"
  },
  {
    "path": "src/preferences.py",
    "chars": 57407,
    "preview": "\r\nimport os\r\nimport sys\r\nimport glob\r\nimport re\r\nfrom PyQt5 import QtWidgets, QtCore, QtGui\r\nfrom .config_manager import"
  },
  {
    "path": "src/save_manager.py",
    "chars": 13631,
    "preview": "import json\r\nimport os\r\nimport zipfile\r\nimport shutil\r\nfrom datetime import datetime\r\nfrom uuid import UUID\r\n\r\nclass Dat"
  },
  {
    "path": "src/splash_screen.py",
    "chars": 3335,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nimport os\r\nfrom .display_scaling import DisplayScaling\r\nfrom .localisation i"
  },
  {
    "path": "src/squid.py",
    "chars": 100461,
    "preview": "import os\nimport random\nimport uuid\nimport time\nfrom datetime import datetime\nfrom enum import Enum\nimport math\nfrom PyQ"
  },
  {
    "path": "src/squid_facts.py",
    "chars": 935,
    "preview": "import random\r\n\r\nSQUID_FACTS = [\r\n    \"Dosidicus Gigas: scientific name for Humboldt squid\",\r\n    \"Humboldt squid can re"
  },
  {
    "path": "src/squid_statistics.py",
    "chars": 7631,
    "preview": "import time\r\nimport math\r\n\r\n# Distance tracking constants\r\nDISTANCE_ROLLOVER_LIMIT = 999_999_999  # ~1 billion pixels be"
  },
  {
    "path": "src/statistics_window.py",
    "chars": 14452,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nimport time, json, math, random, os\r\nfrom .localisation import Localisation\r"
  },
  {
    "path": "src/tamagotchi_logic.py",
    "chars": 147602,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\nfrom PyQt5.QtGui import QPixmap\nimport random\nimport os\nimport time\nimport zi"
  },
  {
    "path": "src/task_manager.py",
    "chars": 4848,
    "preview": "from PyQt5.QtCore import Qt\r\nimport time\r\nimport threading\r\nfrom collections import deque\r\nfrom PyQt5.QtCore import QTim"
  },
  {
    "path": "src/tutorial.py",
    "chars": 32027,
    "preview": "# tutorial.py\nfrom PyQt5 import QtCore, QtGui, QtWidgets\nimport logging\nimport random\nfrom .localisation import Localisa"
  },
  {
    "path": "src/ui.py",
    "chars": 97324,
    "preview": "# UI Stuff\n\nimport os\nimport json\nimport math\nimport time\nimport random\nimport base64\nimport uuid\nimport traceback\nfrom "
  },
  {
    "path": "src/vision.py",
    "chars": 6096,
    "preview": "from PyQt5 import QtCore, QtGui, QtWidgets\r\nfrom .brain_base_tab import BrainBaseTab\r\nfrom .localisation import loc\r\n\r\nc"
  },
  {
    "path": "src/vision_worker.py",
    "chars": 19077,
    "preview": "\"\"\"\r\nvision_worker.py - Background thread for squid vision calculations\r\n\r\nHandles vision cone calculations, food detect"
  },
  {
    "path": "translations/de.py",
    "chars": 19753,
    "preview": "LANGUAGE_HEADER = \"de - Deutsch\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"Hunger\",\r\n    \"happine"
  },
  {
    "path": "translations/en.py",
    "chars": 49015,
    "preview": "LANGUAGE_HEADER = \"en - English\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"Hunger\",\r\n    \"happine"
  },
  {
    "path": "translations/es.py",
    "chars": 52686,
    "preview": "LANGUAGE_HEADER = \"es - Español\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"Hambre\",\r\n    \"happine"
  },
  {
    "path": "translations/fr.py",
    "chars": 52929,
    "preview": "LANGUAGE_HEADER = \"fr - Francais\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"Faim\",\r\n    \"happines"
  },
  {
    "path": "translations/ja.py",
    "chars": 36620,
    "preview": "LANGUAGE_HEADER = \"ja - 日本語\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"空腹\",\r\n    \"happiness\": \"幸福"
  },
  {
    "path": "translations/ml.py",
    "chars": 41237,
    "preview": "LANGUAGE_HEADER = \"ml - Millennial\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"Hangry Level\",\r\n   "
  },
  {
    "path": "translations/zh.py",
    "chars": 35793,
    "preview": "LANGUAGE_HEADER = \"zh - 中文\"\r\ntranslations = {\r\n    # Core continuous neurons\r\n    \"hunger\": \"饥饿感\",\r\n    \"happiness\": \"快乐"
  },
  {
    "path": "version",
    "chars": 109,
    "preview": "dosidicus: 2.6.2.0_STRINg2\r\nbrain_tool: 23.02.26\r\ndecision_engine: 4.0 Dec25\r\nneurogenesis:  3.3_stress_cap\r\n"
  }
]

About this extraction

This page contains the full source code of the ViciousSquid/Dosidicus GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 190 files (3.0 MB), approximately 805.8k tokens, and a symbol index with 2286 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!