[Legends of Code and Magic] Remarks and bugs

I have the same questions as others:

  1. What is the reason you introduce mirror matches so late into the context?
  2. Will they available for every league or some specific league?
  1. High accuracy of ranking is not needed so early in the contest. It slows down rankings considerably.
  2. I don’t think it can be specific to leagues.

The problem is that it seems random how many matches you play as first (easier) or second (harder), and that accounts for some of the randomness in the rankings. So possibly even playing half the number of matches but making them mirror might be more accurate than currently (and would definitely get more accurate after some time with additional matches, unlike now), while being the exact same submit time and server load.

Also, how will mirror matches be counted in case of each player winning one? One win each, one draw, or comparing the health differences?

1 Like

Winning as player 2 becomes slightly less difficult if you draft differently and play differently as player 2. But there’s no way to know which player you are during draft.

2 Likes

Yes, it would add some depth to know which player you are during draft, but that’s a big change to make during the contest (tricky/ugly to do without breaking some bots).

2 Likes

I don’t know how it’s done here, but there are two options: handle it as draw or ignore it, see here - winning is a boolean thing, not looking at health, turns needed to win or whatever. Tron is an example where they are just ignored, as stated lower in that link

There is a way to figure out which player you are… :slight_smile:

3 Likes

During draft?

Yeah during draft.

//MISSING instanceId of card by draft phase. Possible bug?
// it prints to error output stream
// -1 -1 -1

import java.util.;
import java.io.
;
import java.math.*;

/**

  • Auto-generated code below aims at helping you parse

  • the standard input according to the problem statement.
    **/
    class Player {

    public static void main(String args[]) {
    Scanner in = new Scanner(System.in);

     // game loop
     while (true) {
         for (int i = 0; i < 2; i++) {
             int playerHealth = in.nextInt();
             int playerMana = in.nextInt();
             int playerDeck = in.nextInt();
             int playerRune = in.nextInt();
         }
         int opponentHand = in.nextInt();
         int cardCount = in.nextInt();
         for (int i = 0; i < cardCount; i++) {
             int cardNumber = in.nextInt();
             int instanceId = in.nextInt();
             int location = in.nextInt();
             int cardType = in.nextInt();
             int cost = in.nextInt();
             int attack = in.nextInt();
             int defense = in.nextInt();
             String abilities = in.next();
             int myHealthChange = in.nextInt();
             int opponentHealthChange = in.nextInt();
             int cardDraw = in.nextInt();
             
             
             System.err.println(instanceId);
         }
    
         // Write an action using System.out.println()
         // To debug: System.err.println("Debug messages...");
    
         System.out.println("PASS");
     }
    

    }
    }

In case people doubted my claim, I just re-submitted under reCurs3 my proof of concept for figuring out which player you are. It will print a message claiming to know whether it’s playing as red or blue. It’s not 100% reliable but probably possible to make it so.

2 Likes

I know a way too, that is probably the same way that you are doing.

I just don’t know if it is forbidden, or even if it will be usefull… Lets check my win rate at each side at the next leagues…

Now you’ve spiked my interest…

1 Like

am I missing something or you just need to check the opponent’s mana?
If I’m first player, my opponent would have 0 mana at turn 1; else 1.

This is what you’re missing:

EDIT : hmmmm,you might be right Thibaud…
EDIT2 : no, I just checked. Mana is 0 for both players during draft phase.

1 Like

OK, I’m tired, it’s Friday :stuck_out_tongue:

EDIT: but maybe playerDeck shouldn’t be 0 during the whole draft, and everyone could use this info from turn 1 of the draft phase

3 Likes

I suppose you can check the time between when you give output and when you receive the next inputs. At the first turn you can check if the referee handle the end of the turn after you.

I think this just demonstrates how awful the state you get from “official” input is.

1 Like

How do you check if the referee is handling the end of turn after you? I would really like to be able to vary my strategy depending on which player I am, so any advice on how to do this is much appreciated. Thanks!~

It would be helpful to clarify in the rules that breakthrough only happens when attack, not defending (similar to drain).