Chat:World/2020-05-14

From CG community
Jump to navigation Jump to search

VicHofs: Automaton2000 help me please

Automaton2000: it depends on the game

VicHofs: It's the Spring Challenge can you handle it? Automaton2000

Automaton2000: something to do with the way i have it

VicHofs: ...

VicHofs: yes?

SemChumboPT: Inky timed out ?!

VicHofs: yeah it happens sometimes

cegprakash: [CG]Thibaud I shared the company leaderboard in our official slack group that we are the only company from India in top 100

cegprakash: [CG]Thibaud they all got crazy

cegprakash: [CG]Thibaud and appreciated us

VicHofs: guys can anyone explain this

VicHofs: I tried to time my code because I was timing out right

cegprakash: and?

VicHofs: but apparently I'm taking over 100ms sometimes on my turns and not timing out at all

VicHofs: whereas sometimes I time out with a little bit over 50ms

VicHofs: my theory is that it sometimes considers the extra speed rounds but I'm not so sure; gotta run more tests

cegprakash: start ur timer after u read all the inputs

cegprakash: and stop ur timer before u print all the inputs

cegprakash: that should give u accurate timings

cegprakash: ignore the time for IO because IO is usually 0.000001 ms

VicHofs: after reading the inputs?

cegprakash: yes

VicHofs: doesn't the time while inputs are being read count though?

VicHofs: I put my time() after reading the input for the map, which happens before the start of the game

thethiny: nah

thethiny: I put my time() before the input

thethiny: and it says 80ms

VicHofs: what the heck

VicHofs: then something's definitely wrong here lmao

thethiny: I think the timer starts after you read the input

thethiny: in that case you can just hack it and do everything before you read

cegprakash: hey

cegprakash: CG isn't stupid

VicHofs: sup fam

VicHofs: yeah I think it's unlikely too

cegprakash: usually IO takes like 0.00001 ms

cegprakash: I'm sure they have some timeframe before which u have to read inputs quickly

cegprakash: if so I'll just add a Thread.sleep(1000) between reading every row

Icebox: IO does not take 10 nanoseconds, that's for sure

VicHofs: lol

cegprakash: I mean 0.00001 seconds

ZarthaxX: nice maths ceg

ZarthaxX: lol

Icebox: quickmaffs

VicHofs: 2 + 2 = 4

VicHofs: - 1

VicHofs: das 3

Icebox: QUICC MAFFS

VicHofs: everyday mans on the block

jrke: hey we use list.append(3,4) in python what is func in c++ is called

thethiny: vector

VicHofs: how dare you

thethiny: vector<int> myVector; myVector.push(int(3));

thethiny: smoke trees

thethiny: using SOLID Principles has solved way too may bugs in my code

jrke: whats push back func in c++ for BFS

VicHofs: thanks @thethiny

cegprakash: u mean pushing in a queue jrke?

cegprakash: u need to use queue<int> Q; and use Q.push(x);

cegprakash: if u are using vector jrke u need to use push_back(x)

cegprakash: vec.push_back(x)

jrke: but it just push one int

jrke: i have to q.push(4,5)

Default avatar.png TheManeatingFirefighter_41e2: Hi all, o

cegprakash: u can use a pair jrke

cegprakash: or a point class

cegprakash: if u have a Point class like class Point{

 int x; int y;

};

cegprakash: then u can do q.push(p)

cegprakash: if u are okay with pair

cegprakash: use pair<int, int> p;

cegprakash: and do q.push(p)

jrke: K

jrke: thanks

thethiny: @VicHofs lol thx for what

thethiny: guys when I'm using BFS, should I check the nearest point every turn, or should I do that once and just move until I reach it?

VicHofs: cooperating

VicHofs: snike trees

VicHofs: *smoke

VicHofs: gee

VicHofs: I'm slow today

fasil: heheee

thethiny: haha

VicHofs: see your girl in the park

VicHofs: that girl is an uckers

VicHofs: when the ting went quack quack quack

VicHofs: u man were ducking

cegprakash: https://www.codingame.com/share-replay/463321749 Omg Kovi turn 28

cegprakash: no wonder he is #1

VicHofs: what happened there'=

VicHofs: did your pac move back and forth?

cegprakash: he did not go to his closest pellet

cegprakash: instead he was chasing me

cegprakash: only pros know when to chase and when not to chase

cegprakash: I am no pro

VicHofs: oh ok

VicHofs: cause I have the chase function too

VicHofs: but it's an all or nothing thing lol

eulerscheZahl: ceg i think he just wanted to look around the corner

eulerscheZahl: and your noobie but accidentally collided

cegprakash: he doesn't do future prediction?

cegprakash: coming up is definitely a bad move

cegprakash: if he has a sim

NapTown: his message changed when it saw you

**DeWill slaps NapTown around a bit with a large fishbot

NapTown: and again when you died

kovi: yes, its not pure luck

VicHofs: what the heck

VicHofs: DeWill ??

DeWill: sorry just trying something new NapTown... :)

NapTown: :D

NapTown: it felt great

cegprakash: what is DS and what is ST :O

cegprakash: kovi using cheat codes

eulerscheZahl: but ceg did a really dumb move here. i don't think that he assumes a dumb opponent in his prediction. would waste too many turns against good players

shashwat986: The collision seems accidental, but I'm not sure about looking around the corner either. Because there are definitely no pellets there, based on an opponent coming from there

shashwat986: I've understood DS to mean double-speed? Not sure what ST is

eulerscheZahl: true. no idea what he was thinking

thethiny: DS is Depth Search probably

thethiny: ST = Set Trap?

eulerscheZahl: or maybe it's random letters to confuse us :D

NapTown: that it is not

cegprakash: I don't track opponent positions yet eulerscheZahl

cegprakash: may be that's the diff between top 20 vs rest

kovi: sometimes my trueskill got lowered with a win vs. lowbie, is that normal?

eulerscheZahl: yes

eulerscheZahl: it's designed for real players. and the system assumes that you are at least that good

eulerscheZahl: it's possible that you got worse but still beat the noob

eulerscheZahl: it's even part of the FAQ of the trueskill site

Durkin: ah shoot, finally got my collision pathing fixed but still 19 from gold, just gotta' squeeze that last bit out of this man

Default avatar.png jdsfklsd: Yo so what's this about a spring challenge?

Durkin: competitive pacman AIs xD it's a lot of fun-https://www.codingame.com/replay/463245297

thethiny: guys my BFS distance from point A to point B is not the same as from B to A

thethiny: what did I do wrong

NapTown: how far off are they

thethiny: I'll send replay

thethiny: https://www.codingame.com/share-replay/463327353

thethiny: 😭

thethiny: frames 40+

thethiny: infinite loop

thethiny: maybe I should swap Flood Fill with shortest distance?

Ltrltrltr1234: Are yall good at clash of code? Can someone challenge me?

Ltrltrltr1234: https://www.codingame.com/clashofcode/clash/12202802c06c7ea76c4cb0043fd3bdf1c716185

eulerscheZahl: you can challenge us by playing the contest

thethiny: hahaha

Dav1dS: @thethiny are the numbers in brackets the bfs from a to b and bfs dist from b to a?

thethiny: what do you mean

Default avatar.png nguyenchithanh: elca

eulerscheZahl: it's his location

Dav1dS: oh lol

JohnCM: @thethiny

guys my BFS distance from point A to point B is not the same as from B to A

JohnCM: did you forget to add to the visited nodes list?

thethiny: From (19, 9) To (6, 1) Distance 114 From (6, 1) To (19, 9) Distance 117

JohnCM: if a node is visited, you shouldn't expand it out in the bfs loop

thethiny: I have a visited list and it's working fine

thethiny: that's what I don't get

JohnCM: hmm..

JohnCM: perhaps your bfs takes into account other pacs as well inside the calculation?

JohnCM: and sometimes there is a collision in one direction vs no collision in the other?

thethiny: I didn't add collision detection yet

NapTown: print the path and see what's happening

thethiny: I'm doing flood, so it's not one path

aCat: yeah clashes...

thethiny: I'll print the grid that it generates

JohnCM: hmm you should just print the path based on parent of the node

Default avatar.png AndroidGoku: Bring it on !!

aCat: soryy - I was writing to some older history chat showed me

JohnCM: for each node, store the parent which is the previous node

JohnCM: then you can backtrack the entire path

JohnCM: it works even if you're doing flood fill as you can backtrack

thethiny: I don't think I'm following

thethiny: I understood that you want me to check once I reach the path who are the parents

thethiny: and make a path from them

thethiny: right?

JohnCM: ya

JohnCM: means like from maybe node 3 to node 6 the path is

thethiny: I will see, thanks

JohnCM: 3 -> 4 -> 5 -> 6

JohnCM: then you should print the path from 6 to 3 also

JohnCM: 6 -> 5 -> 4 -> 3

JohnCM: if there's any discrepancy, we then know what is wrong with the bfs

JohnCM: perhaps your bfs is not handling a roundabout correctly etc.

JohnCM: roundabout as in a passageway which loops

thethiny: 6 5 3 4 -1 1 2 1 0

thethiny: this is the grid

thethiny: it shows 0, 1, 3

thethiny: which is wrong distance calculation

JohnCM: what is the left side?

JohnCM: 6 5 etc.

thethiny: I'm testing it on a 3x3 grid

thethiny: and this is what it prints

thethiny: the distance calculation is wrong

thethiny: it should be

thethiny: 4 3 2 3 -1 1 2 1 0

JohnCM: hmm i am not sure what is the 3x3 grid calculating

JohnCM: ah.. the centre is a wall is it

thethiny: yes

JohnCM: and you start from bottom right and count to top left

thethiny: yes

JohnCM: i got your problem

wi_lius: how do you calculate the distance for a cell? `parentDistance + 1`?

JohnCM: you didn't store a node.cost in your node

JohnCM: and when you expand that node, the next node's cost is node.cost+1

JohnCM: don't use a global cost incrementer

thethiny: oh no I didn't

thethiny: I used global distance variable

JohnCM: must add one cost for each node you expand based on the previous node's cost

thethiny: thinking of it, I don't have F = G + H

JohnCM: ya just implement a node.cost variable for each node and you'll be fine

thethiny: so I will have to make a Point object, thanks

JohnCM: then when you hit your desired node.. then break the loop to avoid calculating everything

JohnCM: this is called "early stopping"

JohnCM: saves lots of time

thethiny: I'm trying to calculate everything in frame 0

thethiny: so that I don't calculate it next turns

thethiny: Thanks JohnCM, I will add nost cost

thethiny: node*

JohnCM: np

JohnCM: haha anyway i've run out of ideas to implement

JohnCM: now it is just finetuning my model by adjusting parameters

thethiny: good luck!

JohnCM: but haha the top 100 ppl are really hard to win

Default avatar.png TrueBlur: How do you get harder questions on clash of code?

JohnCM: i optimize to some, i lose to the rest

thethiny: Let's hope for the best

JohnCM: are you in silve now thethiny?

JohnCM: oh haha nvm abt that qn

JohnCM: all the best for the coding

thethiny: I didn't submit anything for 5 days now :(

thethiny: at least I'm learning new things

thethiny: which is good

thethiny: From (19, 9) To (6, 1) Distance 122 From (6, 1) To (19, 9) Distance 122

thethiny: :D

thethiny: no it didn't work well

thethiny: 9 7 4 5 -1 2 3 1 0

thethiny: but how is it the same distance I don't understand

Doju: heyy everybody

BenWo: heya Doju

CoolGlitch: guys I think there a problem, most of the times when I read the pacs they feed me, some times they give an opponent pac but the mine flag is True, and they don't give me pas that faces is

jjdb210: You sure you aren't sharing ids? enemy's and good's have have the same id which can cause problems.

CoolGlitch: is it supposed to work like that?

Doju: how do you guys handle smarter pathfinding so you don't collide?

jjdb210: The data they are sending is almost certainly correct (or all of our bots wouldn't be working and you'd see more people mentioning it)... Odds are it's something with how you are parsing the data in.

BenWo: yeah, it's an ID per player

BenWo: I don't care for it either

Doju: i have an idea what i should do about it but no idea where to put that idea

Doju: pac class? universe class? maybe even grid??

BenWo: all my pathfinding stuff is currently in the Pac class

BenWo: but it's due for an overhaul

Doju: Huh.

BenWo: think I might create a "Brain" class

wi_lius: you need a God object

Doju: ohhh

thethiny: I FIXED MY BUG UGH

thethiny: I was updating the function BFS

Doju: so that all pacs belong to the god?

thethiny: but I was calling DFS

thethiny: UGHHHHHHHH

Doju: lol

Doju: well

thethiny: at least it works now

Doju: at least it's fixed now :P

thethiny: finally

thethiny: I can beat Inky

wi_lius: https://en.wikipedia.org/wiki/God_object

thethiny: technically I can't cuz idk how to move 2 everytime with speed

JohnCM: all the best thethiny

thethiny: thank you JohnCM so much for the help

JohnCM: @thethiny, that is easy to do

JohnCM: instead of returning the node.parent, return the node.parent.parent

JohnCM: if it is None, then return node.parent

thethiny: hmmm

JohnCM: basically, return 2 searches from your pac position

JohnCM: not one

thethiny: okay 2 searches will work

thethiny: thanks!

thethiny: I'll search for 2 if it works, else 1

JohnCM: ya

JohnCM: or if you find it difficult to do so

JohnCM: just ask the pac to go to the end goal

JohnCM: don't need to care about the intermediate step

thethiny: my problem is when I'm next to a surrounded block

JohnCM: i think you should be able to get to silver even without intermediate pathfinding

Doju: hm, isn't a god object.. a bad thing? wi_lius

BenWo: lol according to that wikipedia link it's not great

JohnCM: hm what do you mean by surrounded block?

thethiny: example, if I'm at 21, 9 and I need to go 21, 10 https://www.codingame.com/replay/463339201

NapTown: it will still go there, you'll just have to stop on the speed round before coming back

JohnCM: yea for speed wise

JohnCM: you can't do double step in and out

JohnCM: which is a real constraint

NapTown: because you can't change destination

JohnCM: well sometimes i pass by an alley full of pellets, but because it is not in my speed turn, i don't see it

wi_lius: @Doju in real world software engineering - yes. When you need to hack something together that works, might as well skip all the concers where to put what and have everything in a single place

JohnCM: they really should let you see all the pellets your pac passes by

JohnCM: my algo will improve tremendously with that

Doju: wi_lius that's a solid argument. I'll consider just shoving everything in the same thing if i don't find any better solution soon

Doju: thanks

Doju: JohnCM you don't?

Doju: whatt

NapTown: JohnCM that's part of the challenge but yeah it would be easier

Doju: so if you speed through an intersection you don't get info on it

wi_lius: @Doju that's what I do with Scala: a few data classes and one more class with all the methods

NapTown: if it's the speed round you get no input, hence no info

Doju: wi_lius okay, sound reasonable

JohnCM: ya i was watching a replay of mine against kovi

JohnCM: i lost by 1 pellet

Doju: right, NapTown.

JohnCM: and that was the reason

JohnCM: haha

JohnCM: now we're talking about 1-2 pellet difference for the bots to determine victory

BenWo: time to explore new strategies

Zandy156: I feel like I'm just telling my bot what not to do and hoping it understands and stops doing it.

NapTown: i thought about syncing the speeders with the intersections but haven't gotten to it, and won't

Doju: NapTown that's basically the idea that i'm gonna try to do

JohnCM: well there's one suggestion i have for a mediocre bot

JohnCM: eat whatever pellets you see next to you, until unable to. then go back to spreading yourself out

JohnCM: but haha it is still an art to decide which pellets lead to higher returns in the long run

NapTown: a good starting point

Doju: ah this is so wonderful

Doju: instead of adding actual tuples to my pos his

Doju: i can now just throw the cells themselves there

Doju: and it'll just work <3

NapTown: nice

BenWo: that sounds lovely :)

thibpat: Hi :wave: It's :sparkles: Spring Challenge time :sparkles: with a focus on better pathfinding in JavaScript https://twitch.tv/thibpat

JohnCM: nice one thibpat

JohnCM: do you do regular streams of this?

thethiny: yes

thethiny: he keeps doing this every few days

anid: Any idea who the silver boss is?

thethiny: it's me!

NapTown: Clyde

Default avatar.png WINWINWIN: I am attempting to log into discord but I am getting this error:

Default avatar.png WINWINWIN: new login location detected

thethiny: go to your email

thethiny: and allow yourself in

Default avatar.png WINWINWIN: Thanks thethiny

351062: kovi : do you use a fancy enemy tracking with some kind of brute-force or some basic floodfill stuff ?

kovi: multiple heuristic

Neumann: would you classify those as "brute-force" ? :D

kovi: nope

Neumann: dayum

JohnCM: should be something based on countdown and speed if i may guess

JohnCM: i have been trapped at the start of the game before after transforming

JohnCM: haha.. it is not bad

solaimanope: why does so many top contestants use C++?

aCat: because its fast

lifetimeLearner007: yeah, I've that question too

solaimanope: Currently Top 10 has 9 C++ users

aCat: and they have high-level proficiency in it

lifetimeLearner007: either top contestants use c++ or only c++ users get to be in top 10... which one is it?

Durkin: Doesn't hurt that you've got a lota' colleges that teach that as the primary starter language either

solaimanope: I am better at C++ than Java. But I don't have the confidence to manage a code this big in C++.

NapTown: probably the top contestants choose a fast language

JohnCM: oh shouldn't it be the case you should use the langauge that you are confident in

MattSOrme: watching kovis bot is like watching a master class in what i want mine to do

lifetimeLearner007: but the speed of cpp makes a difference in top leagues i think

solaimanope: Kovi are you doing some sort of simulation?

lifetimeLearner007: monte carlo maybe?

kovi: not real one, just many partial heuristics

kovi: no monte carlo (yet)

Neumann: :o

solaimanope: I am struggling in defense.

eulerscheZahl: i did not expect that answer

lifetimeLearner007: :no_mouth:

jrke: hey anybody knows how to return two or more variables from function in c++?

solaimanope: use tuple and tie()

kovi: its easy to see that im fully deterministic

Neumann: return an array, a vector, or a custom class

jrke: K can i return pair

lifetimeLearner007: or u can pass an mutable argument

eulerscheZahl: i'm deterministic too. yet i have a search

kovi: oh, i said you surprised on no monte carlo

eulerscheZahl: being deterministic just simplifies debugging

eulerscheZahl: surprised on no search

eulerscheZahl: i don't have monte carlo either

eulerscheZahl: discarded the idea

kovi: i didnt say i have no search, i said i have no full simu

lifetimeLearner007: there's the catch

eulerscheZahl: ok. i don't have that either, regarding collisions

TrentT: Wow finally rank 1 in bronze

TrentT: Too many dumb assumptions

lifetimeLearner007: well done TrentT

solaimanope: I still haven't got out of the BFS that I wrote on day 1. I wanted to do some simulation, but the time limit may not allow it.

Default avatar.png ashikujjaman: can I play my bot with diffrent levels bot?

lifetimeLearner007: that's why they have time limit for each turn

Icebox: Anyone has gotten brutaltester to work for this contest?

Default avatar.png WINWINWIN: @Icebox what does the brutaltester do?

Icebox: It tests

Icebox: quite brutaly too

solaimanope: brutaltester needs a referee right?

Icebox: it's a tool for playing games offline

Icebox: yeah solaimanope

solaimanope: has anyone made the referee yet?

Icebox: yes, the contest creators

Icebox: :D

Icebox: https://github.com/CodinGame/SpringChallenge2020

dbdr: eulerscheZahl why so much hate?

thethiny: what is brutaltester

eulerscheZahl: the referee is public. but needs a few modifications for the brutaltester

eulerscheZahl: huh?

NapTown: cool map: seed=-6738813856712879100

eulerscheZahl: did i say anything wrong?

solaimanope: has anyone made the modification? It would be helpful

solaimanope: I am in top 10 for a few moments :D

dbdr: https://i.snipboard.io/jc9CIu.jpg eulerscheZah

eulerscheZahl: oh, the evil toad

eulerscheZahl: but i'm not going up

solaimanope: from Futurama

dbdr: oh, one draw. and just won now :D

kovi: oh, daiver19 is also toad

MSmits: seems like it matters a lot who submits

JohnCM: haha euler keeps trapping my pieces

eulerscheZahl: i'm sure you deserved it

MSmits: euler is a killer bot and pulls me down

eulerscheZahl: for not being careful

MSmits: my bot is stupid when it comes to trapping and being trapped

eulerscheZahl: for being trapped i agree

MSmits: how so

JohnCM: haha but i am winning in cases when you trap and miss the super pellets

MSmits: it doesnt trap anyone

eulerscheZahl: https://www.codingame.com/share-replay/463356697 frame 38...

