Skip to content

AIForces/AIforcesAPI-Historical

Repository files navigation

AIForces

AIForces is an online judge for gaming AI competitions. It's written in Ruby. It has a separated multithreaded judging system - AIForces Judge.

Demo: AIForces visualizes a game, played by 2 bots, written in C++.

demo

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

This application requires:

  • Ruby 2.6.1
  • Rails 5.2.2
  • Bundler 2 or greater
  • Postgresql 11.2
  • Redis
  • libpq-dev
  • nodejs

Also, you need to install all the necessary gems by running

bundle

Installing

  1. Clone this repository to your local computer.
git clone https://github.com/aalekseevx/AIforces.git
  1. Satisfy all the prerequisites.
  2. Create the database
rails db:create
rails db:schema:load
  1. Install and run AIForces Judge on the same computer.
  2. Now, run AIForces
rails start

Running the tests

TODO: describe the tests

Deployment

These steps will help you to configure Capistrano, so that it could deploy an app to your remote server.

  1. Clone this repository to your local computer.
git clone https://github.com/aalekseevx/AIforces.git
  1. Satisfy all the prerequisites on the remote server and on the local machine.
  2. Change Capistrano settings, like server ip and ssh port, in config/deploy.rb file.
  3. Add server ssh keys to github
  4. Generate ssh keys on your local machine and add them to authorized_keys on your remote server.
  5. Create a user and a database and set them in config/database.yml on your remote server.
  6. Generate new master key and encrypted credentials.
  7. Move your master key to apps/AIForces/shared/config folder on your server.
  8. Create AIforces_production database.
  9. Run initial deploy from your local machine.
capistrano deploy:initial
  1. Configure your web server as a reverse proxy.
  2. Follow the instructions to deploy AIForces Judge. It is preferred to use another machine in the same network. You can deploy as many judges, as much power you need.
  3. Add judges endpoints to AIForces Settings. Use:
rails console production
Setting.judges_endpoints = %w[http://127.0.0.1:3001/judge]
Setting.trusted_ips = %w[127.0.0.1]

However, these values are set by default.
Now everything is set.

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to Dmitry Chernyshev and Danil Doroshin (ddddanil) for the inspiration and some useful advice.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors