Inspiration

Make AI alignment tangible through play, not lectures. Show that “more AI” ≠ “better” via emergent cooperation and conflict. Blend game “AI Directors” with governance to create teachable moments. Turn everyday spaces (home, hospital, office) into living labs for norms.

What it does

Lets you create AI devices in natural language and watch them come alive. Runs a multi-agent sim with noise, delays, and inertia to spark emergence. Mediates conflicts with soft priorities and hard safety limits. Explains outcomes with “Why” cards, logs, and learning moments.

How we built it

with the help of the kiro TypeScript + Vite with a 2D/2.5D isometric renderer (Pixi-based scene). World tick loop, RNG, event “Director,” and device interactions. NL → JSON specs → runtime agents planned via a local LLM (Ollama). Governance engine for policies, quiet hours, and priority trade-offs. Tests across engine, UI, simulation, and education systems.

Challenges we ran into

Enforcing strict JSON-only LLM outputs and robust retries. Balancing planning cadence, batching, and responsiveness. Tuning rule density so worlds feel lively but legible. Designing explanations that teach without overwhelming. Managing determinism (replay) alongside emergence (surprise).

Accomplishments that we're proud of

A playable sandbox where alignment concepts feel intuitive. Soft-utility mediation with hard safety overrides that users can tweak. Clear “Why” cards and logs that turn surprises into lessons. Local LLM integration with batching to keep ≤2 calls/tick. Seeded replay modes for fair comparisons and debugging.

What we learned

Governance works best as soft trade-offs plus a few hard limits. Emergence needs rhythm: noise, asynchrony, and an event Director. Legibility (explanations, rule browsers) is as important as fidelity. Resource-aware LLM usage keeps sims responsive and credible. Seeded randomness enables both learning and fairness.

What's next for AI Habitat: Harmony or Havoc?

Rule authoring assistant and curated rule packs (home/hospital/office). Deeper explanations: multi-hop causal chains and lightweight counterfactuals. More scenarios and educator tools with fixed-seed “lesson” modes. Performance polish, richer sprites/UX, and collaborative sharing.

Built With

  • c8-coverage
  • cannon-es
  • canvas
  • custom-tick-loop-(src/sim)
  • day.js.
  • eslint
  • fetch
  • gsap
  • happy-dom-(jsdom-like-env)
  • immer
  • jsx/tsx
  • kiro
  • lighthouse-config-(lighthouserc.js)
  • llama3:8b-instruct)
  • lodash
  • ollama-local-http-api-(mistral
  • pixi.js-(2d/2.5d)
  • router
  • testing-library-(dom/react)
  • three.js
  • typescript
  • vite
  • vitejs/plugin-react
  • vitest-(+-@vitest/coverage-v8
  • vitest/ui)
  • webgl
  • zustand
Share this project:

Updates