Show HN: An AI Agent with Hysteresis-Based Personality Evolution (Python/Gemini)
1 points
1 hour ago
| 0 comments
| github.com
| HN
I built an AI companion that implements *state stability and persistent persona evolution*—the next step beyond simple RAG or chat history.

The system uses Python/Flask and Gemini to manage a *multi-dimensional personality state* (Tsundere, Yandere, etc.) that evolves over time.

### Core Technical Challenge & Solution:

1. *State Stability (Hysteresis)*: We prevent the persona from "flipping" instantly based on one message by introducing *inertia* (requiring 2x the score difference to change an established personality). 2. *Affection Scaling*: The emotional depth (Affection Level) scales infinitely, leading to complex state shifts over long interactions. 3. *Efficiency*: All logic runs within a single, cost-optimized API call.

### I'm looking for technical critique on:

* *Architecture*: Are hard margins (10-point difference) for stability the best approach, or should this be solved with a purely ML-driven method? * *Safety & Alignment*: How to maintain the provocative nature of personas (like Yandere) while adhering to strict safety boundaries.

GitHub Repo: [https://github.com/EMMA019/Evo-chat]

No one has commented on this post.