Skip to content

VinayAnupNair/NovaForgeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NovaForge AI - Strategic AI Startup Simulator

A real-time strategy game where you compete against an AI-powered rival to build the most valuable AI company. Navigate funding rounds, manage product development, balance compliance and innovation, and survive competitive pressure in this intense 3-year simulation.

Inspiration

The AI industry moves at breakneck speed, with startups facing unprecedented challenges: balancing innovation with safety, managing investor expectations, competing against well-funded rivals, and navigating regulatory uncertainty. We wanted to capture this intensity in an interactive experience that puts you in the CEO's seat, forcing you to make real strategic tradeoffs under pressure.

We were inspired by the real-world dynamics of AI companies in 2024-2026 - the pressure to ship fast vs. ship safe, the competitive arms race, the sudden market shifts, and the constant scrutiny from regulators and investors. Every decision in NovaForge AI mirrors these real tensions.

What it does

NovaForge AI is a strategic simulation game where you:

Core Gameplay

  • Manage an AI Product Portfolio: Control 3 AI models (Atlas Assist, Vision Copilot, Ops Automator), each with unique traits
  • Strategic Resource Allocation: Spend limited quarterly R&D budgets across 4 upgrade tracks:
    • Capability: Boost product quality and market demand
    • Safety: Improve reliability and regulatory compliance
    • Efficiency: Optimize margins and reduce costs
    • Market: Expand reach and pricing power

Competitive Dynamics

  • Face an AI Rival: Compete against a GPT-4o-powered opponent that adapts its strategy each quarter
  • Handle Rival Pressure: Defend against predatory pricing, regulatory lobbying, moonshot launches, and aggressive market moves
  • Dynamic Leaderboard: Real-time ranking based on valuation, reputation, and compliance

Quarter-by-Quarter Survival

  • Navigate Funding Rounds: Accept or decline investment offers based on valuation and dilution
  • Respond to World Events: Adapt to regulatory shifts, market booms, and sudden crises
  • Balance Metrics: Maintain cash, reputation, compliance, and competitive position
  • Survive 3 Years: Reach Year 3 Q4 to complete your run - win by beating your rival's valuation

Endgame Experience

  • AI-Generated Epilogue: Each completed run receives a unique narrative epilogue generated by Ollama (qwen2.5:7b)
  • Historical Tracking: Review past performance with persistent run history
  • User Accounts: Track your progress across multiple runs with simple authentication

How we built it

Tech Stack

Backend:

  • FastAPI - High-performance async API framework
  • Python 3.11 - Core simulation logic and game mechanics
  • Pydantic - Type-safe schemas and validation
  • OpenAI GPT-4o-mini - Powers intelligent rival decision-making
  • Ollama (qwen2.5:7b) - Generates narrative epilogues locally

Frontend:

  • React 18 - Fast, reactive UI
  • Vite - Lightning-fast dev server and builds
  • Vanilla CSS - Custom pixel-art aesthetic with no framework bloat

Data Layer:

  • In-memory game state - Fast session management
  • JSONL files - Simple per-user run history persistence
  • JSON storage - Username/password auth (SHA-256 hashed)

Architecture Highlights

  • Domain-driven design: Clean separation between game logic, simulation, and API
  • Deterministic fallbacks: Rival always acts even when API fails
  • Per-user data isolation: Each authenticated user has separate game sessions and history
  • Real-time analytics: Live sparkline charts for revenue, profit, reputation, compliance, and competitive pressure

Challenges we ran into

1. Balancing Difficulty

Finding the right difficulty curve was brutal. Initial versions were either trivially easy (player always wins) or impossibly hard (rival crushes you by Q3). We iterated through multiple valuation formulas, pressure mechanics, and event systems before landing on a challenging but fair experience.

2. Rival AI Consistency

Getting the OpenAI-powered rival to play strategically was harder than expected. Early versions would make random moves or repeat the same action. We refined the prompt to force diverse, high-impact strategies and added deterministic fallback plans to ensure competitive pressure even during API failures.

3. Performance vs. Aesthetics