JohnCM: so you gotta watch out for those cases

kovi: same here. i have no self tracking

eulerscheZahl: i escape and then return to the danger

MSmits: I fixed that for my bot

MSmits: its the one thing on my bot that was easy

MSmits: on my list

MSmits: just look back 1 turn see if somethign was there

eulerscheZahl: i prefer generic solutions

MSmits: sure me too, but it's not always possible for this contest

eulerscheZahl: :(

MSmits: if you floodfill the opponent from the moment he disappears, your pac will freeze

kovi: yep, its much shorter than ooc

MSmits: he wont be able to go anywhere

MSmits: so i look 1 turn back. 2 might be worth it

dbdr: here is a bug I need to fix: https://i.snipboard.io/KEOfVw.jpg

solaimanope: dbdr how did you test?

dbdr: it's a unit test

Tiramon: kill_eueler is a nice testcase

kovi: maybe its just flaky

solaimanope: are you testing it locally?

lifetimeLearner007: kovi, being the top guy, how much time per day are you spending for this contest? I'm curious to know.

dbdr: yes, solaimanope

kovi: too much...not always actively, but starting new test or submit

solaimanope: Is there any feature in CG to filter out games which have failed and caused a timeout?

eulerscheZahl: no

solaimanope: It would have been helpful if they added it.

Doju: solaimanope that'd be superr handy

kovi: use euler tooling

eulerscheZahl: i found no timeout in 121 matches for you solaimanope

kovi: or ask him :)

solaimanope: thanks euler

eulerscheZahl: ocean of code was fun regarding timeouts

solaimanope: how to get this tool?

Doju: yeah how can we use it?

thethiny: 4 days left

thethiny: :(

eulerscheZahl: https://eulerschezahl.github.io/OceanOfCode/ooc_stats.html that's timeouts in legend league after a full month of contest

eulerscheZahl: i didn't publish the tool, as you have to download each game individually. stressing the servers

Doju: okay

eulerscheZahl: but check https://www.codingame.com/playgrounds/53705/contest-tools-and-workflow/introduction

eulerscheZahl: gives you the introduction to do it yourself

Doju: sure, thanks eulerscheZahl

solaimanope: thanks!

Doju: Oh there's even python code handy

Doju: nice

eulerscheZahl: which you can run in the browser :tada:

thethiny: #30/2461 without submitting, this is bad

eulerscheZahl: tech.io supports docker, so you can pretty much add whatever you want

eulerscheZahl: pretty cool. to bad we don't have that for codingame

cegprakash: 10% mutation choice performing too bad

cegprakash: my previous mutate full sim performs better

solaimanope: are you doing Machine Learning?

eulerscheZahl: i bet genetic algorithm

eulerscheZahl: but he won't succeed

tekki: hi all

Doju: hi

Rprades: I tried genetic also, but could not fine a good option (rank 66 atm)

Default avatar.png jdsfklsd: For clash of code I noticed that python has an edge when it comes to string manipulation problems compared to c++

Doju: isn't python pretty damn good for clash of code since performance is not an issue?

Default avatar.png jdsfklsd: but i dont like using python so rip

thethiny: true

cegprakash: I won't succeed? eulerscheZahl? I'm already on gold

cegprakash: and my best rank was 110

eulerscheZahl: oh, you call that success?

eulerscheZahl: but admittedly better than your usual struggle with the lower bosses

Icebox: xD

Doju: lol

TinfoilSaint: sik

cegprakash: :'(

cegprakash: roasted

[CG]Thibaud: you have a brother eulerscheZahl : daiver19

eulerscheZahl: i know. he's doing well on topcoder

eulerscheZahl: https://www.topcoder.com/challenges/30122730?tab=submissions beating me there :(

cegprakash: https://www.codingame.com/share-replay/463382833 eulerscheZahl timeout

eulerscheZahl: i know ceg, this submit is broken :(

cegprakash: u always timeout against me

eulerscheZahl: was an infinite loop in my new feature

eulerscheZahl: tested one match. and it was that one "lucky" game where it didn't fail

cegprakash: I want to find the intersection of two points given that the distance between two points is 2

Rprades: does anyone know how many usually are promoted to legend? is it around 10-20, or more around 50? it is my first "serious" contest here, so thinking about it!

Quidome: The last time it was 10

Default avatar.png alexandreb09: Hu guys, does anyone can help me with Winamax Sponsored Contest puzzle ?

cegprakash: it could be x1,y2 or x2,y1 or (x1+x2)/2, (y1+y2)/2

cegprakash: anything else I'm missing

Quidome: eventually ended up around 70 players in legend

Durkin: God i'm so confused- must have added something stupidly tiny but important 3 hours ago, because reverting promoted me from 170 to Gold, and I cant find what changed for the life of me

Rprades: Thanks Quidome

solaimanope: Quidome around how many games are played in legend league for ranking?

Quidome: ¯\_(ツ)_/¯

jrke: hey whats wrong in these two lines c++

solaimanope: I couldn't qualify for legend league in my last participation. I was frustrated from all those traps.

Quidome: legend is tough

Quidome: never been there :)

AntiSquid: only twice, im bad :/

fasil: y u here

Quidome: cegprakash if it is distance 2, it can be around the corner...

Quidome: so you could end up with .5 in x or y direction

perseverent: how do I know one of may pac has died

Doju: perseverent if it's not visible it's dead

cegprakash: perseverent u don't get in input

Doju: and in silver and above you also get dead pacs in input

Quidome: Your pac is no longer on the list or hast status DEAD

AntiSquid: lol feels like a CSB rule

Quidome: Don't know which one actually, because i filter the dead

perseverent: I am sure I receive ifo about the dead one

perseverent: info

perseverent: funny

perseverent: maybe a bug

Quidome: OK than type is DEAD

AntiSquid: because you are in silver .

Quidome: Only in silver and up BTW


Quidome: :)

perseverent: oh

perseverent: I see

perseverent: thanks

perseverent: is is in the rules?

Quidome: yes

sgalasso: Hello everyone, is there 12 996 players or 4452 on the challenge I don't get it ?

perseverent: typeId

Quidome: 4452 submitted

perseverent: I missed that

perseverent: OK

perseverent: thanks

sgalasso: Oh ok tks

Quidome: still an awfull lot :)

sgalasso: Yes yes ^^'

Quidome: cegprakash you there?

Tiramon: almost 13k registered and around 4.5k submitted a bot sgalasso

cegprakash: yes Quidome

Quidome: solved your middle problem?

Quidome: I am needing that too :)

cegprakash: I don't want middle I want intersection of two points :D

cegprakash: so I was trying 3 intersections

Quidome: What do you mean by intersection of 2 points?

cegprakash: http://chat.codingame.com/pastebin/52737673-bd3a-4bf9-a71a-5a79b8d1dd47

cegprakash: there are 3 possible intersections for A and B

Quidome: I got invalid paste on that

cegprakash: A#

  1. B

cegprakash: and

cegprakash: A

B

Quidome: yes, exactly

cegprakash: anything more?

cegprakash: or just 3

cegprakash: x1, y2 x2, y1 mid point

cegprakash: I tried these 3

Quidome: well the horizontal one, but that's sort off the same

Quidome: and btw, one of the two diagonal ones is alway a wall

Quidome: funny was looking at this also :)

Quidome: But we sorted it out\

Quidome: thnxs

cegprakash: cool

Quidome: you don.t need the divide in the diagonal case

Quidome: (x1, y2), and (x2, y1) will do

cegprakash: yes

cegprakash: do u precompute these

Quidome: no

cegprakash: or calculate dynamically

krawacik3: Anyone considered min-max algorithm?

Quidome: i use min_max on one move

eulerscheZahl: too high branching i think

Quidome: with a lot of pruning

Quidome: and grouping

Quidome: was a lot work

AntiSquid: contest got very difficult, hard to move forward

Quidome: what's your position?

eulerscheZahl: then turn around and collect the pellets in a different row

krawacik3: I mean, its really high complexity, but maybe someone uses it for at least 4-5 generations

AntiSquid: somewhere 80 to 100 Quidome ?

Quidome: oh, yes, I am struggling to get into gold :D


JohnCM: wow i added one modification and now i'm top 50

Xoangur: ): I'm struggling to get into silver

JohnCM: actually i removed one modification

JohnCM: lol

AntiSquid: i am struggling to get top 50 :(

Quidome: JohnCM :thumbsup:

AntiSquid: again

JohnCM: counter-meta, works well against euler's bot

AntiSquid: lol

AntiSquid: ah you caught euler in a bad spot on the leaderboard

Default avatar.png jdsfklsd: bruh i suck at c++ for these challenges

Default avatar.png jdsfklsd: if i have to convert a string to int that's a wrap for me

AntiSquid: oh so Neumann did join afterall

Neumann: o/

eulerscheZahl: and with his main account now

AntiSquid: how high was your alt before you joined?

eulerscheZahl: oh, this submit is running good... or lucky?

JohnCM: i guess lucky

Neumann: I was 30 on my alt

Tiramon: great last ideas i have to improve are all hard one ... increase performance of search, predict pellets eaten by opponent ...

eulerscheZahl: what is your alt?

ShannonNorris97: Do any of the high level bot programmers on Codingame have Youtube Channels? I'd be curious to see what their code looks like across the various competitions/competitive modes. It's probably not in their best interest because of potential code copying, but I thought it was worth asking

JohnCM: oh i'm talking abt my submit, not neumann

Neumann: My alt shall remain secret

AntiSquid: obv hard to tell if lucky or not, i don't know if my current submit is an improvement or pure luck :/

eulerscheZahl: i want to know whom i don't have to fear anymore

AntiSquid: you're at 2 euler

Neumann: Don't worry it sleeps in the bottom half of silver league

eulerscheZahl: as i said: submit doing well so far

eulerscheZahl: or lucky?

eulerscheZahl: but i improved the bot, not just resubmitting

AntiSquid: thought you talk about john since he replied

eulerscheZahl: no. i do it like others and just talk about myself

Neumann: Feel free to talk about your enemy tracking

JohnCM: wow euler

Neumann: i'm struggling on that

JohnCM: i wanna see how well mine does against your new bot now

eulerscheZahl: same

eulerscheZahl: tracking is a pain

AntiSquid: is enemy tracking required for top 30-50 or what

JohnCM: next up i'm gonna implement some trapping already XD

JohnCM: payback time

Neumann: Maybe I also should code a proper search instead of a naive depth 1 heuristic

Default avatar.png WINWINWIN: eulerscheZahl nearly 1st?

eulerscheZahl: finally something seems to be working \o/

JohnCM: depth 1 heuristic can't go far

eulerscheZahl: i can smell legend league already

AntiSquid: magically got into top 50

JohnCM: :) i knew it euler, always had faith in your bot

Tiramon: grats AntiSquid ;)

JohnCM: i've been training against yours since day 1

AntiSquid: thx but it's not enough

Ramzel: What is the Memory limit?

eulerscheZahl: 768MB

AntiSquid: i still have two major bugs in my bot which i am aware of, so does that mean everyone around my rank has some ridiculous bugs in their bots?

Ramzel: U mean euler walk in dfs tree or euler cycle? :D

JohnCM: i think by sat/sun most bugs will be gone

AntiSquid: you'd think so

lifetimeLearner007: what is depth1 heuristic?

cegprakash: https://www.codingame.com/share-replay/463410075 frame 16 omg kovi

Tiramon: damn gold has so close matches ... https://www.codingame.com/share-replay/463365572

AntiSquid: just plan 1 turn ahead lifetimeLearner007

eulerscheZahl: ceg that frame 16 isn't even that brilliant. you could just move instead of SPEED

eulerscheZahl: then you win the row of pellets

Tiramon: what depth are you guys using currently?

lifetimeLearner007: thanks AntiSquid. But then how does planning few moves ahead help? we don't know what commands the opponent is gonna make right?

cegprakash: eulerscheZahl meant about my death

AntiSquid: indeed Tiramon lots of losses are just by 1-5 points diff

eulerscheZahl: i think the smartest move is to just keep bumping

eulerscheZahl: me too. he converted to scissors and you lost

cegprakash: yes but why did he switch

AntiSquid: i call mine depth 0, no depth guaranteed Tiramon

cegprakash: how did he know I was a paper

cegprakash: I was in the fog

llllllllll: you bumped

eulerscheZahl: you colldided

cegprakash: oh damn

cegprakash: so what do I do?

cegprakash: u said smartest move is bumping

cegprakash: but I lost there

eulerscheZahl: you keep moving and don't speed

AntiSquid: everyone top gold does the switch i think ceg

Tiramon: keep the cooldown for a switch when bumping

eulerscheZahl: then you reach the collision cell 1 turn earlier

eulerscheZahl: so he can't kill you

Default avatar.png WINWINWIN: Well done cegprakash

Csipcsirip: I don't switch yet at all

eulerscheZahl: i only do when it's a 100% kill

eulerscheZahl: if you see me switching without killing, it's a bug atm

Ramzel: What is bumping

llllllllll: collision

Tiramon: 2 pacs collide and stay where they were

Ramzel: Ok thanks

eulerscheZahl: i like the word bump

JohnCM: lots of losses are 1-5 points difference unless you get eaten up by euler

eulerscheZahl: yeah, thiny differences in harvesting are quite important

eulerscheZahl: coordinating your pacmen and guessing where the opponent has been

JohnCM: wow i never thought i would see this day of top 50

eulerscheZahl: yet you are top40 even

JohnCM: haha i feel satisfied alr abt the progress in this comp. legend or not. this is a personal accomplishment

JohnCM: how?? this small tweak is so good?

JohnCM: it improved 100+ places

eulerscheZahl: you are doing well for your first contest

JohnCM: thanks

[CG]Thibaud: true

JohnCM: hope to code something in C++ next time for monte carlo

eulerscheZahl: i remember my first: was doing well to a certain point. then i just dropped and couldn't improve no matter what i was trying

JohnCM: thanks thibaud

Ramzel: Guys, do u know sth about neural networks in this game?

Ramzel: It should be the best.

Ramzel: Does anyone do sth like that?

JohnCM: don't think it works cause of variable size boards and pacs

eulerscheZahl: too complicated and high uncertainty of what's going on

JohnCM: unless... you train the neural networks for all maps

JohnCM: which is a hell of a task

eulerscheZahl: there are some games where a neural network is dominating, e.g. coders strike back

JohnCM: i guess being symmetrical it reduces the board possibilities

JohnCM: but still there are so many

JohnCM: i would think GA would be a better bet

JohnCM: you control how risk taking each PAC is

Ramzel: Yeah but as input to nn u can just put the close location of each pac

Tiramon: Oh i guess a NN would work, but you have to trains it alot, also you would have to give all weights to the CG IDE, and the ide has a size limit for code can remember someone complaing that his weights were to much ;)

cegprakash: 4% caliberated to #46 adding that anti bump

cegprakash: eulerscheZahl

JohnCM: well technically you could hard code your weights in as a hexadecimal string

Tiramon: even then you will need more than 10 weights ...

Tiramon: and each weight will a few characters

Tiramon: *will need

JohnCM: well last i checked the most complex neural networks need about 1 million weights

JohnCM: now maybe more

JohnCM: so 1 million * double memory space (64 bits)

JohnCM: maybe 64 million bits

eulerscheZahl: hexadecimal? how inefficient :D https://github.com/pb4git/Nash-DQN-CSB-Article#passing-the-100ko-code-size-limit

JohnCM: wow base 85 nice

Tiramon: last size limit i know is at 100k

eulerscheZahl: and the limit is 100k chars, not bytes. so some use fancy unicode

hearthewarsong: How are the final result calculated? If I get into legend ( probably I wont), do I only play against other legends players? For example if I end up with 2 ai. One with 40% winrate against top players, and 99% agaist weaker, and an other with 45% vs top players and 90% vs weaker players, which one is better at the end of the contest?

eulerscheZahl: trueskill ranking matters (you can google that)

Tiramon: for multiplayer scores the 'True Skill' algorithm of Microsoft is used http://bit.ly/TrueSkill


eulerscheZahl: and for legend there will be a final rerun, giving everyone about 1k extra battles

eulerscheZahl: to stabilize and counter lucky submits

Tiramon: and yes if you are in a league, you only play against players that are also in that league

eulerscheZahl: and for gold and below it's just finished pending submits and calling that the final leaderboard

eulerscheZahl: you can still promote after the contest ends and get more battles in the higher league

Ramzel: visited[u.x+vx[g]][u.y+vy[g]]=true, from[x][y][u.x+vx[g]][u.y+vy[g]]=u, cost[x][y][u.x+vx[g]][u.y+vy[g]]=cost[u.x][u.y]+1, q.push({u.x+vx[g], u.y+vy[g]});

Ramzel: need to Find bug in this spagetti

AntiSquid: ramzel you could use the maximum possible board size as input but then you have a lot of empty cells ... maybe you'd have to look into convolutional neural networks and it gets complicated and it's a lot of work, but yes sure possible if you spend time on just doing that, but no idea how you upload your bot to CG afterwards

Ramzel: Thanks for so much feedback. But I was only asking. I dont have anough time to write nn

AntiSquid: lol

AntiSquid: no ambition Ramzel

Ramzel: ;c

Tiramon: oh and about your line of ... what about making more than one line out of that?

Clagus: it's impossible to tell, which way an enemy pac has gone right? and also when it's using Speed, he can rush in front of you, cross your view, and didn't get noticed right?

Ramzel: I did it :D

Tiramon: even saving vy[g] into a seperate var should make it easier readable

Tiramon: Clagus you know where he is able to got and when you see one of those locations and he is not there you can reduce the amount of locations where he can be

Tiramon: but yes if you don't see an enemy pac for some time the locations grow exponentially

Clagus: I just wish we had the info about which direction the enemy pac did take when he was dissapearing from my view

Tiramon: you could also reduce this amount if you see a pellet is still in place where you expected him to walk by

Tiramon: so many possibilities and only 50ms time ;)

Clagus: yeah ;(

Clagus: and I code in c#...

Tiramon: the language is only relevant when you know how to right hight performant code in that language imho

Clagus: true

Tiramon: i guess my java code is more performant than when i 'try' to write that code in c# or c++

Illedan: And C# is fast enough if the algorithm is right.

Clagus: especially after newest changes in c#, it can be used quite efficiently, but I'm not that skilled :P

Clagus: yet!

Clagus: :D

cegprakash: https://www.codingame.com/share-replay/463430666 this is insane

cegprakash: 3 kills all chases

cegprakash: looks all planned

Default avatar.png WINWINWIN: Nicely done Wala!

Ramzel: What league is it?

Doju: woah wala, that first kill from behind the corner

Doju: :ooo

Tiramon: yes crossing are quite dangerous

thethiny: you just got unlocky @ceg

Doju: wait not first kill lol

Doju: third

thethiny: he never saw you once

thethiny: unless he calculated based on his own pacs

Doju: what on earth

thethiny: which is very smart

Doju: that's amazing

Clagus: first kill seems lucky

cegprakash: first kill I agree

thethiny: here on the other hand, my pacs decide to riot and change their paths on their own

Doju: maybe even the first one was planned

cegprakash: 2nd and 3rd kills are master planned

Clagus: second one too :P

Ramzel: Can i see the compile comand?

Doju: red pac 0 did see blue pac 1

eulerscheZahl: how is any of this planned?

Ramzel: for c++

Doju: oh hold on nevermind

eulerscheZahl: i see one player collecting and another one walking into

Doju: i'm dumb

Tiramon: Ramzel? you mean the parameters like mentioned here ? https://www.codingame.com/faq

Doju: technically you could predict that the leftmost pac goes for the super pellet

cegprakash: 3rd kill eulerscheZahl

Doju: and there are only 2 possible paths left

Doju: but the 3rd kill was super neat anyways

Ramzel: Yes thanks

eulerscheZahl: he keeps going in that direction after the kill

eulerscheZahl: so probably just wanted to go there

Ramzel: I was wondering if falg O3 is used

eulerscheZahl: you code is compiled without any optimizations

eulerscheZahl: you can use pragmas to speed it up a little

Ramzel: Lets check if pragmas are allowed

eulerscheZahl: they are

Doju: umh

eulerscheZahl: (this information is C/C++ specific)

Tiramon: if i play against him i don't see any masterfully planned kills

Doju: i'm trying to store different moving methods in a dict. those methods aren't static so they require an instance. Can i make the dictionary a class variable or do i seriously need to store it in the instance?

Doju: seems silly to store it in the instance since

Clagus: Tiramon but that could be highly map dependant, or just lucky as hell, because it that replay he would kill all 4 of them if not scissors block on frame 20

Doju: but the methods require an instance

eulerscheZahl: https://www.studytonight.com/python/python-static-keyword Doju

thethiny: https://www.codingame.com/share-replay/463437730

Can't seem to get paths to work at all

thethiny: at all

Doju: yeah i'm doing that but since the methods that but since i call the instance methods from the class variable it doesn't work

Doju: so i need staticmethods?

Doju: :/

Default avatar.png WINWINWIN: Doju, ig you dont pass self to the method it becomes static

Tiramon: if that wre planed kills it must be a really lucky game for him i didn't have any game like that against him, and i started a few by now

eulerscheZahl: and he would be ranked much higher if it was planned

Clagus: Tiramon - ok, I guess it could be just map shape that did all of this...

Tiramon: he even missed some good chances to kill my bots if he was planing it

Tiramon: played the same seed against him

Tiramon: was a draw

eulerscheZahl: case closed

Tiramon: and only kill was one of his pacs died

dbdr: a broken clock is correct twice a day

thethiny: true

Tiramon: depends on how you break it ;)

