# Platinum Rift multiplayer contest discussion

Please post any questions you may have regarding the Platinum Rift contest. We’ll post information regurlarly to answer questions we see on the chat or that we get by email.

Happy Fighting!

3 Likes

Hi,

in the debug mode it would be great to the see links between the zones.
Sometime I ask me why a pod moves to this zone and not to another and I can’t see easy if there is an link or not.

Thanks.

There is a link between two zones when they share one side. So you’re supposed to see easily when two zones are linked on normal and debug mode.
Maybe have you some mistake on your displacement function?

3 Likes

Hi everyone,

I am coding in Python3 and I have a question for the Codingame team regarding the time limit to print the response :
Isn’t 100ms a bit short for this challenge considering the fact that the reading step only may endure more than 50 ms.

Here is the exemple code I used to test it because I was a bit surprised by the time my program was during :

``````import sys, math, time, functools, operator

playerCount, myId, zoneCount, linkCount = [int(i) for i in input().split()]
for i in range(zoneCount):
zoneId, platinumSource = [int(i) for i in input().split()]
zone1, zone2 = [int(i) for i in input().split()]

turn = 0
worstTime = 0.0
l1 = [1]*10
l2 = [i+10*(myId) for i in range(10)]

# game loop
while 1:
startTime = time.time()
platinum = int(input()) # my available Platinum
for i in range(zoneCount):
zId, ownerId, podsP0, podsP1, podsP2, podsP3 = [int(i) for i in input().split()]

endTime = time.time()
worstTime = (worstTime if (worstTime > endTime-startTime) else endTime-startTime)
print("Worst execution time   : " + "{:4.0f}".format(worstTime*1000), file=sys.stderr)

print("WAIT") # first line for movement commands, second line for POD purchase (see the protocol in the statement for details)
if (turn==1): print(" ".join(functools.reduce(operator.add,[[str(i),str(j)] for i,j in zip(l1,l2)],[])))
else: print("WAIT")
``````

I used it with this configuration :

``````distribution=MOSTLY_HIGH
platinum=120
seed=-565674201219254644
noEmptyIslands=true
startPlatinum=200
map=0 2 1 1 2 1 2 2 2 3 2 4 2 5 3 1 3 2 3 3 3 4 3 5 3 6 4 1 4 2 4 3 4 4 4 5 4 7 5 0 5 1 5 2 5 3 5 4 5 7 5 8 5 9 6 1 6 2 6 3 6 8 6 9 6 10 6 11 6 12 6 13 6 14 7 0 7 2 7 8 7 9 7 10 7 11 8 0 8 9 8 10 9 0 9 1 10 0 10 1 10 6 10 7 11 2 11 3 11 5 11 6 11 7 11 14 12 1 12 3 12 5 12 6 12 7 12 8 12 9 12 10 12 11 12 14 13 1 13 2 13 3 13 5 13 6 13 7 13 8 13 9 13 10 13 11 13 14 14 2 14 3 14 4 14 5 14 6 14 7 14 8 14 9 14 10 14 11 14 14 15 1 15 2 15 3 15 4 15 5 15 6 15 7 15 14 16 1 16 2 16 3 16 4 16 5 16 6 16 14 17 0 17 1 17 2 17 3 17 4 17 5 17 6 17 7 17 14 18 1 18 2 18 3 18 4 18 5 18 6 19 1 19 2 19 3 19 4 19 5 19 6 19 7 19 8 20 1 20 2 20 3 20 4 20 5 20 6 20 9 20 11 20 12 21 1 21 9 21 10 21 11 22 1 22 2 22 5 22 9 22 11 22 12 22 13 23 1 23 3 23 4 23 9 23 13 24 13
unitCost=20
richAmericas=false
``````

I used it with 4 players (4 times me) and I often have reading times over 60 ms for first and second players.
Thank you if you can help me on this point
PS : sorry for the reediting each time but I had trouble with the code formatting

1 Like

Your bot needs to complete its turn in 100 ms of CPU time, not real time.

3 Likes

Ohhhh than my code goes somewhere crazy.
Thanks

Just so you know, my code used to timeout when i keep producing bots even when i didn’t needed to and begin to move 1000+ bots at the same time

Tank you Florent, I understand better (and I guess time.process_time we help me more than time.time to better evaluate the performance of my algorithm)

Right now, the geometry of the map seems to be fixed. However, the rules indicate that it may change. When will it be decided whether the current geometry of the map will be the one used for the final ranking ? A strategy could depend on the map, that’s why it would be great to know more about this.

How are 3 and 4 player matches taken into account for the ranking? Does only the first player get points, or does it matter to be 2nd instead of 3rd?

How will the final ranking be computed?

Can we get more details about the distribution of the platinum on the map? E.g. what is the probability of having a “rich America”?

Thanks

1 Like

I start a battle several times in Manual Mode. I do not change seed or any other parameters but every run I get different outcome. Why?

vzverev: I think it’s because either you or your opponent use a little bit of random in your algorithm. I think “Default AI” use random a bit.

2 questions:

Is this solved ?

Victory by suicide seems unfair to me…

Is the 100ms limit something we can quantify inside the Answer code ? If I assert I always die at first turn (with cpp code : std::chrono::high_resolution_clock).

1 Like

Be careful of the fact that inputs aren’t available as soon as your program starts. When I tested this, I found I have to wait at least 300ms before reading anything. So you may want to assert this 100ms limit from the moment your first read returns, not before.

I have another sample of this bug: http://forum.codingame.com/t/platinum-rift-wrong-victory-when-strategy-produces-invalid-input/367/1

@vzverev: victory by suicide will be fixed tomorrow…

2 Likes

Hello,

do you (the staff) agree if I post a java tool which can give stats of any player by name?

stats are : the number of fights done, rank, and how many times the player was 1st or 2nd (in 1 vs 1) 1st, 2nd and 3th (in 1vs2) etc… for 1vs3 with percentages.

is it allowed?

3 Likes

personally I’d love that
cc @DorianWilde

2 Likes

Yes, for sure. We are happy to see third party tools that can help people!

We understood that it was important to have these stats. We are planning to integrate them directly in the website in a future update. But at the moment, I think that your tool would be welcomed by all players

ok great thanks

then here is the link to get the .jar
https://1fichier.com/?rwzni9te0j

launch it with the command : java -jar parserCGResults.jar nameOfThePlayer

if you prefer the web version (thanks to Tryum who converted my .jar in a node.js app) :

http://www.tibslab.com:3000/

1 Like