# Project export: HyperDream-AI

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 12.0
- Tagline: Hyperdream-AI is a multiplayer AI driven story game engine with dynamic, responsive worlds according to player actions. We empower users to create and build customizable worlds.
- Devpost: https://devpost.com/software/hyperdream-ai
- GitHub: not linked
- Team: contributor stats unavailable

## Devpost submission (written by the team)

### Inspiration

The inspiration behind HyperDream-AI revolves around our love for RPG/tabletop games. Normally, tabletop RPGs need a human game master that can easily overlook the complex effects and nuances of simple player actions on story lore/worldbuilding. Additionally, game masters can be biased and players can disagree on the effects of certain actions. The complexity of multiple worlds and players on even simple stories is a problem we realized we could solve, and in the process, were inspired to innovate the fan favorite concept of role play games. Being able to focus on our concepts of fictional worlds/characters without having to spend as much time on the redundant task of preparation and worldbuilding led to the project we present today: HyperDream-AI.

### What it does

HyperDream-AI provides you with the option of creating your fictional story through nodes (representing worlds) and graphs, allowing for a structured visualization of your worldbuilding utilized by the AI for global updates. HyperDream initializes a game and facilitates multiple users in a chatroom, where each player is presented with 3 unique choice scenarios based on their local context (ie. location, character traits). Rather than being turn-based, the responses from all players are batch processed together and uses a load balancer to handle each scenario by the agent. The agent analyzes the effects of the players' choices on nodes and weights the effect of a certain action on surrounding worlds by proximity, updating the state of each world after every round of batch-processing.

### How we built it

Our tech stack uses typescript, react, next.js for our frontend, and for our backend we used python, Langchain, and Supabase with FastAPI connecting the two. We deployed it on vercel, and used railways for hosting our server. We invented a recursive graph algorithm for storing context within graphs and subgraphs.

### Challenges we ran into

The primary difficulty for us was integrating the frontend with the backend. Our team studied front end since none of us had any front end experience, but the integration process involved a skillset that we were unfamiliar with, and we got into a lot of bugs due to supabase not being typesafe.

### Accomplishments we're proud of

We are proud we worked together to build a product that we personally would use for our personal hobbies. We are also proud of coming up with the algorithm design for how to store context and player interactions within a dynamic changing world.

### What we learned

The core functionality of HyperDream-AI comes from a langchain AI agent, which was conceptually new to all of us. We read through Langchain documentation to initialize a Claude agent, and learned how to engineer proper context. Despite being able to tell an AI anything, we learned that providing procedures and examples greatly improves AI outputs.

### What's next

We want to try to use create a more advanced world where users can interact through player sprites rather than text based chat- players can move around the world and interact with other players and npcs. their decisions shape how the world progresses

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

No repository was indexed for this project. Claimed technologies below could not be checked against code.
- Next.js (technology) — claimed on Devpost, not found in the code
- Python (language) — claimed on Devpost, not found in the code
- React (technology) — claimed on Devpost, not found in the code
- TypeScript (language) — claimed on Devpost, not found in the code
- Vercel (technology) — claimed on Devpost, not found in the code

## Codebase structure

No repository index available.

## Key source files

No repository index available; no source files included.