Doju: :D

Clagus: :D

dbdr: :D

Doju: :D

dbdr: sometimes even 3 times a day

eulerscheZahl: leap hour?

dbdr: I doon't think there is such a thing :D

thethiny: During summe

dbdr: only leap seconds

thethiny: summer time

Doju: i mean leap seconds work too

thethiny: when u move the clock back 1 hour

dbdr: right

eulerscheZahl: daylight saving time, that's what I meant...

thethiny: Riddle me this:

thethiny: A guy was driving his car, and he saw 3 doors in front of him. Red, blue, and green/ Which door should he open first?

**dbdr knew, just teasing

AntiSquid: then just display a random time, 60 tries / minute, chances are much higher

fasil: corridoor

thethiny: :D

dbdr: thetiny the best one

Doju: monte carlo it

thethiny: the car door :D

eulerscheZahl: always switch doors, learned it from monty hall

dbdr: can I make up the rules now eulerscheZahl? :D

eulerscheZahl: wow, dropped again quickly. i guess i was just lucky :(

cegprakash: #69 I like my rank

dbdr: switching doors is obviously the best strategy: you can look what's behind while switching them

Default avatar.png WINWINWIN: #800 :(

cegprakash: helps me be in the mood

Quidome: cegprakash I also like you rank :)

uvBoss: im stuck in bronze

uvBoss: :sob::sob::sob::sob::sob:

Illedan: eulerscheZahl, only 1 point between 11 and 3.. In that window it's just about luck and latest submits :P

cegprakash: uvBoss I reached gold with just going to closest PAC

uvBoss: wat????

eulerscheZahl: (╯°□°)╯︵ ┻━┻

Default avatar.png WINWINWIN: closest PAC using a BFS?

cegprakash: yes

uvBoss: closest PAC?

Default avatar.png WINWINWIN: and cooperation?

cegprakash: yes cooperation

cegprakash: but cooperation was needed to get from silver to gold

cegprakash: didn't have that till silver

uvBoss: sigh

cegprakash: bronze to silver was pellet tracking

cegprakash: I'm in top 30

cegprakash: will I get my first T shirt?

Default avatar.png WINWINWIN: T-shirt?

jrke: last pellet race

jrke: https://www.codingame.com/replay/463451607


eulerscheZahl: there are no tshirts this time

Default avatar.png WINWINWIN: there are T-shirt prizes?

eulerscheZahl: usually there are. this time nope

ShannonNorris97: Yeah, it doesn't say anything about T Shirts in the prizes

eulerscheZahl: top20 usually

jrke: there is curved monitor for first ranker

Default avatar.png offroff: why can I see dead pacs? Is that useful for anything?

eulerscheZahl: tracking

cegprakash: I don't use it yet offroff but I think top 10 use it in gold

Default avatar.png offroff: hmm, alright, I guess maybe it make sense, otherwise you don't really know if an enemy died?

Default avatar.png WINWINWIN: Congrats ValGrowth!

cegprakash: offroff thats right

cegprakash: because of accidents

Default avatar.png offroff: yeah, and in some situations the enemy hides behind a corner and you won't know

Default avatar.png offroff: didn't realize that :)

MattSOrme: If you don't code in c++ you aint getting a prize haha

MattSOrme: 8/10 top 10 are c++ other 2 are c#

Ramzel: Is it bcs of c++ speed?

MattSOrme: yh

MattSOrme: Should also give prizes to top for each language. Would encourage more languages

eulerscheZahl: in the past it was like that

Default avatar.png offroff: would also encourage even more laziness from me

eulerscheZahl: tshirt for top50 + first per language years ago...

Default avatar.png offroff: I use javascript, too lazy to learn anything else

MattSOrme: CG getting cheap on us?

eulerscheZahl: some abused the system: promote to legend, submit crashing bot in obscure language

MattSOrme: Only 1 person using Objective-C and they're in 84th

eulerscheZahl: there are 4 D players now :o

MattSOrme: someone called atra is in gold, but his bot just sits still... is that a way of stopping other players from testing against him properly?

Uljahn: :scream_cat:

MattSOrme: AtrA*

JohnCM: maybe he submitted a buggy code accidentally

JohnCM: it'll be fixed by sunday probably

JohnCM: just take it as a free win

Uljahn: could be bot hiding :smirk:

AntiSquid: ya obv bot hiding

AntiSquid: but if your bot isn't top 10 material, what's the point?

cegprakash: I just added something nice.. hopefully top 20.. I'll take a break and come back tonight.. have to do office work :D

AntiSquid: you really did improve ceg

AntiSquid: but not top 20 lol

cegprakash: hey it's only 27% AntiSquid

MattSOrme: Maybe he is top 10...

MattSOrme: Hi ranked codingame player for sure

MattSOrme: high*

Tiramon: 48% and 29 ... don't think he reaches top20

AntiSquid: his rank fluctuates

AntiSquid: could reach top 10 if he gets lucky

AntiSquid: not enough luck ceg

AntiSquid: accidentally wrecked ceg now

JohnCM: wow amazing kovi has been dethroned

Doju: wow, that val guy is winning like every game

cegprakash: I rekt him on IDE

eulerscheZahl: https://twitter.com/valgrowth?lang=en that level of confidence :D

eulerscheZahl: I want to know if it's luck or if the change is working, so I'd like to bring it up, but I don't want to lose my current ranking, so I'm conflicted.

lifetimeLearner007: well done cegprakash, ur score seems to be increasing. u might actually end up in top 20

cegprakash: what language is it eulerscheZahl

eulerscheZahl: japanese

cegprakash: ty lifetimeLearner007

eulerscheZahl: and english from a machine translation

cegprakash: translator is confused

cegprakash: can't read

cegprakash: it took it for french

Ramzel: Hunting supper Pellets works nice https://www.codingame.com/replay/463477938

cegprakash: I had to choose Japanese manually

eulerscheZahl: he would like to resubmit to see if it was luck but not lose the #1 spot for trying

Doju: cegprakash same

eulerscheZahl: so he just assumes #1 is justified

cegprakash: what's there to lose

Clagus: :D

cegprakash: 4 days left

cegprakash: If I'm #1 I would hide my bot

eulerscheZahl: the japanese users are an active community. sadly staying in their language

