Platinum Rift multiplayer contest discussion


#21

Well, if it is open API that’s my solution:

Create a new shortcut in your browser with the title of your choice and the link:

javascript:(function(e,t){function n(){var e=document.createElement("script");e.type="text/javascript";e.src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js";var t=document.getElementsByTagName("head");t[0].appendChild(e)}function r(e,t){var n=$("#ide #hackContent");if(n.length<=0){n=$('<div id="hackContent" style="font-family: sans-serif; position: absolute; bottom: 0; background: #000; color: #fff; left: 0; max-width: 45%; min-width: 560px;"/>').appendTo("#ide")}$.ajax({type:"POST",url:"/services/PlayersAgentsRemoteService/findAllValidByChallengePublicId",data:'["'+e+'"]',success:function(r){var i=null;$.each(r.success,function(e,n){if(n.playerName==t){i=n}});$.ajax({type:"POST",url:"/services/PlayersAgentsRemoteService/findRank",data:'["'+e+'", '+i.candidateId+"]",success:function(e){var t='<div style="float: left; margin: 0 15px;">';t+='<h2 style="font-size: 15px; line-height: 20px;">Score: '+i.score.toFixed(2)+" - "+i.gamesPlayed.toFixed(0)+"%</h2>";t+='<h1 style="font-size: 22px; line-height: 33px;">Rank '+e.success.pos+"/"+e.success.total+"</h1>";t+="</div>";$.ajax({type:"POST",url:"/services/gamesPlayersRankingRemoteService/findAllByUserId",data:"["+i.candidateId+"]",success:function(e){var r=[{0:0,1:0,nb:0},{0:0,1:0,2:0,nb:0},{0:0,1:0,2:0,3:0,nb:0}];$.each(e.success,function(e,t){if(t.done&&$.isNumeric(t.position)){r[t.nbPlayers-2][t.position]++;r[t.nbPlayers-2]["nb"]++}});t+='<p style="line-height: 17px; font-size: 13px;">1 vs 1 ('+r[0]["nb"]+"): 1er:"+(r[0][0]/r[0]["nb"]*100).toFixed(1)+"%, 2eme:"+(r[0][1]/r[0]["nb"]*100).toFixed(1)+"%</p>";t+='<p style="line-height: 17px; font-size: 13px;">1 vs 2 ('+r[1]["nb"]+"): 1er:"+(r[1][0]/r[1]["nb"]*100).toFixed(1)+"%, 2eme:"+(r[1][1]/r[1]["nb"]*100).toFixed(1)+"%, 3eme:"+(r[1][2]/r[1]["nb"]*100).toFixed(1)+"%</p>";t+='<p style="line-height: 17px; font-size: 13px;">1 vs 3 ('+r[2]["nb"]+"): 1er:"+(r[2][0]/r[2]["nb"]*100).toFixed(1)+"%, 2eme:"+(r[2][1]/r[2]["nb"]*100).toFixed(1)+"%, 3eme:"+(r[2][2]/r[2]["nb"]*100).toFixed(1)+"%, 4eme:"+(r[2][3]/r[2]["nb"]*100).toFixed(1)+"%</p>";n.html(t)}})}})}})}n();setInterval(function(){r(e,t)},1e4);r(e,t)})("platinum-rift","Pirquessa")

Don’t forget to change the name at the end.

To use it, go to your IDE, click on the shortcut… TADAM, new content on the bottom left of the page !


#22

Well, it is not a completely an opened API (it is not documented and really subject to change in the future)

Knowing this, feel free to use ajax calls that can help you, but please, be nice and respectful with the server charge too. Do not overload it with too many unnecessary repeated calls else we will have to be more protective.

Anyway, we are happy to see all this creativity around the challenge :slight_smile:


#23

As the end of the challenge approaches, I find these questions very interesting… :slight_smile:


#24

hi all,

just for information, if you are an Android user, here is my app based on the java code I gave before.

it will give you basic stats information about your fights. also you can get information about any player with his username.

https://play.google.com/store/apps/details?id=com.fdg.AndroidCodinGame&hl=fr_FR


#25

Do you change some rules ? Or the following situation is a bug: http://www.codingame.com/replay/18692641 round 273, zone 76. The zone is mine, I have pods in it but I can’t move them to a linked zone, I get the error:

“3 76 88” is an invalid action: Cannot retreat from 76 to 88 as destination is controlled by enemy (and 2 additional errors of the same type)


#26

OK I found the rule… It sux :frowning:

Can you explain me what’s the point with it ?


#27

Hello FredTreg, what will be the number of match that will be played after solution submission ?

It seems that the position of my bot on the leaderboard becomes stable after around 400 matches.


#28

leaderboards by language here : http://samybob1.alwaysdata.net/codingame :wink:


#29

There is a bug in the platform. I noticed that sometimes the beginning of a move action is erroneously modified by the platform by adding some extra digits in front of the output.

Eg. My move output is 1 104 97 1 113 104 1 4 8 1 5 6 3 13 20 1 14 15 1 16 15 1 21 20 1 27 20 1 18 51 1 42 34 1 56 51 1 59 53 1 111 112 1 122 131 1 126 127 1 133 125 1 146 147

And what is actually displayed on the console output is: 113 104 97 1 113 104 1 4 8 1 5 6 3 13 20 1 14 15 1 16 15 1 21 20 1 27 20 1 18 51 1 42 34 1 56 51 1 59 53 1 111 112 1 122 131 1 126 127 1" 133 125 1 146 147

I wonder if there are any other cases like this…


#30

Hello,

just to answer comments on the Android App.

first: thanks to your comments and appreciations :slight_smile:

then I didn’t develop features as asked because I just didn’t have time for that. and because the contest is almost done.
At the begining it was an app for me, a draft. a try.
so there is no basics feature (check if network connection is available for example to prevent crash)

but since it’s quite appreciated I’ll develop a better app for the next contest. if you want it of course :wink:

(and excuse my english… not my favourite language ^^


#32

Hello everyone,
I’m working and the Platinuim 2 Rift for few days (awsome game by the way congrats :)), and i’ve notice something strange on the “Last Battles Panel” that computes your rank. For a lot of games, one of the two players don’t move at all with an output : “[Player Name] bides their time”. So I’m loosing & winning a lot of game just because one of the two player doesn’t move :frowning:
Have you heard about this problem ?
Thank you for your help and your time !
Bye


#33

That’s normal. When a player “bides their time”, it’s only because they sent “WAIT” on standard output.
I don’t see the problem, if he doesn’t move at all, you have the opportunity to conquer all areas and even kill all enemy pods presents. The only situation where you can loose is because you’re timeouting or sending wrong output, so it’s your fault.

And if there is no topic in relation with your problem, you should create one, because your question has nothing to do with this section.


#34

i think that Platinum Rift I/II Default AI is pretty low, i made my AI which is just not making errors in output (i mean does not try to perform illegal moves) and it beats default easily, and in leaderboard i get slightly lower than average
Default AI should really have average strength


#35

I have extremly strange bug using Python3 for Episode 2.

Here is my main loop code:

_, my_id, zone_count, link_count = [int(i) for i in input().split()]
strategy = Strategy(my_id, zone_count)
for i in range(zone_count):
    input()
for i in range(link_count):
    strategy.link(*[int(j) for j in input().split()])

# game loop
while True:
    strategy.new_turn(int(input()))
    print("BEGIN TURN!", file=sys.stderr)
    print(zone_count, file=sys.stderr)
    for i in range(zone_count):
        if i > zone_count - 5:
            print("WAIT FOR", i, file=sys.stderr)
        r = input()
        if i > zone_count - 5:
            print(i, r, file=sys.stderr)
        strategy.new_turn_data(*[int(j) for j in r.split()])
    strategy.after_turn()
    print(strategy.build_turn())
    print("WAIT")

It works great for the first turn, but on the second i have output:

BEGIN TURN!
150
WAIT FOR 146
146 146 -1 0 0 0 0
WAIT FOR 147
147 147 -1 0 0 0 0
WAIT FOR 148
148 148 -1 0 0 0 0
WAIT FOR 149

And wait infinitely for the last node.

Can anybody show me where is mistake?


#36

Found out that error output is buffered so I simply don’t see last prints. Error somewhere deeper in my AI logic.


#37

i honestly dont even know where to begin atm


#38

Spawn randomly, Move randomly is a good start. Then start to find a programming structure to store the map.


#39

Wouldn’t there be a problem with scala on this game ?
Even the default program finished often in timeout


#40

Defines “often”.

I played 20 games and got 0 timeouts with the default code.


#41

Do you change something for scala ?
Now, timeout disapear, and I win 100 places without change anything.