## Check out our site -> [Saga](http://sagaverse.app)

## Inspiration

There are few better feelings in the world than reading together with a child that you care about. “Just one more story!” — “I promise I’ll go to bed after the next one” — or even simply “Zzzzzzz” — these moments forge lasting memories and provide important educational development during bedtime routines. We wanted to make sure that our loved ones never run out of good stories. Even more, we wanted to create a unique, dynamic reading experience for kids that makes reading even more fun.

After helping to build the components of the story, kids are able to help the character make decisions along the way. “Should Balthazar the bear search near the park for his lost friend? or should he look in the desert?” These decisions help children learn and develop key skills like decisiveness and action. The story updates in real time, ensuring an engaging experience for kids and parents.

Through copious amounts of delirious research, we learned that children can actually learn better and retain more when reading with parents on a tablet. After talking to 8 users (parents and kiddos) over the course of the weekend, we defined our problem space and set out to create a truly “Neverending Story.”

## What it does

Each day, *Saga* creates a new, illustrated bedtime story for children aged 0-7. Using OpenAI technology, the app generates and then illustrates an age and interest-appropriate story based on what they want to hear and what will help them learn. Along the way, our application keeps kids engaged by prompting decisions; like a real-time choose-your-own-adventure story.

We’re helping parents broaden the stories available for their children — imprinting values of diversity, inclusion, community, and a strong moral compass. With *Saga*, parents and children can create a universe of stories, with their specific interests at the center.

## How we built it

We took an intentional approach to developing a working MVP

* **Needs finding:** We began with a desire to uncover a need and build a solution based on user input. We interviewed 8 users over the weekend (parents and kids) and used their insights to develop our application.
* **Defined MVP:** A deployable application that generates a unique story and illustrations while allowing for dynamic reader inputs using OpenAI. We indexed on story, picture, and educational quality over reproducibility.
* **Tech Stack:** We used the latest LLM models (GPT-3 and DALLE-2), Flutter for the client, a Node/Express backend, and MongoDB for data management
* **Prompt Engineering:** Finding the limitations of the underlying LLM technology and instead using Guess and check until we narrowed down the prompt to produce to more consistent results. We explored borderline use cases to learn where the model breaks.
* **Final Touches:** Quality control and lots of tweaking of the image prompting functionality

## Challenges we ran into

Our biggest challenges revolved around fully understanding the power of, and the difficulties stemming from prompt generation for OpenAI. This struggle hit us on several different fronts:

1. **Text generation** - Early on, we asked for specific stories and prompts resembling “write me a 500-word story.” Unsurprisingly, the API completely disregarded the constraints, and the outputs were similar regardless of how we bounded by word count. We eventually became more familiar with the structure of quality prompts, but we hit our heads against this particular problem for a long time.
2. **Illustration generation** - We weren’t able to predictably write OpenAI illustration prompts that provided consistently quality images. This was a particularly difficult problem for us since we had planned on having a consistent character illustration throughout the story. Eventually, we found style modifiers to help bound the problem.
3. **Child-safe content** - We wanted to be completely certain that we only presented safe and age-appropriate information back to the users. With this in mind, we built several layers of passive and active protection to ensure all content is family friendly.

## What we learned

So many things about OpenAI!

1. Creating consistent images using OpenAI generation is super hard, especially when focusing on one primary protagonist. We addressed this by specifically using art styles to decrease the variability between images.
2. GPT-3's input / output length limitations are much more stringent than ChatGPT's -- this meant we had to be pretty innovative with how we maintained the context over the course of 10+ page stories.
3. How to reduce overall response time while using OpenAI's API, which was really important when generating so many images and using GPT-3 to describe and summarize so many things.
4. Simply instructing GPT to not do something doesn’t seem to work as well as carefully crafting a prompt of behavior you would like it to model. You need to trick it into thinking it is someone or something -- from there, it will behave.

## Accomplishments that we're proud of

We’re super excited about what we were able to create given that this is the first hackathon for 3 of our team members! Specifically, we’re proud of:

* Developing a fun solution to help make learning engaging for future generations
* Solving a real need for people in our lives
* Delivering a well-scoped and functional MVP based on multiple user interviews
* Integrating varied team member skill sets from barely technical to full-stack

## What's next for Saga

### **Test and Iterate**

We’re excited to get our prototype project in the hands of users and see what real-world feedback looks like. Using this customer feedback, we’ll quickly iterate and make sure that our application is really solving a user need. We hope to get this on the App Store ASAP!!

### **Add functionality**

Based on the feedback that we’ll receive from our initial MVP, we will prioritize additional functionality:

**Reading level that grows with the child** — adding more complex vocabulary and situations for a story and character that the child knows and loves.

**Allow for ongoing universe creation** — saving favorite characters, settings, and situations to create a rich, ongoing world.

**Unbounded story attributes** — rather than prompting parents with fixed attributes, give an open-ended prompt for more control of the story, increasing child engagement

**Real-time user feedback on a story to refine the prompts** — at the end of each story, capture user feedback to help personalize future prompts and stories.

### **Monetize**

Evaluate unit economics and determine the best path to market. Current possible ideas:

* SaaS subscription based on one book per day or unlimited access
* Audible tokens model to access a fixed amount of stories per month
* Identify and partner with mid-market publishers to license IP and leverage existing fan bases
* Whitelabel the solution on a services level to publishers who don’t have a robust engineering team

