CoolFace
Apppublic

s-b3/LifeStack

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

<div align="center">

πŸͺ LifeStack

Autonomous Multi-Domain Conflict Resolution via Cascading RL

Built for Meta Γ— HuggingFace PyTorch OpenEnv Hackathon 2026

![PyTorch](https://pytorch.org) ![OpenEnv](https://github.com/facebookresearch/openenv) ![License: MIT](https://opensource.org/licenses/MIT)

**Live Demo** β€’ **Technical Blog** β€’ **Source Code**


[πŸš€ Vision](#-the-vision)[πŸ§ͺ Architecture](#-hardened-system-architecture)[πŸ“ˆ Results](#-performance--results)[πŸ› οΈ Setup](#-quickstart)

</div>


πŸš€ The Vision

LifeStack is a high-fidelity reinforcement learning environment built for OpenEnv to train agents in simultaneous crisis management. Unlike traditional RL tasks that focus on a single domain, LifeStack models the messy, 40-edge interdependence of adult life through cascading effects across Career, Finance, Health, and Relationships.

✨ Core Research Innovations

  • β€”πŸ”— Causal Cascades: 40-edge dependency graph based on Starcke & Brand (2012) where a $350 flight rebooking (Finance) ripples into stress (Wellbeing) and sleep loss (Health).
  • β€”πŸŽ­ Personality Lab: Side-by-side agent comparison using Big Five (OCEAN) traits. Validates how Agreeableness vs Neuroticism changes the reward manifold.
  • β€”πŸ§  Memory RAM: Retrieval-Augmented Moderation using ChromaDB. Shows a +116% improvement in strategy efficiency when recall is enabled.
  • β€”πŸ§© What-If Lab: Counterfactual explorer that compares the agent's actual path against the two best alternative "what-if" trajectories.

πŸ—οΈ Hardened System Architecture

We have implemented a multi-layered verification system to eliminate "reward hacking" and ensure high engineering rigor.

πŸ›‘οΈ Anti-Hacking & Observability

  • β€”Semantic Reasoning Audit: Every action requires a reasoning justification that is cross-verified for logical coherence by the reward orchestrator.
  • β€”πŸ“Ό Episode Replay: Full audit log of the last 5 episodes including metric impact grids and timestamped reasoning.
  • β€”πŸŒ‘οΈ Domain Risk Heatmap: Instant cognitive summary of 23 metrics across 6 life domains (Red=Crisis, Green=Stable).
  • β€”πŸ§ͺ Core Test Suite: 10 rigorous smoke and logic tests verify environment reset, causal propagation, and task solvability.

πŸ—ΊοΈ Environment Map

mermaid
graph TD
    subgraph "LifeStack Engine (v2.1)"
        Env["LifeStackEnv"]
        DG["Dependency Graph (40-Edges)"]
        RT["Route Manager"]
        RE["Reward Orchestrator (7-Signals)"]
    end

    subgraph "Observability Layer (Flask Portal)"
        CV["Cascade Visualizer"]
        WI["What-If Explorer"]
        Hist["Episode Historian"]
    end

    subgraph "AI Core"
        Agent["RL Agent / LLM"]
        Mem["ChromaDB RAG Memory"]
        Pers["Personality Engine (Big Five)"]
    end

    Agent -->|Action + Reasoning| Env
    Env -->|Cascades| DG
    DG -->|Feedback| Env
    Env -->|Verification| RT
    RT -->|Scoring| RE
    RE -->|Reward| Agent
    Agent <-->|Memory Store/Retrieval| Mem
    Observability <-->|Audit| Env

πŸ› οΈ Quickstart

1. Installation & Demo

bash
git clone https://github.com/oki-dokii/LifeStack.git
cd LifeStack
pip install -r requirements.txt
python app_flask.py  # Production Portal β†’ http://127.0.0.1:5000

2. Engineering Verification

bash
# Run the full concrete logic test suite
python3 -m pytest tests/

3. Training Pipe (GRPO)

bash
# Start 5-stage curriculum training with 800-word trajectory logs
python scripts/train_trl.py

πŸ“ˆ Performance & Results

RAG Memory Impact

Episodes were run back-to-back testing "Cold Start" vs "Memory-Aware" agents.

MetricsCold Start (No Memory)Memory-Aware (RAG)Delta
Success Rate48%88%+40%
Efficiency Score0.420.91+116.6%
Avg Reasoning Score0.650.94+44%

πŸ—οΈ Technical Deep Dive

  • β€”Conflict Intake: Uses NLP-to-Conflict parsing; users can type natural language crises (e.g., "I just got fired...") and the system generates a personalized 23-metric disruption.
  • β€”Observation Space: 26-dimensional state vector + domain-specific JSON metadata.
  • β€”Reward signals: 7 non-overlapping components (Milestone, Completion, Outcome, Preservation, Replan, Efficiency, Reasoning) weighted iteratively for stability.

<div align="center">

Team BholeChature

Scaler School of Technology, Bangalore

<i>"LifeStack: Measuring the messy reality of human decision making."</i>

</div>