Inspiration

Retro games have a timeless charm, but the computer opponent is often limited to fixed, pre-programmed behaviors. We were inspired by the classic Japanese fighting video game Street Fighter and decided to put a modern spin on it for Timeless Tech Challenge - adding machine learning to make the game more of a challenge.

What it does

Street Fighter: Algorithm Annihilation uses machine learning to understand a player's habits and patterns. We developed a CPU that continuously learns from player actions, adapts its strategies, and evolves over time, making each match more challenging and unpredictable. Repetitive and predictable gameplay is a real-world problem in gaming, leading to player disengagement and shorter game lifespans. Many games rely on scripted behavior, which can feel stale after repeated playthroughs. By implementing machine learning, this project addresses the challenge of keeping players immersed, creating a more dynamic experience that stays challenging and exciting. This approach could redefine game design, making AI-driven experiences that evolve alongside the player, keeping games fresh and enjoyable for longer.

How we built it

We built Street Fighter: Algorithm Annihilation using Python.

On top of the basic framework, which can be credited to Aaditya Panda, we implemented a machine-learning-based system for tracking player behavior and adapting the CPU opponent. We created the PlayerBehaviorTracker class to collect data on player actions and game states, extracting features such as player and CPU positions, velocity, and relative distance. This data is trains a decision tree model in the MLModel class, which predicts the CPU's next move based on past player behavior. The model is trained, saved, and loaded using pickle, and continuously adapts to player strategies. The extract_features_from_state function converts game states into numerical data for the AI. The system enables the CPU opponent to evolve over time, becoming smarter and more responsive to the player's actions.

Challenges we ran into

We encountered challenges in saving the behavior data for different players, as it was crucial to track each player's actions and state accurately. Another significant challenge was ensuring the CPU opponent didn't simply charge towards the player or act predictably. We had to implement more sophisticated logic for the CPU to avoid repetitive movements, allowing it to dodge, block, and strategize based on the player's position and actions, making the game more dynamic and challenging.

Accomplishments that we're proud of

We're proud of successfully implementing a machine learning-powered AI for the CPU opponents, which significantly enhanced the gameplay experience. By using reinforcement learning, we were able to create opponents that could learn from the player's actions and adapt their strategies, providing a more challenging and engaging experience.

What we learned

Throughout this project, we learned about both machine learning and game development. We gained hands-on experience implementing machine learning algorithms, which gave us a better understanding of concepts like reinforcement learning and supervised learning. In terms of game development, we gained valuable insights into gameplay mechanics and working with graphics. Overall, this project deepened our understanding of how machine learning can be integrated into games, and how thoughtful game design can lead to a more immersive player experience.

What's next for Street Fighter: Algorithm Annihilation

We aim to enhance the game's graphics and animations to create a more immersive experience. For example, we can add customization options, power-ups, and different attacks.

Built With

Share this project:

Updates