Virtual_Pet (v0.2) is an interactive, light-themed desktop simulation that models a hybrid cognitive-thermodynamic dynamical system. Written entirely in Python with Tkinter, the software transitions away from basic toy loops to formalize a five-species virtual ecosystem regulated by the strict mathematical principles of the SATC Framework.
Virtual_Pet models the continuous homeostatic and physical states of an agent over infinite iterations, balancing cognitive decay against metabolic expenditure.
- Light-Mode, Retro-Compatible Design: Features an clean, aesthetic off-white dashboard with an LCD green simulation canvas. Dark frames and terminal-black screens are removed in favor of a modern scientific interface.
- Five Distinct Species Profiles: Adopt an Axolotl, Rabbit, Snake, Chlamydosaurus (Frilled Lizard), or Fish. Each features a hand-crafted pixel art matrix, custom eye boundary coordinates for blinking/sleeping, and unique dietary preferences.
-
Species-Specific Independent Saving: The dashboard detects active localized save slots (
save_axolotl.json,save_rabbit.json, etc.) on boot, allowing you to resume existing sessions. - Auto-Save & Permadeath (Cease Loop): Progress auto-saves every 5 seconds. If a pet crosses a critical viability boundary (starvation or toxicosis), the save file is instantly wiped from disk and the simulation is permanently halted, requiring a fresh adoption.
-
Real-time Z-Space Telemetry: Live feedback displays of both physical coordinates (
$x$ ) and virtual coordinate transformations ($g$ ) on the right sidebar monitor.
-
FEED: Replenishes Satiety (
$x_s$ ) and raises Somatic Toxicity ($x_b$ ). Spawns species-specific pixel food (a leafy green lettuce for the Rabbit, traditional kibble pellets for others). - PLAY: Burns Satiety to act on Boredom potentials. Restricted if the pet lacks sufficient energy.
- SLEEP: Restricts active behaviors, closes the eyes of the sprite, and scales base metabolic consumption down to 40%.
-
CLEAN: Sweeps away visual physical waste piles on the canvas and clears Somatic Toxicity (
$x_b$ ). - AUTO-VAC: A toggleable automatic cleaning system. While active, it continuously sweeps toxins at the expense of an added energy dissipation tax.
Ensure you are running Python 3.8+ with Tkinter compiled on your system.
# Clone the repository
git clone https://github.com/yourusername/virtual_pet.git
cd virtual_pet
# Run the simulation
python virtual_pet.pyThe metabolic engine under the hood does not use simple timers. It is formulated as a hybrid cognitive-thermodynamic dynamical system using differential geometry, non-linear feedback linearization, and numerical exponential integration.
An agent
where:
-
$\mathcal{X} \subset \mathbb{R}^{4+L}$ is the continuous physical-cognitive state space, where any state is represented as$\mathbf{X} = [x_s, x_c, \mathbf{w}_p, x_e, x_b]^T$ . -
$\mathcal{K} \subset \mathcal{X}$ is a closed, convex set representing the viability envelope (the homeostatic bounds). -
$\mathcal{Z} \subset \mathbb{R}^{4+L}$ is the globally linearized virtual state space, represented as$\mathbf{Z} = [g_s, g_c, \mathbf{w}_p, g_e, g_b]^T$ . -
$\mathcal{M}: \mathcal{K} \to \mathcal{Z}$ is a bijective, diffeomorphic coordinate transformation mapping (the Homeostatic Map). -
$\mathbf{f}: \mathcal{K} \to \mathbb{R}^{4+L}$ is the non-linear vector field dictating unconstrained system dynamics. -
$\mathcal{P}_{\mathcal{K}}$ is the Projected Dynamical Systems boundary operator preserving physical realism along the boundaries of$\mathcal{K}$ .
The agent senses its physical state
For any physiological variable
This mapping guarantees that coordinates approaching their targets asymptotically approach infinity, while coordinates collapsing to zero approach zero. The physical coordinate is recovered via the analytical inverse
The decision variables
The raw activation $\tilde{\psi}a$ of each cognitive channel $a \in {1, \dots, L}$ is coordinated through a logistic sensor gate $\sigma: \mathbb{R} \to (0, 1)$: $$\tilde{\psi}a = \sigma(\gamma{\text{gate}} w{p,a}) = \left(1 + e^{-\gamma_{\text{gate}} w_{p,a}}\right)^{-1}$$
The action selector
where
The active dissipation cost
where the virtual metabolic pressure
As energy depletes (
To advance the SATC cycle over an integration step
Physical coordinates are then reconstructed and mapped back onto the tangent cone of