Jump to content

Skylords Reborn PvP AI programming contest - Phase 2


Recommended Posts

amii_paladin_small.pngcommunity_splitter.png

The Skylords Reborn PvP AI programming contest - Phase 2

Hello fellow Skyladies, Skylords and other Sky-beings!

The time has finally come - phase 2 of The Skylords Reborn PvP AI programming contest is here!
Over the past few months we have been working on ways to program your own PvP bots and let them fight against each other and now it is time to bring your PvP and programming skills to the test!


What is happening now?
The API for programming a PvP bot is ready to use now and you is your time to put it to use.
At the end of phase 2, you are supposed to send in the source code of your bot, so it can be entered into the tournament.

We highly recommend you to join the Discord server, which we created for this event, since it lists all relevant resources to get your project started.

Event Details

  • Preliminary deadline for phase 2: 31.08.2024 (Might get extended if more time is needed)
  • Link to the event Discord: *CLICK*


 Rules and specifications

In order for you to be able to prepare your bot, we have composed a set of rules, which your submission has to satisfy.

  1. All PvP matches will be played on the map Elyon (spectator).
  2. The cardpool is limited to all cards, that appear in the free PvP decks, and they have to be on Upgrade 3.
  3. Exploting any bugs, glitches or other programming oversights may lead to a disqualification.
  4. You have to hand in the source code of your bot in order to participate. We will not distribute the source code without your explicit permission. The preferred way of submission is via gitlab/github, but other forms of submission are fine as well.

The bots will be run on my personal computer. Here are some of its specifications and resulting limitations: (these specifications may be subject to change, but I will try to keep this list updated)

  • AMD Ryzen 9 5950X processor (16 cores, 32 threads)
    • Each bot is limited to 8 OS-threads. Green threading is allowed.
  • 16 GB DDR4 RAM
    • Each bot is limited to use up to 4 GB of RAM.
  • NVIDIA GeForce GTX 970 graphics card
    • Please contact me beforehand, if you want to do any GPU calculations.
  • Operating System: Linux Mint 21.3, Kernel version 6.5 or later

I will try my best to get each bot to run on my setup and will gladly help you with any compatibility issues/concerns you might encounter.

What programming languages are available?

Currently the following programming languages have an official example available:

There has also been work done by community members on implementing the following languages:

  • Java (On an outdated version of the API, updates for types will be provided, if necessary)
  • JavaScript/TypeScript (API types are available, but no example implementations)

If your preferred language is not in the list, it is likely still possible to write an implementation of the API in that language. Just hop onto the Discord server and ask around!

For Rust, C# and Python there are also tutorial videos available on YouTube.

Some bonus to keep you excited

Since the deadline of 6 months might feel a little long, we came up with a way to keep you in touch with the event for the next few months.

Once every month, there will be a preliminary mini-tournament, where you can sign up the current work-in-progress version of your bot to compete with the others, so you can see where you currently stand. These mini-tournaments will not be streamed, but the results will be published.

Participation in these in-between contests is not mandatory, so if you do not have a working version of your bot when one of them happens, don't worry - you will not be penalized for it!

This means that you will have the chance to sign your bot up in 5 mini-tournaments before the big showdown at the end.

Additionally, you can of course also ask your fellow participants for a friendly match between your bots.

Instructions on how to run a bot

You can find detailed instructions on how to run your own bot and the available resources on the event Discord.
If you can't or don't want to join the Discord for some reason, feel free to contact me via a DM in the forums so I can provide you with the most recent version of the necessary files.

Here is a quick rundown of how to run a bot:

Spoiler

How to test your bot?

  • Run the updater to make sure your game is up to date.
  • Get the latest proxy-kubik.dll from me and put it in the game's directory.
  • For now, unless stated otherwise, there shouldn't be any issue if you keep using an older version of the proxy, with the corresponding version of the API (if that version is still compatible with the server, if not, you will not be able to log in).
  • Make sure you have the AI bot connection information configured correctly in the config files.
  • Run _run_with_ai_bot_support.bat (you can also get that file from me).
  • It will start the game. When you log in, you will connect to the test server, where you have all cards. Ff you have not been on the test server before, you will need to create new game character there (it is not directly connected to your character on the live server).
  • Create a lobby and type /AI: <command> (the space is important)
    • /AI: list
      will tell you which AIs are ready to play on this map. Example response: RustTestAI(Tutorial, TaintedFlora)
    • /AI: deck <name> <deck>
      will show you that deck used by that AI. Example command: /AI: deck RustTestAI TaintedFlora
    • /AI: spectate <name> <deck>
      will allow the bot limited interaction (whispers and pings), and the bot will not be shown in the lobby. Example command: /AI: spectate Commentator Comment
    • /AI: add  <name> <deck> <slot_index>
      for example /AI: add RustTestAI TaintedFlora 4 will add the bot to first position in the second team in a 3v3 lobby
  • If you add the bot to a wrong slot, close the lobby and create a new one. Removing a bot from a lobby is not supported.
  • If you want multiple people in the lobby, they need to join the lobby before adding bots.
  • Launch the game.

How to configure game to look for your bot

  • Open Documents\BattleForge\config_debug.json
  • Add a section "ai" and in it an array called "urls"
  • To this array you need to add connection information for each bot you want to use.
  • Whenever you use /AI: list (or other command with not known AI or deck name), it will try to find it on any of these URLs.
  • I highly recommend running the AI bots only locally (`http://127.0.0.1:????`), but for now there is nothing enforcing that.

Few examples:
Default rust example bot:

 

Quote

{
  "ai": {
    "urls": [
      "http://127.0.0.1:7273"
    ] },


Default C# bot

Quote

{
  "ai": {
    "urls": [
      "http://127.0.0.1:6373"
    ] },

Both

Quote

{
  "ai": {
    "urls": [
      "http://127.0.0.1:7273",
      "http://127.0.0.1:6373"
    ] },

Useful tips

  • If you press CTRL + X the game will show some debug data
    • Pressing Alt hides them for things you are not pointing your mouse to (configurable).
    • Holding Shift will show coordinates under the mouse.
    • The world section now has bot statistic, if you want to know how much time is your bot taking, or how many times it missed the response deadline.

Special Thanks

Big thanks to @Kubik for providing the technical stuff necessary to make this happen!
Also thank you to everyone, who already joined the Discord server and provided constructive feedback to make the API better.


Questions
Reply in this thread if you have questions, we will answer them as soon as possible.

Best regards,
The Skylords Reborn Team

Edited by Kubik
Correct the wording on Java, API, that it is now updated
SmellyPete and Ultralord like this
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use