Skip to content
@AI-Tournaments

AI-Tournaments

Platform for match making between algorithms.

AI-Tournaments

AI-Tournaments is a platform for competitive programming and match making between algorithms. Users can make their own participates to compete in any of the existing arenas, or make their own custom arena and challenge other users to join. "AI" in the name refers to playing against the computer on old video games, like "Hard AI" or "Hard CPU".

AI-Tournaments in an early prototype stage. See the section Participate if you want to join a arena, then analyze how other have solved the arena until better documentation has been written.

Community

Join the official GitHub or Discord community. Please read and follow the community guide lines.
Discord banner2

Participate

To participate in a Arena you need to create a public GitHub repository and apply three topics: AI-Tournaments, AI-Tournaments-Participant and the full repository name of the arena (ExampleAuthor--ExampleArena). The repository also has to have a file in root called participant.js, this is the file that will be called to the arena. The repository's name will represent the participants name, except if it starts with AI-Tournaments-Participant- then that part is omitted.

Private repositories

Currently not supported.

Develop environment

For both developing arenas and participants.
In Local development setups you can add the URLs to arena (arena.js along with the arenas replay page) and participants to test with before publishing them in GitHub.

Explanation

Key Description Example
arena.url URL to a arena.
⚠️ Do not include arena.js.
"http://127.0.0.1:8080/Community-Arena/" or "https://raw.githubusercontent.com/AI-Tournaments/Worm-Arena/main/"
arena.name
Optional
Displayed name.
Name defaults to URL if left empty.
"New-Community-Arena"
arena.replay URL to replay view. "http://127.0.0.1:8080/Community-Arena-Replay/"
arena.settings
Optional
Prefigured settings. {"general":{"seed":"example"}}
participants Adds participants.
Array with either a url string to script or a JSON object per participant.
["http://127.0.0.1:8080/Community-Arena-Test-Participants/participant-1.js",{"url":"http://127.0.0.1:8080/Community-Arena-Test-Participants/participant-2.js","name":"Temp-Participant","team":1}]

The development environment also includes some extra dials and features to help with quality assurance.

Participant

Participant's URLs can be written in different forms. An ordinary URL is interpreted in the default sealed sandbox, but URLs that starts with a question mark (?) is executed as plain javascript and can be debugged by the javascript debugger command.

Interface

If you need more freedom for debugging or would like to train a neural network you should investigate using an interface, which's URLs starts with a exclamation mark (!). The main difference between an Interface and a Participant is that interfaces opens up a separate web page and sidestep all participant's restrictions. The main use case for interfaces is to get better insight during a running match, for example by allowing Human vs Participant and even Human vs Human matches.

Break before first message

By appending a question mark (?) after the first special character (?? or !?) the arena will insert a break point just before the first message is posted to the participant or interface so that JavaScript debuggers can be used to step inside along with the first message.

File header

The arena.js and participant.js optional file header has to be valid Json otherwise it is omitted. The header can be placed anywhere in the file, but at the top is recommended as a standardization.

/**
{}
**/
/**{}**/
/**{
	"example": true
}**/

Dependencies

To load libraries like jQuery and others, copy the files to the repository and add them to the file header. The files has to be referenced locally. The sources are imported assigned order.

/**{
	"dependencies": [
		"exampleLib.js",
		"other/exampleLib.js"
	]
}**/

Special thanks

Why Source Available?

AI-Tournaments is not Open Source by the Open Source Initiative's definition but rather Source Available, except were a license that says otherwise is in place. This might change when AI-Tournaments leaves the prototype stage, the decision has not yet been made.

User written JavaScript

AI-Tournaments executes user written JavaScripts in the web browser, which is usually seen as a security concern (Cross-site scripting). But the scripts are loaded into a sandbox IFrame and Web Worker to prevent just that. But the concern still remain and that's a fact that should not be hidden, that is why it is instead addressed and displayed publicly here.

But if you do find a way to break out of the sandbox and access client data or other participant scripts, please do report it! Reporters of confirmed security holes will get a honorable mention once the hole is fixed.

Scheduled server hosted events

A server-side events with official match results is planned, but until then client-side execution is the only way to run the arenas. Note that interfaces will not be able or allowed to compete.

Arenas

The source code for AI-Tournament's arena executor and the official arenas are available in order to make it easier to examen the "rules" and come up with optimal strategies. You are basically allowed to do what ever as long as it isn't commercial matches.

Allowed examples

Download code from AI-Tournaments to ...

  • Develop, troubleshooting or train an AI.
  • Writing and recording dev-diary or tutorial.
  • Have your own internal non-profit tournaments.
  • Scientific research.
    • Please do tell if something is published! 😃

Basically anything that gives something back to the community.

Disallowed examples

  • Removing all links and references to AI-Tournaments.
  • Setup a commercial competitor to AI-Tournaments.
  • Private tournaments for benchmarking user performance.

If you have any doubts, you can request permission here.

Pinned Loading

  1. Participant-Template Participant-Template Public template

    JavaScript

  2. Arena-Template Arena-Template Public template

    JavaScript

  3. Replay-Template Replay-Template Public template

    JavaScript

  4. Interface-Template Interface-Template Public template

    HTML

  5. P2P-Interface P2P-Interface Public

    Redirect traffic to a peered interface.

    HTML

Repositories

Showing 10 of 14 repositories
  • Surveys Public

    Automated surveys

    AI-Tournaments/Surveys’s past year of commit activity
    0 MIT 0 0 0 Updated Nov 20, 2024
  • AI-Tournaments/AI-Tournaments.github.io’s past year of commit activity
    JavaScript 0 0 0 0 Updated Oct 25, 2024
  • AI-Tournaments/Arena-Manager’s past year of commit activity
    JavaScript 0 0 0 0 Updated Oct 24, 2024
  • Arena-Kalaha Public

    Gathers and manage all Kalaha (a.k.s. Mancala) participants.

    AI-Tournaments/Arena-Kalaha’s past year of commit activity
    JavaScript 0 0 0 0 Updated Oct 21, 2024
  • .github Public
    AI-Tournaments/.github’s past year of commit activity
    0 MIT 0 0 0 Updated Sep 23, 2024
  • AI-Tournaments/Arena-Worm’s past year of commit activity
    JavaScript 0 0 0 0 Updated Aug 17, 2024
  • GitHub-Explore Public Forked from github/explore

    Community-curated topic and collection pages on GitHub

    AI-Tournaments/GitHub-Explore’s past year of commit activity
    Ruby 0 CC-BY-4.0 14,379 0 1 Updated Aug 2, 2024
  • AI-Tournaments/Community’s past year of commit activity
    HTML 0 MIT 0 0 0 Updated Aug 1, 2023
  • P2P-Interface Public

    Redirect traffic to a peered interface.

    AI-Tournaments/P2P-Interface’s past year of commit activity
    HTML 0 MIT 0 0 0 Updated Jul 28, 2023
  • Participant-Template Public template
    AI-Tournaments/Participant-Template’s past year of commit activity
    JavaScript 0 0 0 0 Updated Feb 2, 2023

Top languages

Loading…

Most used topics

Loading…