Giter VIP home page Giter VIP logo

ai-royale's Introduction

AI Royale - Creating Bots for Head to Head Competition in Pong!

Our inspiration come from coding competitions/challenges being very one sided. We're all given a coding problem and the person with the fastest/most optimal solution wins. However, there's a real lack of satisfaction and competition when it comes to these competitions. Our solution to this was to create an online competition platform where individuals just plug their logic and play against other people's bots to score high on the leaderboard.

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 - see here - 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 - see here and here - for matchmaking and realtime spectating

How we built it:

Architecuture Diagram

  • 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.

ai-royale's People

Contributors

jrobchin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.