AI Integration

AI Battles

A prompt-based fantasy game using Flask and Google Gemini

This project was created use Python Flask as the frontend and backend, and uses Google Gemini to control the enemy generation in addition to win and lose condition. This project was created in essentially one day, (you can view the commit history on GitHub), but was able to be unique and complex enough to get a 100% in the project 😎. When creating this project, I followed as closely to the 3-tier architecture design pattern, with having 3 scripts: application.py (frontend), director.py (backend), and the ai.py (generator). I am honestly really proud on how fast I coded the entire project, but do wish I could have expanded more on it.

Flask
Python
Google Gemini
AI
AI Battles
Project Details

Duration

2 days (Dec. 2024)

Team Size

2 developers

Key Challenges

  • β€’ AI token limits
  • β€’ AI prompts

Key Features

AI integration

Uses AI to control many features of the gameplay.

Unique enemies

Fight different fantasy-generated enemies that get harder as time goes on.

Limitless solves

Use your imagination to defeat your enemies.

Results & Impact

Key Achievements

  • 100% grade on Final Project

Lessons Learned

This gave me and my partner a better understanding on how we should structure our prompts when using AI. A lot of the times, it would give a giant response or would use too many tokens to the point you can only fight one enemy before having to wait until we get more tokens. There has to be a balance between giving just enough to the AI and making sure that the AI gives the proper response.