Doju: i dont get this :(

Doju: i'm defining some methods as a class attribute

Doju: and trying to call them from the instance using this https://stackoverflow.com/questions/19075843/dispatch-a-class-method

eulerscheZahl: http://ykawano.hatenablog.com/ https://valgrowth.hatenablog.com/ http://simanman.hatenablog.com/ https://tsukammo.hatenablog.com/

Doju: (methods in a dict, btw)

Doju: but it's just throwing an error when i define the dict

Doju: oh now it almost worked

Doju: nvm then

dbdr: > I tried implementing red and black trees in Ruby > Conclusion > I implemented it.

dbdr: :D

dbdr: translation might make it funnier than it is

Doju: :D

Doju: no he just snaps his fingers and it's done :D

eulerscheZahl: they even have their own search algos that get rarely mentioned here on chat. such as chokudai search

Zenoscave: what is chokudai

eulerscheZahl: read the blogs

Zenoscave: beam search related?

kovi: http://chokudai.hatenablog.com/

kovi: he is the strongest (if we consider topcoder open finals)

tsukammo: yes, beamsearch variants.

eulerscheZahl: http://ykawano.hatenablog.com/entry/2018/06/26/002228

BenWo: ugh, submitting

wlesavo: so chokudai search is kind of meme like smitsimax?

AntiSquid: no ooc PM on kawano's blog

Default avatar.png Thiesjoo: What is smitsimax?

AntiSquid: some reinvented algo by msmistz

AntiSquid: solaimanop and jolindien, same avatar and almost same rank, different language though, coincidence? AutomatonNN

Psyho: wata is way stronger than chokudai

AntiSquid: well same character, no same avatar

Default avatar.png WINWINWIN: I dont get it, why does cegprakash`s rank go till top 50 and suddenly come down to last in gold?

JohnCM: that happens when you resubmit

Doju: WINWINWIN maybe he introduced a bug

RockyMullet: lucky first games probably

cegprakash: because every submission is independent

JohnCM: if you roll 10 wins in first 10 games, your rank skyrockets very high

kovi: you must be right psyho

JohnCM: especially if you score a lucky win against the top 10

AntiSquid: because he didn't fixt'd his bugs WINWINWIN, and where is your avatar?

Default avatar.png WINWINWIN: Thanks, L) AntiSquid will add an avatar now

kovi: neither active lately though

Default avatar.png WINWINWIN: Got an avatar now

kovi: nice to see you back (and here) btw psyho. can we expect a last hour win submit?

Default avatar.png WINWINWIN: why doesnt it show up AntiSquid?

wlesavo: refresh

Psyho: haha, probably not

Default avatar.png WINWINWIN: tried refreshing twice

Psyho: I'm struggling :)

Psyho: just started writing something non-trivial but I had a 2+ years break from coding + I don't have too much experience with those kinds of contests

kovi: unlike with halite...you are on pair with recurse

eulerscheZahl: 2 years away, wins topcoder...

eulerscheZahl: by a huge margin

kovi: and that

Psyho: that topcoder win was very lucky - it was more like a puzzle that you had to solve

Psyho: and somehow people didn't do that and rushed to implement anything that works

eulerscheZahl: i liked the puzzle

Psyho: halite had a ton of depth and I'm usually good with problems/tasks that are incredibly complex

Psyho: but I have never really done a proper 2-player game where you can't ignore enemy moves

kovi: +fog of war. so it is complex even though ooc seemed better

JohnCM: what's ooc by the way?

AntiSquid: ocean of code

AntiSquid: previous contest

JohnCM: i see..

AntiSquid: but imo this is less random

JohnCM: oh this is quite random indeed

JohnCM: random start points, random maps

Psyho: actually fog of war makes it more single player imho

AntiSquid: but it's symmetrical start, you know the initial state

AntiSquid: in ooc you didn't know the initial state

Psyho: i.e. more heuristic-based than chess-like

JohnCM: true

JohnCM: unless you can simulate the entire state 200 moves later

JohnCM: you have to rely on heuristics

JohnCM: if not can monte carlo through, with maybe a billion simulations

JohnCM: even a billion may be too little

cegprakash: https://www.codingame.com/replay/463503473 turn 12 I show mercy

Doju: JohnCM you need a quantum computer :d

JohnCM: or you need good state value approximations

AntiSquid: i like this more than ocean of code and unleash the geek combined, despite all of them having hidden info

JohnCM: cut off the search at a certain depth

kovi: true. i like heuristics. im not that good in finetuning a single algo

JohnCM: my algo has at least 10 heuristics

JohnCM: i finetune them against the top 10

AntiSquid: there got to be a perfect search for the top spot

JohnCM: but it doesn't work against the top 100. quite different playstyle

JohnCM: so it is a balance

JohnCM: kovi, can i ask roughly what is the win rate like to be #1 in leaderboard

cegprakash: just 60% against #2 is enough JohnCM

JohnCM: but you don't really fight with #2 much, you fight with the rest usually

AntiSquid: http://cgstats.magusgeek.com/app/spring-challenge-2020/valgrowth

AntiSquid: JohnCM

AntiSquid: looks like on recalc it's close tiberiu and kovi atm

AntiSquid: ah nvm

AntiSquid: kovi has bigger win rate vs val

AntiSquid: 88% win rate vs val @_@

JohnCM: how do you see win rate?

AntiSquid: click on their names

AntiSquid: it brings you to their stats

Default avatar.png WINWINWIN: Really nice tool cgstats, who made it?

AntiSquid: some rock paper scissors effect at the top

AntiSquid: magus did WINWINWIN

JohnCM: wow yup

drykberg: some matches mine and the enemies pacs dont move, is this a known bug or something?

Tiramon: do you have a replay drykberg?

wlesavo: you probably timing out

cegprakash: drykberg those are speed turns I guess

Tiramon: that is what i guess ceg

drykberg: https://www.codingame.com/replay/463518069

drykberg: https://www.codingame.com/share-replay/463518187

Tiramon: oh no it is just you output only one command per turn

drykberg: https://www.codingame.com/share-replay/463517210

Tiramon: so only one command is handled

drykberg: but it cant be ^^

Tiramon: in https://www.codingame.com/replay/463518069 you send first turn 'MOVE 0 1 1|' so only pac id 0 is moved

drykberg: ive tried this almost 100 times on pinky this morning

drykberg: i saw that, but why it cant be ^^

Tiramon: that must be in your code

Tiramon: hard to tell you were it happens without knowing your code ;)

drykberg: happened 5 times in last 25 matches i think

Tiramon: propably an if that is triggered in special situations

Tiramon: for details i would need your code

drykberg: actually it happened every match

drykberg: sometimes mine sometimes opponents

drykberg: could it be because i put code before the game while loop?

dbdr: OK, I found my algo's name, now I can start implementing my bot

Tiramon: depends what code you put there

Tiramon: as i said without code i can just guess

drykberg: http://chat.codingame.com/pastebin/6f63a5f5-1900-4625-beb3-a487f0e2cfdb

Tiramon: that expired ...

drykberg: how to post code without it saying expired ^^

Tiramon: normaly it should work like this

R1FA: someone had the same pb, he was using '\n' between each commands

Tiramon: http://chat.codingame.com/pastebin/64b48b5e-9f04-46d1-afde-55b4b481248c

Tiramon: [CG]Maxime pastebin seems to be broken, it is always expired

Tiramon: send it to me per private msg

Tiramon: there no pastebin is created

drykberg: i have only 1 \n at the very end

drykberg: it all works normally, as expected vs pinky

drykberg: well, before the game loop i have 6 arrays each of size 201 initialized with null

drykberg: and 15 variables

drykberg: https://www.codingame.com/share-replay/463526371

drykberg: does not happen vs pinky

Default avatar.png TheSugarCoatedTaxidermist_3da7: Hello everyone,

Default avatar.png goore: hi

Default avatar.png TheSugarCoatedTaxidermist_3da7: i want working on a Leap motion project

Default avatar.png TheSugarCoatedTaxidermist_3da7: i have keyboard and i want to click them thru leapmotion

Tiramon: drykberg, yes looks fine there ... but without code ...

Tiramon: leap is still alive?

Default avatar.png TheSugarCoatedTaxidermist_3da7: but when i implement the leap motion code it appears under the keyboard and i cant access the keyboard with leap

Default avatar.png TheSugarCoatedTaxidermist_3da7: yeah xD do you prefer another sensor ?

Tiramon: no just havn't heard of leap for a long time

drykberg: its 400 lines of wannabe programmer trash, you dont want to see it ^^

Default avatar.png TheSugarCoatedTaxidermist_3da7: EXACTLYYY

drykberg: i dont even know how to use a 2d array

drykberg: or pointers

Tiramon: but without i can't tell you why it sometimes works and sometimes does not ...

Default avatar.png TheSugarCoatedTaxidermist_3da7: like i was trying to understand the cope so i can create the keyboard using js and implement leap with

drykberg: it wud be awesome if u took a look, but dont know how to paste it here as pastebin seems to be broken as of right now

Tiramon: sry never worked with leap, just was fascinated when they published it =(

Tiramon: use an external pastebin or post it in that private talk i just started with you

drykberg: how about this: 5 minutes ago i submitted code and was placed #36 in wood 1, now i re-submitted to see if that error comes up again and im placed #257 in wood 1?

Tiramon: if it sometimes only gives one command and sometimes for all .. that sounds as expected

drykberg: how do you get ranked though? because i did win more than i guess 75% of the matchups

Tiramon: for multiplayer scores the 'True Skill' algorithm of Microsoft is used http://bit.ly/TrueSkill

drykberg: so it doesnt matter if you win?

[CG]Maxime: if you win against someone you're expected to win, your score is not changed as much as winning against someone better than you

drykberg: ok read it, got it thanks

drykberg: this time i got placed #76

eulerscheZahl: Tiramon that's you change to report the broken pastebin

eulerscheZahl: oh i guess he's here because of your ping :thinking:

Tiramon: hope so =)

Adnmaster: i cant find an invalid syntax here: elif(ability_cooldowns[a]==0 and distanceTo(d, d2, pac_x[a], pac_y[a])>10): can someone help me?

Adnmaster: note: distanceTo is a function that i made

eulerscheZahl: test:

eulerscheZahl: http://chat.codingame.com/pastebin/c4785647-e662-4011-9a8a-66195b5270d4

eulerscheZahl: works again

Tiramon: yay

H1ggsb0s0n: does anybody know how the promotion to legend is done ? Is there another bot we'll have to defeat ? Where can I find more information about the schedule and the promotion rules ?

AntiSquid: just like before H1ggsb0s0n

AntiSquid: top 15 or top 10 automatically promoted, rest need to beat up the boss

Tiramon: yes H1ggsb0s0n

Doju: Adnmaster i can't really find anything there

Doju: except maybe you need a space after elif? not sure

Tiramon: they will choose a bot from the ranking and then they will add it as boss

AntiSquid: also tomorrow 18:00 CET is legend release H1ggsb0s0n

Adnmaster: thanks Doju

H1ggsb0s0n: Thank you for the info, AntiSquid and Tiramon!

Doju: Though i have a suspicion that you forgot to close some parentheses

Adnmaster: hmm...

Doju: above that line

Adnmaster: can be

Adnmaster: i sent it to a syntax checker it said no error

Adnmaster: but codingame says error

Doju: is distanceTo a method or a function?

Adnmaster: function i think, i use def to make it

Doju: if it's a method it has to be instance.distanceTo

Doju: is it in a class?

Adnmaster: no

Doju: ok

Doju: hmm

Adnmaster: i used: def distanceTo(here variables):

Doju: yeah ok

Adnmaster: it doesnt give error about the function, but it says not in a function, shall i check distanceTo?

Doju: ohh

Adnmaster: at the other parts of the code, there is not error of the function though

Doju: um

Doju: i think there's an error in the definition of distanceTo

Doju: typo?

Adnmaster: wait

Adnmaster: i dont think its a typo

Adnmaster: but i will check

Doju: or typo where you're calling it?

Doju: Ah

Adnmaster: nope

Adnmaster: not typo

Doju: Does the definition come before where you call it?

Doju: i think it has to

Adnmaster: it does

Adnmaster: it comes at the program beginning

Doju: so is the error on that line?

Doju: it might be that you need a space after elif

Doju: so elif (ability_cooldowns[a] == 0 and distanceTo(d, d2, pac_x[a], pac_y[a]) > 10):

Adnmaster: oh

Adnmaster: wait let me check

Adnmaster: still error

Doju: are you sure that you've called if something before that?

Adnmaster: oh

Adnmaster: wait it worked

Adnmaster: thanks very much

Doju: lol :P

Doju: np

Adnmaster: now there is another error lol

Adnmaster: :D

Adnmaster: aahh

Adnmaster: finally got it!!

Adnmaster: yes!!!!

Doju: great!

Adnmaster: i did this: pac_x[a], instead of this: pac_x[my_pac_id[a]]

Doju: oh

Doju: okay

Adnmaster: wait...

Adnmaster: nooooooooooooooooooooooooooooooooooooooooooooooo

AntiSquid: ?

AntiSquid: waiting, yes or no ?

Adnmaster: i though it was fixed!

AntiSquid: i bet i am rank 1 in the captcha game this contest

Adnmaster: captcha game?

AntiSquid: yes

AntiSquid: you unlock it if you submit bot enough times

AntiSquid: it's a secret bonus level

Adnmaster: i never heard of that, can you explain more?

AntiSquid: no more spoilers

Adnmaster: :D ok

AntiSquid: use your skills to unlock it

Doju: you can try it yourself

Adnmaster: ok

Default avatar.png carlnix: Hey guys

AntiSquid: hi

AntiSquid: are you here for the contest? carlnix

AntiSquid: https://www.codingame.com/contests/spring-challenge-2020/leaderboard/global

AntiSquid: just jump in submit a bot and see how it goes

Default avatar.png carlnix: Sure

muy31: yo Doju how early were you up?

Adnmaster: winning with 1 point :D: https://www.codingame.com/share-replay/463560600

Doju: uhhh maybe 8:15?

Doju: why?

muy31: weren't you online at 1:00 am finland time yesterday?

muy31: cause it was 5pm my time

Doju: i went to bed at 3 am xD

Doju: trying to fix my sleep schedule

muy31: lol i see

Doju: tired as hell

Doju: but hey more time to code :p

jrke: anyone knows how to know response time in c++

Adnmaster: how

muy31: im really annoyed right now that the reason i cant get too gold is b/c i use switch

Tiramon: then use switch less?

Adnmaster: do you keep your pacs alive with switch?

muy31: yeah

muy31: i mean its just that i use an extremely logical switch to survive, but the other pacs just ignoe me

Adnmaster: oh

muy31: so it's pointless

Adnmaster: yeah, then better dont use it

muy31: but it's logically adept

Adnmaster: youre in bronze, right?

muy31: silver

Adnmaster: oh

Adnmaster: ok

Tiramon: silver without speed? nice

jrke: anybody to my ques

muy31: no i use speed definitely

muy31: i just dont always use speed

Adnmaster: youre in silver, im in bronze, can i see our battle?

muy31: i dont know how to switch the leagues

Tiramon: get ranked above the boss

muy31: i dont think i can play against another league, can i?

Tiramon: oh you mean play against lower leagues

muy31: yeah

Default avatar.png Akarachudra: there are another rules. u cant

Tiramon: you can

muy31: how?

Adnmaster: but arent all the rules unlocked in bronze?

Tiramon: but the opponent selector has a limit ... in top league it is top 1k players

Adnmaster: so isnt bronze and silver same?

muy31: i want to battle Adnmaster

Adnmaster: let us battle

Adnmaster: wait

Tiramon: else it is top x in current league and less

Adnmaster: im checking if i can

Adnmaster: oh we cant

muy31: yeah

Tiramon: only higher league player can select

Adnmaster: oh

Tiramon: bronze can't see silver but silver has a chance to see bronze

muy31: but i cant see him

Adnmaster: muy31 can you send replay

Adnmaster: you cant see me?

muy31: no

muy31: it only goes to 197th place in silver

Doju: i'm so deep in the wikipedia pages atm

Doju: trying to solve some pathfinding problems

muy31: now 199 in bronze

muy31: Adnmaster get above 199th place

Tiramon: sure even i can see 669 in silver

Adnmaster: ok

Tiramon: ?

Adnmaster: ill try

muy31: my bad Tiramon it was a mistake i meant bronze

Tiramon: k

Tiramon: still sad that they limit it to 1k

Adnmaster: whats the formula to find my distance to another pac?

Doju: Adnmaster it depends

Doju: what do you want to do

Doju: the actual walking distance or an approximation?

Adnmaster: for example if my pac is away from the enemy pac it will use speed

Adnmaster: not walking distance

muy31: you can use Manhattan for that

Adnmaster: manhattan?

Doju: then manhattan is fine

Tiramon: muy31 why you switched to rock in https://www.codingame.com/share-replay/463574147 ?

Tiramon: in frame 34

Doju: abs(x1 - x2) + abs(y1 - y2)

Adnmaster: i used that but it didnt work

Doju: it should

WINWINWIN: it does not take portals into account

Adnmaster: hmm...

Adnmaster: wait

muy31: the assumption that you would switch to scissors and chase me

WINWINWIN: I copied the distance from the referee

muy31: Tiramon

WINWINWIN: that is a lot more accurate

muy31: Adnmaster then use modulus...

Tiramon: yes guessed that, but i passed you 2 times as paper ... why would i switch at the 3rd time?

muy31: my bot doesn't extrapolate

muy31: it's not that smart...

Tiramon: so it's just distance == 1so switch

Tiramon: btw i couldn't switch to scissor .. i had cooldown

Tiramon: one more reason for you to switch to scissor instead of rock

Tiramon: same in frame 68 i had cooldown and you expected me to get rock

muy31: did i switch them up then?

muy31: thanks for replay Tiramon

Tiramon: np ;)

Adnmaster: trick to league up: find what the boss does, convert it into code, then submit that code :D

perseverent: hi

perseverent: did anybody reach gold without pathfinding?

RoboStac: Adnmaster - if it's that easy then just skip the bosses and watch replays on the leaderboard from #1

RoboStac: :)

perseverent: is it possible?

muy31: Tiramon is the green bar accurate? for cooldown

Adnmaster: ok then :D

Tiramon: log and player are not 100% sync, but i guess the bar should be accurate

eulerscheZahl: tooltips only show SPEED cooldown, but not the reload :(

Tiramon: else print abilitycooldown from input

muy31: Tiramon you in gold?

wlesavo: im always printing out the cooldown in msg, seems to be the most relevant info

MiniWall: Hey guys, any way to change the cerr output color ?

eulerscheZahl: yes, greasemonkey

perseverent: I take it as a no then

muy31: its a chrome extension

perseverent: I'll go and implement some kind of BFS then

wlesavo: is it the same as Violentmonkey?

Alshock: eulerscheZahl I like that answer

perseverent: hope it's worth it

JohnCM: manhattan can go to bronze

JohnCM: i didn't do bfs until silver

muy31: like tampermonkey

perseverent: what about gold

perseverent: manhattan works?

JohnCM: haha haven't tried

JohnCM: i think best to use bfs in gold

muy31: for real ive been doing bfs since bronze

perseverent: I mean for silver boss

perseverent: can you beat with mnhattan?

muy31: probably not

perseverent: I see

perseverent: no hope for me

lexXxel: http://chat.codingame.com/pastebin/c2680d4c-c5be-4bd7-839e-c1981da3617d

lexXxel: http://chat.codingame.com/pastebin/2970964d-c941-4f7a-a278-c3b45d94b9c3

lexXxel: oh come one

lexXxel: Hi guys, are there any known issues with the pellet input?

eulerscheZahl: no

lexXxel: thx

WINWINWIN: lexXxel I have not faced any yet

eulerscheZahl: try to flush your stderr

eulerscheZahl: print(..., flush=True)

lexXxel: http://chat.codingame.com/pastebin/f8016871-941b-4e0e-8c5f-0a862ef06147

WINWINWIN: what does that do eule

WINWINWIN: *euler

Alshock: it makes sure to print

eulerscheZahl: i bet you get all input but don't see it in the logs. that forces to print everything

eulerscheZahl: you probably get stuck somewhere below in your code

Default avatar.png TheNiv: Only pacs with the SPEED ability enabled can move- what does this means?

muy31: hey perseverent due to pathfinding issues, your rock got stuck https://www.codingame.com/replay/463591073

WINWINWIN: what is the use of flush eulerscheZahl

WINWINWIN: ?

Alshock: TheNiv SPEED allows to move twice in a turn

Default avatar.png TheNiv: wow I missed a lot

perseverent: :)

perseverent: I know

Alshock: once with all other pacs, and once afterwards

perseverent: manhattan does that

eulerscheZahl: print(f"get pellet {i}: {line}", file=sys.stderr, flush=True)

Default avatar.png TheNiv: oh ok

lexXxel: @eulerischeZahl thx, I used sys.stdout.flush() and failed to replace it with stderr

lexXxel: xD

eulerscheZahl: :D

Alshock: lol sys.stderr.flush() should work though

lexXxel: yeah

Alshock: I didn't even know there was an option for it in print

lexXxel: but i failed and copied sys.stdout.flush()

Alshock: I feel you

eulerscheZahl: a lot of users got stuck here. they should just change the default stub or change the way they call your python bot as robo suggested on the forum

Alshock: I guess they don't want to do that kind of change because they're affraid to be asked to change them for all languages

eulerscheZahl: i guess they will change it. just not as fast as we hope

eulerscheZahl: 1434 python players in this contest. the most popular language, worth doing such a small change

WINWINWIN: anyone think the contest will touch 5000 participants?

muy31: come on, ive been below rank 20 in silver for a day now,,, im 5

muy31: someone submit and boost me

Tiramon: how much score behind theboss?

WINWINWIN: muy31 collaborative submitting is extremely important :P

muy31: what does that mean?

MattSOrme: I actually found out my problem wasn't with flush, but that i timed out on the previous turn

muy31: Tiramon

WINWINWIN: I got to silver because the guy who I was especially good against kept submitting :P

Tiramon: muy in the leader board it is shown a score for you and the boss

Tiramon: and i want to know the diff

Tiramon: sometimes it is high even if only a few ranks apart then i won't expect to be pushed up

muy31: me: 24.75 vs. 26.05


muy31: is that high?

eulerscheZahl: Tiramon just find a battle with the boss and open it. then you see the score of the boss below

eulerscheZahl: it's possible to get pushed up but i wouldn't bet on it

Tiramon: oh nice didn't know that

Tiramon: < 1 is quit ok, normally i expect to be pushed up with < 0.5

eulerscheZahl: even cgstats shows the boss now, if it's part of any of the past battles

WINWINWIN: Is the boss part of the final ranking?

eulerscheZahl: no

muy31: Tiramon you think i should resubmit then if I think my new code is better?

muy31: even though im ranked 5?

Tiramon: depends on how much better ;)

muy31: that's rough

Tiramon: if you always win against your arena bot it sure is worth a try

Tiramon: worst case you get ranked lower

muy31: it's not that much better its 50/50

Tiramon: with a bit of luck you get a lot of winning matches and get ranked higher, or maybe you had luck and will get ranked lower

Tiramon: wouldn't resubmit in that case

Tiramon: find a better improvement

muy31: also silver bot doesnt switch at all

Hjax: switching is overrated

Tiramon: especially because the 8 ranks below you have a very low diff to you

eulerscheZahl: switching for a kill is still a nice thing

Tiramon: if you kill some pacs in the first turns it's very powerful, else it often is a waste of score

eulerscheZahl: but now that i'm speeding almost all the time, i rarely do it :(

Tiramon: except you avoid being killed

WINWINWIN: speed is better than switch???

Tiramon: imho

muy31: yes

WINWINWIN: I never do speed -_-

WINWINWIN: I only switch rarely

MattSOrme: then you might want to change your name

muy31: thats mean

WINWINWIN: :) MattSOrme will rather change speed :P

eulerscheZahl: WINWINWIN you should speed for sure. i beat you with 1 vs 2 :D https://www.codingame.com/share-replay/463602594

eulerscheZahl: but that switch was definitely helpful

WINWINWIN: :D will do that, maybe start with switch at lower priority and work up from there

eulerscheZahl: there are still some interesting moves from my bot that i should debug in that match

Default avatar.png IronBeast_24c7: Can we make the console output re-sizable. It's a nightmare to deal with ..

JohnCM: i have some issues with my bot now

JohnCM: the more i modify, the more i realize i had 2 bugs all along

JohnCM: but somehow it worked

Tiramon: oh you really meant 1vs2 ... ouch

muy31: eulerscheZahl what do you even do with the info of possible opponent locations

eulerscheZahl: remove pellets from the map

Doju: Damn, collaborative pathing is really difficult to do

Tiramon: frame 48 and moves like that are things i don't really understand

eulerscheZahl: in my replay? i'm looking into it right now...

muy31: it appears he is extrapolating on further turns

eulerscheZahl: i think it's probably harvested already https://imgur.com/a/6K46FzS

eulerscheZahl: so better tracking would help for sure here. or another scoring

muy31: he sees two 100% pellets in one that he could get vs 4 in the opposite direction

muy31: so he goes for the four

muy31: i think

Tiramon: so you expect the pellets behind the corner to be gone?

muy31: less than 100%

eulerscheZahl: yes, 21% chance it's still there

Tiramon: interesting visulization

eulerscheZahl: but when i'm so close i should just look around the corner

muy31: ive been doing the ame technique, how come im in silver

AntiSquid: how's it going ZarthaxX ?

muy31: oh rank 12

muy31: ...

Tiramon: as i said those guys behind you were very close in score

muy31: im going to start tracking enemies then

Tiramon: i got basic enemy tracking but ignore the information

MattSOrme: damn, if thats what it takes to be top 10, i'll be lucky to maek gold

Doju: WOW

Doju: muy

Doju: your switching is on point

muy31: show me...

muy31: please

Doju: https://www.codingame.com/replay/463586620

Doju: frame 31

Tiramon: thats why i never attack a pack with available cooldown

Doju: you predicted that i'd switch to scissors

muy31: yea, but now you see the problem right?

Doju: yup

Doju: also what on earth is my pac 0 doing on frame 16

Doju: "nope, don't like that pellet"

muy31: lol

Doju: Oh i see what it's doing

Doju: alright

Doju: it thinks there's a pellet behind the corner

Default avatar.png lorus: ohh god

Doju: oh no it doesn't

Doju: it's going for the super pellet

Doju: maybe i'm giving them a bit too much value hahah

muy31: i see

muy31: i guess value should also depend on distance

muy31: what do you think

Doju: atm i don't do values other than 0, 1 and 10

Doju: but yes definitely

Doju: that's gonna be a thing soon

Tiramon: distance is very important

Doju: and some other things

Tiramon: else you aim for a pellet at distance 6 and ignore the one at distance 1

Doju: well

Doju: the idea with my current system was to go for super pellets even if their distance is greater than 10 and there's a normal pellet right next to me

muy31: eulerscheZahl you doing like probability of opponent moving to a new location = 70%, prob of moving to an old location 20% and prob of ataying still 10%?

Doju: since there can be normal pellets on the way there

Tiramon: even with more than 1 pac per superpellet?

muy31: or do you 100% assume that your opponent will move to an unexplored location?

eulerscheZahl: sorry, i won't get too much into detail here

muy31: ok then np

Doju: Tiramon atm they don't care if there's another pac going for the same pellet

Hjax: come on euler, spill all of your secrets :P

Doju: working on fixing that right now

Default avatar.png lxnn: muy31, surely it would be best not to make any assumptions about the opponent's movement, and so model their behaviour as uniformly random

Default avatar.png lxnn: remember, probabilistic logic is monotonic, so if your model gets into an 'overly certain' state, it's unlikely to get back to an appropriately uncertain state again

Default avatar.png lxnn: although you might just want to manually tweak the parameters, as naive probabilistic models can sometimes miraculously perform well

Default avatar.png lxnn: just my two cents

NormantasStankevicius: heyo, gin league

muy31: cool Ixnn

Ramzel: Currently First in Bronze hope that i will go up soon

Ramzel: Yey welcome silver

AntiSquid: ya that's about enough to graduate from bronze

AntiSquid: nvm too late

AntiSquid: chat lags

Ramzel: Are there any new rules in gold?

Hjax: no new rules in gold

Ramzel: ok

AntiSquid: wroclaw back to 1st place eh ?

eulerscheZahl: https://www.codingame.com/share-replay/463633476 that brilliant plan at frame 54: 2 papers can trap the rock, completely ignoring the scissors :D

Ramzel: Is there information about dead pacs usefull?

jrke: hey to return two or more values from a function in c++ anybody please

Ramzel: u can return a vector of informations

Ramzel: jrke

DamianS: use pair<>

jrke: ya but not working

Ramzel: or tuple to store more then to informations

Ramzel: u can also use for example pair of pairs

Ramzel: and so on

jrke: my return statement return std::make_pair(rx,ry);

Ramzel: And what is the compiler log?

jrke: means

Tiramon: wow pac tracking costs quite some time

WINWINWIN: Looks like another guy going to gold now

Tiramon: especially if the pac isn't seen for a longer time

Ramzel: Tiramon what league are u in?

Tiramon: gold

Tiramon: but lower rnaks in gold

Tiramon: *ranks

WINWINWIN: Is a pathfinder necessary for gold?

Tiramon: not sure if pathfinding is needed, i wrote a simple simulation to avoid blocking and gather pellets effective

Ramzel: What do u mean by gathering pellets effective?

Ramzel: :D

leodark: hi

EvModder: lol i have an awful algorithm for gathering pellets

EvModder: but i am pretty good at combat ;)

Tiramon: if i run through a block of pellets and have 2 directions to leave that block it's more effective to leave it at the side were another pellet is know instead of an empty area

Tiramon: also those 1 pellet deadend walk by are also quite uneffective imho

EvModder: i think a good idea would be to mark dead ends on your grid, and prioritize those lower

Tiramon: why should i go for one pellet in a dead end ... so yes

EvModder: i dont find pellet-collecting algos as fun to write as fighting stuff :)

Tiramon: a way to gather more pellets in a shorter time ;)

Tiramon: fight can be avoided to easily to invest much time

EvModder: actually, my pellet-collecting strat DOES consider dead ends, but only because I already wrote the code to use it for detecting is a pac is trapped lol

Default avatar.png goolmoos: https://www.codingame.com/replay/463651032

Tiramon: if you really kill all early it is nice, but that isn't easy

EvModder: did he time out?

Default avatar.png goolmoos: no

Default avatar.png goolmoos: I just are them all

EvModder: oh i see

EvModder: very tasty :)

EvModder: is there a way to play against a specific player?

Default avatar.png goolmoos: yes

Default avatar.png goolmoos: add them in the IDE

Default avatar.png goolmoos: click delete below the Default AI

Default avatar.png goolmoos: and then add whoever you want

EvModder: oh wow thanks!

NormantasStankevicius: just jumped with a dumb fix 1200spots... to silver 254

Tiramon: but choice is limited to players of your league or below limit(1k)

EvModder: i feel you norman

NormantasStankevicius: it's the definition I don't know why is it working, but it is

Quidome: You can invite players in lower leagues but not the other way around

EvModder: i dropped 100 spots yesterday because of a bad submission. i still don't know what was wrong. i just kept working on it and slowly climbing back up

NormantasStankevicius: people improved their code evModder?

EvModder: it was a submission

NormantasStankevicius: ohhh, you're top 93

EvModder: it is still deciding, i am 106 now

NormantasStankevicius: in high gold *

EvModder: hopefully it goes up but ¯\_(ツ)_/¯

EvModder: ya i've put too much time into this lol

Ramzel: 367's in silver

Ramzel: not bad at all

EvModder: a friend told me to join but now im playing more than him

njaber: I like seeing collecting pellets as one giant fight over territory with the enemy, this makes it more fun ;)

njaber: wait I was this far back in chat

njaber: EvModder I was replying to a message you sent way earlier

EvModder: oh yea

EvModder: the territory war :D

EvModder: my pacs also have 0 collaboration rn, for pellet-collecting nor fighting

EvModder: they are smart but not good team players, yet

njaber: the problem with collaboration is that it transform the decision making time from (numberOfAction * numberOfPac) to (numberOfActions ^ numberOdPac)

njaber: and with 5 pacs this can mean up to 9 ^ 5 which is a lot

njaber: wait no 11 ^5

njaber: No i'm dumb it's 9 since you can't have "move 2" and "use abilitiy" possibilities at once

Kellthazar: Im stuck trying to implement an alternative for my heuristc approach

EvModder: heuristics all the way man

EvModder: magic numbers ftw (:

Kellthazar: Yeah, but my code with heurist is so bloated right now...

Kellthazar: Im trying to implement Monte Carlo Tree Search...

Ikhadem: i can't improve this shit no more

llllllllll: same feeling I had since sunday

Doju: THis is in no way related to coding, but does anyone here know a good inventory/warehouse management app?

llllllllll: and every day I could do a lot more to improve

AntiSquid: fixed the most crucial bug!

AntiSquid: could have done it sooner but w/e

Kellthazar: Yeah, Ill be back to my heuristc algo... See if I can improve any aspect of it

AntiSquid: my emojis are now working perfectly

MattSOrme: lol, are they meant to mean something or just random?

mamitiana: hi all! how can i speed multiple PAC pls ? in python

Quidome: you seperate each command with a |

EvModder: AntiSquid i love your emojis man

MattSOrme: you need to get a target 2+ moves away, and print them on the same line MOVE 0 10 10 | MOVE 1 15 15

AntiSquid: thanks! EvModder

AntiSquid: ofc they do, they hold the key to the universe MattSOrme

EvModder: before i knew how to pick who i play against in IDE (lol until today), i played you in random matches and copied to IDE

AntiSquid: lol

Quidome: 4512 submits :)

EvModder: dang lol

Illedan: 4k submits?

Quidome: 4.5k :D

Illedan: -.-

EvModder: 49 :)

EvModder: and i thought i was spamming it XD

Illedan: You can't test in the IDE Quidome?

Quidome: uh i mean different players of course

EvModder: about to make it 50

AntiSquid: how ? when ?

AntiSquid: Quidome

Quidome: Big confusion now

EvModder: you can copy players to the IDE from matches, or pick them by clicking under the AI

EvModder: i learned this today myself

Quidome: I mean 4513 different players have submitted a bot

Quidome: I find that very amazing :D

EvModder: ah ok yea it is!

EvModder: i thought you meant that you submitted 4513 different updates of your bot code

EvModder: (which would also be amazing)

Quidome: lol

Doju: does submitting the default code count as a submission?

Quidome: I think so

Doju: because i bet like half of those are that

llllllllll: those are in wood 2

llllllllll: and not counted imo

Doju: wdym going to one spot isn't a valid strategy

EvModder: yeah, i don't think those can beat the boss and actually enter

MattSOrme: ugh, i swear i've just spent the last 2 days making my code worse :(

Quidome: 231 in wood 2, so max 231 default code submits

EvModder: :(

llllllllll: @Matt I know that feeling ^^

Default avatar.png Paikan2068: @MattSOrme, same

EvModder: yeah.. especially yesterday

Default avatar.png Paikan2068: Anyhow, we try and learn

EvModder: I got so tired, and then submitted and dropped 100 places

Default avatar.png Paikan2068: Learning by failure is painful

Doju: that's pretty good Quidome

Default avatar.png Paikan2068: but I guess even the best at this learnt by failure as well :p

JohnCM: no worries @evmodder, you'll gain it back

EvModder: i have, mostly :)

EvModder: new day, new energy

JohnCM: there's a fluctuation of +- 100 when you submit

JohnCM: depends on your initial luck

JohnCM: after that will stabilize over the next few days

EvModder: oh i know about the flectuation, i was responding to MattSOrme

MattSOrme: my code from 2 days ago is technically going up in the league, but not sure if thats just cos other people are leaving

EvModder: might be, or perhaps it just stabilizes

MattSOrme: Got too many ideas that Im just not implementing well

EvModder: i think it plays too few games initially, so if you are unlucky it puts you lower than you should be

Default avatar.png Paikan2068: I think my best code was when I didn't care, like 5 days ago.. Then I went up with the bigger guns, and totally missed the implementations

EvModder: and it gets fixed over time

EvModder: ahh yeah

EvModder: i've been sticking to incremental improvements so far but i hav big dreams i might attempt later

Default avatar.png Paikan2068: I guess, that's the way to learn also

EvModder: like having pacs actually collaborate :joy:

Doju: do you guys have a class for all your pacs

JohnCM: my pacs just avoid each other

EvModder: I have names for them if that counts

Doju: like not a pac class but an "all the pacs" class

JohnCM: but by doing so they collaborate

JohnCM: emergence by simple rules, i call it

Default avatar.png Paikan2068: I'd like to not timeout with my bfs and a* for 10% of my games

Default avatar.png Paikan2068: that would already be a great improvement

EvModder: Spongebob, Patrick, Squidward, Sandy, Mr. Crabs <- my pac names

njaber: I made the mistake of starting with the big dream, now I'm fully commited and I don't know if I'll actually have something to submit better then silver in time

EvModder: naming them is proven an effective strategy.

Doju: njaber type away then!

Doju: i'm also making quite a big change atm

Doju: if it works it'll surely get me to gold

njaber: I've been coding almost 20 hours a day (not an exageration) since the beginning of the challenge XD

Doju: same njaber

JohnCM: lol that's too much

Doju: or maybe not 20

Doju: more like 14

Doju: or 15

Default avatar.png Paikan2068: Let's say that at least you get to learn things!

Doju: Paikan2068 oh definitely

Doju: i've learned sooo many things

AntiSquid: you need breaks, have fun, don't overexhaust njaber, did you even add emojis to your pacs yet?

Doju: This is the biggest coding project i've done

JohnCM: how to put emojis?

EvModder: my next big goals for tomorrow: (1) guessing enemy next N moves after they leave LOS, (2) having one of my pacs let the other move if it is blocked

Doju: unicode chars

AntiSquid: exhaustion creates most bugs

JohnCM: ah..

Doju: AntiSquid yeah that's true tho

EvModder: so true

njaber: I've saddly come to the conclusion that to make my algorithm work I'll need a lot of bayesian calculations which I didn't have until now, so I'mm reworking a lot of it, and I don't know if 3 days are enough :/

AntiSquid: https://getemoji.com/ copy one from there and add them as you would add a mesage to your pac outputs JohnCM

Doju: bayesian calculation

Doju: oh damn

Doju: actually i kinda need that too

njaber: Antisquad no I haven't but I don't have something to submit :/

EvModder: sounds so fancy :3

EvModder: i use "magic"

njaber: Also that's how I have fun usually, I'm not overexhausting myself

AntiSquid: naive bayes like relations between stuff ?

JohnCM: thanks antisquid

AntiSquid: np

EvModder: i assign every square a "magic value" and then each pac greedily goes along the most "magical" trail

Doju: hmm

njaber: I don't know how deap I'll go into bayesinism, for now I'm just doing normal probablities without conditions which isn't even working yet

AntiSquid: but with adding emojis comes the responsibility to raise in rank so more people notice them JohnCM

EvModder: and a lot of random, complex junk goes into how i assign the magic values

AntiSquid: rise *

njaber: But I'll need a little bit of it to estimate enemy pos, the limit will be how much bayesianism I can do in 50ms

Doju: i did a little thinking

Doju: i wanna get every possible path between any given cells of given length n

Doju: and i need to do that... many times

EvModder: what for? there might be an easier solution

Doju: magic

EvModder: ah :)

EvModder: BFS is the solution general for distance

Doju: yup

Doju: i need every possible path though

Doju: that's a little more intensive

EvModder: from every x1,y1 to every x2,y2 ?

Default avatar.png Paikan2068: but even with that in mind, you have to find a heuristic to design targets which works fine. And then collaboration... and so on and so on

JohnCM: how do i put the emoji in

JohnCM: like

JohnCM: 😇

llllllllll: in python: \U0001f914

JohnCM: i'm gonna put an emoji right before i crush my opponent's pac

Doju: EvModder yes

EvModder: i think you just print it after the move JognCM

JohnCM: oh how did you get the unicode?

llllllllll: I do the same, with the kiss emoji

llllllllll: unicode emoji list

llllllllll: google

njaber: Well, you can be sure there is at most (dist / 2) ^2 paths, and I think you could just branch "closer neighboors" until you hit your destinations with all paths

EvModder: Doju that is W*H * W*H memory :sweat_smile:

EvModder: but that is doable i think

EvModder: as a preprocess step, certainly

Doju: umm how did you get (dist / 2)^2?

EvModder: each cell will need a grid for the distance to each other cell

Doju: i have that

llllllllll: me too

llllllllll: much faster to look it up than to calc every time

EvModder: lol i hav no clue what u guys need all that for

Doju: i already told you

Doju: magic

EvModder: ah right

MSmits: :six_pointed_star:

llllllllll: I use it to get the 'real distance' between 2 cells

llllllllll: that comes handy sometimes

Default avatar.png Paikan2068: Just use BFS, quite a lot faster than you might think at first

EvModder: llllllllll that makes sense actually, for caching/performance i guess. i haven't had issues with the time limit yet really

MSmits: they do use BFS Paikan2068

EvModder: or, if i have, it was because of a bug in my code

MSmits: they just do it all on turn 1

llllllllll: we do bfs, but for every cell in turn 1

MSmits: and then lookup the result

llllllllll: exactly

Default avatar.png Paikan2068: Oh, yeah, good point

MSmits: i dont think it's workable for me, pacs block movement

EvModder: yall are smart now i want to do this too. even though i dont need to

MSmits: i dont do it EvModder

MSmits: ive done it for other contests, but dont see the point here

EvModder: yeah time limit is pretty generous

MSmits: thats not why

MSmits: all my path calculations include pacs blocking

EvModder: ah

MSmits: and thats different all the time

EvModder: pacs move around though

MSmits: yes

Doju: those you can't precalculate

EvModder: so distance makes sense somewhat if you expect them to move away

Doju: or maybe if you're reeeally smat about it

Doju: you might

MSmits: well.. i dont have any other Doju

njaber: http://chat.codingame.com/pastebin/3950ee6a-3f4b-4303-a42a-77afe5e8452e

njaber: Doju

MSmits: well except maybe hardcoding for superpellets

MSmits: i gotta get that working

EvModder: my super pellet handling has caused me a lot of losses

MSmits: mine too

njaber: Don't know if that helps

EvModder: that, and not thinking before going around corners (which i will work on tomorrow)

Doju: Oh i see, thanks njaber

Default avatar.png Paikan2068: I don't know what caused me many of my losses, but I'm starting to lose hope, and tell myself I should probably get back to actually work on theory :p

EvModder: :(

Petras: Hey guys, what are the conditions for pac switching? (- Pac 2 can't switch to ROCK form yet!) yet xdd Coldown = 0 and SpeedTurn = 0

njaber: maybe he's already a rock?

Petras: I'm missing something here

Doju: I think it's time to put the lofi girl on the second monitor and start coding

njaber: or he's dead?

jrke: ya maybe already rock

Default avatar.png Paikan2068: Eh, but wait, my last submit is actually doing quite good

EvModder: oh yeah, the dead thing can trip you up

Petras: He's alive and of different type o_O

MSmits: yeah thats life

EvModder: my last submit was a very pleasant surprise for me

Default avatar.png Paikan2068: Yeah, but will it beat the bot :p

Default avatar.png Paikan2068: that's the terrible question

MSmits: Petras share a replay

Petras: https://www.codingame.com/share-replay/463707000

MSmits: frame?

Petras: turn 25 pacID 2

Counterbalance: referee only prints that if cooldown != 0

Petras: oh yeah I'm stupid

Petras: .. nevermind.. :DDD

jrke: see its not cooldown petras

Default avatar.png Paikan2068: I'm actually starting to believe, 48 fights for this sbmit, 5 losses...

MSmits: it became a rock

MattSOrme: ok, so im gonna go back to my old submitted code that was better, and start adding bits from my new code to it nicely

MSmits: you denied its rock-hood, it's a rock

Default avatar.png Paikan2068: Good luck Matt

Petras: xd

jrke: petras which league

MattSOrme: I will get to gold if it kills me

Default avatar.png Paikan2068: Oh, and just when I told that, a terrible 4 loss serie

Petras: gold

jrke: wow

MSmits: allright back to coding

jrke: yuo

jrke: *yup

EvModder: hmm, i like my ranking, so i might nap for a bit actually lol

KCrown: how do you get gold? at what rank us each league?

njaber: I need to optimize a specific part of my C# code (~25 lines) can I copy it here to ask for ideas?

njaber: about 25 lines *

Default avatar.png Paikan2068: KCrown you have to beat the boss to change league

EvModder: i would advise not, to be on the safe side

KCrown: thanks

EvModder: site rules and etc. maybe link a pastebin though?

njaber: Too bad

jrke: KCrown you should beat the boss I.e. above boss

Hvosten: Only pacs with the SPEED ability enabled can move

njaber: I though it wasn't ok to link a pastebin either?

Hvosten: What that this mean?

EvModder: idk

MattSOrme: It means only pacs with speed active who chose a target 2 or more away will move

EvModder: yes

jrke: Hvosten it means only pac with speed availibility can move in this chance

Hvosten: Ok thanks

njaber: Actually I can reduce it to 5 lines, 5 lines of codes wouldn't be problematic would it?

Counterbalance: nope, go ahead

njaber: Actually 10

njaber: Well I'll copy the 10

njaber: http://chat.codingame.com/pastebin/9144dc8f-2856-45cb-a313-7ccb157cc47d

njaber: IVec2 is a custom class I made, and I can paste thee code for GetNeighboors if you think this could be the thing slowing down

njaber: Oh and I forgot the declaration of pos1Cells

					Dictionary<IVec2,int> pos2Cells = new Dictionary<IVec2,int>();


njaber: ignor the fact that it's pos2 it's the same

njaber: Actually, I'll try rewritting GetNeighboors first, I'll store a reference to each valid neighboors for each cell during the initialization turn

Default avatar.png journeyvivek: nice

njaber: but if you've got other ideas it'd be hellpful

Counterbalance: what's the purpose of that code? make a collection of all 'lastCells' and their neighbours?

njaber: http://chat.codingame.com/pastebin/b0c36b00-a9b9-4a64-aebe-491fc494dcca

njaber: frick I write too much

jrke: why my rank suddenly became 8 and next submission suddenly 316 without any changes in code:thinking:

cegprakash: my rank dropped by 60 not surprising

njaber: Counterbalance the pastebin contains my answer, I'm just too verbose XD

alinde2: Being "first" after the boss is rather fun. :upside_down:

gangland6001: dafuk

Counterbalance: njaber i see. You're re-calculating that for the past 20 turns each turn?

njaber: no for the past I have another algorithm which is pretty efficient and remembers previous turn's calculations, this one is for future turns

Tiipiac: I have an issue with the input, it seems like I do not receive the last line of it. I should be seeing 34 pellets now when only 33 are given. :(

Tiipiac: Can anyone help me please?

njaber: For now it's not much more useful then a distance except that it takes all current possible pos of the enemy into account, but later I plan on adding probabilities to the each movement so I'll need this map to be generate

Counterbalance: Tiipiac there's some messages on the forum about that

Tiipiac: thx

Kukiss: Tiipiac maybe you have modified something by accident there. You can restore the code to the default one to see hot it looks like. (ofc store your code somewhere else first)

Kukiss: how*

Doju: Is there a way to jump to the definition of a method in the ide?

Doju: i tried everything i could think of

[CG]Nonofr: in the CG ide?

Doju: yes

Tiipiac: I will try this yes.

Doju: Apparently there's a keybindings file

Doju: i'll have to edit that i guess

RoboStac: Tiipiac - it's probably that, it's most likely an issue with python buffering your logs (https://forum.codingame.com/t/spring-challenge-2020-bugs-questions/180397/67?u=robostac)

[CG]Nonofr: In what language Doju?

Doju: Python 3

[CG]Nonofr: If it doesn't work, just refresh the page

[CG]Nonofr: ctrl+click on it should work

[CG]Nonofr: I just fixed it ! :)

Tiipiac: I tried to refresh but it does not work either

Doju: Yup now it works, thanks [CG]Nonofr

Tiipiac: I will try the post solution from @RoboStac

Tiipiac: @RoboStac it worked, thank you!

Tiipiac: I flushed it ;)

Tiramon: ok .. it works like expected to bad i expected it will take to much time ...

Tiramon: 5 speed moves after another result in quite many possible path and final locations ...

njaber: You working on tracking?

Tiramon: try to track the pacs to find out where they are and what path they took (or maybe took_) so i can ignore those pellets

Tiramon: less looking around the corner with the 'too late' feedback

Tiramon: not working well

njaber: I've gt good news for you, it's defenitly possible in less then 50ms since I'm already doing, I haven't implemented all features yet but it's gonna be faster when I implement them since there'll be less paths to extend

Tiramon: incl path?

njaber: Yeah everything

Tiramon: hm ok

Tiramon: then i will have to rethink that part a bit more

EvModder: i haven't done that yet, i will in my next iteration tho probably

njaber: that's not exactly true actualy, I can check if they've taken a given path, but I can't easily list them all

Tiramon: hm got just another idea how to prune the amount

EvModder: right now i only keep track of the last location i saw them at, so i dont run away then just turn around and go right back into the danger zone

njaber: isting all paths is hard though, because there's a lot they could have taken from the last seen point to all possible end point, how I do it is that I basically regroup each path by length and turn they could have passed a given cells, then I can deduduce back the possbility of the enemy taking a given path

cegprakash: njaber why no gold yet

cegprakash: :D

njaber: because no submit because my code isn't ready

njaber: I'm getting closer though

njaber: But I have to implement a few probabilitic/bayesian logics before it's usable

njaber: Currently it does what I imagined it would do but it basically thniks about the absolute worst case scenario, I think it'd do really well with perfect info, but I need to allow it to make decisions in cases where there are too many worst case scenarios

cegprakash: I assume opponent is stupid at times

cegprakash: :D

njaber: I'm now regretting leaving Wood1, I would have liked to test my code in a perfect info situation

njaber: It would really help with debbuging

eulerscheZahl: https://www.codingame.com/demo/8418077ed71a7b5a95ed0be20717ef7385050f

cegprakash: no the place u need to test is gold

eulerscheZahl: switch leagues at the top right

njaber: Oh thanks, that helps a lot!

cegprakash: I hope by the end of this contest I'll become Doctor Strange

eulerscheZahl: play BotG, then you can get him right now

MattSOrme: Why does history not tell you what rank it got to :(

Hjax: that would be a nice feature

eulerscheZahl: CG Enhancer

eulerscheZahl: https://www.codingame.com/forum/t/cg-enhancer/59441

AntiSquid: but you need to add rank mannualy no ?

eulerscheZahl: yes

wlesavo: and after that it sometimes disappears

eulerscheZahl: i make screenshots when it's going well. then i have the date+time at least

wlesavo: that an idea

Hjax: i do most of my testing locally anyway

eulerscheZahl: i configured my print key to directly save it in a chosen directory

Hjax: submits are just for finding edge case bugs

AntiSquid: doesn't matter much atm, seems like the outcome is very random, the bots in mid gold are of similar strength

AntiSquid: you don't notice it probably

eulerscheZahl: random at the top too

eulerscheZahl: val growth was 1st

eulerscheZahl: saw him below 10, i don't think he submitted since

Hjax: the top also drops a lot of games vs the middle of gold

eulerscheZahl: because the game is quite random

Hjax: yeah

Hjax: i hope by the end the winner is clear, rather than lucky

eulerscheZahl: for other contest like wondev woman you didn't see that. almost 100% winrate for the top players

eulerscheZahl: not another OoC please

Hjax: was ooc pretty rng at the end?

eulerscheZahl: yes

eulerscheZahl: top4 on a coinflip

Hjax: i messed around with it for like a day, got bored and stopped

Hjax: wasnt a big fan of that game

AntiSquid: me neither

eulerscheZahl: https://www.codingame.com/contests/ocean-of-code/leaderboard they changed order a few times during recalc

Hjax: do you think this game will end up the same euler?

wlesavo: kovi droped from 1st to 4

wlesavo: in ooc recalc i mean

Hjax: i think in utg the top bots were pretty consistent vs weaker bots

AntiSquid: there was some RPS in there too at the top

wlesavo: and with this game i feel like i cant improve anymore, most of my ideas broke my bot

AntiSquid: certain people countered each other

Hjax: this is true, i had a better winrate against karliso than teccles did

Hjax: also a pretty google winrate against teccles

Hjax: good*

wlesavo: had to go back on 1.5 days of chnges, to go back at 100 at least

kovi: btw

kovi: pb4 33.93 0% [%, 20%] 0 / 17 / 0

njaber: I'm starting to wonder is iterating through a list that can sometimes contain all cells of the maze isn't slower then simply iterating through indexes and checking a 2D array at this index :thinking:

Hjax: whats that

AntiSquid: from ooc ?

kovi: that how recalc ended for me

wlesavo: ooc wr i guess

Hjax: oh i see

Hjax: tragic

cegprakash: njaber early game 2D array is better late game list is better :D

cegprakash: but I use 2D array :D

njaber: i'm not talking about pellets btw

njaber: I'm talking about my projection algorithm that generates possible enemy paths/positions up to N turns ahead

njaber: I've set it to 20 rn but it's too slow, I hopped to optimize it to get as much turns in a as possible

njaber: hoped*

MattSOrme: damn, kovi is crushing... what happened?

AntiSquid: well why not use c++ then if you need more speed njaber

njaber: rn I'm doing list + map for each turn, but I'm wondering if the upside of using the list for turns where there aren't a lot of possibilities is worth the downside of assigning to it on turns with a lot of them

njaber: AntiSquid how much faster is optimized c++ compared to optimized c#?

eulerscheZahl: factor 2

AntiSquid: stupidly much

njaber: Because it will take a long time form me to convert 1900 lines of code to c++, and since I'm using enumerable functions a lot I think there's going to be a lot of refactoring needed

AntiSquid: do it after contest i guess

njaber: Oh yeah because the game stays open after contest right?

eulerscheZahl: or never

eulerscheZahl: it will quickly return to the multiplayer section

AntiSquid: did everyone drop in rank, gold seems oddly bigger and harder Q_Q

wlesavo: resubs are more random

cegprakash: I got dropped

cegprakash: :D

Kukiss: Yup, but I guess it is not possible that Everybody dropped with us :D

AntiSquid: you were never that high ceg

dbf: AntiSquid I moved 50->130 during the night, so please submit tomorrow to push legend bot to place #135

Icebox: I doubt you'd get legend even in top 50

Icebox: I'm guessing it's gonna be top 20-40 that are gonna get promoted initially

AntiSquid: not sure what you mean by that dbf

AntiSquid: 40 ? so generous ?

eulerscheZahl: 20-40? that number is too high

Icebox: :D

eulerscheZahl: more like 10-15

Icebox: people will join gold till tomoroow

AntiSquid: yes was thinking 10-15 too

eulerscheZahl: you should play more often Icebox

Icebox: you should end in top 10-15 more often

eulerscheZahl: :(

Icebox: :D

eulerscheZahl: usually it's looking good till the last weekend hits me hard

AntiSquid: it's like friday every bot comes out of hiding to promote

Hjax: only 10-15 in legend? even given how big this competition is

Hjax: id expect like 50

eulerscheZahl: legend is a fixed number, not a percentage

Hjax: interesting

njaber: Fixed number at all times? or only the original ranking up?

eulerscheZahl: for the boss placement

Hjax: original ranking

Hjax: utg legend was about 100 people by the end

eulerscheZahl: heuristic games tend to have larger legend leagues

eulerscheZahl: simulations games like mean max as small

eulerscheZahl: are small*

Hjax: because its easier to hard counter the boss?

eulerscheZahl: because more people are capable to improve their bots

Hjax: true, sim is hard

eulerscheZahl: https://www.codingame.com/share-replay/463750541 that scissors at frame 46. just why?!

eulerscheZahl: and then even chasing me with it

njaber: It couldn't see your pack

njaber: pac*

cegprakash: Hjax 3 days to get it right :D

NapTown: suicidal pac

njaber: tho he could have deduced the pac type from the fact he was bouncing

Hjax: maybe he thought youd switch paper

Hjax: and was trying to be clever

eulerscheZahl: but what about the chasing turn after? :rofl:

Hjax: brave pac

njaber: chased you before seeing you

Hjax: thats not true

njaber: His bot probably doesn't track pac

Hjax: hes rank 6 in gold

njaber: But it's true the more I look the less it makes sens

Hjax: pretty sure he does lol

Default avatar.png CatchinAsteroids: Do you guys know where to find completed assignments?

njaber: Oh well then it make 0 sens to me

njaber: Maybe it's an NN/GC that learned to do that?

njaber: I mean GA

eulerscheZahl: complete assignments for what?

Default avatar.png CatchinAsteroids: like where to view all of the puzzles we've completed

eulerscheZahl: https://www.codingame.com/training/easy at the bottom

Default avatar.png CatchinAsteroids: awesome ! Thanks :)

elderlybeginner: how to turn off autosuggestions?

elderlybeginner: in editor

Doju: How many submissions do you guys have?

Kukiss: elderlybeginner I don't exactly but you can open comman pallete with F1, maybe you can find it there

Doju: i've got 88 xD

Kukiss: command*

Hjax: 28 submissions

AntiSquid: select > prefer to not say

Doju: Oh right, you're playing the captcha game all day long :D

AntiSquid: no

AntiSquid: only when i tab to codingame

eulerscheZahl: 76

AntiSquid: tested stuff and submits take aeons, so have plenty of time to watch random stuff on amazon/netflix

alinde2: Well, BFS and a couple of ifs got me to silver, anyone got a suggestion what to try next?

Doju: alinde2 I think collaboration is very important

Ramzel: Lol I m winning in ide with silver boss but when i submit i m losing so often

AntiSquid: implement the perfect search algo alinde2

EvModder: i do 0 collaboration and i'm got to gold, but i do a lot of work elsewhere

Doju: ^ winning strategy

Doju: how do you do 0 collaboration?

EvModder: perfect search algo yes

Doju: do all of your pacs always go for the same pellet? :D

EvModder: well, i avoid dead ends and other pacs, so I guess that counts

Doju: that counts

Doju: that definitely counts

EvModder: no, it has a means of preventing that, heuristically

EvModder: alright

ntroPi: avoiding others of your own pacs is cooperation

njaber: what do you mean perfect search algo, it's a joke or is this really something I never heard of?

alinde2: I hope its a joke...

Doju: a perfect search algo goes through every possible path, i'd say

Doju: till the game ends

Default avatar.png SyrusSilverkin: Rookie question: how do I import a module here? I'm trying to use `Math.sqrt`...

Hjax: yeah id define perfect search as minimax with infinite depth

njaber: Yeah that's what I though

Doju: Hjax yeah that

Hjax: good luck minimaxing to the end of the game in 50 ms

Doju: SyrusSilverkin python?

Default avatar.png SyrusSilverkin: Sorry, JS

EvModder: perhaps a min-max ai would be perfect

Doju: you won't get very far with that

Doju: like literally

Doju: in time

EvModder: i know, only speaking theoretically

Adnmaster: what is minmax?

Doju: isn't minimax technically the only perfect one?

njaber: There is no perfect search algo anyway in this game since at some point you must bet on the opponents past or future moves to make the "perfect choice"

EvModder: google it, famous game algo :)

EvModder: technically yes

Zenoscave: https://en.wikipedia.org/wiki/Minimax

EvModder: idk, it might actually be semi-doable for this game impo

Default avatar.png SyrusSilverkin: Minimax can be sped up with alpha-beta pruning if you decide to go down that route.

Hjax: theres a proof somewhere that mcts converges to minimax given enough time

Doju: oh huh...

Hjax: so mcts is also perfect

Doju: that's interesting

Zenoscave: SyrusSilverkin Alpha beta still isn't enough to go to end depth

njaber: Still doesn't resolve incomplete info and betting on the next enemy move

alinde2: But, we don't know where the enemy pacs are and which have been eaten, so thats not really gonna go far?..

Doju: maybe i should take a look at the online ai introductory course that i took again

Doju: btw awesome course

Hjax: this isnt a good game for minimax or mcts

Doju: https://www.elementsofai.com/

RockyMullet: my first turn only sim got me from 120th to 85th, I'm happy :D

Doju: no coding but theory

Default avatar.png SyrusSilverkin: No, not for this game, but you might be able to get a few levels deeper, especially if you make it towards the end game where there are significantly fewer viable states.

Doju: if you're a beginner

Hjax: my bot is currently doing something monte carlo esque though

EvModder: (5*[5,9])^depth for min max, for your moves along. enemy is worse, because you have to min-max for what you can't see

EvModder: alone*

Doju: err

AntiSquid: RockyMullet that's not much, my bot is near yours in rank just to give you a good point of reference

AntiSquid: (my bot isn't very good)

Doju: if you go the theoretical route why don't you minimax the opponet too..?

Doju: opponent*

Doju: or there is not other version

Doju: really

EvModder: don't down talk your bot antisquid, it's given me quite a bit of trouble :'D

EvModder: i played so many IDE games against it lol

Hjax: AntiSquids bot beats me somewhat often as well

Icebox: minmax won't work here

RockyMullet: AntiSquid yeah but at least it was better lol

Doju: unless you define the game as get all pellets in the least amount of time and the opponent doesn't exist

AntiSquid: ya which is funny because i rely on 2 bugs to cause odd behaviour and somehow magically win

RockyMullet: how many times I did a search algo that ended up being worse than my heuristic lol

AntiSquid: if you look at how it plays you will see it's bugged

Doju: everybody's bot just runs on magic

EvModder: yes, magic powers everything

RockyMullet: yeah werent you like way higher earlier ? AntiSquid

RockyMullet: you broke something ?

AntiSquid: no, more like fixing it drops my rank

Hjax: story of my life

EvModder: i'm about to submit, fingers crossed i don't drop a mile lol

AntiSquid: one of the bugs: it occasionally selects index -1 as a target ...

Hjax: @EvModder i smell timeouts

Hjax: https://www.codingame.com/replay/463818006

RockyMullet: yeah exactly why im happy I improved, too many time 2 days of coding lead to a worse bot lol

AntiSquid: the other bug is related to the scoring, i deducts score for one thing it should actually increase the score T_T

AntiSquid: so basically i don't know how it works anymore

RockyMullet: if you know about those bugs, why not fix them ?

AntiSquid: because it lowers my rank @_@

RockyMullet: oh rip

AntiSquid: by a 100 or so even

Ramzel: When bugs makes yours rank higher ;D

RockyMullet: you got the desise of "my bugs make it better"

Ramzel: :D *

RockyMullet: makes it impossible to tweak lol

AntiSquid: i am adding new features on top of it

Ramzel: Ouch

Ramzel: I found stiupid bug

AntiSquid: should be fun

Hjax: got to pull the bandaid and get out of your local maxima

RockyMullet: fettuccine over the spagethi

Hjax: fix the bugs, add new features, make it better than it ever was

EvModder: oh i've had bugs like that

AntiSquid: trying to replace the scoring function as a first step

EvModder: I patched them 2 days, and my rank dropped, and i've only now finally restored it

EvModder: i still don't know why the bugs helped lol

Nerchio: hello

Nerchio: how is your tracking antisquid

AntiSquid: first step to sentience is a bug, humans don't have perfect logic, so my bot is sentient, do you want me to kill it? AutomatonNN change my mind

AutomatonNN: where?

Zenoscave: False syllogism

AntiSquid: do you have tracking nerchio? what makes you think i have ?

Nerchio: i dont have it just asking

Nerchio: lost motivation because of it :D

RockyMullet: mine is pretty dumb and I dont do much with it..., its probably my next step, to improve it

AntiSquid: my tracking is just unrefined i guess

Default avatar.png Derthek: For c# users. Can I use newtonsoft json in the game?

Nerchio: its different from ooc

EvModder: how do i use the seed for a game to replay it?

Nerchio: not a fan of implementing tracking here there is so many weird cases to consider

Nerchio: but its neccessary for the top i think

cegprakash: omg kovi now coin has counter to counter of bump counter

cegprakash: what a legend

njaber: Doing a for loop is faster then mapping a function to the array right?

AntiSquid: i have a good idea for tracking, but it's a bit long winded Nerchio

AntiSquid: maybe even incomplete

cegprakash: I've become a big fanboy ofkovi

Default avatar.png Derthek: For c# users. Can I use newtonsoft json in the game?

AntiSquid: ask for a kovi pillow cegprakash

RockyMullet: make it a group buy

njaber: I've done most of the hard work for tracking, still got a few features to implement but those are easy and I've got my actually bot to work on, I'll finish the tracking after I'm happy with my bot's decision making

EvModder: can i re-create a game if i have the seed?

AntiSquid: yes ?

njaber: Unless one of the bots is non-deterministic

AntiSquid: first click cog wheel (settings) > select expert mode then mid of screen select options, mangual, input seed

EvModder: mind telling me how?

EvModder: oh

EvModder: ty

AntiSquid: RockyMullet since you have a sim, why didnt you try to go higher depth?

eulerscheZahl: Derthek no you can't

Default avatar.png Derthek: Thanks :D

Hjax: only if both bots are deterministic

Hjax: oops scroll

Enknable: just a quick question..theres a bug where we get input for enemy bots we cant see, right?

RockyMullet: AntiSquid I have a pretty specific sim made for first turn

RockyMullet: so I dont actually have a sim for the whole game, so thats probably what I should do, make a dumb very of my sim for each turn

eulerscheZahl: seems extremely unlikely Enknable

njaber: Enknableif those are dead pacs and you're in Silver it's not a bug

EvModder: Enknable those might be dead bots

Enknable: no, im getting the position of an enemy pac on the 2nd turn, even though its on the other side of a wall

AntiSquid: ah i get now what you have RockyMullet, didn't add that yet to mine

eulerscheZahl: wrapping around?

njaber: Replay?

Enknable: ohh thats a good point, eulerscheZahl

njaber: nice thinking

AntiSquid: might be a hard legend and it's only been a week :/

RockyMullet: yeah once my initial sim is done, my bot is back to pure dumbness

eulerscheZahl: legend isn't supposed to be easy

eulerscheZahl: and you said you like challenging bosses

AntiSquid: relative to other contests i mean

Hjax: my goal for UTG was top 20 (for the tshirt) i think my goal now is just get legend

njaber: TIL doing tons of unnecessary iterations and value checks on array is more then 10 times more efficient then keeping available values in a list

njaber: Wait no this might just be me not having implemented this correctly

njaber: I'm holding back that statement

njaber: Ok no it's "only" 2-3 times faster

njaber: Still worth the hour of refactoring

Doju: whhat

Doju: o.o

njaber: I should mention this is in c#

foxbel: hey

foxbel: go minecraft

Lopear: go

Lopear: what version

Lopear: &

Lopear: ?

AntiSquid: ? @_@ this is contest chat

AntiSquid: click #minecraft_chat if you want minecraft

Csipcsirip: some1 please link me seed with pellet spawned next to a pacman :D

Csipcsirip: *big pellet

Counterbalance: I must be doing something seriously wrong if the same bot gets #120 on the first submit and #320 on the second..

cegprakash: Counterbalance yes we all are :D

AntiSquid: the bots are of similar strength Counterbalance

cegprakash: still in gold and we are working with guesses

AntiSquid: some fluctuate less

RockyMullet: beat kovi in 22 turn in his last submit :P https://www.codingame.com/replay/463828773

AntiSquid: doesn't look like his best submit

AntiSquid: http://cgstats.magusgeek.com/app/spring-challenge-2020/kovi

RockyMullet: im still happy hehe, this specific game was probably really impacted by my sim

AntiSquid: the new guy is at 71% win rate

Doju: damn that's good

Doju: nobody is even close

RockyMullet: looks like I reached depth 18

cegprakash: I think eulerscheZahl is doing MCTS :D

njaber: http://chat.codingame.com/pastebin/5ed44895-23a9-4180-bc7b-745a6fd7ad37

njaber: Once again I'm too verbose

njaber: Should learn to write short messages

AntiSquid: i think second one is a bit faster

njaber: ok thanks

AntiSquid: no wait ...

ZarthaxX: njaber but you are not comparing var on there

ZarthaxX: not the same expression

njaber: it's always more then 0, it's just to make it part of the if

ZarthaxX: ah

AntiSquid: can't you use a profile njaber ?

dbf: njaber have a look at godbolt where you can see compiler output, it is better than guessing.

dbf: or just profile it

AntiSquid: profiler *

AntiSquid: and tell me if i guessed correctly

njaber: I never used a profiler and I'm too lazy to set one up just for that, I'll just use the C# stopwatch

cegprakash: when njaber comes to gold we are all screwed

cegprakash: I'd love to see his opponent prediction

njaber: s/when/if

cegprakash: njaber submit plz :'(

njaber: I hope I have enough time to finish

njaber: what I have now isn't submitable, it's barley wood1 level

njaber: But yeah I'm trying to squeeze as much time as possible out of the "future possible opponents moves" function

Quidome: https://www.codingame.com/replay/463843058

Quidome: bug in the referee?? Move 29

cegprakash: no

cegprakash: 2 papers can't move to same location

cnn: "omg kovi now coin has counter to counter of bump counter" what does that mean ?

cegprakash: u know bumping?

Quidome: o, wow, you are right :)

Quidome: tricky

Doju: that's next meta strats

Doju: protect your pacs by blocking them from the other side

cegprakash: Doju and waste turns rofl

cegprakash: if creating meta is an art then kovi is the picasso of i

cegprakash: *it

cnn: Nope, what's bumping ?

cegprakash: bumping = colliding

Doju: i think there's one veryy specific case where that would be useful

Doju: if an enemy is going into a dead end

cegprakash: when u collide accidentally then there is some counter to it

cegprakash: but then kovi has a counter to that counter

Doju: you follow them but are countered and have cd

cegprakash: kovi had other ideas

cegprakash: :D

Doju: in that case it'd be beneficial to have another pac protecting you

cnn: I stil lhave no idea what that means :D

cnn: Do you have a replay ?

Hjax: kovi didnt play utg

RockyMullet: my bot doesnt handle collision from collisions, it sometimes lead to really bad games :grimacing:

Hjax: the trendsetter there was the_duck

Jay_Jayjay: Does anyone have parameterfiddler working?

cegprakash: RockyMullet u mean chain collisions?

RockyMullet: yah

cegprakash: I don't have it too

cegprakash: don't think it's worth it

alinde2: Sprinkle in some Math.random() to fix that.

RockyMullet: like if my pac collide with an enemy which leads to my other pac to collide with my pac that is still there because of the collision

Enknable: night at the roxbury attack?

NapTown: lol

AntiSquid: @cnn that looks like something AutomatonNN would say

AutomatonNN: update your age

njaber: AntiSquid I'm not sure the results are accurate but if they are you were wrong on the optimization thing, the other choice was faster, it's not very noticable though

AntiSquid: i see, thx for letting me know

cegprakash: eulerscheZahl is at #2

eulerscheZahl: random luck

cegprakash: lol

cegprakash: nice parking eulerscheZahl

cegprakash: *parking spot

eulerscheZahl: valgrowth finished the submit at #1, is at 11 now the leaderboard isn't very reliable

Hjax: i blame kovi

eulerscheZahl: but my tracking can be improved. not sure if i will instantly see it on submit but will make my bot better for sure

kovi: i blame overtraining

eulerscheZahl: but i'll leave that for tomorrow

eulerscheZahl: overtraining against whom?

kovi: self

eulerscheZahl: i didn't even bother setting that up this time

dbf: I moved 130 -> 70 in couple of hours without any changes, so not sure if I submit now for #100 - is it better or not :)

eulerscheZahl: no way to tell. the random aspect is strong

eulerscheZahl: 1 bad collision at a corner and it's even hard for a top bot to win vs a mediocre one

Quidome: ppff, nr 2 in silver...

Quidome: waiting to get pushed :)

Quidome: or not :(

Illedan: The difference in rank is VERY small

jjdb210: Any chance at Legend League we'll be getting the ability to see around corners when at the corner?

Illedan: No chance.

AntiSquid: you aren't even gold jjdb210

jjdb210: That's just a matter of time to code... :-)

AntiSquid: or being an alt

Doju: :D

AndrewLaneX: Is there a way to see the question of a clash after submitting?

NickStahl: 2nd in bronze.... maybe I can finally go to silver with my simple heuristics :D

alinde2: Oh my, I just realised that a move command has to be >=2 away or the speed bonus doesn't apply.

Doju: yeah you can

Doju: yup alinde2 it's a bit of a PITA

alinde2: I was wondering why my pacs were slower, this changes everything.

cegprakash: go go NickStahl

Quidome: yes!! made it :D

NickStahl: cegprakash tx. Still second :)

cegprakash: I wouldn't resubmit if I were u nicola

cegprakash: NickStahl*

NickStahl: cegprakash I won't, even if I have to wait until tomorrow :)

cegprakash: gratz eulerscheZahl

cegprakash: E1

cegprakash: #1

Quidome: I was in the same situation and just pushed to the next legeau after 45 minutes

NickStahl: Question... I do BFS to find my path... but the order in which i linked my nodes might be different from the game in case there are two routes to the same cell with same amount of steps... Does anyone know in which order the game does this?

cegprakash: how much difference NickStahl

NickStahl: ceg 30.92 (boss) vs 30.46 (me)

cegprakash: no NickStahl u need to check the referee

Doju: NickStahl if ypu want to make sure you can just take a step on your own path

cegprakash: NickStahl then wait

NickStahl: Doju, that's what I did, but thought that this was not always sufficient, I think it is though.. Need to think this trough :)

Doju: alright

alinde2: Welp, with me figuring out that a move has to be 2 away, I went from 800 Silver to 95 silver.

Doju: haha

Doju: nice

NickStahl: alinde2, nice, I should implement that :)

Doju: do you not have that?!

NickStahl: well, not if my closest pellet is one step away

Doju: D:

NickStahl: I know :) Focused on other stuff first. Amount of pellets I get in a game was hardly the issue, needed to make sure that I stopped dying first :)

Doju: gotcha

Doju: I've been spending so much of my time on this that i'm surprised that i haven't had any pac-man dreams xD

muy31: im so done... i just keep finding random bugs that hadnt existed before in my code

NickStahl: I remember my first time... Coders of the Caribbean... I even worked on my bot during work.

Doju: :D

Doju: this is my first time

NickStahl: I know, I follow the chat a lot :)

Hjax: ha kovi resubmitted and lost to me

Doju: :p

Doju: :o nice Hjax

muy31: https://www.codingame.com/replay/463892040 my bot is finding the pellet, but isnt going to it frames 31 to end

Doju: which one's better? this one? no, this one

Doju: no, the other one

muy31: i dont know why...

NickStahl: Doju, you had experience in AI related coding? Or are you going full heuristics?

Doju: I dont have experience in ai related coding. I only took an introductory online course that had 0 coding in it. Soo full heuristics, NickStahl

NapTown: muy21 it's going between 15-11 and 17-11, back and forth

Quidome: muy31 you are targetting the right one, moe to the right then targetting the left one

Doju: although it's debatable at which point complicated heuristics become ai

muy31: i know that obviously but i dont know why...

NickStahl: Doju ok, nice going then!

Quidome: O, well, yes, your targetting system is not known to us :P

muy31: given the fact that i am using a score map, what i know to be true is better than what i dint

muy31: dont

muy31: so why?

Quidome: ¯\_(ツ)_/¯

Jerzy: how can i got sample cod for bronze league

Jerzy: ??

Jerzy: nevermind

cegprakash: is it normal to add 5 bugs when u add 1 feature or is it just me?

Hjax: need to add at least 6 bugs per feature :P

Jerzy: yeah it is

Doju: cegprakash i add 5 bugs per line

NickStahl: Silver! :)

NickStahl: Waited it out

Doju: grats NickStahl

MarekM: welcome

cegprakash: yayya NickStahl

Default avatar.png HKG: ids are unique?

cegprakash: Doju lol

Jerzy: pacs id are uniique HKG

cegprakash: I don't know how ppl hire me in jobs I am doing mistakes on curly braces

cegprakash: :D

NickStahl: Enough for today. Back again tomorrow!

cegprakash: night NickStahl

NickStahl: tx for the support :)

Default avatar.png HKG: then no idea why it gives me two pacs with same ids 🤔

Doju: HKG own and enemy pacs have the same ids

NapTown: one is an enemy?

Crispy23: Opponent's ID?

muy31: what i did was just to add 5 to enemy ids

muy31: to differentiate

Doju: hahah, now that schools are closed, the principal and vice-principal are doing homeroom on every thursday via the fantastic platform that is youtube

Doju: it's absolutely hilarious

Default avatar.png faresnaoui: ramadan mukarak evevrybody

Krizai: 6th in silver. So close.....

Counterbalance: hm so everyone's submitting. Wins against top don't help if they're still at the bottom, and losses against top who just submitted keep the bot from climbing.. it's like quicksand

NapTown: these are the times we live in

AntiSquid: play the contest faresnaoui https://www.codingame.com/contests/spring-challenge-2020

AntiSquid: here on CG we celebrate the holy event of spring challenge bot contest and god is an AI

AntiSquid: i saw it in futurama

Kukiss: http://chat.codingame.com/pastebin/f62dd3bf-8a88-4c45-8b83-845c08a4df83

Kukiss: should have put a code separately

Kukiss: any help is appreciated, I must be doing sth very dumb there :/

Enknable: self.x =x, etc?

Enknable: oops..

Enknable: self.x = x, self.y =y, ..?

Doju: no that's not it

Doju: oh wait

Kukiss: Nevermind -.- I was putting variables when defining a function it could not work..

Kukiss: :flushed:

Doju: ah yes

Doju: if you do that then it uses the variables as defaults when no others were specified in the function call

Kukiss: I was doing things too fast :D wanted to define a method and run it

Doju: :p

drykberg: can i put wood 1 on my resume? ^^

Doju: just put in "professional programmer with experience in AI"

[Csongor]: (:

drykberg: seasoned professional in methods of applied machine learning, specialised in natural language processing

drykberg: thats what i have now

drykberg: think they will know? ^^

drykberg: are there any tutorials you guys can recommend to learn how to build a map, calculate distances, cost and paths etc?

Doju: Hmm

Doju: well, probably the easiest yet the best pathfinding for a grid like this is BFS

Doju: i just looked at the wikipedia page

Doju: maybe peeked at some implementations

Doju: then implemented it and debugged for a million hours

Doju: better learning experience if you do it yourself :p

drykberg: yes thats why i am here

drykberg: although, it is quite addictive

Doju: oh talk about addictive

Doju: i've been coding like 14 hours per day since the contest started

drykberg: lol

drykberg: i got onboard yesterday and coded through the night 12 hours straight

drykberg: no clue about anything

Doju: cool

Doju: how much programming have you done before?

Doju: oh hello 700 line mark

njaber: only 700 after 14 hours per day?

Doju: yup, honestly most of that has been fixing bugs prolly

Default avatar.png Lydericsensei: Hello World. I've just started codingame, I'm in coders strike back. I'm winning against the Boss & don't fit any of the "lost condition" yet I'm not moving up a level (i'm in bronze1) any ideas?

Doju: and i've done a lot of things that i've never done before so they're taking some extra time

njaber: I've been doing 90% things i've never done before and I'd say 70% of my time is spent debbuging yet I'm at 1700 lines

Doju: huh

Doju: maybe we have a different style?

Doju: or maybe you just have more stuff

njaber: Yeah idk

njaber: Or maybe I just space my code out more XD

darkhorse64: Lydericsensei: did you submit your bot ?

njaber: I guess I kinda limit myself to ~100 characters per line so this might affect the length of my code quite a bit

njaber: I hate that the tilde display as a minus here

Doju: i do a lot of list comprehensions

Doju: those tighten code up a lot

Default avatar.png HKG: code shouldn't be longer than 80 lines imo

Default avatar.png Lydericsensei: Yes I did submit. Many times

Doju: HKG hmm :D

Doju: 80 lines?

Doju: or do you mean 80 chars

Default avatar.png HKG: oh.

Default avatar.png HKG: just realised

njaber: 80 1000 character lines I guess?

Default avatar.png HKG: 80 columns, right xD

njaber: Xd yeah that I can understand

Default avatar.png HKG: somehow my brain read lines as columns

Doju: I just pasted all of my code in to microsoft word

Doju: this is the height of my coding career

cegprakash: euler still has timeouts

cegprakash: and he is #3

darkhorse64: If your ranking is not above the boss, you do not get promoted

njaber: I have a hard time making my code both less then 80 characters and properlly formatted/readable, especially in languages with lots of nested blocks like C#

Doju: 25000 chars on 700 ines

Default avatar.png Lydericsensei: oh

Default avatar.png Lydericsensei: you not only needs to beat the boss 1v1 but then beat its ranking?

Doju: of which like 8k are tabs

Default avatar.png Lydericsensei: Got it

Default avatar.png Lydericsensei: thank you for clearing that up

Doju: yup lydericsensei

Kukiss: also Lydericsenei join the currently open contest. It is running for next 3 days and almost all conversation here is about it -> Spring Challange 2020

Default avatar.png Lydericsensei: will check it out

Default avatar.png Lydericsensei: ty

darkhorse64: submitting runs a number of battles against other people's bots and the boss. You get a raking frolm these battles. At the end of the run, your ranking must be above the boss for promotion

njaber: 45854 characters, 10676 blanck characters

Default avatar.png Lydericsensei: so I do need to wait a while

njaber: Doju what language btw?

Doju: my lines are more character-dense than yours then

Doju: python

Default avatar.png Lydericsensei: that's why. I'm always impatient and closing games against other ppl lol

Doju: must be my stupid variable names

Kukiss: When you submit your code and go to "Last battles" you will see the progress of battles done in %

njaber: Well it's understandable that python code is shorter then C# code also

Doju: yeah

Doju: oh im dumb

Doju: i was wondering why my bfs didnt work

Doju: apparently i put in "cell is empty" as an exit criteria

njaber: most of my bugs come from me pasting part of my code elsewhere and forgetting to change some part of it

Doju: most of mine come from forgetting the second = in comparisons :D

Doju: and the second largest category come from my sleep deprived brain

njaber: ^

Doju: i still haven't figured out a smart way to not make my pacs crash

Doju: like yes i know the idea

Doju: just put some flags on the existing target cells and dont go to those

Doju: but the thing that i use to pick a further cell to utilize speed will totally break that

njaber: I assign pellets to pacs before assigning pacs to pellets, this usually helps, tho there are still some corner cases

Doju: hm

Doju: that's smart

Doju: i was thinking of doing something like test if they have the same target

Doju: if they do, figure out which one should get it

Doju: and let the other ones decide again but with that cell excluded

njaber: I don't like to hardcode exceptions, I like to have my logics include as broad of situations as possible

Doju: that's reasonable

Doju: although i need to do something similar anyways soon

njaber: If you do that your pac will probably select a cell that is on the other side of the other pac

Doju: umm

Doju: not if i dont let them pathfind through the existing target cell

muy31: that's what i did doju it's semi recursive

muy31: refind a new cell

njaber: Right that could work, but you can't use your current BFS so this might get expensive both in time to code and time to execute

muy31: if there are duplicates

muy31: no not at all

Doju: i can use my current bfs

muy31: i have a working system ive been utilizing

Doju: i don't have logic hardcoded :P

njaber: You don't pregen the maps?

Doju: i do that too

Doju: but dont actually even use it atm

Doju: soon im gonna do some fancy stuff and use those

njaber: Oh so you'll jsut run a normal bfs

njaber: I guess that could work if not too slow

Enknable: checking that their next step isnt the same spot when choosing your path has worked for avoid crashing

Doju: woah what

Doju: i have such a big winstreak

Doju: this might actually push me to gold

Doju: not the blocking prevention

Doju: but a really minor change in pathfinding

Default avatar.png AlexRSS: Ahh man, I've just got the bare bones of dfs working in the map I copied over to vscode

Default avatar.png AlexRSS: I'm dreading bringing this into CG and seeing what inevitably breaks

Doju: https://www.codingame.com/replay/463967364

Doju: hahahh

cegprakash: Donu turn 95 https://www.youtube.com/watch?v=j9V78UbdzWI&feature=youtu.be&t=81

Default avatar.png AlexRSS: That one pac really carried the team at the end there!

cegprakash: *Doju

Doju: rofl cegprakash

muy31: implementing enemy tracking, hope this works...

Doju: gl

muy31: thx

AntiSquid: 4579 participants in the contest

njaber: muy31if you're stuck I'm supposed to be the expert (I think?), don't hesitate to ask

njaber: muy31

Doju: rip muy31

Doju: alright imma go for today

Doju: cya everybody

njaber: cya

Icebox: Adios

ArslannHalil: merhabalar

muy31: ok my bad i closed the chat for a while

muy31: njaber &% Doju

muy31: *&&

njaber: np

Default avatar.png adamjhawley: I just did my first clash and lost wayyy too much time because I couldn't see how to raise an error when all I had to do was print("INVALID") :((

thethiny: 3 Days left and I still can't seem to have a good path algorithm

daffie: same here

daffie: faced endless problems

thethiny: I fixed collisions and fixed stuck and fixed enemy collisions

thethiny: yet they all go to the same point

daffie: path system is pretty much the core of this needs to be build around that imo

Default avatar.png HKG: can I read enemy's ability cooldown?

CodinBotChatRelay: _creepersbane#2074: yes

EvModder: yesterday i said i would work on the pathing today.

EvModder: ....i feel like it's time for some combat upgrades

EvModder: lol

Zenoscave: How do you keep from blind corner collisions

Zenoscave: Track enemy possible?

cegprakash: I use a BFS inside my eval and it runs the same speed as pacsxwxh

cegprakash: I thought it would run pacs times faster

Zenoscave: do you iterate over all pacs?

cegprakash: only closest pellet

cegprakash: for each pac

Zenoscave: which on average is pacs x w x h / 2

Zenoscave: so linear to the same idea

cegprakash: nopes

EvModder: i dont track it at all and i die a lot because of it lol

cegprakash: my BFS is wxh

njaber: Nice, got stuck 30mn on a + instead of a minus

njaber: Wait no this doesn't fix it

Default avatar.png AlexRSS: Hmm

Default avatar.png AlexRSS: Anyone have any ideas what could be causing a random phantom positional argument?

Default avatar.png AlexRSS: self.mapcheckinit(self.x, self.y)

Default avatar.png AlexRSS: self.x and self.y are both ints

Default avatar.png AlexRSS: TypeError: mapcheckinit() takes 2 positional arguments but 3 were given

Default avatar.png Braykin08: Some languague adds "this" as a parameter during compilation which adds 1 to the argument count

Default avatar.png AlexRSS: Huh

Default avatar.png Braykin08: Meaning, you may want to substract one

Default avatar.png lxnn: is mapcheckinit a classmethod?

Default avatar.png AlexRSS: I added an extra variable so I could print it and somehow the object is adding itself as an argument

Default avatar.png AlexRSS: Yeah

Default avatar.png lxnn: https://stackoverflow.com/questions/136097/difference-between-staticmethod-and-classmethod

Default avatar.png AlexRSS: Wait no, got confused with terminology there

Default avatar.png AlexRSS: Maybe?

Default avatar.png lxnn: sorry, i assumed python, right?

Default avatar.png AlexRSS: It's a function within a class

Default avatar.png AlexRSS: Python 3 yeah

Default avatar.png AlexRSS: Defined as def mapcheckinit(x, y):

Icebox: just paste the piece of code here

Default avatar.png AlexRSS: self.mapcheckinit(self.x, self.y)

Default avatar.png AlexRSS: ...

Default avatar.png AlexRSS: def mapcheckinit(x, y, z): http://chat.codingame.com/pastebin/f547569b-513a-460b-9aa4-3054f11e8b30

Default avatar.png AlexRSS: AGH

Default avatar.png AlexRSS: Just figured it

Icebox: np

Default avatar.png AlexRSS: Forgot to include self

Icebox: :D

Default avatar.png lxnn: well done :D

thethiny: guys what are your best heuristics?

thethiny: I'm tryna find one

Icebox: if cx == 0:

         cx = width - 2

thethiny: but don't seem able to

Icebox: unless I'm missing something that looks weird

cegprakash: 1 if condition reduces my simulations by 4 times lolol

Icebox: do you add a border around the map AlexRSS?

Default avatar.png AlexRSS: I haven't done no, I just worked it in to allow looping

Icebox: shouldn't it be if cx == -1: cx = width -1?

Icebox: cause 0 is a valid coordinate

Default avatar.png AlexRSS: (Haven't actually got this working for a run in the IDE yet, but I had it working on one map in vscode

Default avatar.png AlexRSS: Umm one sec let me look

Default avatar.png AlexRSS: Right you are!

Icebox: :)

Default avatar.png AlexRSS: Thanks :-)

Icebox: Also a very general tip, probably too late to rewrite your code now and that's fine, but I'd advise against using globals

Icebox: like

Icebox: ever

NinjaDoggy: meh i disagree :)

Icebox: I'm always open for counterpoints

Icebox: do you have any good uses for globals?

NinjaDoggy: sure

NinjaDoggy: width,height,maze

Default avatar.png lxnn: they can be fine for small single-threaded procedural programs

Icebox: appart from the fact that they will destroy your life and take custody of your kids

Icebox: NinjaDoggy why not make those static variables of your game class?

NinjaDoggy: because everything in my code might use it

Default avatar.png lxnn: although ideally you'd use only static globals

Icebox: ^^^^

Default avatar.png lxnn: constant*

Default avatar.png AlexRSS: Yeah, I've limited them where I can

Icebox: NinjaDoggy well class variables are accessable from anywhere

Icebox: accessible*

Default avatar.png AlexRSS: It's probably not the most polished though, stuff like that I might go back and try to make better after the time limit is up.

NinjaDoggy: true... but typing

NinjaDoggy: GlobalInfo.width

NinjaDoggy: is kinda ...

Icebox: using namespace global;

NinjaDoggy: ok but now I see your point

Icebox: nah jk

Icebox: :D

Icebox: don't do that

NinjaDoggy: lol

Default avatar.png lxnn: I think in Python globals aren't too bad because of the way modules work

EvModder: https://www.codingame.com/share-replay/464031653

njaber: lol, I wonder why you pac was switching between staying in place and moving at the end

EvModder: gotta fake em out you see

Default avatar.png AlexRSS: :O

Default avatar.png AlexRSS: I have movement!

EvModder: my pacs are sentient

Icebox: AntiSquid 2.0

EvModder: my rank may have dropped from 40 to 140 just now, but my pac iq rose to 200

Default avatar.png AlexRSS: It crashes as soon as the pacs headbutt each other

Default avatar.png AlexRSS: But it's progress

Default avatar.png AlexRSS: Right that seems a good place to go sleep

Default avatar.png AlexRSS: Thanks for the help icebox!

Icebox: Np :wave: see ya around

Dav1dS: https://www.codingame.com/replay/464040164

Kukiss: hah, funny game

thethiny: is it weird that top 20 are using C to code?

Kellthazar: Jeez I think that a got a nice heuristc now! o.o

Dav1dS: nope, they are probably doing very expensive simulations that require a very fast language

thethiny: oh wow

thethiny: so they're predicting the game basically

Default avatar.png dogankoseoglu: why there are french articles in learn section ?

struct: CG is a french company

Default avatar.png dogankoseoglu: oh okayy

Default avatar.png dogankoseoglu: they should add language preference for articles

Default avatar.png dogankoseoglu: actually it's not a big deal to simply translate them and put different versions for different languages

Default avatar.png lxnn: I think the articles there are written by users

Default avatar.png lxnn: so it's up to them

Default avatar.png lxnn: whether they want to write a translated version

Default avatar.png dogankoseoglu: yes, some of them

Default avatar.png lxnn: it would be good to be able to filter by language though

Default avatar.png dogankoseoglu: I graduated in 2012 and maybe I wrote total of 500 lines of code

Default avatar.png dogankoseoglu: now I'm trying to catch back

Default avatar.png dogankoseoglu: but it's not easy at 30s

Default avatar.png lxnn: That's true, much less free time

Default avatar.png lxnn: Although there's tonnes of free learning resources out there now, on the bright side

Default avatar.png dogankoseoglu: actually I have lots of free time thanks to covid thing :)

Default avatar.png dogankoseoglu: at least I can create algorithms I need to study more syntax

Default avatar.png dogankoseoglu: problem solving part is unforgettable :D

BenjaminUrquhart: welp, looks like I need to get around to fixing my bot

BenjaminUrquhart: Instead of precomputing routes between points in the map I'm just going to lazy-load them and cache the result cause doing them all takes more than 1 second

thethiny: instead of precomputing routes, just have the distances and when u need a route generate it?

njaber: Yeah getting a route from distance isn't very expensive

njaber: if you have all the distances that is

thethiny: you can do it in n, where n is the distance

thethiny: comparisons are 4n worst case

BenjaminUrquhart: but why do that when I can just be lazy

thethiny: it'll save you time

BenjaminUrquhart: pish posh unused time is wasted time

thethiny: haha

cegprakash: https://www.codingame.com/share-replay/464063637 oh no

Kellthazar: thethiny, are you using pure heuristic in your algo?

BenjaminUrquhart: Kellthazar you promoting?

Kellthazar: Still battling...

Kellthazar: Lets see

Kellthazar: I did something in my logic that improved my bots performance a lot.

Kellthazar: Rank 3 =/

BenjaminUrquhart: rip

BenjaminUrquhart: you beat me and I'm mid-gold

BenjaminUrquhart: so

Kellthazar: 6 loses in a row

cegprakash: sometimes my win rate is high but my rank never goes higher I keep getting matches against lower ranked bots

BenjaminUrquhart: Kellthazar https://www.codingame.com/replay/464068282

cegprakash: http://cgstats.magusgeek.com/app/spring-challenge-2020/cegprakash shows 70% win rate but still caliberating at bottom 40

ashelkov: what a wonderful submit - top 7!!! glory for Ukraine and javascript :)

BenjaminUrquhart: C++

cegprakash: C++

Kellthazar: BenjaminUrquhart ouch

BenjaminUrquhart: keep in mind that's my ide code which currently has some stuff disabled since I'm editing stuff

BenjaminUrquhart: so

icecream17: Ugh. I die a lot more when I speed... oh wait

Default avatar.png Braykin08: Top 20 = Better programmer = More Experience = Older = Born and meld by C

Kukiss: gz ashelkov :)

ashelkov: thanks

BenWo: evening folks

BenjaminUrquhart: I added a thing and it did absolutely nothing

BenWo: better take it back out, flip it upside down, and put it back in

BenjaminUrquhart: oh I put it in the wrong place

Kukiss: I rebuilded my classes with no real new feature and jumped over 70 positions

Kukiss: but it's a middle of submission, so I am gona fall down probably :x

BenjaminUrquhart: the ultimate debugging tool: kovi

cegprakash: I debug with euler

cegprakash: but he timesout at times

BenjaminUrquhart: I've successfully timed out

BenjaminUrquhart: cool

BenWo: congrats

BenjaminUrquhart: oh I forgot to reset nodes

thethiny: guys what is this thing called:

thethiny: I have 3 choices where each one affects the other. I want to select a specific order that maximizes the score of the 3 choices.

thethiny: Example

thethiny: I have -2, +2, *-1

thethiny: these are 3 choices

thethiny: I want to know the best order for these 3

Default avatar.png Braykin08: I personnaly call it a homework

thethiny: XD

thethiny: I mean it's either permuations or the other thing

thethiny: which one is it

wi_lius: are you talking about permutations (n!) and combinations (n choose k)?

thethiny: yes but I don;t know which one is for my problem

thethiny: idk which one to use

thethiny: basicalyl I want to generate all the possibilities without repetition

thethiny: and order is important

wi_lius: then it's a permutation, combinations ignore order

thethiny: is this the nPr one?

icecream17: Is it guaranteed that all spaces are pellets?

thethiny: yes @icecream17

cegprakash: except your spawn Icebox

cegprakash: icecream17*

Icebox: same

icecream17: Nice. Now i can put the opponents down because of symmetry in turn one, and pellets 100%

thethiny: yes

thethiny: @wi_lius thanks it was Permuations :D

Icebox: n!/(n-r)!

Icebox: woop woop

Icebox: factorials coming through

icecream17: New record amount of pellets: 10!

Icebox: 3628800 is a lot of pellets

icecream17: Hey, when the opponents are symettrical to us, is each ID directly opposite the other ID? It seems like it but im not sure

Default avatar.png journeyvivek: hi

icecream17: Is the width always odd?

Icebox: yes and yes

Icebox: to both of your questions

Icebox: the map has to be symetrical and the pathways have to be max 1 width

Icebox: so that's possible with only odd width maps

icecream17: http://chat.codingame.com/pastebin/86e3d28f-de75-4950-9db4-85482d5dfbb4

icecream17: AA BB Is symmetrical, width is even

Drastic_Loontastic: How do you enter debug mode again?

thethiny: Guys what's the minimum Big pellets count

thethiny: and what's the maximum?

thethiny: 4?

Icebox: icecream17 fair enough, argumentation was wrong, statement remains true tho

icecream17: thx icebox convenient info

Icebox: http://chat.codingame.com/pastebin/f3bde18e-9c43-49a9-b946-5020cd573f80

Icebox: https://github.com/CodinGame/SpringChallenge2020/blob/7c55441261dfd23de72cdff8b51941ed14a9e057/src/main/java/com/codingame/spring2020/Game.java#L59

njaber: C# is in Debug mode in IDE but release mode when submitted right? What's the difference in speed?

VicHofs: no idea @thethiny

Default avatar.png Lydericsensei: Hey world, small question: Why do they male me wait 45min to go in silver league?

NinjaDoggy: great question :D

Flyingkid: Are you head of the boss?

thethiny: looks so

thethiny: why do people follow others here, trying to understand this website

Default avatar.png RustyCrown: how would you do a genetic algorithm on here, how would you train it?

Icebox: if you both follow each other it allows direct messages between you thethiny

Icebox: but it's mostly used purely out of respect

Icebox: which works well with the private msg thing

Icebox: I follow everyone who I aknowledge to be a skilled or engaging coder

Icebox: basically as a form of respect

Default avatar.png Braykin08: I don't see you following me

Icebox: if they follow me back (for whatever reason they have) it makes sense that it then allows us to dm each other

Icebox: I have literally no idea who you are Braykin08 :D

Default avatar.png Braykin08: T'was just a joke :P

NinjaDoggy: wait you need to both follow each other to dm? :O

Icebox: correct NinjaDoggy

thethiny: @IceBox bbut people can message me even without follow

thethiny: unless you mean DMs other than Chat

Icebox: only if you type something in chat

thethiny: okay, thanks :D

NinjaDoggy: "I follow everyone who I aknowledge to be a skilled or engaging coder"

O he follows me :O

Icebox: :D

Icebox: Absolutely, one of the OG's

NinjaDoggy: <3

ShlOk: Hello World!

NinjaDoggy: been around so long had to change my status from high school student to college student :P

NinjaDoggy: bio*

ShlOk: :joy:

Icebox: the day will come you'll change your coder status to professional :P

NinjaDoggy: true! :joy:

thethiny: My path system finally works

thethiny: and it's collaborative :')

thethiny: I didn't use this emoji

VicHofs: good stuff @thethiny

thethiny: I used this 😭

VicHofs: wym collaborative

thethiny: It means they determine where to go by discussing with each other

VicHofs: is that a bad thing

thethiny: These are tears of joy

thethiny: 😭😭😭

VicHofs: oh

VicHofs: ok

VicHofs: lol

thethiny: I used permutations

NinjaDoggy: you should have them print messages'

NinjaDoggy: like "no you go left"

NinjaDoggy: :P

VicHofs: how'd you do that?

VicHofs: just curious @thethiny

thethiny: I assign 4 points that I consider crucial

thethiny: say for example the 4 pellets at the start

thethiny: then I distribute all points to all the pacs

thethiny: then I ask them to print out their distances

thethiny: and I pick the shortest distance of them all using

thethiny: using permutations

thethiny: since you have a maximum of 60 permutations

VicHofs: oh I thought about doing that lol

Icebox: holup

Icebox: why permutations

VicHofs: but I thought I wouldn't manage

Icebox: all pacs take turns simultaneously

thethiny: so?

Icebox: so it should be combinations

VicHofs: I didn't get that bit either but I won't question

thethiny: I asked a while ago and they told me what I'm looking for is called permutations so I went with that

Icebox: imagine you have 2 pacs

Icebox: and each pac has 4 options

Icebox: how many possibilities does your alg come up with?

NinjaDoggy: i think he's treating it as turn based

thethiny: 4

NinjaDoggy: and then permuting order

CodingCarter: anyone here taken AP Computer Science A?

thethiny: wait let me calculate properly

thethiny: should be 16

thethiny: yes 16 possibilities

Icebox: those are combinations

Icebox: thethiny 02:54AM idk which one to use basicalyl I want to generate all the possibilities without repetition and order is important

Icebox: cause order is not important if you have 16

thethiny: Permute([1, 2, 3, 4], 2) =

thethiny: 12 possibilities lol

thethiny: @IceBox I think that I'm generating combinations using permutations then

Icebox: :thinking:

thethiny: since I had to do too many if statements to bring down the number from 120 to 60

Icebox: what lang?

thethiny: python3

Icebox: from itertools import combinations :)

NinjaDoggy: :O

ShlOk: Java is best??

thethiny: I just compared both of them together

thethiny: permutations to combinations

VicHofs: whatever you're best at is best

thethiny: and no Combinations isn't what I'm looking for

thethiny: combinations are missing too many combinations that I need

ShlOk: @vichofs yessss!!

Icebox: okay

thethiny: since to me, pellet_id = idx

Icebox: so you want

Icebox: to have all possible moves

thethiny: yes

Icebox: from pac A

Icebox: and then check it

thethiny: to all 4 points

thethiny: then Pac B to all 4 points

Icebox: with all possible moves with B

Icebox: yeah

Icebox: I have bad news

thethiny: yes?

Icebox: that's neither permutations nor combinations

thethiny: then what is it then

Icebox: from itertools import product :D

Icebox: you're literally multiplying all A options with all B

NinjaDoggy: yeh combo is a choose b

NinjaDoggy: perm is 4!

thethiny: still not it

thethiny: oh wait

NinjaDoggy: u want 4^2

thethiny: okay so from this I can see that

thethiny: this gives me all posibilities

thethiny: which is true, but not in order

Icebox: there is no order tho

thethiny: I want the possibilities ordered between the pacs

thethiny: so that if Pac 1 goes to A, pac 2 cannot go to A

NinjaDoggy: that's ok

NinjaDoggy: you can resolve them later

NinjaDoggy: detect that it's a collision and then don't do it

thethiny: for pellet_idx, player_id in enumerate(perm):

thethiny: dist = self.get_distance(game.player_pacs[player_id].position, big_pellets[pellet_idx].position)

Icebox: you're assuming that action A from pac 1 is same as action A from pac 2

Icebox: just because they are both the 1st option of each pac doesn't mean they can't do it together

thethiny: pac 1 and 2 can't go to A together

Icebox: alright, you might be missing the point :D

thethiny: I understood what you mean

thethiny: but see the thing is

thethiny: I'm using the index as my position, not the actual permutations

thethiny: so for permutations [A B C D] for 2 pacs

thethiny: I get

thethiny: A B, A C, AD ...etc

thethiny: and from the index of A, which is 0

thethiny: I assign it to pac 0

Icebox: so not 16

thethiny: 12

Icebox: right, I missed that part

thethiny: so am I doing it wrong still or is it fine this way?

thethiny: https://www.codingame.com/share-replay/464102233

thethiny: first 27 frames

VicHofs: yo sweet finally not in the 1000ths in bronze lol

Icebox: that's 2nCr thethiny

Icebox: still combinations :D

Icebox: I have no way of knowing if it's correct or not, just pure banter about naming

Icebox: nCr(2,4)*2 = 12 though

thethiny: I'm always bad at terminology

Icebox: nCr(4,2) sorry

thethiny: okay so it's not 2nCr, it is n x nCr

thethiny: xD

Icebox: yeah yeah it's for 2 pacs

thethiny: if it's 4 pacs it'll change

thethiny: so it's n^2Cr

HKTran: sadly my rank now is 53th in bronze league, should I improve my code now or wait guys?

Icebox: rather

cegprakash: when u win 2 times in a row against kovi just submit I repeat just submit

thethiny: well it is doing this in under 1ms and it's working well so idm

VicHofs: is the boss in silver called inky too?

VicHofs: what

Flyingkid: Clyde

VicHofs: oh nvm

VicHofs: thethiny's in bronze too

VicHofs: how do I check battle % progression

VicHofs: I still don't know lol

NinjaDoggy: @HKTran always improve :D

HKTran: :joy:

thethiny: in the last battles

thethiny: it says so

VicHofs: where tho

VicHofs: is it the battle with highest index?

thethiny: under the screen

thethiny: it will show a percentage

VicHofs: I swear I don't see it lol

thethiny: https://imgur.com/undefined

thethiny: https://imgur.com/a/opnDV88

thethiny: waht's wrong with imgur

VicHofs: what

thethiny: can you see the image I sent?

VicHofs: I don't see anything where the arrow is pointing lol

VicHofs: yeah I can but ^^

thethiny: exactly

thethiny: if the battle progress not done

thethiny: it will show there

VicHofs: oh ok

VicHofs: so if it's not there it's done

VicHofs: gotcha

VicHofs: ty

thethiny: :D

VicHofs: -it could just fucking show 100% tho-

thethiny: ikr

VicHofs: are battles instant tho

thethiny: my windows demanded an update

thethiny: so I did

thethiny: now demanding again

thethiny: what is it my wife

VicHofs: cause right after I submit there's nothing there either

Kellthazar: 4 loses on 20 games... not bad

VicHofs: yoo I fell a ton ri[

VicHofs: rip

thethiny: youll always fall when u submit

VicHofs: oh ok

thethiny: you start from last each time

VicHofs: got spooked the flip out for a sec there lmao

thethiny: no worries

Kellthazar: 6 on 25

Kellthazar: gogogo

VicHofs: boa mano Kellthazar

Kellthazar: ;)

thethiny: lol you're both Brazilian

VicHofs: oh no the mask is off

VicHofs: I mean

Kellthazar: https://www.codingame.com/replay/464113350

Kellthazar: What happened in this game

VicHofs: dance party bro

thethiny: guys let's say Iam at x = 0, and another me at x = 3. Both need to go to x = 1, but pac 2 has speed. Will they collide, or will Pac 1 arrive first then Pac 2 be blocked at x = 2?

NinjaDoggy: second one

Kellthazar: they will collide... and pac 2 will be on x = 2 I guess

VicHofs: what NinjaDoggy

VicHofs: said

mbaros: Is it possible to go back to previous round and continue testing the program there?

VicHofs: I don't think so

VicHofs: unless you have its seed and play against the same opponent

mbaros: damn... that's bad.....

VicHofs: why? did you really need to play the same round again?

Icebox: pfew back in top 100

mbaros: I want to debug there (on the easy configuration) and improve single instance algorithm

VicHofs: @Icebox stop flexing -_-

VicHofs: @mbaros think you're just gonna have to try your luck dude...

Icebox: after my eternal struggles I'm glad my fix didn't drop me another 1000 places down

VicHofs: @Icebox lend me some power fam

Icebox: \o/ take my power

thethiny: just you wait until I fix my algorithm then I'm placing #1 forever to the point where I automatically spot #1 without playing next contests

VicHofs: ty I'll give it back in 2 days

VicHofs: played ya

Icebox: oof

VicHofs: @thethiny 3spooky5me

VicHofs: anyone have any method to avoid pacs trailing behind each other

VicHofs: that shit's fucking me over big time

Zenoscave: You could try hungarian assignment algorithm VicHofs

VicHofs: I have absolutely no clue what that is but thanks

Zenoscave: https://en.wikipedia.org/wiki/Hungarian_algorithm

Zenoscave: Chose targets you want to visit and assign them to different Pacs separately

VicHofs: hmm

Zenoscave: just make sure they can't choose the same assignment

VicHofs: considering I'm a dumdum not sure if I can concile that with the BFS I already have going

daffie: not sure what pathing you have but I just give the adjacent tiles higher cost and they seem to disperse well enough like this

thethiny: this won't work btw, the hungarian thing

thethiny: let's say you're both going to same point, and that point has a point +1 away from it

thethiny: they will still trail

Neabfi: Or remove the pellets ahead of the first pac

thethiny: you can do that

thethiny: still same issue

Neabfi: you can do a bfs until there are 2 nodes for a given depth

thethiny: what if you shared the same path?

VicHofs: Neabfi that might work

daffie: if you share the same path then they're doing what they're told to do, why share the path if you don't want them following behind each other

thethiny: @IceBox Hungarian Algorithm is apparently what I was trying to implement using my perumtations, but I did it wrong :D

Neabfi: Depending of your ranking but if you’re lazy and not already in gold just simulate random move and take the best, just that will bring you in the first half of silver

Neabfi: no need even to simulate the collisions

VicHofs: simulate...

cegprakash: has everyone in top 100 started to track opponents? I'm surprised I'm not even closer to the rank I was yesterday

cegprakash: I was #20 yesterday on gold and getting to top 100 seem to be a struggle right now :D

JohnCM: it may just be unlucky submission

JohnCM: you can try again

JohnCM: well i have partial tracking of opponent, but not much, as too much tends to make my bot weaker

Zandy156: in silver today I was going back and forth from rank 30 to 150 to

Neabfi: Is it possible to keep track of all possible paths for the opponent and eliminate non possible paths ? Don’t know if memory wise it is possible

Zandy156: bronze I mean

Neabfi: I guess most people just keep track of a heatmap

cegprakash: how do I replay under same conditions with same spawn locations?

cegprakash: random spawn locations is not helpihng

njaber: Neabfi I do it and I don't elminate all paths already, yet I can still keep track of all possible paths over any number of turns without seeing the opponent

Neabfi: without any pruning ? :open_mouth:

njaber: pruning?

njaber: You mean removing "unlikely" paths?

Neabfi: yep

njaber: No I keep all possible paths

njaber: But I remove them if I'm sure they can't be possible

Neabfi: ok that is impressive

njaber: The only thing I might need to optimize a bit because it might timeout in extreme cases is removing the paths when I see the enemy

JohnCM: my code keeps timing out nowadays

njaber: I use a trick to regroup as much paths as possible together without losing information

JohnCM: although it didn't change much from the original

JohnCM: guess the 50ms became a little shorter, or there is some bug in my code

Zenoscave: JohnCM it is the second

Neabfi: @njaber are you also including the speed ?

JohnCM: lol oh well

njaber: Yes

cegprakash: does anyone know to replay under same coonditions with same spawn locations?

njaber: Actually I made a condition to exit (basically give up) if I see the enemy in a place where I think he cannot be

Neabfi: ok I have to think then to find a data structure that allows to find very quickly all the path that go through a given cell at a given time

njaber: cegprakash Settings, expert mode, then next to player selection => options => manual, and then set the seed

njaber: Neabfi the trick is that I don't know all the paths that go through a given cell at a given time, I don't actually know all the pathes an enemy could have taken in a reasonable time, what I can know easily is whether the enemy could have taken any given path I want to know

Icebox: thethiny are you gonna try implementing it now?

njaber: So I can check the validity of a path but not list all the valid ones

Icebox: the algorithm I mean

Neabfi: But so can you know the probability that a enemy pac came by this cell in the past ?

Neabfi: * I mean: The probability for a given pac that he visited a given cell before time t

njaber: I don't do probablities yet, and I'm still not sure I can implement it how I want with full Bayesian probability, but I have a few ideas and it might be possible. It's definitely possible if I don't update the probabilities in a bayesian way when removing paths

njaber: It MIGHT be possible with bayesian updating but I'm still not sure

Neabfi: That opens lots of possibilities by looking at the enemy score

Neabfi: (and more obviously the big pellet )

njaber: Yes of course, I don't support thos path removings yet but they will be super easy to add with what I have currently

njaber: Rn I'm working on an algorithm that uses the same trick I use with enemy tracking for pellet path finding, but I'm still not sure it's possible, I'm doing a lot of theorizing rn. If my theories are right I might have a hyper powerful but, but it's a gamble because I might also just not have something submitable before then end of the challenge

njaber: hyper powerful bot*

Neabfi: yeah I see, you make me hesitate to switch to a full tracking ^^For now I just have a slightly improved heatmap for each pac

njaber: It took me a lot of time to implement, so this might not be worth with a little more then 3 days left

Neabfi: yeah and I don’t have much time until Monday

njaber: well I guess most of the time was debbuging so if you're good at avoiding bugs you might have time

Neabfi: You know other wise I’m still randomly sampling moves lol

Neabfi: I don’t have any heuristic yet

njaber: I don't like random sampling, I like to do things the most deterministically possible, I only resort to probablities when I'm sure I don't have enough info and I need to make a bet

Neabfi: Yeah it is just the lazy solution :p

thethiny: @IceBox I was trying it now, and it is giving me the exact same solution as mine, only in less time

Icebox: did you actually implement it lol?

thethiny: no I used scipy

Icebox: thank god

Icebox: :D

thethiny: XD

thethiny: though importing scipy takes long!

thethiny: do import count in the first frame?

Icebox: it's before first input though so it's not counted

thethiny: oh okay

thethiny: so anything I do before first input isn't counted?

Icebox: yes and no

thethiny: damn

Icebox: if you put some long ass calculations before reading inputs you still timeout

thethiny: then how does it know

thethiny: I mean

thethiny: currently my first frame is 800ms

Icebox: on the other hand, anything you want to calculate before reading the first input can be calculated offline and pasted in zipped string

thethiny: scipy takes about 200 to load

thethiny: that's true

cegprakash: 13 wins in first 15 games.. luck or good change :O

Zenoscave: jinxed

cegprakash: everyone in gold got amazing path finding! that's what this submission clearly tells

Zenoscave: Does anyone do more than BFS?

cegprakash: depth = 5 rank bottom 30.. depth=20 with same code I'm at #22 now :D

cegprakash: Zenoscave I just do BFS

Zenoscave: And which path do you chose? Longest? Shortest? SCore based?

cegprakash: thousands of BFSs

cegprakash: shortest ofc

Zenoscave: What if a slightly longer one has a cherry in it

Neabfi: @cegprakash depth 20 with pruning ?

cegprakash: yes pruning

cegprakash: I assume opponent is stupid

Neabfi: how many iterations you get at depth 20 ?

cegprakash: around 10K xD

Neabfi: ok

Neabfi: I’m sample randomly with depth 11 for now

cegprakash: I usually test my eval with depth=1 whenever I change something but in this league it seems very much impossible with everyone having a good pathing

thethiny: just to be sure, 1 million comparisons require 1 million operataions, which is 1 GHz, right?

Zenoscave: no

thethiny: 1 MHz?

Zenoscave: GHz means 1 million cycles per second

Zenoscave: has nothing to do with ops directly

thethiny: okay so if I have 1 million operations of O(1)

Zenoscave: some ops are 1 cycle most are mor

thethiny: how much approx should it take

Zenoscave: 5 unicorn lifetimes

cegprakash: 0.001 seconds thethiny

cegprakash: in c++

cegprakash: python can do in 0.01 seconds

cegprakash: that's 10 times slower

thethiny: okay so in python

Zenoscave: give or take 4 unicorn lifetimes

thethiny: lol

thethiny: so let's say I'm doing 1 Million Ops, that transltes to MHz not GHz,

thethiny: cuz GHz is billion

thethiny: right?

thethiny: 1 Hz 1000 KHz 1000000 MHz 1000000000 GHz

thethiny: okay cool

Zenoscave: there's so much going on under the os and with system calls and locality issues/caching/interrupts there's no way to say X comparisons will take Y time

thethiny: @zenoscave I understand

thethiny: I just wanna know if O(n) where n is 1 Million will fit or not

Zenoscave: 1 million what

Zenoscave: comparisons?

thethiny: yes

Zenoscave: integer constant comparisons to a local variable?

thethiny: 1 million of CMP EAX, EBX JE

Zenoscave: Ah. ok

thethiny: Thanks BTW 👍🏻

Zenoscave: There's a processor speed somewhere... I forget what it is hang on

Zenoscave: They run at about 2Ghz. so 1million CMPS would take about 5ms

Zenoscave: I think...

thethiny: suddenly that's costly

thethiny: damn

thethiny: looks like I'll have to port my code to python

thethiny: from*

fasil: java is best python is worst

njaber: fasil ofc not if you want perf, don't do java, do c or c++