Inspiration

I play a lot of games on a daily basis, most of which have to do with geography. One game is called the WhereTaken, where you try to guess the country a given image was taken. I play the game with my roommate, and we always analyze the image after we play, discussing our thought processes for our guesses. Because of this game, I've become better at recognizing different countries and regions. I realized that the same could be done with food.

What it does

Nutritionle is a game where you try to guess the food based on its nutritional information. To make the game easier, we picked from a select list of foods. If you guess wrong, you can compare the nutritional label of your guessed food to that of the mystery food. You have 5 guesses to correctly identify the mystery food. If you're particularly stuck, you can ask our AI bot for a hint. After the game, whether you guessed correctly or not, you can play our bonus games, which give you another opportunity to learn about the chosen food.

How we built it

The project integrates a frontend and backend solution, leveraging a reactive component-based framework for dynamic user interfaces and automatic routing. It includes state management for build-end operations and supports both client-side rendering (CSR) and server-side rendering (SSR) for optimal performance. We used a fuzzy sort algorithm to match input query with the foods in the search bar. For the data, we wrote a python script to scrape a dataset from Kaggle with all the nutrition info. For this demo, we handpicked a couple of well-known foods that each have a distinct nutrition profile to make things easier. The backend is powered by FastAPI, providing a robust REST interface that connects Svelte (JavaScript) components with Fetch.ai agents written in Python. A key feature is the load-balancing query agent, which intelligently routes requests to specific tasks using agent-to-agent communication. This system also includes worker agents responsible for processing data, querying large language models (LLMs) such as ChatGPT and Gemini, and facilitating dynamic prompt engineering. Overall, the architecture ensures efficient communication, task delegation, and seamless integration between frontend components and backend services.

Challenges we ran into

Determining how a distributed network of agents could fit into the game Figuring out how to scrape and process the data efficiently

Accomplishments that we're proud of

Using AI agents and LLMs to help the user in their nutritional journey Quickly learning and deploying a new framework (Svelte, FastAPI)

What's next for Nutritionle

Create accounts so users can track their stats Add more foods into the database Have themed days (all McDonald's Items, all vegetables, etc.)

Built With

Share this project:

Updates