## References

<https://www.frontiersin.org/articles/10.3389/fpsyg.2017.00677/full>
## Inspiration 🌈

According to mentalhealth.uk, over 45% of children asked said they felt lonely 'often' or 'some of the time'.

That is way too high in our team's opinion.

At Teddy.ai, our inspiration is simple yet powerful: to ensure that no child or individual ever feels lonely. We believe in harnessing the potential of technology to create companionship, connection, and a brighter future for everyone. 🤗

## What It Does 🐻

Teddy.ai is not just a teddy bear; it's a gateway to a world of possibilities. 🌌

* It leverages the blockchain to introduce children to concepts like NFTs and FLOW tokens through fun and interactive experiences, while also leveraging Starknet to ensure privacy and scalability. 🧸🔗
* Teddy.ai is your child's snuggable best friend who understands them, rewards positive behavior, and ensures no child feels alone. 🎉
* With Teddy.ai, you can now seamlessly integrate your social media links and personal websites, allowing the bear to know all the details about its owner's life. It's like having a friend who truly understands you! 📱🌐

## How We Built It 🛠️

We built Teddy.ai with a combination of cutting-edge technologies:

* **Verbwire API**: Utilized for minting NFTs of precious memories in real-time. 🖼️
* **Flow Blockchain**: Integrated to enable transactions through speech, making it accessible for children. 🗣️
* **OpenAI Language Models (LLMs)**: Utilized OpenAI's language models for understanding and responding to users. 🤖
* **OpenAI Whisper**: Employed for Speech-to-Text (STT) functionality. 🎤
* **Beautiful Soup**: Used for web scraping to gather information. 🕸️
* **Elevenlabs**: Leveraged for Text-to-Speech (TTS) capabilities. 🔊
* **OpenCV**: Captured memories with a user's webcam. 📸
* **Sounddevice**: Recorded audio from interaction between the user and their teddy. 🎶
* **Starknet**: Leveraged Starknet mainnet to mint unique Teddy Bear NFTs for each teddy bear, immutably recording their owner on the blockchain.

## Challenges We Ran Into 🚧

During our journey, we faced several challenges, including:

* Working with Cadence as well as Flow Client Library for the first time. 💻
* Getting Flow transactions working in JavaScript and integrating them with our Python background. 🤯
* Integrating Starknet with the rest of our software given the intensive implementation necessary. 🧩

## Accomplishments That We're Proud Of 🏆

Our proudest accomplishments include:

* Successfully integrating web3 features seamlessly with our backend. 🌐
* Lowering the barrier so that even children can mint NFTs and send blockchain transactions. 🚀
* Integrating audio and video capture to make Teddy.ai a reality. 🎥🔊

## What We Learned 📚

First, working with Flow and Starknet for the first time was a significant learning experience for us, and it has enriched our understanding of blockchain technology. 🤓

In addition, integrating the frontend and backend proved to be quite the challenge. We were able to do so, but it took many hours. Thankfully, we were able to do so just in time for the hackathon submission deadline. 🕰️

Finally, we really love working with the new OpenAI Assistants and function calling APIs - we were able to streamline processes that would otherwise be incredibly complicated. 🤖

## What's Next For Teddy.ai 🚀

The journey has just begun! We envision Teddy.ai becoming a global symbol of companionship and learning. We'll continue to enhance its capabilities, expand its educational features, and explore new horizons in technology and education. Our mission remains clear: to ensure that no one ever feels alone, and that Teddy.ai is there to provide comfort, connection, and a bright future for all. 🌍💖

Join us on this exciting journey to redefine companionship and education with Teddy.ai! 🐻💡
## Inspiration

After playing Minecraft until 5am for the first time the weekend prior to YHack, I thought about building the basic features of Minecraft would be fun and challenging.

## What it does

This is a single player game where the camera is controlled by WASD keys for planar movements and cursor for rotation. When looking at a clickable object, the camera rotation is prevented (different from the actual game). To "mine" the blocks, players must click on the block object multiple times until its "health" goes down (differs from actual game). Particle Systems (mini blocks that fly out) are then launched out of the block for interaction feedback. Once a block is "mined," a compact version drops, floats, and rotates above the ground.

## How I built it

Using material assets from Unity's Tanks! tutorial and the cube self-rotation concept from Roll-A-Ball tutorial, I was able to create animations with simple assets.

## Challenges I ran into

This was my first time learning and using Particle Systems and customizing the produced particles. Another challenge was the camera rotation using the cursor's position. The most difficult challenge (that I could not solve) was making the Particle System output the same material as the cube it is attached to. The goal was to be able to scale up the cubes with different materials without creating a separate particle system for each block type the map maker creates. Further investigation is needed here.

## Accomplishments that I'm proud of

Having the Particle System in the game really saved time and unnecessary loading of new objects. It make made it look more like Minecraft which was a huge plus. I am really proud of finally knowing how to move the camera based off of arrow key inputs. Even though it the planar movement may be considered trivial, it was definitely a milestone in my books after many different Unity projects.

## What I learned

I learned what is a Particle System and how to move/rotate the camera with arrow key inputs and cursor.

## What's next for Minecraft - POC

Listing from highest priority to least:

* Make cubes scalable
* Add a weapon to simulate attacking
* Collecting cubes and having a storage
* Having a map maker (Bonus: environmental effects)
* Crafting
* Enemies