We wanted real-time analytics with smooth animations, but initial implementations caused frame drops. Solved by optimizing sparkline rendering, batching state updates, and using CSS transforms for performance-critical animations.

4. Auth Without Bloat

Needed simple authentication without pulling in heavyweight libraries. Built a minimal session-based system with httpOnly cookies, in-memory sessions, and hashed passwords - secure enough for a hackathon project without the complexity of JWT or OAuth.

5. Endgame Narrative Generation

Running Ollama locally for epilogue generation introduced latency concerns. Solved by making epilogue generation async with a loading state, so players see stats instantly while the narrative generates in the background.

Accomplishments that we're proud of

  1. Complete Gameplay Loop: From account creation → strategic decision-making → rival competition → funding rounds → endgame narrative, every piece works seamlessly
  2. Intelligent AI Opponent: The rival feels alive - it adapts to player strategy, takes risks, and applies meaningful pressure
  3. Visual Polish: Achieved a cohesive retro-futuristic aesthetic with custom CSS, no frameworks needed
  4. Persistent Progress: Full user system with run history tracking across sessions
  5. Fast Iteration: Built, tested, and polished the entire game in a compressed timeframe by keeping architecture simple
  6. Fault Tolerance: Rival always acts even when APIs fail; game never breaks from external service issues

What we learned

  • Less is More: Simple architecture (JSONL files, in-memory state) shipped faster than complex database setups
  • Prompt Engineering Matters: Crafting the rival AI prompt to generate diverse, strategic actions required dozens of iterations
  • Game Balance is Hard: Small tweaks to valuation formulas or pressure mechanics completely changed difficulty
  • CSS is Powerful: Modern CSS (grid, custom properties, transforms) can create beautiful UIs without component libraries
  • Fallback Strategies Win: Deterministic fallbacks for AI failures made the game more reliable than pure LLM dependence

What's next for NovaForgeAI

Immediate Roadmap

  • Multiplayer Mode: Real players competing head-to-head instead of vs AI
  • More AI Models: Expand from 3 to 5-7 products with diverse traits
  • Extended Timeline: 5-year runs with Series B/C funding rounds
  • Advanced Events: Industry consolidation, acqui-hire scenarios, regulatory investigations

Long-term Vision

  • Campaign Mode: Predefined scenarios (e.g., "Survive the 2025 AI Regulation Crisis")
  • Modding Support: Community-created events, rival strategies, and difficulty mods
  • Leaderboards: Global rankings based on final valuation and survival rate
  • Mobile Version: Touch-optimized interface for on-the-go gameplay
  • Pro Analytics: Detailed post-game breakdowns, decision replay, and what-if analysis

Quick Start

Backend

# Install dependencies
pip install -r requirements.txt

# Set environment variables
echo "RIVAL_API_KEY=your_openai_key" > .env.local

# Start server
uvicorn main:app --reload

Frontend

cd frontend
npm install
npm run dev

Play

  1. Navigate to http://localhost:5173
  2. Create an account or login
  3. Make strategic upgrades each quarter
  4. Accept/decline funding offers
  5. Survive to Year 3 Q4 and beat your rival!

Built with ❤️ for strategists, founders, and anyone who's ever wondered what it's like to run an AI company under pressure.

python3 main.py

Example Input Flow

During a quarter you can enter:

  • Model number (1, 2, 3)
  • Upgrade number (1 to 4)
  • back to return
  • done to finish spending
  • y / n for funding and continuation decisions

Win / End Conditions

  • Primary success horizon: reach Year 4
  • Early failure: company cash falls to 0 or below
  • Final outcome depends on:
    • Cash position
    • Reputation and compliance health

Strategy Tips

  • Do not over-index on growth upgrades early; safety prevents expensive incidents.
  • Efficiency compounds through better margins and helps runway.
  • Declining a funding round can preserve ownership, but increases financial risk.
  • Watch quarterly runway and incident count as your main risk indicators.

Project Structure

.
├── main.py
└── README.md

Notes

  • The simulation includes randomness (random) to keep runs varied.
  • If your system does not have python alias, use python3.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors