Inspiration

The inspiration for Push Battle came from the idea of combining strategic gameplay with AI-driven decision-making, where each move can shift the balance of power. We aimed to create an interactive environment that encourages users to explore AI-driven strategies within a competitive game setting, making it both fun and educational. The goal was to showcase how Monte Carlo Tree Search (MCTS) and other AI techniques can be applied in a real-time, fast-paced game.

What it does

Push Battle is a two-player strategy game where players take turns placing or moving pieces on a board. The objective is to outsmart the opponent by strategically placing and pushing pieces to gain an advantage. Each player has a limited number of pieces and must think ahead to anticipate the opponent’s moves. The game leverages AI, allowing players to either compete against each other or against a computer-controlled agent powered by MCTS, providing dynamic gameplay with various levels of challenge.

How we built it

Push Battle was built using Python and Flask for the backend server, with game logic implemented in the PushBattle module. We used a combination of agents, including a Monte Carlo Tree Search (MCTS) agent for optimal decision-making and a Random Agent for baseline testing. The MCTS agent was refined to handle complex decision-making under time constraints, with mechanisms to explore potential moves and backpropagate outcomes to improve performance over time. The Flask server was set up to manage game states, handle API requests, and facilitate interaction between the client and the AI agent.

Challenges we ran into

We encountered several challenges during development:

  • Time Constraints: Optimizing MCTS to make decisions within a 4-second window was challenging, requiring careful tuning of the iteration limits and exploration weights.
  • Balancing AI Complexity and Speed: We had to strike a balance between building a sophisticated AI that could predict moves accurately and ensuring it could operate within the time constraints.
  • Debugging AI Decision-making: Troubleshooting MCTS logic to ensure the agent made intelligent moves while handling edge cases on the board was challenging, especially as the game rules grew more complex.

Accomplishments that we're proud of

We’re proud of successfully implementing MCTS, which allowed the AI agent to make strategic moves within the time limit. The iterative tuning of the exploration-exploitation balance in MCTS also provided a better gameplay experience by creating a challenging yet fair opponent. Additionally, building a responsive and robust backend using Flask enabled smooth interaction between players and the AI.

What we learned

Through this project, we gained a deeper understanding of Monte Carlo Tree Search and how it can be applied to turn-based strategy games. We also learned the importance of balancing algorithmic complexity with real-time constraints, especially when building competitive, interactive applications. The experience of designing and debugging a real-time game agent provided insight into optimizing AI models under performance constraints.

What's next for Push Battle

In the future, we envision expanding Push Battle with new features:

  • Enhanced AI Agents: We could introduce neural network-based agents to add a learning component and potentially adapt to players’ strategies over time.
  • Multiplayer Mode: Implementing a multiplayer mode to allow players to challenge friends online would add a social element to the game.
  • Improved UI/UX: Creating a more interactive and visually appealing interface would enhance player engagement.
  • Customizable Difficulty Levels: Allowing players to choose between various difficulty settings could make the game accessible to a wider audience, from beginners to advanced strategists.

Built With

Share this project:

Updates