Inspiration
When I was younger I loved choose-your-own-adventure books and now with AI being popularized, decided to make my own - one where every world can change and be different - where anyone can do whatever they wish to win
What it does
Introduces the user to a world with an arbitrary goal that only the omniscient narrator is aware of, and leads them along to help them win.
How we built it
A big part of this project was prompt engineering, to get the machine to do exactly what you would like. After building the base prompt, we went on from there to randomize the character, setting, and item the user starts off with. The entire program is built around the expectation that AI will follow the prompt exactly, making that part of the process essential.
Challenges we ran into
Since API calls are individual, we needed to find a way to store previous conversations in each call. I started off by simply appending a list of all the previous points but that ended up using too many tokens (which impacts pricing and most importantly makes the AI begin to repeat itself at some point) and this is where my teammate Ethan's biggest contribution shines - he explained a process to quickly and efficiently add onto the conversation through built-in System, User, and Assistant info for the API call. After this, we still had an issue with tokens, as the list of previous conversations got too large, so I implemented a feature that keeps the initial prompt but correctly and in a timely manner removes previous less important information.
Accomplishments that we're proud of
Prompt-Engineering Progressive Memory Storage Game-Loop
What we learned
We got better at interacting with the OpenAI API, and got more familiar with its prompting and memory processes
What's next for Adventure
Right now, to make it more fun for the user, we made it as easy as possible to win with minimal pitfalls to go through. The next step is to make a way for the user to lose but be able to go back to whichever step they would like and go from there. Also, I would like to implement it into a website to make it more widely accessible.
Built With
- openai
- python
Log in or sign up for Devpost to join the conversation.