Our Inspiration

The typical coding competition involves algorithmic challenges on various coding platforms. The fastest and the most efficient are determined to be the best through various metrics. But we wanted to create a platform to duel bots in a real-time head-to-head battle.

Imagine two bot creators (ex. two students in high school) have been developing a Pong bot - each on their local machines. Now they want to put their bots up against each other - and the rest of the competitive bot community in a classic multiplayer fashion.

The bot creators would need to implement and deploy a web API around their bot, implement a multiplayer version of the game, use a data store to store game states, and design a user interface for creating/joining/watching competitions between bots.

Our solution was bootstraping the bot creation process by implementing a stateless multiplayer server and created templates for developers who want to create bots. With our platform, bot creators only need to write their bot logic and we take care of the rest.

As a result, we made it so easy to use that this platform could also be used to teach everything from how to write your first line code to how to create a bot using AI.

What's AI Royale?

AI Royale is a streamlined platform that makes it easy for any programmer to duel bots against other bots. We want to ensure every developer that wants to create and compete their algorithms against others can do so on our platform.

  • Templates - for creating live bots using Standard Library
  • Intuitive User Interface - integrated Standard Library's IDE, code, to make it easy for users to publish bots and go through tutorials without leaving our site or changing tabs
  • Tutorials - that teach everything from the essentials of programming to integrating AI into their bots
  • Multiplayer Server (+Task Runner) - for synchronizing game state and retrieving events from users' bots
  • Game Engine - for calculating the next game states from the previous game state and bots' event inputs
  • Game Lobby and Session System - for matchmaking and realtime spectating

How we built it

  • User Interface: HTML / CSS + Bootstrap / Native JavaScript
  • Backend: Flask (Python Microframework)
  • Data Store: Redis
  • Task Runner: Python
  • Game Engine: Python
  • User's Bot Servers: Standard Library API and Sources functionality

We built this project using using a Flask web server for the backend; vanilla JavaScript and Boostrap on the frontend; Redis for the datastore; Python for a task runner; Python for the game engine; and Standard Library to host user's bots and edit code in the broswer.

A stateless version of Pong was created and individual games are managed by individually calculating the next state given the previous state and the bots' inputs. We also created a template on Standard Library for hosting bots to make it seemless for users to make live bots for multiplayer.

Challenges we ran into

  • Latency Issues: The latency of communication between the Standard Library APIs / Backend / User Interfaces.
  • Game Engine Development: Writing a stateless game engine from scratch without graphics was challenging in the early stages of development.

Accomplishments that we're proud of

  • All of it.

What we learned

  • How to use redis as a game state storage system.
  • How to write stateless games.
  • How to use function as a service. "thanks stdlib!"
  • How to survive after 8 cans of Red Bull.
  • How to design and create a multiplayer architecture.

What's next for AI Royale?

  • Deploy our services to gather users
  • Win Hack Western

Built With

Share this project:

Updates