Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔮 Bayesian AI Scenario Simulator

An interactive, zero-backend Cognitive Wargaming tool designed for analysts, strategists, and decision-makers. The engine simulates non-linear future scenarios (2nd and 3rd-order consequences) using Large Language Models (Gemini 3.5 Flash Lite) anchored in a Directed Acyclic Graph (DAG) architecture.


🎯 Vision & Purpose

Traditional forecasting often suffers from linear bias. The Bayesian AI Simulator forces users to explore probabilistic branches, unexpected trade-offs, and systemic sectorial impacts across customizable timelines.

It does not serve as a financial oracle, but as a Strategic Stress-Testing Tool to evaluate "What If" scenarios under strict probabilistic boundaries.


✨ Key Features

  • BYOK Architecture (Bring Your Own Key): 100% Client-Side execution. Your Google Gemini API key is stored exclusively in your browser's Local Storage. No external database or intermediate backend.
  • Timeline Alignment: Dynamic spatial calculation anchoring scenarios to an absolute year coordinate, allowing precise parallel branch inspection.
  • Probabilistic Confidence Metrics:
    • Relative Confidence: Independent probability of occurrence based purely on the immediate parent scenario.
    • Absolute Confidence: Cumulative path-dependent probability calculated from Node 0 (Genesis).
  • Multi-Branching Parallel Realities: Generate up to 3 mutually exclusive scenarios for the same target year in a single inference call.
  • Target Year Override: Force projections to a specific future year while strictly preventing temporal paradoxes (past-year traversal).
  • Incremental Deep Dive: Expand specific node insights without polluting the DAG layout.
  • Data Lifecycle Management: Export and Import your entire simulation tree via standard .json format.
  • Multi-Language Support: Fully operational in Italian, English, Spanish, and French.

🛠️ Tech Stack & Architecture

  • Frontend: Vanilla HTML5, CSS3 (Glassmorphism UI), JavaScript (ES6+).
  • Graph Engine: Vis-Network (Hierarchical Directed Layout).
  • AI Model: Google Gemini 3.5 Flash Lite via REST API.
  • Persistence: HTML5 Web Storage API (localStorage).

🚀 Getting Started

Local Execution

  1. Clone this repository or download the source files.
  2. Open index.html in any modern web browser (Chrome, Safari, Firefox).
  3. Click on the 📖 Guida / Guide or Inizializza Motore button.
  4. Provide your Google Gemini API Key (Get one at Google AI Studio).

Cloud Deployment (Vercel / Netlify)

Since the application is purely static and backend-less:

  1. Import this repository into Vercel or Netlify.
  2. Click Deploy (No environment variables or build settings required).

🔒 Security & Privacy

This application does not collect, track, or proxy any user data. All API calls are routed directly from your browser to Google's official endpoints (generativelanguage.googleapis.com).


📄 License

This project is open-source and available under the MIT License.

About

Interactive Bayesian Simulation engine powered by Gemini 3.5 Flash Lite. Explore strategic future scenarios, multi-branching timelines, and sector impacts through a zero-backend, secure BYOK web interface.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages