Show HN: Neural Emotion Matrix for NPCs (github.com)

🤖 AI Summary
Neural Emotion Matrix is an open-source C API that gives NPCs persistent, evolving emotions using a neural valence–arousal model (Russell’s Circumplex). The system maps interactions to 2D emotional coordinates (valence, arousal ∈ [-1,1]), integrates them with a per-NPC memory store that decays over time, and recalculates emotional state to drive behavior and relationships. It ships as an ONNX model plus runtime DLLs, provides lifecycle APIs (initialize, create/remove session, evaluate_interaction, get_current_emotion/by_source, export/clear memory), and is packaged for easy integration with Unity/Unreal/C++ engines (Windows-focused build requires Docker). Training data is an NPC Valence-Arousal Dataset (1K+ dialogues now; 100K+ planned). For AI/ML developers this is significant because it operationalizes affect modeling for game agents with a reproducible pipeline: text → neural affect prediction → memory retrieval → contextual re-evaluation → state update. Key constraints/implementation notes: interactions are best in English and limited to ~512 characters; memory decay is configurable per NPC; callers must free ApiResult to avoid leaks; session-based memory enables save/load and relationship tracking via source_id. The project provides a compact experimental benchmark/dataset and tooling for real-time affect-driven behaviors, opening avenues for research into long-term emotional persistence, evaluation of emergent social dynamics, and ethical/robustness concerns when deploying learned affect models in interactive systems.
Loading comments...
loading comments...