From CG community
Jump to navigation Jump to search

JohnCM: jiayou

eulerscheZahl: good morning

Icebox: moin :wave:

EvModder: mornin!

EvModder: i'm entirely rewriting my bot today lol

eulerscheZahl: i should rework my harvesting :/

eulerscheZahl: and codejam this afternoon

Icebox: what?

Icebox: is it?

Icebox: isn't it romorrow?

eulerscheZahl: round 2 is today

Icebox: oh I'm trolling, kickstart is tomorrow

Icebox: mb

EvModder: best of luck on codejam :)

eulerscheZahl: thanks

eulerscheZahl: i hope to reach top1000 tehre

Icebox: unrealistic goals again, huh? :eyes:

Icebox: :D

eulerscheZahl: i'm much stronger on CG than in these short rounds

Default avatar.png morning_cloud: :robot:

Icebox: same tho

Icebox: I mean you saw my usefulness in reply challenge

eulerscheZahl: i take you over unihedron everytime

Icebox: I'm lit in clashes tho

Icebox: those are "short rounds" as well

Icebox: :D

Icebox: same but different

eulerscheZahl: and fewer strong competitors

Icebox: ah my head is going to explode smh

Icebox: I should start like

Icebox: sleeping

eulerscheZahl: still awake?

Icebox: :D

eulerscheZahl: i'm already awake :D

Icebox: ofc you are

Icebox: like a clock every morning 6am

eulerscheZahl: and the bird is at my window, asking for a peanut

eulerscheZahl: recently i got a squirrel coming too

Icebox: what are you

Icebox: a disney princess?

eulerscheZahl: and my cat slapping against the window from the inside


VicHofs: pac1 huge brain play at frame 42 tho

thethiny: I was timing out because....... I was printing a long list

Gonny: what's the website to compare different versions of our bot against a set of players?

thethiny: 106-48 against Inky

VicHofs: anyone have a tweak to get pacs to do the same as blue pac 2 here?


VicHofs: from frame 30-66

eulerscheZahl: the blue pacmen are doing horribly

eulerscheZahl: going in every deadend for a few pellets instead of taking the long corridor at first

VicHofs: well considering they beat me I take it you're not a fan of mine lol

VicHofs: :(

eulerscheZahl: at least you got 3 of the superpellets

VicHofs: lol ye it's a priority in my algo

jrke: hey whats priority?

VicHofs: umm

VicHofs: are you joking or...

WINWINWIN: exactly what it sounds like jrke

jrke: K

jrke: no i am thinking its any other thing sorry :)

VicHofs: like I'm not trying to be mean lol are you serious or nah

VicHofs: oh ok

VicHofs: no I don't mean it as a coding term or anything kek

jrke: K

eulerscheZahl: if you rearrange the letters in jrke a little, you obtain "jerk"

VicHofs: yeah potassium is fucking dope jrke

jrke: yeah euler

VicHofs: that the point?

thethiny: can I see behind an enemy?

thethiny: if he's halfway can I see behind him?

eulerscheZahl: yes

VicHofs: I think so thethiny

thethiny: okay thanks

VicHofs: I think you can do it even if not "halfway blocking" the los

Kellthazar: What is your rank now thethiny?

lifetimeLearner007: how much time is it taking for u guys to calculate distance from every cell to every other cell?

eulerscheZahl: 20ms on large maps

thethiny: @Kellthazar I didn't submit yet, but I'm 76 in Bronze

VicHofs: what u got going rn @thethiny

thethiny: @lifetimeLearner007 30ms


VicHofs: lifetimeLearner007 not doing that

Kellthazar: 230 ms (to read and create my "board" object")... There is a lot of points to improve.

thethiny: @VicHofs I can now beat Inky but that's without using SWITCH or avoiding collisions, nor using line of sight. I just assume all pelllets are there. I will patch those first

WINWINWIN: Does BFS need to be optimized to reach that speed or is it b virtue of language?

eulerscheZahl: you have to start the timer after reading the input

thethiny: in C++ it's like that, in Python you need too many optimizations

eulerscheZahl: otherwise you measure time for your opponent and server activity too

VicHofs: Yeah I'm doing the same lol

thethiny: Good luck Vic

VicHofs: ty @thethiny u too :)

VicHofs: you know I passed you earlier lol

thethiny: good XD

Kellthazar: WINWINWIN, You only need the BFS to get all the paths, after this, you can use the paths to do all kind of calculation

eulerscheZahl: WINWINWIN i didn't optimize my BFS at all. was fast enough the way it was

thethiny: you're using C++ that's why

VicHofs: but now I "fixed" some stuff and dropped all the way to 550 lmao

thethiny: @VicHofs you can do it :D

VicHofs: ty @thethiny 頑張るよ

thethiny: me too

thethiny: 頑張るよ

Kellthazar: I implemented a kind of awareness range for my bots and my code is worse now XD

VicHofs: ええええええ

thethiny: I have too many functions that have similar names, I'm lost now, using wrong functions

thethiny: get_path get_path_nodes get_path_points

BenWo: thethiny - how many lines you up to?

thethiny: and autofill is filling the wrong ones :D

thethiny: 1145 lines

BenWo: dang

WINWINWIN: Using C++ or Java thethiny?

VicHofs: なんだよそれ日本語を理解できるの 笑笑

thethiny: Python

thethiny: @WINWINWIN

thethiny: I'm only using Python cuz I don't wanna deal with Pointers

thethiny: yet all I'm doing in Python is pass by reference

thethiny: :D


VicHofs: oh WINWINWIN is someone's user lol

thethiny: ikr

VicHofs: I was starting to wonder why y'all kept saying that lol

thethiny: took mew a few tries to find out

WINWINWIN: Yes, it is meant to be irony :D



Kellthazar: 803 LoC at the moment

VicHofs: cause u loseloselose?

eulerscheZahl: in i was waiting for you to just to #1 at the end of the contest :(

WINWINWIN: all the time :P

DavidTheNewKid: All I do is lose, take these L's like a champ :)

DavidTheNewKid: All I do is lose, I take these L's like a champ :)


VicHofs: me too DavidTheNewKid

VicHofs: up top

VicHofs: It's like a hobby to me at this point

thethiny: after a few turns the number of output lines reduces :O

thethiny: in stderr

eulerscheZahl: doesn't depend on the number of turns but how much you have printed in total

BenWo: must have used up your allotted errors already


lifetimeLearner007: can we find distances from every cell to every other cell in 1ms? Is that possible?

VicHofs: hey eulerscheZahl you're a veteran here

eulerscheZahl: true

VicHofs: got a simple way to deal with trailing pacs?

Kellthazar: BFS Flood fill before the loop lifetimeLearner007

eulerscheZahl: what are trailing pacs?

VicHofs: like a pac of mine going after or very close to another

VicHofs: thus they don't cover area well enough

lifetimeLearner007: Kellthazar, will that reduce the time to 1ms?

VicHofs: idk what to do exactly

eulerscheZahl: ah, clustering

thethiny: trailing he meant like same path

VicHofs: yeah that

thethiny: 1-2 steps away freom each other

thethiny: @VicHofs in my herustic I give 5 penalty for the pacs

VicHofs: idk what that means lol

eulerscheZahl: the easiest generic solution would be to simulate the whole thing and reward keeping some distance

lifetimeLearner007: VicHofs, commanding a pac by checking if this path is overlapping with already commanded pac and then change the path??

VicHofs: reward?

thethiny: if grid.get(node) == -2: self.f += 5

Kellthazar: lifetimeLearner007, no, but you only need to calc one time. After the calculation, you can store the result on a data structure to use in your bot logic.

thethiny: @VicHofs the F value

WINWINWIN: @lifetimeLearner007 there is a 1000ms allowance on the first turn, why not precompute it?

eulerscheZahl: a scoring function that gives bonus points for not being too close

VicHofs: *c0nFus10n 1nt3nS1f13s*

WINWINWIN: So something like score += sum of each pac distance from the other?

eulerscheZahl: i reimplemented parts of the game engine

lifetimeLearner007: Kellthazar, WINWINWIN, I'm precomputing it and its taking 90ms. I wasn't sure if that was reasonable. So asking if it can be done even faster like just 1or 2 ms

eulerscheZahl: so i test a move and obtain a new board state

eulerscheZahl: i do the same for several possible actions

Kellthazar: The C++ guys can do it in 20ms I guess...

thethiny: in order to beat the game, you have to beat the game

WINWINWIN: Is that even needed lifetimeLearner007? when we have 1000ms on the first turn how is it possible to timeout?

thethiny: make*

VicHofs: yeah lifetimeLearner007 thing is I'm not doing paths 😂

eulerscheZahl: then i look at each board and take into account how many pellets i collected in total and such

VicHofs: I just pick the destination

eulerscheZahl: you can add distance between your pacmen too at that point

lifetimeLearner007: WINWINWIN, I didn't say I was timing out. I was just trying to improve the time taken. Was curious if it could be done in 1 ms even cpp. I just got to know that its 20ms with cpp. Not sure if that's the best we can do though

WINWINWIN: K, Ive heard something about a Dijkstra algorithm being used for that, dont know how to use it

lifetimeLearner007: VicHofs, in that case, maybe u need better pellet tracking

eulerscheZahl: BFS does the job here. dijkstra has some extra features that you don't need and is slower for this grid

lifetimeLearner007: Diijkstra isn't necessary, simple bfs suffices, WINWINWIN

VicHofs: lifetimeLearner007

VicHofs: how so?


lifetimeLearner007: exactly eulerscheZahl. I learnt that the hard way by implementing it and timing out. lol

VicHofs: I have BFS rn to find the closest target

eulerscheZahl: :D

VicHofs: (works for different items and entities)

VicHofs: what the function returns is just the destination though

VicHofs: is that a problem?

BenWo: So how often does CG run challenges like this?

Kellthazar: My first contest was coder strike back

Kellthazar: pretty funny

lifetimeLearner007: VicHofs, the destination of first pac is to be considered as no pellet b4 calculating destination of second pac which would trail. Then, it'll no trail that much, mayb 1 or 2 cells

DavidTheNewKid: I've been doing a lot of clash of code, and I just don't find the reverse problems that enjoyable.

Kellthazar: I think the schedule is a new contest after 3 months I guess... BenWo

BenWo: oh, that's a long gap

VicHofs: I am doing that lifetimeLearner007 lol

VicHofs: maybe I'm just unlucky in that sense

VicHofs: but I'm trying to figure something else out


eulerscheZahl: you can still play most of the older contests. just without the possibility to win prizes and with less active players chatting about it

BenWo: right

BenWo: I like the time limit though

thethiny: @eulerscheZahl u good in python?

eulerscheZahl: mediocre

thethiny: may I ask u to assist me in sth?

VicHofs: what's sth?

thethiny: something

VicHofs: oh ok lol

eulerscheZahl: why me? i'm busy

thethiny: because you seem like you can catch typos on the fly

VicHofs: I'm good in Python if you need help with the language

VicHofs: not the algos tho lmao

thethiny: def __mod__(self, point): self.x

thethiny: this is giving me error

thethiny: says int does not have x

VicHofs: is it in a class?

thethiny: yes

thethiny: called Point

VicHofs: that class needs to have an attribute x

VicHofs: does it have that>

VicHofs: ?

thethiny: it does, but why does it say "int"?

BenWo: yeah, would need a bigger chunk of the code to debug that one

VicHofs: yeah

VicHofs: can you send a snippet?


VicHofs: can we see the attributes too?

thethiny: error is here

thethiny: return Point(self.x % len(point[0]), self.y % len(point))

VicHofs: I gotta see how you defined them

thethiny: @VicHofs which attributes

VicHofs: of the class

VicHofs: cause def __mod__ has to be in it right

thethiny: what does attributes mean

Gonny: you have len(point) and len(point[0])

Gonny: they are not consistent

thethiny: it is a 2D array

Gonny: are you missing a [0]?

VicHofs: attributes are the variables shared by instances of a class

thethiny: self.var in init?

VicHofs: yep

thethiny: def __init__(self, x=-1, y=-1):

       self.x = x
       self.y = y

thethiny: what's weird is that the line before the last is calling the last line

thethiny: return Point(self.x % len(point[0]), self.y % len(point))

VicHofs: Did you instantiate the class as an int by any case?

thethiny: nope, it is working fine in another function

thethiny: if grid:

               adjacent_point %=  grid

thethiny: this is working fine

VicHofs: a method for the same class?

thethiny: yes

VicHofs: huh

VicHofs: idk what could be going wrong then

VicHofs: what's the error out again?

thethiny: int does not have x attribute

VicHofs: huh

VicHofs: well unless you defined the instance as an int idk what could be wron

VicHofs: *wrong

VicHofs: you defined the __mod__ method inside of the class, right?

thethiny: yes

thethiny: I found the problem but not why it's happening

VicHofs: well idk then

thethiny: apparently point.x contains another point

thethiny: instead of an int

VicHofs: oh

VicHofs: well I guess I lack context

thethiny: adjacent_point = Point(1, 1) + Point(1, 1)

thethiny: adjacent_point %= grid

thethiny: this returns (2, 2)

thethiny: which is fine

thethiny: position = Point(1, 1) position += Point(1, 1)

thethiny: position %= grid

thethiny: gives error

VicHofs: isn't that essentially the same thing though

thethiny: it is

VicHofs: idk what to tell ya fam


VicHofs: what am I looking at here

thethiny: the error function that called %

thethiny: error at position %= grid

thethiny: it's a pointer issue

Kellthazar: Well.. time to go to bed.

thethiny: start is an object

thethiny: position = start

Kellthazar: Good luck everyone

thethiny: reference

thethiny: goodnight

VicHofs: valeu boa noite @Kellthazar

VicHofs: @thethiny yeah I got the function

VicHofs: But I can't seem to put my finger on it

thethiny: I'm gonna try and let you know once I find the issue

VicHofs: ok

VicHofs: gl

VicHofs: Imma head off to bed too

VicHofs: 3AM and what not

thethiny: yeah man found the issue FFS

thethiny: def __init__(self, x=-1, y=-1):

       self.x = x
       self.y = y

VicHofs: oh yeah?

VicHofs: what was it?

thethiny: I'm passing a tuple without *

VicHofs: oh you meant to initialize it with a tuple?

thethiny: yes

thethiny: I guess I forgot that

VicHofs: oh ok

VicHofs: I figured maybe it was on purpose with a transformation later on lol

VicHofs: anyways peace out yall

VicHofs: gl hf

thethiny: goodnight you to

thethiny: too*

thethiny: I'm timing out in arena, but locally it's working fine??!?!?!

thethiny: sth is wrong I just hit replay again and it works

thethiny: server issues?

thethiny: Inky just time out, wtf???

thethiny: timed*

HKTran: I was 6th in bronze league, then I submit again with an improvement, now it's 22nd :(

[Csongor]: ):

[Csongor]: I was yesterday 810th now I am 890th.

jrke: HKtran don't worry iwhen i was in bronze my rank was fluctuating from 5-200 one submit one submit 5 and one in silver same code

thethiny: guys I swear I time out in arena but not offline

thethiny: I mean in IDE

thethiny: I bet serve is busy cuz my BFS time went from 0.3 to 0.9 in the same stage

thethiny: server*

eulerscheZahl: how do you know it's the same server?

eulerscheZahl: is it in the same match?

thethiny: yes

thethiny: I just hit replay in same conditions

thethiny: sometimes I time out sometimes I don't

eulerscheZahl: CG has different servers. you can't be sure which one you hit

eulerscheZahl: from 2.2GHz to 3GHz i think

thethiny: so that means some servers are slower than others?

thethiny: but that still doesn't explain the jump from 0.3 to 0.9

eulerscheZahl: there's always some variation in time measurement. but 0.3 to 0.9 is huge indeed

jacek: happy Caturday

SurajMishra2209: time out for same scenarios in arena but not in ide

SurajMishra2209: *awkward*

BenWo: I'm definitely at the point where I'm winging it here, lol

SurajMishra2209: does crying help?

BenWo: definitely not

SurajMishra2209: inky loves to see me crying -_-

SurajMishra2209: from 34 to 324 in bronze

SurajMishra2209: pretty motivating

BenWo: you must have really improved the code to drop that far :-P

BenWo: that seems to be how it works, lol

SurajMishra2209: this time out thing is definitely not helping

**BenWo crosses fingers

thethiny: my RNG is always producing a number that ends with multiples of 4

thethiny: what even

Default avatar.png AVD: So are you saying the timeout isn't code related, rather server problems?

SurajMishra2209: I don't think it is...sent the parameters and tried in ide...worked fine

SurajMishra2209: but in arena timeout

Quidome: It is possible that you have a different match, try a few times more in the IDE

Quidome: because of random things

eulerscheZahl: and when you are close to the 50ms, it's definitely possible that you timeout sometimes but not always

Quidome: I have a situation which i want to replay and only getting it 1 out of 4 matches

Quidome: And it's on move 15 :)

SurajMishra2209: alright...I'll try again tomorrow...

eulerscheZahl: and some players are random. so sending it to the IDE doesn't guarantee to play the same game again

Default avatar.png AVD: Can you write out the time it took to process your code with Console.Error.WriteLine?

SurajMishra2209: 4 am is definitely not the right time to code

eulerscheZahl: true

Quidome: Sweet dreams :)

SurajMishra2209: :nerd:

klforthwind: can the map loop up and down?

eulerscheZahl: no

klforthwind: awesome, ty :)

BenWo: ugh, got an infinite loop somewhere I think

TinfoilSaint: infinite loop go brrr

BenWo: ok how do I run this crap locally

BenWo: I'm dying to be able to step through this mess

WINWINWIN: print inputs to stderr and run in a local ide?

Csipcsirip: calm down euler

TinfoilSaint: I just have a local test suite that I run locally

TinfoilSaint: So when I bug hunting I use my test suite to do it

eulerscheZahl: sorry Csipcsirip

eulerscheZahl: for this game local debugging needs the full match history

eulerscheZahl: what I do:

Rprades: euler on top!

eulerscheZahl: random luck i think

EvModder: either way, congrats

eulerscheZahl: arena: 54 Pacman: 78 draw: 20

eulerscheZahl: arena = old version, pacman = IDE version that i just submitted

eulerscheZahl: numbers: how often it wins

EvModder: it has been 18 hours since my last submission and frankly im terrified to do it lol

Csipcsirip: wow you test before submit?

eulerscheZahl: you don't?

eulerscheZahl: but only vs myself

eulerscheZahl: no online benchmark

Csipcsirip: nah, for me hte submit is the test :D

eulerscheZahl: too random

Csipcsirip: easier to get crashy replays

EvModder: i test in IDE by copying games i lost and trying to figure out if i can win them

eulerscheZahl: right now i'm just boosting the hungarian trio

eulerscheZahl: i catch crashes too in my local testing

eulerscheZahl: but i increased the time limit a bit

EvModder: how do u increase the time limit o.O

eulerscheZahl: modified the referee code

eulerscheZahl: but there's still an upper limit that's not that simple to raise

eulerscheZahl: so i have 75ms instead of 50

EvModder: where is the referee code?

eulerscheZahl: linked at the bottom of the statement


eulerscheZahl: and that's what i changed

kovi: wow, that is magic euler

eulerscheZahl: was there earlier today

eulerscheZahl: submit finished at #8 :D

kovi: from 66%?

eulerscheZahl: this one ended at 8

WINWINWIN: very well done eulerscheZahl considerable lead as 1st

WINWINWIN: 1.2 points

eulerscheZahl: too early to celebrate. but it's better than the previous version :)


thethiny: I made a coward AI

WINWINWIN: :) this contest should put you back on 1st in global LB eulerscheZahl

eulerscheZahl: as long as royale doesn't do anything stupid, you are right :D


solaimanope: any suggestion for qualifying for legend? I have been trying different ideas for last four days and nothing seems to bring great improvement

EvModder: what are some things you've tried? have you looked at games you lost for bugs or things to improve?

thethiny: My losses are only due to time out :(

EvModder: huehue i've been there

solaimanope: i have tried low quality sim for example not visiting a cell more than one time when choosing path; choosing path for one pac at a time

solaimanope: I have tried different profit calculations for shortest path

solaimanope: none seems to work

EvModder: how about your combat prowess?

solaimanope: i don't have any attacking strategy. I might be able to code to trap an enemy pac in some trivial case but I am not sure if it will do any good.

kovi: if legend is the goal look weakness on the boss

eulerscheZahl: that attitude is exactly why i never want to be the boss

struct: Nice euler, good luck for the rest of the contest :pray:

eulerscheZahl: thanks. been there a few times, never lasted till the end

struct: 4 hungarians in top 10

struct: damn

struct: all from budapest

eulerscheZahl: nixerrr where are you?

eulerscheZahl: your country needs you

eulerscheZahl: Csipcsirip from budapest too

struct: yeah he is currently on submit

struct: he is top 10 too right?

eulerscheZahl: sometimes

Brokolis: Do you guys write in local IDE or in the online one?

eulerscheZahl: offline

struct: local

ashelkov: VSCode

struct: offline yeah*

struct: by local I meant on my machine

eulerscheZahl: with multiple files that i merge into 1 on build

struct: ^

Brokolis: Makes sense

struct: I also have template that generates some functions so I dont rewrite them everytime

eulerscheZahl: i just copied my OoC :D

thethiny: guys look at my blue pac in the middle top.

persi: Hi guys

thethiny: I mean... It said so

persi: I'm a noob in this games

persi: How I can get better?

eulerscheZahl: step 1: hypnotoad avatar

persi: Well, and step2..?

Insufficient: hey persi :)

Insufficient: a good idea is to watch your games and see if you can see your pacs doing things you dont like

Insufficient: and think of what would be better and try to think of a way to tell them not to do the bad things you see them do

Quidome: keep it simple, get rid of the bugs before the next feature

eulerscheZahl: i always struggle to answer these general questions that aren't about a specific issue

Quidome: You are in Wood 1, correct greedy play should get you into bronze

eulerscheZahl: go to closest pellet

Quidome: correct greedy play is hard enough when using speed ;)

struct: Its hard to answer honestly

Quidome: Is speed available in Wood 1?

struct: no

persi: No

persi: I think..

Quidome: aha, sorry about that

BenWo: hi persi, welcome :)

struct: persi just move to closest pellet that isnt already being targeted

Quidome: good advice

Quidome: maybe target supperpellets before everythinh

struct: yeah, target super pellets if dist < n

persi: I'll work on it. Thank you all!

persi: See you on gold!

Quidome: :punch:

EvModder: eulerscheZahl im looking at a match in IDE where i eat 4 of 5 of your pacs and you still end up winning

eulerscheZahl: share it

eulerscheZahl: losing 4 is a lot

dbdr: wow, eulerscheZahl #1, gg! what happened? :)

EvModder: oop i already pressed play and it got lost, is there a way to view game history for IDE?

eulerscheZahl: i submitted and got really lucky i guess

eulerscheZahl: it's gone

EvModder: rip

dbdr: aaaaaand...

eulerscheZahl: i like that southpark reference

Quidome: yes, a seed history would be very helpfull indeed :)

dbdr: write a script for it ;)

eulerscheZahl: or not losing your current IDE match on promotion

Quidome: aha, that's an idea

eulerscheZahl: or your bookmarks on league opening

dbdr: bookmarks??

eulerscheZahl: bookmarks survive. but link to 404 now

EvModder: here is an interesting one eulerscheZahl:

dbdr: ah, got that, was not sure it's systematic. :(

EvModder: my pac on the left going for the super pellet realizes it is dangerous but only at the last second

eulerscheZahl: and that, ladies and gentleman is the current #1 _D

EvModder: but then your pac lets me have it

eulerscheZahl: :D

EvModder: your bot is good enough it can afford to be generous sometimes :)

EvModder: not sure why it let me have the super pellet on the left, might be worth investigating

struct: its good, it just means you can still improve

eulerscheZahl: i know

struct: also his death doesnt make lot of sence

struct: ok it makes soem


EvModder: yeah it's a bit tricky, check the rules under the game it is formally listed out

eulerscheZahl: "i'll grab the super pellet later, small ones first"

EvModder: my bot that got me to gold did that lol

sgalasso: Hello does anyone have an ideas for prioritize pacs paths without calculating multiple times for the same pac ?

EvModder: a pellet is a pellet

EvModder: size doesn't matter

eulerscheZahl: it does in my code

EvModder: sounds like a bug :)

Doju: My pacs think they're stuck if they end up within the killing radius of an enemy :/

BenWo: morning Doju

Doju: morning

EvModder: i think my current sumbission has a similar problem Doju

Doju: or afternoon xD

EvModder: my pacs get really paniced

BenWo: my pacs are all broken

Doju: frame 60

EvModder: LOGIC

Doju: such logic

EvModder: my pacs use the power of spongebob

Doju: nobody has as much logic as i do

BenWo: lol, try using science

EvModder: but i dont believe in science

Doju: BenWo i'll try that

Doju: the word is too long :(

BenWo: Science cares not for your belief

eulerscheZahl: and now it's 50% hungarians in top10

Peudoki: sneakily I'm also Hungarian

Peudoki: so 60%

eulerscheZahl: tht was unexpected

eulerscheZahl: budapest too?

Peudoki: not exactly, but close


Peudoki: I live and study in London though

thethiny: woohooo

thethiny: 1000 ranks jump

perseverent: my BFS is not getting me out of silver

perseverent: any ideas

perseverent: ?

kovi: but that way dbdr is not hungarian

perseverent: BFS to first has no speed

Doju: thethiny wow, what did you do?

Doju: perseverent you need to make it not go to the first

thethiny: @Doju I rewrote my code

Doju: top tip

perseverent: BFS to first 3 is slower than BFS to first 2 for some reason

perseverent: :)

dbdr: let's say together we count as one Peudoki :D

thethiny: @Doju I also removed my combat mechanism

Peudoki: okay dbdr :D

Doju: thethiny that helped? :o

dbdr: but feel free to switch if you want to overwhel the top completely :D

eulerscheZahl: you are not hungarian?

thethiny: yes

eulerscheZahl: what you are dbdr?

Doju: mmkay...

perseverent: Yes Doju, but why BFS to first 3 is slower comapared to BFS to first 2?

struct: french

dbdr: I'm hungarian resident

struct: he is french

eulerscheZahl: no

Peudoki: I'll fall out of top 10 fast though

dbdr: EU citizen

eulerscheZahl: he said he's not that fluent in french

struct: not french?

Doju: perseverent it shouldn't have much of a difference in computational speed

Doju: if that's what you're talking about

eulerscheZahl: but he seems to speak a lot of languages

dbdr: I said that? I think there was someone complimenting on my french, might have been joking

perseverent: Doju I mean performance in battles

struct: So maybe he is from switzerland

dbdr: it's my native language

perseverent: if I submit this Doju I rank worst

eulerscheZahl: oh. maybe your replied with sarcasm and i didn't get it

Doju: perseverent what do you mean by "first 3"? neighbours? pellets? depth?

EvModder: i just made a genius change

perseverent: first 3 pellets

EvModder: if my pacs are running away, they will prioritize running towards pellets, not arbitrary directions

dbdr: oh, wow, it's 5 in top 10 now

dbdr: + Peudoki

jrke: hey i have one error

Doju: EvModder same but they also run into dead ends :p

jrke: if i put if(n%3==1)

jrke: then it works

jrke: and when if(n%6==1)

jrke: it doesn't why

dbdr: I hope my bot works out so I can join the top

jrke: c++

perseverent: Doju, my rank if I go after first 2 pallest, is higher than if I go after first one or the first 3

Doju: umh.. sorry but i have no idea whats causing that perseverent

Doju: use your perseverence to figure out

perseverent: doju good point

perseverent: not giving up

perseverent: but close

EvModder: Doju mine are doing that too, like in this:

EvModder: but hopefully i can fix that now

Doju: But you won?

Doju: and made no bad plays there?

Doju: oh wait, frame 10

Doju: gotcha

Clagus: I found a new strategy! Go to sleep! Wake up! And you're in GOLD! :D

perseverent: I tried that Clagus

perseverent: not working

Clagus: ok, you have to be top10 or top 5 first

Clagus: did you try that?

Clagus: :P

perseverent: did you use BFS?

EvModder: i'm going t just bit the bullet and submit

EvModder: how bad could it be?

EvModder: :D going mostly well so far

Default avatar.png ernestvw: guys please make the boss go down a bit

BenWo: I don't get it, I'm timing out in a simple loop that I haven't changed in days

EvModder: add lots and lots of debug code

EvModder: i fixed a latent issue today that i'd had for days, it just wasn't triggered very commonly

wlesavo: so eazy legend is when you take it by litterally sleeping

EvModder: hahah yes wlesavo that's how i got in too xD

BenWo: yep gonna keep adding more

thethiny: rank 8 in Bronze finally

[Csongor]: I get an error that it can't read id of undefined, but I logged the ids to console and both are defined. What is the problem here?

llllllllll: hard to know, without seeing your code, so try to debug it

thethiny: rank 4

perseverent: what pathfinding are you using thethiny?

thethiny: BFS

perseverent: So do I thethiny, but I can not get it to outperform the boss

perseverent: do you just look for closest 2 pellets thethiny?

thethiny: no

thethiny: I look for the closest 10 pellets

perseverent: I tried for the first 3 pellets but than I ranked lower than if I just look for first 2 thethiny

thethiny: sometimes when you look too far you miss the close ones

thethiny: make sure you have a reward and penalty systems

Doju: you look for that many pellets? :o

thethiny: yeah I have to

Doju: hm

Doju: And go in the direction of their average pos?

thethiny: How do I rank up if my battles are 100% done?

perseverent: you mean like shortest path wins thethiny?

thethiny: Now I have too many checks in place

thethiny: see, I calculate all routes from here to 10 points away

thethiny: then for each one I calculate the value

thethiny: +1 for pellets, +10 for big, +0.5 for corners, -2 for enemies, -3 for players

thethiny: then I calculate how many empty spaces are there, and where it starts

perseverent: utility function

thethiny: then I go to the point where the last space was found

Doju: oh wow, you have a lot more complicated of a system than i do

thethiny: I have to

Clagus: @thethiny - other players are submitting and fighting with you from time to time

thethiny: and I can't go more than that cuz python speed limitations

Doju: What rank are you?

perseverent: you can go up thethiny bc you fight others

thethiny: @Clagus If it helps other people in their programming, then I don't mind

thethiny: @preseverent I don't fight because it will waste time

thethiny: I might do that later

Clagus: thethiny sorry chat wasn't scrolled down :P I answered some old question I guess

perseverent: thethiny I mean, your bot will fight even after the initial ranking was complet

Doju: thethiny whatt how are you in bronze with such a sophisticated system=

Doju: i thought you were in gold

thethiny: oh @Clagus thanks! Sorry for the misunderstanding!

Clagus: I'm in gold and still using A* implemented in game xD

Clagus: is that an achievement? :P

thethiny: @Doju cuz I just finished my code today

Doju: okay gotcha

perseverent: Clagus A* to what? where are you going?

Clagus: perseverent - choosing a target I have a algorithm for that :P

Doju: But anyways I've been thinking of doing something similar + a little extra to make a really magical system thethiny

Default avatar.png morning_cloud: In bronze level, are you finding a way to overcome the line of sight constraint?

thethiny: guys the game sometimes is sending me that there's a Big Pellet even though there isn;t

thethiny: @Doju best of luck

Doju: i'm pretty sure you just have a bug thethiny

perseverent: I see clagus,

thethiny: @Doju I am printing the list of pellets and I can see the big pellet there

thethiny: even though it's not on screen

eulerscheZahl: do you clear the list?

thethiny: yeah

Doju: o.o

eulerscheZahl: sometimes the error streams looks off by 1 turn in the IDE

thethiny: I will check and see

jrke: hey some errors in IDE you are getting time out then replay again with same code then no timeouts:thinking:

eulerscheZahl: happens when you are close to the time limit

jrke: K

Doju: or you hit some bugs that aren't triggered every time

perseverent: morning_cloud no enemy tracking for me but I am in silver

struct: or probably game doesnt play out the same

yonder83: hello, I use A* too.

AntiSquid: nice, this submit is randomly better

jrke: no if you click replay in same condition

eulerscheZahl: soon legend AntiSquid?

Doju: jrke is it deterministic?

TinfoilSaint: Is A* the one where you assign weights to each direction and pick the best one?

yonder83: I'm trying to get to gold League, my code needs a little optimization

struct: jrke if you or your opponent has random in his bot it probably wont play th same

AntiSquid: doubt it, because i don't feel like rewriting to fix the bot

jrke: K

Peudoki: I'm 5th place but have attrocous winrate against top 4

Default avatar.png ernestvw: guys if you are top 2 of silver

Default avatar.png ernestvw: do you recommend to resubmit many times?

Default avatar.png ernestvw: or to wait to be pushed?

Doju: no ernestvw

Peudoki: is it close?

Default avatar.png ernestvw: it was 0.2

Doju: i'd say just wait unless you have some major improvement in your code

struct: was?

Default avatar.png ernestvw: now it is 0.4 i lost a match against a random perso

Peudoki: wait to be pushed

Default avatar.png ernestvw: n

Default avatar.png ernestvw: ok! thx

struct: Just wait like 1 hour

Default avatar.png ernestvw: i waited an hour already

Default avatar.png ernestvw: still 2nd

Default avatar.png ernestvw: i'll wait till i have a major improvement

yonder83: @TinfoilSaint. In large map, there is so much paths that I cant calculate them all in game init. I continue calculation during each turn.

Default avatar.png ernestvw: i just remembered someone saying he got first after submitting 5 times

Default avatar.png ernestvw: that's why i aksed

Default avatar.png ernestvw: asked*

struct: it can happen

struct: but can be risky

struct: Sometimes it works

jrke: after a pain of 4 hours full power coding first time in my life of 13 years i made Sim :)

struct: On FB and STC I remember submiting like 30 times or soemthing to get to legnecd

struct: legend*

yonder83: very interesting challenge, by the way

eulerscheZahl: the most honorable way to reach legend struct

struct: on stc is forgivable

Default avatar.png ernestvw: if i'm not gold by 4pm i'll submit 30 times

eulerscheZahl: why?

yonder83: It's pleasant to compete with you, this is best entertainment for me :laughing:

thethiny: @Maxlaxs our win rate is 1:1

struct: ok, I dont have a real argument :p

eulerscheZahl: illedan once complained about an overrated boss. gave him my bot. he was about 5 points above the boss at 60% and then cancelled the submit

struct: Maybe it really isnt

struct: yeah, that was what I was thinking

struct: Most top 30 bots would destroy boss anyways

wlesavo: euler what game it was? :slight_smile:

Maxlaxs: @thethiny only played against you 2 times when I submitted, so I take your word for it lol

AntiSquid: really curious what recurz is creating

Default avatar.png BoBot: hey, has there been a change in how much logging is allowed when running from IDE? I have had this problem throughout the contest, where I don't see why my code failed unless I comment out my logging - and it is not some ridiculous amount that would cause a timeout, like currently I commented out one line of log, and the execution moved on to the actual bug..

Default avatar.png BoBot: I am using Python, and I flush when I print to stderr

llllllllll: im not aware of anything like that

Default avatar.png BoBot: asking here, because maybe it is reported/common knowledge

thethiny: @Maxlaxs yeah XD

togatoga: Does anyone know what compiler options we use? I found that there are some differences about the run time between my local and codingame env.

EvModder: hey AntiSquid what'sup :)

Doju: BoBot I had some timout issues when printing ridiculous amount of logs, i'd say you should be able to print out a fair few logs before timing out

thethiny: #3 again lol

thethiny: #2

Default avatar.png BoBot: @Doju yes, I have had those problems over old contests, one issue is not flushing and the other is logging too much - now there seems to be a third issue :D

thethiny: YEAH BABY

Doju: gratz thethiny

llllllllll: grats


EvModder: it should say at the top

thethiny: NOOOOO

Illedan: You have to finish submission

thethiny: #2 again

jrke: whats this timeout in one then win in another

thethiny: but I beat inky

thethiny: it's a win in my book

AntiSquid: thanks i am fine EvModder

EvModder: :D

yonder83: @BoBot you can use timer keep track of remaining turn time. I use Stopwatch class for that

AntiSquid: how's it going EvModder ? where do you expect to be at the end of the contest?

EvModder: i don't know really, it's actually going well

thethiny: 85%

thethiny: 🤞🏻🤞🏻🤞🏻🤞🏻

EvModder: i lost some ranking but TBH that makes me less stressed about submitting new code now so im more motivated

Maxlaxs: Ayy got pushed into silver lol


AntiSquid: cool, but how will you get pushed into gold now

BenWo: congrats thethiny :)

thethiny: Thanks!

Maxlaxs: @AntiSquid making pathfinding will prob help a lot lol

AntiSquid: but then why didn't you do it prev league instead of waiting lol

Default avatar.png BoBot: @yonder83 thanks for that, there might be something surprising about where time is lost, though I am pretty sure it's not that

Maxlaxs: Well I submittet it today so not that much waiting + was doing other things anyway

thethiny: Clyde and I play the exact same way lol?


njaber: Maybe a previous iteration of your bot was selected to be Clyde?

thethiny: Is that possible? Lol

TinfoilSaint: wow, haven't seen a draw happen yet, what are the odds?

Doju: I've seen it quite a few times TinfoilSaint

njaber: I think they sometime choose a random submit that matches some criteria and power level as boss so this is possible

thethiny: oh I see

TinfoilSaint: Fair enough

wlesavo: wait, chokudai actually joined

BenWo: I am painfully slowly zeroing in on this bug

wlesavo: 1st in gold rn

Doju: wlesavo :o

thethiny: I can easily beat Clyde, yet I struggle against the ladder 😂😂

wlesavo: remember the chokudai search discussion?

Doju: Yup

kovi: psyho was also active in the night

thethiny: Guys what's Legend? A New league?

AntiSquid: yes

Doju: the highest league

thethiny: oh wow

BenWo: it's where the winners are

thethiny: and what are the rules there?

Doju: the same ones

thethiny: then what's the difference

AntiSquid: bronze league rules are supposed to be final thethiny

Doju: see what BenWo said

AntiSquid: same difference as silver and gold

chokudai: I found this contest on twitter yesterday and entered it.

thethiny: yeah but you can see dead pacs in silver

AntiSquid: really? you're doing really well for a 1 day bot chokudai

chokudai: thanks!

AntiSquid: already legend .

wlesavo: chokudai wow, nice

solaimanope: congratulations on passing gold, chokudai

chokudai: thanks!

Doju: How do you make such a good bot in one day :o

thethiny: experience

thethiny: he has lots of it

Doju: yeah

Default avatar.png Thiesjoo: How do you use BFS to get distance from every node to every node?

thethiny: currently at #150 in silver so I feel good about myself

Doju: Thiesjoo you run it from every node once and take note of the depth for each neighbour

Default avatar.png Thiesjoo: Ok thanks

MattSOrme: before i went to bed last night i was around 100, then i submitted what i thought was an improvement, and woke up to 1300 :/

Doju: MattSOrme that sounds like a bug

AntiSquid: i feel terrible even if i end up at #50 gold thethiny

MattSOrme: haha, yeah, just a little

thethiny: @AntiSquid the half of the glass

BenWo: oh thank god I found it

BenWo: now wtf did I do here

Cappefra: I feel like it was harder for me to get into gold here than in ooc

AntiSquid: really?

wlesavo: legend is easier though, due to such randomness

AntiSquid: here you're aren't forced to track opponents to get gold so that's a huge plus

wlesavo: AntiSquid even legend actually

Cappefra: Yeah AntiSquid, though it might be cause I lost a bunch of time trying to implement MCTS for the first time (and failed)

**AntiSquid removes tracking

AntiSquid: think the tracking rather confuses my bot

MattSOrme: my bots run great till they start hitting my new pellet finding, then they seem to just start going back and forth :/

Cappefra: I lost a bunch of stuff in my deterministic bot and had to rewrite it

EvModder: wlesavo your bot is non deterministic and i hate it lol

EvModder: so hard to test anything against it xD

Cappefra: but also it might only be that submitting here it's a bit frustrating cause of sooo much more randomness

thethiny: *test

wlesavo: EvModder at least it is not a boss this time :slight_smile:

thethiny: how do you write in bold

AntiSquid: EvModder imagine his bot was the gold boss (happened last contest, hard to test anything against)

**thethiny test

EvModder: o lord xD

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

Cappefra: I was beating the silver boss almost every time and I was in the first 50 places in silver, still I had to submit like 5 times before the algorithm even put me against the boss for the first time

Cappefra: I was even place 9 at some point and didn't even get a single battle against the boss

wlesavo: EvModder actually this one at least have fixed seed but a random number of simulations, ooc one had random seed

Cappefra: then I went to the market, came back and now I'm mid-gold

thethiny: well done

Cappefra: it's weird hahaha

EvModder: still outside my comfort zone lol

njaber: has someone calculated the maximum distance between 2 points of the map in this contest?

Scarfield: you could loop, go back and forth, how max dist?

njaber: "Between 2 points"

njaber: if you do BFS distance

njaber: what's the max it can be

wlesavo: if you do a bfs distance it is fixed

njaber: You don't understand the question

njaber: lemme rephrase it

wlesavo: oh i see

wlesavo: max val of distance

Doju: the walls can be in different arrangements

Doju: hmm

njaber: If you were to search the shortest path between 2 points, what's the maximum length it can be

BenWo: about 48 I think

wlesavo: yeah, dont know about that but it is pretty close to Height+Width on most maps

BenWo: could be a bit higher

llllllllll: except if left-right side iis open

BenWo: right, most will be half that

BenWo: but there are maps without tunnels

ntroPi: theoretically # free fields in board, if you don't make assumptions on the layout. Especially if path being blocked by enemy pacs is plausible

BenWo: Just guesstimating, I'd say it wont exceed 65

wlesavo: it will exceed basically on maps with dead ends of particular shape in the corners

njaber: nvm, instead of hardcoding the value, I'll just calculate max length at the begining when doign my bfs, thx everyone fo the answers anyway

njaber: I'm not counting pac blocking btw

ntroPi: i.e. dijkstra should handle these cases well though.

ntroPi: ah yes good idea to precalculate the exact number for the field in your case.

njaber: I need it for optimization because I got an algo that runs in O(n^2) and same for memory where N is the number of turns, and Ireally want to optimize it, and I know I don't need turns past the max length I'm atalking about

eulerscheZahl: are you using chokudai search?

eulerscheZahl: oh, chat scrolled

Scarfield: im still not sure what path you want, the longest non self intersecting path between 2 points? the longest path done with bfs where when the search reaches the target pos, it stops spreading?

njaber: the longest possible "shortest path" between 2 points of a map

njaber: so yeah last answer

WINWINWIN: njaber, I asked this question on the forum earlier

Scarfield: haha okay, makes sense


WINWINWIN: this is the answer

njaber: WINWINWIN thx

njaber: Oh it's not the same question

Scarfield: this answers the longest path though

njaber: Dw I got it working anyways

WINWINWIN: you want to find the longest potential path to a given location without crossing over your previously crossed points.

njaber: WINWINWIN no it's just the longest a "flood" algorithm could need to run to fill the whole map

njaber: I don't need it for a flood but since I do flood on all cells at the beginning of the game I alreeady got my answer

njaber: I just hope it's not more then 100 or else I might have cases where I can timeout

njaber: hope it cannot be *

WINWINWIN: K, sorry no forum post on it

elderlybeginner: anyone knows how to get rid of editor suggestions and tips?

Scarfield: since it is a "direct" path it shouldnt exceed 35 + 17, at least not when you are using bfs to find it. the spreading will cancel out longer paths, i suppose anyway

njaber: Scarfield I think it can be a little more then that if there are convoluted wlls can't it?

njaber: walls*

Scarfield: there is propably some cases where it can reach a little more, but certainly not up to 100, the expanding of the bfs will stop that i think

njaber: I mean without the constraints of the tetris map generation algorithm, the longest would be a spiral, but a map like that can't happen with this algo

JohnCM: haha i think heuristics alone can't go to legend already

JohnCM: need to use some form of partial simulation

MSmits: you sure do

JohnCM: while i can win the ai 70% of the time, i can't win the rest

JohnCM: when i configure to win the rest, i can't win the ai

Scarfield: anyway gtg, happy coding all :)

JohnCM: so it is a dilemma here

WINWINWIN: Are all the people in legend using opponent tracking or is map tracking enough?

JohnCM: yup which heuristics can't solve because it doesn't adapt very well to diff. playstyles

MSmits: you can get legend with opponent tracking if you assume opponent to be stationary and dont get near opponents that kill your pac

MSmits: without opponent tracking i mean

MSmits: so just worry about coordinating your own pacs

Peudoki: own pac coordinating is so much more important than anything else

MSmits: yes, it's really the only thing in my bot I can definitively say helps a lot

eulerscheZahl: bu tracking really helps to know where to harvest

MSmits: the rest is just, meh...

BenWo: oh thank god it didn't crash

JohnCM: i get what you mean MSmits

MSmits: yes its helpful, *if* you can pull it off euler. It's not easy and not many succeed i think

eulerscheZahl: mine isn't perfect either

eulerscheZahl: still better than nothing

JohnCM: i use a similar approach, but i don't search everything, I estimates lots of it with heuristics

MSmits: dont think anyone's is perfect

ntroPi: elderlybeginner you can disable applying of the editor suggestion on return key - in settings

MSmits: better than nothing is a serious achievement

JohnCM: i only need to run bfs for my algo and that's it, pretty good alr

NormantasStankevicius: Gold, legends of this contest, when you are looking where to go next, do you look for all the possible pellets and how much you will make on the quickest way there? or just see if going North, East, South West is more worth by doing a recursive way of finding the most valuable path going the 4 directions?

JohnCM: nearest pellet isn't going to cut it

MSmits: people do this differently NormantasStankevicius. I try random move combinations for my pacs and pick the best ones

JohnCM: you need to have a sum of future rewards

MSmits: yes

JohnCM: either by simulation or by bfs

NormantasStankevicius: well I don't go nearest pellet

NormantasStankevicius: I go through a vector

WINWINWIN: With a variable number or pacs is it possible to write a simulation? the definition of a solution will keep changing?

NormantasStankevicius: and retrace the fastest way from my pac to the pellet

NormantasStankevicius: and do value / distance

Ramzel: I m not even checking if place when i go has pelet

NormantasStankevicius: so on the way I might pick up 5 pellets

JohnCM: you can ask MSmits for his Smitsmax (individual minimax style tree for each pac)

MSmits: dont do that for this contest please

MSmits: it's not going to work

JohnCM: still surprised it actually works for coder strike back. since it ultimately is an approx.

MSmits: it works for csb yes and some others

MSmits: but it is very important that the agents possible actions may be only weakly affected by opponent actions

MSmits: see kutulu, where you can only block someone with yell

GreatTux: I get all the paths < dist X then score them and take the best, the distance from the current pac is a parameter of the score, you don't always want to reach the closest pellet

JohnCM: this one is quite strongly affected by opp actions

MSmits: yes, so no smitsi

JohnCM: so the opp tracking can be important

JohnCM: or a way to figure out which "areas to harvest"

MSmits: i dont doubt that it's important. It's just hard to do

JohnCM: haha i do a partial opp tracking, but it wasn't good enough

MSmits: same

Peudoki: same

eulerscheZahl: Peudoki you are 7th without?!

GreatTux: opp tracking can give you an edge but it's a massive time investement and potentially small reward

eulerscheZahl: i didn't expect that

MSmits: well i am debugging a new way now... if you somehow see me in top 20 it worked :P

WINWINWIN: how much time does your tracking part take eulerscheZahl?

MSmits: it doesn't have to take time though WINWINWIN. You can do it heuristically with many assumptions. Then the calc time is negligible

eulerscheZahl: really hard to answer, depends on the turn

eulerscheZahl: i would say 10ms at most.

eulerscheZahl: except for some rare edge cases when it can even make me timeout :D

Peudoki: I have something eulerschZahl

WINWINWIN: But would it be sufficiently accurate?

JohnCM: heuristics, i love them

eulerscheZahl: but i have a cost heuristic. when tracking is too expensive, i skip it

Peudoki: it just didn't improve my standing much when I added it

JohnCM: when you use python and can't do monte carlo, heuristics are the way to go

Peudoki: probaby it is better than nothing

JohnCM: haha i should go learn C++ more so I can use it for the next comp

eulerscheZahl: python was your free choice ;)

JohnCM: was lazy to convert

JohnCM: i tried to use monte carlo, it couldn't do much

eulerscheZahl: some players learned C++ just for codingame

eulerscheZahl: such as MSmits

JohnCM: so heuristics all the way

JohnCM: but euler you use C#

JohnCM: seems to work quite well also

eulerscheZahl: correct. because my C++ knowledge is poor

eulerscheZahl: i can code it but not as fast as C#

WINWINWIN: Is C# slower that C++?

eulerscheZahl: by factor 2 i would say

MSmits: yep... I am pretty sure eulerscheZahl can do c++ better than I can. But I specialized in this little CG-niche. I can do C++ fairly well just on CG. I never even made a multi-file project though

NormantasStankevicius: maaaan, I hate the idea, that it reads pacs that are dead in the function that reads all the pacs I have and enemy visable pacs, that created a lot of bugs for me

JohnCM: hey yep i gtg, cya around

Peudoki: what language specific knowledge do you guys use?

MSmits: WINWINWIN, it depends on the game, but C++ can be much faster sometimes than just a factor of 2. It depends on what the game is

dbf: Peudoki, in mostly memory management is important - how objects are created/reused how not to be affected by gc (if aavailable in language)

NormantasStankevicius: ^^^^

Numby: Is there any way to reset/look up the starter code for a language?

NormantasStankevicius: my teacher is good at C++, I'm good at C#, but for example he stated the issues how a function may run faster if your inserted parameters are smaller in C++

NormantasStankevicius: also not sure if other languages do that, but in C#, always place the first if statement (if you are using multiple checks) the ones that if you do not check, might brake your code (out of range for arrays) or the ones that would quickly eliminate the function, but those don't add much

MSmits: you have to be careful about not inserting big objects because it will copy them. Or you need to pass a pointer

MSmits: C# automatically uses references for objects

NormantasStankevicius: yeah

NormantasStankevicius: MSmits, so I normally could outperform C++ when it comes to big objects

MSmits: no

MSmits: because c++ can also just pass a reference

HiIamFriend: c++ lol

MSmits: but you need to think about these things

MSmits: in C# you dont as much

MSmits: thats why coding happens faster in C#

MSmits: I think there are very very few instances where C# will ever be faster than C++ at anything when it comes to performance

MSmits: but the virtual machine may do some optimization during use

MSmits: and sometimes this is significant as I understand

HiIamFriend: MSits in lithuania 90% of teachers only knows c++ dont judge him

MSmits: i won't judge anyone. Pretty sure these teachers know more about it than I do anyway

HiIamFriend: no

HiIamFriend: u are wrong :D

HiIamFriend: most of them only knows basic stuff

MSmits: I know a little piece of it really well and have no broad knowledge

MSmits: this is especially true for c++, but also somewhat for C#. I know a bit more, but not a third of what euler does I think

HiIamFriend: its kind a useless to know c++ at these times

MSmits: depends on what your line of work is going to be

MSmits: i noticed that working with C++ for a while gives you intimate knowledge about how memory works

MSmits: this helps you when using other languages, like C#

MSmits: especially when you're trying to avoid cache misses and such

wlesavo: JohnCM but you can do MC with python, not a lot of estimations, but quite enough i would say

elderlybeginner: @ntroPi tried: {"editor.parameterHints.enabled": false} and it's not working

ntroPi: no idea, how to disable them completely. But they don't annoy me without the permanent auto apply on return. Did you find that setting?

eulerscheZahl: "Accept suggestion on Enter key"

eulerscheZahl: settings, above the keybindings

elderlybeginner: yes, I did, "accept..." off has nothing to do with it, i'm changing keybindings in accordance to some tips from vscode

thethiny: going over the comments in my code

thethiny: "Temp section, remove later". Little did I know, this temp section is what made everything work.

BenWo: rofl

njaber: Someone who does C# , is there a way to extract a part of a bitArray into a smaller bitArray, or do operations between BitArrays of different sizes?

llllllllll: seen this comment in production code @thetiny

llllllllll: then someone added a comment to the next line: "temporary my ass"

NormantasStankevicius: fixed a bug when accounting for dead pacs, now 150~ silver :) I am happy

llllllllll: grats!

thethiny: @llllllllll 😂😂

thethiny: cibgrats Norman!

thethiny: congrats*

MSmits: well done

Default avatar.png wygryw83: Is anyone from Poland?

llllllllll: *types "import random"* things will get crazy now

MSmits: sure people live there

MSmits: population > 0


MSmits: thats on the current contest


MSmits: thats on general leaderboard, but many of those will not be active

NormantasStankevicius: Poland has some really competitive universities, @wygryw83, and during the last competition they were really good as much as I remember

lifetimeLearner007: Hi. Given a source, I want to find a path with most pellets. Currently I'm using dfs for this. Now, my question is, is this correct approach or should I use bfs?

Doju: Path to what?

thethiny: Use what you feel is better for you

thethiny: BFS is used to find the paths to something else, DFS will go into each branch and go inside it.

lifetimeLearner007: there is no destination Doju, just need to find a path that has most pellets. I'm not sure if dfs is more suitable or bfs is. Does that make a difference w.r.t. efficiency?

Doju: lifetimeLearner007 so you're finding the shortest path that goes through every pellet on the map?

lifetimeLearner007: yeah, shortest or longest, I don't mind as long as there are most pellets in it

Doju: Ohhh

Doju: you're finding the path that contains the most pellet and doesn't go through the same cell twice?

Doju: most pellets*

lifetimeLearner007: yes

lifetimeLearner007: Is this approach even correct? Do I need to take up different approach?

Doju: The approach that you take is up to you

Doju: but i think your problem is a variation of the travelling salesman problem


Doju: Perhaps this one?

lifetimeLearner007: tsp ensures all nodes are visited and reach back to source.

Doju: well maybe it's not that then

lifetimeLearner007: here, all floor cells may or maynot have pellets. just want to maximize the path with most pellets.

thethiny: I accidentally submitted and I went wayyyyyyyyy behind

thethiny: and I can't even remember what I changed

randymarsh: Under history on the left panel you should see the submitted versions

thethiny: oh nice

thethiny: I forgot about this

thethiny: thanks

randymarsh: :thumbsup:

elderlybeginner: puzzle executions time limit is constant or it depends on a puzzle?

struct: depends on puzzle

struct: and language

Cappefra: oh I didn't know it depended on the language

elderlybeginner: how to find time limit for a puzzle if it's not mentioned in the description?

elderlybeginner: beside in-code try-error checking

struct: yes, it is not mentioned, I guess the only way is by measuring it yourself

struct: like make 1 sec timer or something and check if timeout

struct: if yes it must be lower

struct: else higher

Default avatar.png SabertheLost: anyone know, if you do array[x] in typescript, can you modify the class inside the array from outside?

njaber: If I copy part of a code that is under MIT licencing in my bot (I want to modify the BitArray class from the c# source code, but the class is sealed) will the be a problem with licensing? is adding the license as a comment just above the class enough?

Rimailleur: hello, is there a big concern of time out on the current challenge ?

llllllllll: depends on what you want to implement

Rimailleur: no, i mean in the game itself

Rimailleur: i see timeout in battle for my submitted code

Rimailleur: but they do happen in IDE !

Rimailleur: but they doN,T happen in IDE !

MattSOrme: If you have a timeout, its your code

Rimailleur: i have no timeout in IDE with the same battle

Quidome: maybe it is not the same batlle

MattSOrme: could be randomness in your or enemy bot making the game run different?

Quidome: due to randomness

Quidome: :)

Cappefra: it means there's some randomness in either yours on your enemy's moves

Kukiss: if the time is at the edge of limit it may also be random if you get time out or not

Cappefra: or you're pushing it really close to 50 ms

MattSOrme: yeah, if you're maxing out your time, maybe cap at ~48ms

Rimailleur: i thought it was due to random in the opposent code

Rimailleur: the forum seems to contain many cases like mine, but i did not see a codingame comment

Rimailleur: Well thanks, boring challenge for me !

wlesavo: ooc sized legend in a first day

eulerscheZahl: the boss is weak

eulerscheZahl: and the game has enough randomness for a lucky push

MattSOrme: you and mazelcop are getting bounced around each other as others challenge you

Default avatar.png tuning: hi

Default avatar.png tuning: hello

Doju: hello hello

IAmNoob: hi

Default avatar.png SabertheLost: Two hours trying to figure out why my function was not updating the values, only to find out that I ended by resetting all values in the loop

MattSOrme: I've made so many dumb mistakes trying to code this thing.

IAmNoob: i too:)

[Csongor]: yeah, but learned a lot from the mistakes

IAmNoob: how to make level exept the puzzles?

IAmNoob: cause i made lots of puzzles and only level 22

Default avatar.png tuning: no

IAmNoob: ?

Default avatar.png SabertheLost: My attempts to make small improvmes just makes me drop in rank :)

IAmNoob: :)_)

MattSOrme: Last night i pushed an "improvement" and dropped about 700 places

Default avatar.png SabertheLost: Like, changing to move towards a pacman with that i can eat. Lost 300 ranks.

IAmNoob: gg

MattSOrme: SabertheLost, probably need to cover conditions like if they can switch then don't attack

Default avatar.png SabertheLost: If they have swiched thay are not valid target next step

Default avatar.png SabertheLost: hmm, you can see if they can swich ? :)

MattSOrme: ability_cooldown == 0

Lord_Pixel: +-

user938300: can i disable all peeks and highlighting? the red squiggle blinds me

user938300: or anything to be done about the red underline? it is like coding in a word processor

MattSOrme: ugh. Im having to add a silly amount of lines just to catch a stupidly small scenario

IAmNoob: any idea about level

IAmNoob: i asked above

IAmNoob: and i have 90% of the resinens

IAmNoob: can someone help me?

[Csongor]: Do anything on this site and your coding skills will level up.

JohnCM: hey i'm learning C++ now

JohnCM: can you have multiple files at the same time in codingame?

JohnCM: like #include "myfile.h"

MattSOrme: Bit late for this competition JohnCM ;)

MattSOrme: Whens the next comp? Might have to learn for that one

MattSOrme: Is rust good, or is dbdr just a freak with it?

JohnCM: nah not for this comp haha, i'm sort of done coding already

JohnCM: the rest is up to the competition to see my final rank

IAmNoob: you have to work now too

MattSOrme: My aim is just to get to gold, then i'll be happy

MattSOrme: top 100 in silver atm


IAmNoob: gg

IAmNoob: the terranin is symetric sooo....:)

MSmits: look at what it's doing at the end

Default avatar.png SabertheLost: Finaly, it moving upwards again.

JohnCM: haha it is common for my program too to draw

JohnCM: in fact for most deterministic programs it should draw

JohnCM: just... for simulations wise, may not be easy to draw

MSmits: I monte carlo though :P

JohnCM: it means that there is no better move

JohnCM: you have reached nash equilibrium

MSmits: yeah, if i do this a couple times, i get maybe 3 different games

JohnCM: means you should submit 3 different times also

JohnCM: each submit might be a different leaderboard placing

MSmits: my submits dont get high, they drift up over time

IAmNoob: @johnCM not really

IAmNoob: it is a chance but you can submit 100 times and still dont change the place

JohnCM: haha why not. since gameplay is sort of random rollouts, you may have diff. rollouts

Default avatar.png SabertheLost: soo, after 4 hous of coding, when from 560 to 460 in broze...

IAmNoob: it worth



MSmits: the leaderboard is very random. If you're testing bot improvements with submits, you wont get any reliable measurements. Except on the really big improvements

MSmits: havent had those very often

Default avatar.png SabertheLost: Well, it was down at 900 ealier today)

MSmits: When I was in gold, the same version that once ended at 170 on a submit, also was in legend less than an hour after it opened

MSmits: which is almost the same version that is now ranked around 20

MSmits: thats how random it is

MattSOrme: I just check my game history for a bug, then work on that till its working. But half the time, fixing one bug is causing 2 more haha

MSmits: yeah... i gets bet

MSmits: bad

MSmits: i have 2300 lines now

Default avatar.png SabertheLost: oooo, it´s climbing, now at 160

MSmits: I doubt it's bugfree

MattSOrme: wishing mine would randomy jump up a league ;)

Default avatar.png SabertheLost: All bugs are features

Default avatar.png SabertheLost: is it feature free +

Default avatar.png SabertheLost: ?

IAmNoob: when comes the last leauge?\

Hjax: yesterday

MSmits: its out

IAmNoob: ok:(

IAmNoob: i am still silver

IAmNoob: so.....

MSmits: one advantage of a fairly random bot is that you can more reliably test improvements vs yourself

MSmits: your opponent will be a bit different

Default avatar.png SabertheLost: ok, my broze elo when from 21 to 27...

MSmits: in different games

[Csongor]: IAmNoob the leaderboard shows you in bronze.

IAmNoob: bruh

IAmNoob: dude is anyone here python developer?

IAmNoob: ?????

IAmNoob: no okk...

IAmNoob: bye i have to go:(

Default avatar.png SabertheLost: Maybe i should use the fact that I can around the map if there is no wall :)

MSmits: SabertheLost write a neighbor function that finds all the neighbors and do two ifs (if x == 0 and if x == width -1)

MSmits: that way it is easily added

MSmits: it's not one of the hard things about this multi

MSmits: err contest

eulerscheZahl: my bot supports wrapping at the top/bottom too

eulerscheZahl: 2 completely useless lines in my bot

MSmits: hah yes, i started coding this for "y" and stopped

eulerscheZahl: codejam in 9min

MSmits: you're going to participate !?

eulerscheZahl: sure

MSmits: you have a chance at nr 1 in this contest

MSmits: take it :)

MSmits: I want to see you at nr 1

eulerscheZahl: unrealistic :(

MSmits: if you dont have any new ideas, then yes

MSmits: otherwise no

eulerscheZahl: i need a major rework of my broken pathfinding

MSmits: I see

eulerscheZahl: and i don't even have ideas how to code it

MSmits: well anyways, this is an awesome result already, especially for a 5K contest

MSmits: some good players

kovi: amd who knows what brings the final recalc

eulerscheZahl: i will try some more tomorrow

Default avatar.png SabertheLost: yea, it was super easy :)

MSmits: yeah kovi, i saw you right above me 1 time on the leaderboard

MSmits: even though your bot is much stronger

eulerscheZahl: there will be some last-minute submits i guess

MattSOrme: Im ahead of my friends/co-workers who are doing this, so im happy :D

MSmits: thats the best metric MattSOrme

MSmits: compare with people you know

H1ggsb0s0n: use it when asking for the raise :D

MSmits: unless they're too good, then just get to know some worse players

eulerscheZahl: i don't know any participants in person :(

MSmits: I know you better than most of my colleagues lol

eulerscheZahl: :D

MattSOrme: I've been waiting for this comp, so i got some other people keen to have a go before it started. Though i don't think they've spent as long on it as i have

ShannonNorris97: I don't have anyone from my rl competing either. I might try to convince people next time; even though I'm having a lot of fun competing, it would be way more fun to compete against people I knew as well

Default avatar.png ashikujjaman: though I have enabled speed boast to my pac but it's going one step while opponent pac is going two step . what's the problem here? see this from 16 move my team is red

MattSOrme: You need to set target more than 1 step away

Default avatar.png cguzman: Anyone can explain me why I lose here?

Default avatar.png cguzman:

MattSOrme: You timed out

MattSOrme: Send game to your ide, and re-play it to debug

MattSOrme: Look like your bottom right pac gets confused

Default avatar.png cguzman: Yes, it is not clear for him whether to kill the enemy or get the high pellet :joy:

Default avatar.png cguzman: Got it, I have a nullpointerexception .. puff

MattSOrme: I currently have the word "pac" in my code just shy 500 times...

dbdr: first commit in more than 2 days :)

wlesavo: dbdr big changes?

dbdr: no, actually it's a small tweak, one more feature

dbdr: how are you doing wlesavo?

MattSOrme: ugh, finally, dealt with pacs going for tens that will get them killed

wlesavo: dbdr hit legend while sleeping, dont think ill improve much anymore

elderlybeginner: how to check memory usage of puzzle code in python?

wlesavo: implemented most of thing i had in mind, and my motivation is kind of low now, cant say i really liked the game

Default avatar.png ashikujjaman: how can I see the wood league? I am now in silver league

semera: Working on simuator and I don't underestand, turn 20. Two red pacs do MOVE 1 33 9|MOVE 4 34 9. First are bumped, it's fine. But Pac 4 has speed, so then he should move to 33 9?? in rules is "Repeat for any pac with an activated SPEED ability." How is evaluation?

wlesavo: elderlybeginner do you think you can hit the memory limit?

dbdr: you don't get OOC vibes wlesavo? hidden information as wel...

elderlybeginner: wlesavo, no just for test tuples and lists

dbdr: MSmits you're in top 20 :)

dbdr: do that mean your feature worked?

wlesavo: dbdr i do, but most of thing i tried made my bot worse, and thats quite discouraging, at some point i wanted to give up on legend even

MSmits: no, I havent submitted it yet

MSmits: should be a small improvement

wlesavo: elderlybeginner oh, i just use tuples whenever possible

MSmits: but when i submit I wont end at 16

MSmits: i will end at 30 and drift up over time

MSmits: my CG bench test gave 57-43 vs my old version

MattSOrme: Is there some tool you're using to test against the same bot many times, or just counting yourself?

MSmits: i do cg benchmark

Nerchio: is it hard to set up smits?

Nerchio: probably not

wlesavo: still impressed by choku dai hitting top 10 in one day

Nerchio: seeing some stats could help me with my motivation :p

wlesavo: it is even less than a day actually

dbdr: you know whe he started?

wlesavo: dbdr he said on a chat today, that found the contest on twitter yeasterday and decided to join

dbdr: oh, nice!

WINWINWIN: Top 12 in 1 day??? I am not even top 1000 in 8 days!

wlesavo: Nerchio it is quite easy actually, takes like couple of minutes to change configuration, collecting is long though

Nerchio: still good though :p

Nerchio: you use it?

jdyerjdyer: Is there a way to leave the contest. I signed up a while back thinking I'd have time, but then I got some work that has overlapped this week leaving me no time. It seems like this keeps happening. :(

Nerchio: so just leave your bot

Nerchio: why do you need to 'exit' so to speak

WINWINWIN: When a collision occurs, on the next turn is you location equal to your previous location?

MSmits: yes Nerchio it is pretty easy

MSmits: but I cant use it by saving a file from my IDE and then starting CG bench

MSmits: text encoding issue

MSmits: so i made a new text file i copy my code into

njaber: WINWINWIN yes unless your pac used speed and he collided only on the second frame

WINWINWIN: Ok, thanks njaber

wlesavo: Nerchio i do also just read the readme its quite easy

Nerchio: yeah i looked it over thats why i said looks quite easy

wlesavo: oh, i see

Nerchio: i will set it up for next contest im not feeling the pac anymore :D

wlesavo: MSmits new version submit? :slight_smile:

MSmits: yeah... impossible to know if it's any good

MSmits: my last submit was at 16, but on the end of the submit it was at 37 or so

MSmits: so i cant know if it is better until half a day later or something

MSmits: it is better in cg bench though

AntiSquid: very frustrating

jdyerjdyer: Oh, well. Guess it doesn't matter much. Just wish I could have at least submitted something. This one looked like a lot of fun. Maybe I'll just come back to it when it is a regular game. If things will quit interrupting my fun time...

MSmits: yeah, I suppose. The idea is to be significantly better than anyone else though, if you can't do that, it's your own fault :P

MSmits: so i take the blame here

struct: jdyerjdyer there is guy at top 15 that started yesterday

AntiSquid: your own fault the system is broken heh

MSmits: it's not broken really. this is not because the ranking is bad

MSmits: the game just has a strong random/luck component

jdyerjdyer: Yeah, but I have to work through this weekend. :(

AntiSquid: it is bad

MSmits: even if it were perfect, you'd see the same result

jdyerjdyer: Supposed to be working now.

MSmits: it's not the ranking, it's the game

MSmits: in other games it's really reliable

MSmits: for example, csb

AntiSquid: i always see a different result though

MSmits: because of the game

AntiSquid: csb was also random :D still is

dbdr: I'm not sure, I still see the top bots doing bad moves

dbdr: including mine obviously

MSmits: i'm always at 6 or 7 AntiSquid

MSmits: never changes

struct: csb is random if the bots are the same

struct: otherwise not

AntiSquid: if there's a huge difference to the bots below yes it works

MSmits: thats the thing, this game cant have a huge difference at the top

AntiSquid: but if the difference isn't huge enough then it doesn't work

MSmits: the random component is stronger than the differences between the bots

AntiSquid: a good leaderboard doesn't only sort well the obvious cases

AntiSquid: like putting at the top the bot that is better by a large margin, you can do that by hand lol

kovi: once again, it is hard to climb with near 50% winrates vs. many others

MSmits: it's impossible to solve the problem of rock paper scissors between players

MSmits: the player who submits, will always screw up the leaderboard

MSmits: pushing those stronger to him or her and pulling on those weaker

MSmits: the only thing you can do to prevent it is to be significantly better than others

dbdr: there are systems where matches are played automatically

dbdr: not especially when you submit

MSmits: that would be better, but also problematic

MSmits: too many would have to be played

dbdr: why?

MattSOrme: time to see if this change makes me go up or down haha

struct: I dont think cg would want that

MSmits: people who just submit once and then ignore the contest for 3 days, would cause a lot more stress on the servers if there were automatic battles

struct: The cost being the first problem i think

dbdr: you can play matches less often in lower leagues

MSmits: true, that would be better

MSmits: this is why they only recalc the top

dbdr: most players are in bronze or below

MSmits: right

MattSOrme: How do they calc the final winner? Is it just who happens to be at the top when time is called, or do they have a system?

MattSOrme: Like get the top 100, and have them all play each other, then repeat for 50, 20, 10, 5

MSmits: lots of games played at the end MattSOrme

MSmits: automatic

MSmits: with smaller jumps in rating

MSmits: but it starts with the current leaderboard yes

MSmits: I fear this contest may not have a clear winner, even though the winner will be one of the best bots

struct: just like previous one

MSmits: pb 4 showed he won by a different system also

MSmits: but not by a huge margin no

MSmits: what i mean is that this time the winner might actually win due to luck, compared to the nr 2. I hope not, but it could be true

Default avatar.png ashikujjaman: how can I see the wood league?

Ikhadem: is there a reason why my code times out sometimes in ranking phase but when i send that to IDE it doesn't?

struct: ashikujjaman select league on filters


struct: Ikhadem maybe on bot has random on it?

struct: and doesnt play same moves

Ikhadem: nope i have no random values

struct: But your opponent

struct: might have

Ikhadem: k

Default avatar.png ashikujjaman: struct, I want to code for wood league for better developing my bot

struct: ah you want to code with wood rules?

King-Of-Code: yeah id get to the higher ranks first then create a better structure because the rules change

MattSOrme: Does coding with all the info help? Just because you can make better decisions with all the data, doesn't mean that will help when you take it all away

wlesavo: euler posted a contribution page for spring challenge, but i dont have the link


struct: change league at the top

WINWINWIN: How do you send game parameters to ide in a replay?

WINWINWIN: Got it, sorry

ShannonNorris97: How do you guys decide when to use speed?

Default avatar.png wereii: if enemy_near: sanic_mode()

dbdr: don't panic!

Default avatar.png wereii: imma not in speedable league, yet :P

MattSOrme: damn, my improvements made me slightly worse again :(

Default avatar.png wereii: oh lol, my code (for one pac) from wood 2 just won over the boss by 8 points xd

Default avatar.png wereii: in wood 1

MSmits: yep thats how it goes

Default avatar.png ChooJeremy: Interesting seed where 2 of your pacs start stuck in a corner

Default avatar.png ChooJeremy: Especially interesting to me cause the gold boss times out on this seed

[Csongor]: It was a wrong decision not implementing pathfinding, but I never really programmed one before. Now I have to suffer. ):

Stanworld: hi , where i can find the referee ?

Stanworld: i found...

uvBoss: hello?

uvBoss: can anyone tel me how to work with multiple files in js??

uvBoss: tell*

PiterYeh: uvBoss you have to setup your own bundler, because CG accepts a single source file

uvBoss: yeah how do i merge them??

uvBoss: there are no plugins..i searched and could not find

[Csongor]: copy, paste

uvBoss: dat is tedious man

struct: Im sure that if you google it you can find an answer

uvBoss: how many times do u do that for running once??

struct: "merge multiple files javascript"

uvBoss: i tried .. could not find something

uvBoss: or i dint understand

HungryBurger: uvBoss -- I have the same challenge with Python. I use bash to merge all my files together. Once I built a basic bundler script, I've been using it for all the contests.

uvBoss: i dont how to do that

uvBoss: XD nooooooob

HungryBurger: Well, on the bright side, you're writing advanced enough code now, that you need to learn how to get your computer to help manage it for you.

uvBoss: my head hurts lookin at this one file

uvBoss: k im gonna make a simple text merger then..

HungryBurger: :thumbsup:

Doju: This is getting complicated :|

Doju: Now i have to give the cells two different levels of "wall"

Kellthazar: My enemy enconter resolver was so complicated... I deleted it all and wrote from the beggining, a lot more readable.

Doju: Actually I think it's not _that_ complicated after all

Doju: luckily i made my earlier code pretty flexible

Doju: Cuz what my pacs are doing atm, just freezing if they are next to an enemy pac, is unacceptable

Kellthazar: You not eval if they can kill you?

Doju: eval?

Doju: oh

Doju: i do

Kellthazar: Sorry for my english XD

Doju: if they can kill me, i set the cells next to them as walls

Doju: and if my bfs starts from a wall it returns none

Doju: luckily i can change that :p

MattSOrme: ugh, now my 10 targetting is broke again. So frustrating

WINWINWIN: perseverent -- latest guy in gold

muy31: for real, i just helped him 2 days ago

muy31: when he was in bronze

MattSOrme: probably shouldn't have ;)

Doju: woow

Kellthazar: One thing I did, was just use the pellets to check if a floor (or cell) was explored or not...

VicHofs: meanwhile I'm still here lol

Doju: Kellthazar isn't that a bit obvious? xd

Doju: Oh you mean like

Doju: if a pellet is gone and you haven't eaten it, the ones next to it might be gone too?

Kellthazar: I dont go for pellets, but paths that will discover more unexplored areas...

Doju: hm

Kellthazar: Soh, at the moment, Im trying to do this more coopeartive-like

Kellthazar: given weights for cells based on the ammount of pacs nearby

Kellthazar: nearny unexplored cells

Kellthazar: etc...

Default avatar.png prost: i just got started here any advice?

Doju: prost you still have enough time to participate in the spring challenge

Default avatar.png prost: whats that again


Doju: that's basically what we're all talking about

AntiSquid: JohnCM what have you done? you were like top 5, thought you were going to legend at some point

Beerus: are starting positions always symmetric?

Doju: Yes Beerus

Beerus: damn i just noticed

Beerus: if i use that can i go legend from gold

fchris82: I always get the same ID for the pacmans.

fchris82: I'm alone with this issue?

Doju: fchris82 your pacs and enemy pacs get the same ids

seronis: each of your pacmen have a unique id

muy31: for every pacman?

seronis: ie: the first 3 pacmen on each team will get 0 through 2

seronis: you -never- have the same id used more than once on a single team

seronis: if you think they are, you're reading data wrong

fchris82: Doju Thanks, I thought this is a bug and I should get different ID for the enemy pacman

Doju: i'm doing waaay too many loops over the entire grid

Doju: if i need to clear anything i just loop over every cell instead of taking the to-be-cleared- things out specifically

Doju: Nice, looks like Clyde is deterministic

Doju: makes debugging a loot easier

JohnCM: haha i didn't do anything, the rest just caught up

AntiSquid: so unlucky then

JohnCM: anyway my bot is effective against the top 10, but not so good for the top 100. so it is a fine balance

JohnCM: no worries

JohnCM: i'm like 50% through with C++, will do better for sim based competitions next time

JohnCM: python just can't do monte carlo

JohnCM: just studied C++ for about 4 hours today. pretty easy for me to pick up as I know Python and C and a bit of Java

JohnCM: pretty similar

AntiSquid: true

JohnCM: how about you antisquid

JohnCM: any hopes of going legend?

kovi: euler winning while away to play codejam

AntiSquid: i just fix some minor bugs, but ladder is to random for me to try a submit, so i will wait and see if i can do a massive improvement, don't want to restart my bot, i know why the current structure is a complete failure

eulerscheZahl: i failed codejam horribly

eulerscheZahl: just came back

eulerscheZahl: rank 2677

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

AntiSquid: what's your usual rank ?

JohnCM: probably euler will win this comp. i'm betting on it

JohnCM: XD

RoboStac: I just managed to squeak through at 980

ZarthaxX: f eulerscheZahl

eulerscheZahl: congrats robo

kovi: grat!

ZarthaxX: gz robo :O

eulerscheZahl: i thought i got A but only small was correct B small bug in C small

AntiSquid: euler what was your rank last time? codejam

JohnCM: lol what is codejam?


eulerscheZahl: codejam = google's coding contest, once a year

eulerscheZahl: 1000 tshirts to win

eulerscheZahl: so robo got lucky

JohnCM: how long is a code jam?

nosenfield: can somebody tell me how you output debug info into the actual game view?

nosenfield: like, text above the pacs?

Doju: nosenfield add it after the command

VicHofs: append to commands

AntiSquid: just add " msg" to the end of your output

Doju: MOVE 0 3 13 text

eulerscheZahl: this round was 2.5h

nosenfield: ah, thanks much

AntiSquid: most important thing to ask about near the end of the contest though

eulerscheZahl: there are always about 4 problems and there's a clear correct answer

eulerscheZahl: unlike codingame where you can do pretty much anything and your rank results from your performance against others in direct matches

wlesavo: euler any really interesting problems?

Beerus: 1 problem is easy 1 medium and the other just pray

JohnCM: i see..

JohnCM: means it is an algorithm programming in 2.5 hours

wlesavo: this round

JohnCM: solve as many as possible

eulerscheZahl: either the problems weren't that interesting or i'm too stupid to see the interesting part of it

eulerscheZahl: no interactive problem this time

JohnCM: what's the difficulty like?

eulerscheZahl: hard to very hard CG puzzles

wlesavo: 1c also was without interactive ones, strange

eulerscheZahl: some easy/medium in early stage

JohnCM: ok sounds tough

JohnCM: so actually doing CG gives you quite a bit of practice in it?

wlesavo: JohnCM all of them should available rn

eulerscheZahl: CG is really different from codejam

Insufficient: and even though codejam is in full swing this year you can still do kickstart

Insufficient: which is a similar google competition

eulerscheZahl: for codejam you have to know standard algos and code much faster

eulerscheZahl: here i can return the next day when i'm stuck

eulerscheZahl: i don't care about kickstart

wlesavo: kickstart is actually tomorrow i believe

eulerscheZahl: correct

eulerscheZahl: but CG has priority here

eulerscheZahl: i'm so high, can't stop now

eulerscheZahl: can't let C++ win :D

VicHofs: 420

wlesavo: but the problems are not that interesting, neither really hard

JohnCM: lol

JohnCM: their problems are the standard programming competition kind

JohnCM: i went to have a look

eulerscheZahl: for me CG is more fun. but just a personal preference

Braykin08: Hey, anyone got a seed with an hallways that loops back to itself without intersection? I might have a infinite loop, but cant find a replay anymore

Insufficient: i'm doing the odd competition on leetcode and doing cg competitions, but i'll try kickstart in a month or two maybe

JohnCM: incremental house of pancakes is like a depth first search prob.

eulerscheZahl: ping struct give seed for blank line

ShannonNorris97: Anyone got any generic tips to get from silver to gold? (Besides win lots of games and lose few)

eulerscheZahl: would timeout, you need maths to do it efficiently

JohnCM: hmm.. then what algo did you use?

eulerscheZahl: you can see my submissions

eulerscheZahl: but somehow it was wrong, some obscure off by 1 i guess

RoboStac: oh you went for the quadratic solving

eulerscheZahl: you didn't?

eulerscheZahl: was expecting to timeout with naive

Default avatar.png JBM: i tried to use math

RoboStac: no, I did a binary search to find out how many pancakes I could serve from each pile

WINWINWIN: python3 is timing out by a small amount, I know enough C# to translate, is a C# rewrite enough?

Default avatar.png JBM: oh wait

Cappefra: @eulescheZahl you wrote I'm so high and for a moment I thought you weren't talking about the leaderbord

Default avatar.png JBM: i recall a 10^18, did i lose precision

eulerscheZahl: i see you also missed top 1000 but did better than me JBM

Default avatar.png JBM: yeah not too happy

Default avatar.png twiho: has anybody ruled out MCTS

Default avatar.png JBM: still don't underrstand why le b-small failed

Doju: nooooooooooo

Doju: i was fixing a bug

Doju: think i got to the solution

Default avatar.png JBM: or my a-large

eulerscheZahl: i have no idea why my C small was wrong

Doju: then got a new seed :(

Doju: Is there any way to retrieve the old one?

eulerscheZahl: but even with A large + B small + C small: not in top 1000

Default avatar.png JBM: i'm at that painful level where *any* next thing solved would have put me in

JohnCM: wow haha.. this one requires serious practice

eulerscheZahl: i'm disappointed, mainly because it's a one per year thing

Default avatar.png JBM: same

JohnCM: the 2.5 hours is just spamming known algos, not really coming up with one on the spot

eulerscheZahl: but i'll get back to CG then

Default avatar.png JBM: though i do get the feeling i was more adequate this time

Default avatar.png JBM: not through, but i feel like i could have

eulerscheZahl: i was far off

Default avatar.png JBM: as in "knew without too much doubt the alg to pick", just a question of time

Default avatar.png JBM: and real bad strategising

eulerscheZahl: sometimes i like the tasks, sometimes i'm just clueless

VicHofs: hey when pacs collide and kinda recoil a bit what is their position?

JohnCM: are you allowed to copy paste code?

JohnCM: @vichofs same pos as before they collided

VicHofs: good ty

eulerscheZahl: i don't even know their copy-paste rules

Default avatar.png JBM: debugging my b-small would have been a better pick than attempting a-large

JohnCM: anyway i guess they don't worry about ppl copying

Default avatar.png JBM: you can c/p what you want as long as it's legal

JohnCM: the problems shld be new

Default avatar.png JBM: they have a section for this in the faq

eulerscheZahl: but there are usually some disqualifications

Default avatar.png JBM: you're allowed your library of code

eulerscheZahl: not sure if copy-paste from online sources, code sharing with other users or whatever

Default avatar.png JBM: disquals are more for sharing solutions and discussing problems during the round

eulerscheZahl: i see. i only observe my rank going up after review each time without knowing details

Default avatar.png JBM: yeah that's the disquals

Default avatar.png JBM: i'd expect to see less of then in round 2

eulerscheZahl: because only honest competitors made it to round 2

eulerscheZahl: only -> mostly

Default avatar.png JBM: hopefully

eulerscheZahl: or skilled cheaters :D

Default avatar.png JBM: disquals have their special status in the contestant pages

Default avatar.png JBM: where's my list

Default avatar.png JBM: like this fellow for instance

eulerscheZahl: ah, i saw such a profile too

JohnCM: manually rejected haha

eulerscheZahl: someone complained on codeforces while it was still in review

Default avatar.png JBM: complained that he was rejected?

eulerscheZahl: complained that someone was cheating but the user got DQed then


eulerscheZahl: a weird user in general, not just on codejam

eulerscheZahl: and proud author of a book, which got sold more than 1k times according to him

JohnCM: sounds interesting

JohnCM: anyway i saw there's still kickstart tmr if you're interested euler

eulerscheZahl: i'm not

JohnCM: sounds like you have lots of experience in this algo thing

JohnCM: what's the diff anyway between this codejam and kickstart

Default avatar.png JBM: what's the kickstart concept?

Default avatar.png JBM: yeah, same as JohnCM

eulerscheZahl: similar to codejam but multiple rounds

Default avatar.png JBM: codejam *is* multiple rounds

eulerscheZahl: like 1A 1B 1C but you can play all of them

Default avatar.png JBM: you mean without?

Default avatar.png JBM: ah, repeated ok

Doju: Apparently my dead pacs have been casting vision all this time :o

Doju: wonder what other bugs i have now

eulerscheZahl: csipcsirip calm down you know that we will catch you in the end, don't make it harder than it has to be

kovi: nice submit csipcsirip

AntiSquid: is that some illuminati lizard avatar?

eulerscheZahl: i'm off for dinner

JohnCM: haha ok cya

nosenfield: one other question, any way to get the full debug output?

nosenfield: ie, the console clipping it after X lines?

nosenfield: any way to actually see the full log?

egaetan: Athight try a resubmit ?

AlluringChair: Doju my pacs are seeing pellets that are not there _-_ and i have no idea why and how

Doju: maybe you're not clearing the list of pellets?

Doju: or something

Zenoscave: Woke up to gold cool

Clagus: Zenoscave - same for me :D

Zenoscave: Who is Lord Betrayus

Zenoscave: gz Clagus

eulerscheZahl: the boss that will betry you

eulerscheZahl: betray

Clagus: he is the Lord who Betrayed us

Zenoscave: I should phrase that better. Which bot became the boss?


eulerscheZahl: oh

eulerscheZahl: Npi2 Loup

Clagus: oh shit

Clagus: :D

Zenoscave: cool

eulerscheZahl: the boss isn't that strong considering the league size

MattSOrme: my bot is now ranked as bad, but i don't even know why :(

WINWINWIN: A lot more dynamic top 3 than Ocean of Code

Zenoscave: What's the gold Meta?

eulerscheZahl: the game is more random

eulerscheZahl: collect pellets, win game

eulerscheZahl: legend too

Zenoscave: eulerscheZahl you never cease to have the best answers

Clagus: "Pac is the last yellow Pac-Worlder left in Pac-World" :O ;(

Clagus: this game is more sad than I thought

Zenoscave: Is hunarian good for cherries?

Zenoscave: hungarian*

struct: seems good

struct: at least in legend there are some

Clagus: holy crap:

ShannonNorris97: Today I'm making a lot of changes that it seems would really help me in the leaderboards, but then have incredibly little effect

Zenoscave: Are there any maps where Pacs.Count != Cherries.Count on start?

eulerscheZahl: what are cherries?

struct: pellets

ShannonNorris97: super pellets

struct: or big pellets?

struct: oh ok

Zenoscave: The name for the big pellets

eulerscheZahl: super pellets is always 4

Zenoscave: Ok thanks

tobk: hm, just had Gold Boss timeout in 2nd turn...

eulerscheZahl: i do that too in some rare cases

tobk: my bot dropped 200 ranks after last "improvements"... will try an older version again. things like this can be so frustrating...

Durkin: Got gold and decided to start a new bot- clearly genius plays

eulerscheZahl: we've all been there

Doju: gosh this is ugly

Doju: i have a method that checks if two pac's next step is the same cell

Doju: i need to do that for the next step too

Doju: copy-paste :D

MattSOrme: Problem is, sometimes you need to go through the reduced rank to actually fix everything properly rather than just ignoring the problem

Braykin08: Private function, lambda, anonymous functions. Bunch of ways to avoid that

NickStahl: Doju that is some proper competative programming there :)

Braykin08: But I also went for copy paste :)

tobk: meh, resubmitted bot from last night, back 200 ranks up... and I basically just refactored some duplicate code into a method, and checked that 10 times... prob should check an 11th time now

eulerscheZahl: or submit again

eulerscheZahl: rng is strong

Doju: although i could fix that the real way and actually just make the function smart and check the entire path instead of just one cell

Doju: but 38 hours left...

Cappefra: rng?

tobk: I already resubmitted the "improved" version twice with two more minor improvements, but hte lower rank was pretty consistent

jrke: i challenge everybody no one would have more submission count than me

jrke: ;) 347

Doju: jrke did you get your sim working?

eulerscheZahl: random number generator - implying that there is some randomness in your rank

Doju: Checking the entire path is gonna be a bit difficult...

Cappefra: oh ok yeah

Doju: how do you even determine which pac should yield when delaying a path might cause more collisions

Cappefra: ok legend is not gonna be easy...

seronis: if you know distance to target for each pacman, you have the one with the closest target yield

Doju: yes im doing that

Doju: but im talking about the whole path

dbdr: eulerscheZahl: do you timeout more in the IDE than in the arena?

eulerscheZahl: i rarely test in the IDE

Doju: actually there isn't any reason to have multiple collision points since pellets dont care which pac goes for it

eulerscheZahl: but arena timeouts are rare. and these peaks usually timeout in the IDE too

Doju: therefore i suppose i can just do the copy-paste and be done with it forever

eulerscheZahl: in theory: more timeouts in the IDE as arena is release mode

seronis: theory is wrong. i still get random timeouts in arena with no test timeouts

seronis: but thats why i deleted my code and started over

dbdr: is there a big difference in C#?

eulerscheZahl: i didn't do any benchmarks yet

MSmits: doing one right now

MSmits: euler GW=41,89% [ W=40,54% L=56,76% D=2,70% ] [37]

               kovi    GW=47,06%    [ W=47,06%   L=52,94%   D=0,00%   ] [34]
               Robo    GW=54,05%    [ W=54,05%   L=45,95%   D=0,00%   ] [37]
        -- TOTAL --    GW=47,69%    [ W=47,22%   L=51,85%   D=0,93%   ] [108 games]

eulerscheZahl: toad is beating you :)

MSmits: yeah, but it surprises me that it is such a small margin

MSmits: this game really is random

eulerscheZahl: i know

eulerscheZahl: and my bot has random bugs

MSmits: my bot is a random bug :P

eulerscheZahl: increasing the variance, giving everyone a chance

dbdr: the game is more complex than it seems I think

dbdr: my todo list is growing indefinitely :D

MSmits: it just has a large luck factor

eulerscheZahl: should get 1 more super pellet in both of those matches

dbdr: I am convinced there is a huge margin of improvement

eulerscheZahl: for my bot: definitely

seronis: no. how you prioritize pellets is a valid test

eulerscheZahl: my harvesting is awful

seronis: so you shouldnt have all tests with 'enough' pellets

MSmits: dbdr of course, but games are still decided by one unfortunate turn

eulerscheZahl: i'm just not sure how to code it

dbdr: don't do that turn ;)

MSmits: you lack information

eulerscheZahl: but we'll see on monday morning with hiders coming

dbdr: dapo?

MSmits: it might be that with the information known, even the best move is a move that can be countered

eulerscheZahl: my money is on karlis o

cegprakash: I'm thinking about adding anti accident code

eulerscheZahl: or add accident code cegprakash

Doju: cegprakash what does that mean?

cegprakash: getting hit by invisible enemy

cegprakash: that's accident

Doju: i see

cegprakash: usually accidents happen in signals

eulerscheZahl: and you can try to enforce these yourself

seronis: 'invisible' means thy enter an intersection same time as you. you CANT prevent that

MSmits: you can

eulerscheZahl: damn, 11 timeouts in 500 matches

MSmits: with a few assumptions, you can guess it

cegprakash: can in silver and up

seronis: you just have to collide and then react. you cant prevent

eulerscheZahl: just do this cegprakash

Braykin08: euler, do you have built custom tool to figure out your timeouts in the last matches, or it is displayed somewhere on the site?

eulerscheZahl: own script

cegprakash: eulerscheZahl he got his priorities right

eulerscheZahl: have to download each single replay, stressing the servers

eulerscheZahl: so nothing that will be public

cegprakash: dying to get super pellet is worth it Iguess

cegprakash: dying for a stupid pellet is not

eulerscheZahl: no cegprakash he just didn't see me coming, i was around the corner

eulerscheZahl: and i wanted to make him crash

cegprakash: but he doesn't have anti accident

cegprakash: that's why

cegprakash: it's upto him to choose when to do anti accident

cegprakash: I probably will never enable anti accident when there is a super pellet in the map

eulerscheZahl: he doesn't see me, how should he prevent it?

cegprakash: he can see u

cegprakash: even though he can't

eulerscheZahl: he's speeding

cegprakash: he can

eulerscheZahl: you mean by tracking?

cegprakash: ezpz

cegprakash: yes

eulerscheZahl: he can only guess

cegprakash: but u have to assume that opponent's goal is to create an accident

cegprakash: to prevent it

eulerscheZahl: yeah, it's likely that i go to the pellet

eulerscheZahl: if you try to dodge that, your bot will be way too shy

cegprakash: yes

cegprakash: that's why enable it for stupid pellets

cegprakash: not super pellets

eulerscheZahl: that's just a sneaky ninja attack you can't prevent

cegprakash: can prevent

cegprakash: but not sure if it's worth it

cegprakash: as u said

eulerscheZahl: can't prevent and still play reasonably well in general

cegprakash: oh

seronis: considering the REAL pacman game algorithms are known, anyone bother implementing the real 4 ghosts and see how their bot plays original ?

cegprakash: ghosts can work on closed maps I guess

Braykin08: In the same set of ideas, I wished that the higher leagues added more player

cegprakash: the difficulty is that ghosts are vulnerable seronis

cegprakash: unlike in real pacman game

seronis: would require a larger map as you would need 2 axis of symmetry

seronis: anyone know if the spring challenge is gonna stay available after competition closes ?

jrke: yeah you can do it after challenge completion also

Rimailleur: well, you were right, my code was very bad in the challenge ! Difficult to analyse vs random enemy:)

ShannonNorris97: Using Codingame's IDE how can I get it to implement a certain seed?

Icebox: click on options

eulerscheZahl: left: setting -> export mode

eulerscheZahl: expert

ShannonNorris97: ah brilliant, thank you

ShannonNorris97: That's weird - this one seed makes me timeout on the very first turn but with no errors or anything

seronis: you take over 1sec to set up your board info ?

eulerscheZahl: print the map input to stderr

eulerscheZahl: and copy it to test offline

eulerscheZahl: can you share the map?

ShannonNorris97: definitely not over a second. It has a map print in it but it's at the end of the turn, I'll try shifting some prints about to see if I can get it to do anything

eulerscheZahl: some have timeouts when there's a horizontal line without a single wall

ShannonNorris97: That's it, thank you sm

seronis: why is a horrizontal hallway bad ?

eulerscheZahl: because of line of sight infinite loop

njaber: people have an infinite loop with (x + 1) % width

struct: ah makes sence

seronis: ahh i already dont revisit cells so no need to care if a horizontal bar is the cause

ShannonNorris97: Mine's from where I go through each pac's line of sight adding the pellets to the map. So by being a continuous line, it gave an infinite loop

ShannonNorris97: ^ One of my pacs was on that line on turn 1

semera: Sorry for repeated question....

Working on simuator and I don't underestand, turn 20. Two red pacs do MOVE 1 33 9|MOVE 4 34 9.

First are bumped, it's fine. But Pac 4 has speed, so then he should move to 33 9?? in rules is "Repeat for any pac with an activated SPEED ability." How is evaluation?

Counterbalance: it doesn't have speed left

Counterbalance: it uses it's last speed at frame 18

semera: wtf, I am blind.. sorry guys

Doju: Oops, submitted a bot that would time out every now and then for stupid reasons

cegprakash: anyone have a seed with only 1 pac?

MadKnight: no

Doju: I think there is none

cegprakash: I saw once

Doju: are*

MadKnight: yea i think it's 2+

MadKnight: maybe it was in wood ?

cegprakash: no silver

seronis: constraints at least says 2-5

seronis: though other puzzles sometimes disobey listed constraints

Counterbalance: only wood2 has 1 pac it seems

SurajMishra2209: reached rank 5 in arena and fell down to 70 :D

cegprakash: no way which league SurajMishra2209

RavenKZP: yes i was 20 -> fixed or add something = fall to 150 xp

cegprakash: it's good not to fix some bugs

cegprakash: that way u are less predictable

seronis: cant you just submit again, get a new set of opponents and recalc rank ?

SurajMishra2209: lol...bronze

cegprakash: hey SurajMishra2209 do u go to closest pellet?

cegprakash: if u go to closest pellet u can reach gold

SurajMishra2209: closest to pellet? I didn't get it?

cegprakash: ur pacs should go to their closest pellets

seronis: that seems like a travesty. merely closest pellet should be bronze

jrke: hey ceg i am not using speed is that ok

cegprakash: I reached gold with closest pellet

cegprakash: it's not okay jrke

jrke: K

cegprakash: speed is always preferred to shield

cegprakash: *switch

SurajMishra2209: in some cases....what I have seen is I lose because of the bad rollback mechanism that I have in case I don't have any visible pellets

seronis: no?

seronis: if an enemy is IMMEDIATELY beside you, switch. otherwise speed

jrke: and my pac don't collaborate how to fix that

cegprakash: don't rollback anything SurajMishra2209

cegprakash: add speed to ur wood code

cegprakash: and that should take u silver

Kukiss: +1 ^^^^

SurajMishra2209: cool....will give it a go

cegprakash: then start team work with ur pacs and u are in gold

cegprakash: that's what I did

jrke: how to collab with my pacs

cegprakash: talk to each other

cegprakash: take a collaborative decision

wicked_: using tcp/ip?

SurajMishra2209: I guess that's the problem here....I started building on shared knowledge between the pacs...and I never really could reach silver

cegprakash: no just if else

cegprakash: wicked_

jrke: K

wicked_: jk :)

cegprakash: SurajMishra2209 do that after reaching silver

SurajMishra2209: cool

cegprakash: don't do magic that others don't do

cegprakash: or it's difficult to promote

cegprakash: unless u are a meta maker

SurajMishra2209: gotcha

RavenKZP: i cant get to gold couse my pacs are suicide since... always i try to teach them to dont go to enemy but they still want to die :D

cegprakash: I think gold to legend is to make bugs so that we get less predictable.. everyone predicts opponents in gold :(

cegprakash: RavenKZP lol u have bad collision detection

cegprakash: assume enemy's intention is to kill u on next turn RavenKZP

cegprakash: that way u are safe

cegprakash: and u can avoid that

SurajMishra2209: currently at 34 in bronze...hopefully this change will take me to silver

RavenKZP: i have detection but bugged :D

RavenKZP: thats my problem

RavenKZP: sometimes my pac follow enemy until he finally kill them :D

seronis: never seek out enemy to attack. defend or run

H1ggsb0s0n: Yes, attacking is a losing strategy

H1ggsb0s0n: you'll never be able to catch up tot he pac you're following and it will eat everything in front of it

seronis: you chase the enemy who is eating pellets and earning points

seronis: or because you move towards it first, it sits still, switches, and you die

seronis: attacking = losing

Icebox: I'm sure euler sitting in the top of legend with his aggresive attacking strat would dissagree with you but hey

RavenKZP: hahah i found it

RavenKZP: when opponent ability was 0 then it was invisible for my pacs :D

Neumann: Are there any people in legend with small depth search ? (<4)

Doju: Euler has said that he's doing 4

lifetimeLearner007: cegprakash: I think gold to legend is to make bugs so that we get less predictable..

so, so far we're trying so hard to fix bugs and now u're saying we've to introduce bugs to win?


Doju: Time to dive into the probabilities

Doju: so far i've only had 1s and 0s

VicHofs: damn it was against inky but


VicHofs: this one was tough lol

Doju: VicHofs are you using bfs?

VicHofs: yep

Doju: okay, one tip

Doju: consider other pacs as walls

seronis: who is NOT using some type of bfs ?

Doju: easy to implement, huge reward

VicHofs: sure about that?

Doju: seronis a lot of people who think it's not worth it to do

Doju: VicHofs yup, i jumped like 800 ranks when i did that

VicHofs: I think I might miss out on some pellets

VicHofs: ok I'll test it then

seronis: my fist code had a bfs and was under 120 lines including empty lines, comments, and default code

Doju: You can tweak it later if you want but it's such an easy thing that its totally worth it to do

VicHofs: hmm

Doju: how was your code under 120 lines!?

VicHofs: dude at this point honestly I just think I'm unlucky

seronis: because a simplified BFS doesnt require hardly anything ...

VicHofs: I've done every possible tweak I could think of

VicHofs: and nothing

Doju: my bfs functions (2 of them) are 60 lines in total

VicHofs: odds are I'll try that too and have it backfire

Doju: to be fair they aren't the simplest onest possible

Doju: VicHofs i'm almost certain that it'll be a huge improvement

Doju: looking at that replay your pacs are following eachother and grouping up for no reason

VicHofs: we'll see

Doju: that will prevent that

VicHofs: yeah that is happening

VicHofs: will it?

VicHofs: how?

Doju: yes

Doju: mostly

VicHofs: I was trying to think of a way to deal with it

Doju: that's a super easy fix

Doju: not a perfect one though

VicHofs: aight then

VicHofs: treating enemy and friendly pacs as walls?

VicHofs: or just opponents

Doju: both

VicHofs: ok easy to do at least

VicHofs: I'm at rank 300 rn

VicHofs: I'll implement that and see if it helps

VicHofs: but honestly my money

Doju: lemme know what happens

VicHofs: 's on nothing lmao

Doju: lol

VicHofs: aight

VicHofs: well against inky in my tests I lost 2/5

Doju: umm

Doju: are you sure you did it correctly?

Doju: that was a huge jump for me

VicHofs: not sure whether it's a huge improvement

VicHofs: yeah

VicHofs: I run BFS for a set time so it doesn't time out

Doju: can you send me a replay?

VicHofs: yeah sure thing


VicHofs: one I lost^

Doju: it's not working

Doju: assuming your logic is closest pellet

VicHofs: oh wait no

VicHofs: my bad

VicHofs: I did fuck up

VicHofs: easy fix tho

VicHofs: one sec

VicHofs: I fixed it but now I'm timing out every game

Doju: umm

Doju: what do you resort to if you don't find a target

VicHofs: depends

Doju: hm

VicHofs: if there are superpellets, a random one among them

VicHofs: but that wouldn't explain the timeouts

Doju: okay...

Doju: yeah

Doju: it wouldnt

Doju: oh sorry, i meant if bfs doesn't find a target

VicHofs: Yeah that's what I meant tho

Doju: ok

VicHofs: if it goes over the time limit I set

Doju: well, send me a replay where you time out?

VicHofs: it just picks a random superpellets

Doju: and what's causing it to time out?

Doju: bfs?

VicHofs: okay

Doju: it shouldn't be that slow

VicHofs: no idea yet

VicHofs: but since I'm timing out only now that I changed the logic it must be that

Doju: yes

Doju: but what's the root cause

Doju: does it not give an error?

VicHofs: nope

VicHofs: just timing out

Doju: huh.

Doju: then you must have an infinite loop somewhere

Doju: or reeeally crappy code haha

Doju: if you're not doing anything special

VicHofs: here u go


Doju: it's definitely still not working

cegprakash: is board width always ODD?

Doju: cegprakash i think it is

VicHofs: I don't think so

VicHofs: I just played on a 30x11

Doju: hmm....

Doju: what if you tell them to ignore the super pellets

cegprakash: alright I think it shouldn't matter for symmetricity

Doju: can you easily do that?

VicHofs: ignore as in not even do bfs?

Doju: don't give super pellets more value than normal pellets

Adnmaster: they do

cegprakash: why not Doju

Doju: cegprakash to debug

Doju: because they are definitely finding the same target there in that replay

Doju: but it might be from the other direction

Doju: and if you use the default pathfinding they're still gonna take the same path

Doju: but if they take different paths it would clearly show that they aren't finding paths through eachother

[Csongor]: Why can't get a path (do a different path finding) to every "field" of the game. And why don't I get any errors while trying to do that?

cegprakash: he doesn't have team cooperation.. apart from that it looks fine to me

Doju: cegprakash that's why i recommended to consider pacs to be walls in the bfs

Doju: that'll instantly give you a pretty decent-ish level of cooperation

cegprakash: can work

cegprakash: but that's costly in time

Doju: no?

Doju: why would it be

cegprakash: I never do BFS in my sim

cegprakash: I only do a BFS on turn 1

cegprakash: start of the game

lifetimeLearner007: but then u wouldn't know the best path with most pellets on other turns right, cegprakash?

Doju: he's simming lifetimeLearner007

cegprakash: I know lifetimeLearner007

cegprakash: I predict the future detecting all my future collisions

VicHofs: tried ignoring superpellets

VicHofs: still timing out

lifetimeLearner007: does monte carlo come under simulation?

Doju: what does the replay look like?

cegprakash: lifetimeLearner007 yes it does


VicHofs: plus I get rekt cause I don't get the superpellets

lifetimeLearner007: i started implementing monte carlo but getting timed out. running that only for 25sec though, still timing out.

lifetimeLearner007: 25ms*

Doju: okay it looks like its working but lemme see another replay just to be sure

seronis: i use BFS purely to find either closest pellet or shorted path to a goal. are most of you using BFS to find 'most pellets within an X length path' ?

lifetimeLearner007: for heuristics, it is fine but for simulation, its not.

cegprakash: VicHofs turn 20+

VicHofs: yes

cegprakash: go to a history of ur submissions when u don't have a timeout

cegprakash: and see what u added

cegprakash: use

cegprakash: that's what I use

Doju: he added pacs as walls

VicHofs: I know what I did

VicHofs: Doju's suggestion

Doju: but that shouldn't still be causing timeouts

VicHofs: I would be nice to try out but yeah

cegprakash: he has bug in BFS then

cegprakash: how me ur BFS code alone VicHofs

cegprakash: show*

VicHofs: I've sent it in pseucode before but no one found any bugs

VicHofs: sure you wanna look?

cegprakash: send pseudo code again

VicHofs: aight

Default avatar.png KoreN-: how to debug in java?

cegprakash: 1) u should mark visited before u push into queue 2) check if visited before pushing into queue

doing these 2 things correctly should run ur bfs in 0.000001 seconds

VicHofs: did those

cegprakash: check again

VicHofs: 'correctly' might be a bit iffy

VicHofs: but I did

cegprakash: check again

cegprakash: till u fix

cegprakash: if ur bfs runs more than 0.000001 seconds u have bug there

Doju: how fast did your bfs run before pacs were walls?

cegprakash: walls doesn't matter

cegprakash: any bfs runs in O(width*height)

Doju: erm

Doju: isn't it like nodes * edges?

cegprakash: nopes

cegprakash: it's nodes

Default avatar.png PippiCoder: anyone doing this in java?

cegprakash: + edges

Default avatar.png PippiCoder: I'm confused a bit xD

seronis: my bfs didnt both checking visited before pushing. it checked visited before examing current cell and then bailed. fewer total checks

Doju: you're right

Doju: + edges

Doju: umm

Doju: that's slower though

Doju: it had to push it into the queue

seronis: is there a way to find the code i had before ?

cegprakash: seronis that's wrong

cegprakash: fix it

cegprakash: can run 1000 times slower

Quidome: @seronis it is in your history

Quidome: Click on the left on history and you see your commits

Quidome: Click on the arrow and you can send back your code to the IDE

seronis: ty. i had assumed that was battle history / replay stuff. not code history


VicHofs: in case you wanna see

VicHofs: @cegprakash @Doju

Doju: erm

Doju: i think it should be while len(queue) > 0

Doju: or at least that's what i'm doing

Doju: actually i'm doing while len(queue) > 1 because i'm also pushing in Nones as markers but anyways you get the idea

VicHofs: well I tried while True before

VicHofs: so same dif

VicHofs: but I was timing out sometimes

Doju: its not

Doju: that's exactly what your issue is

VicHofs: wym

cegprakash: VicHofs it looks so wrong

cegprakash: does not follow both the conditions I said

VicHofs: thanks

VicHofs: yeah it does tho lol

VicHofs: I set visited before sending to queue

VicHofs: and also check if visited beforehand

Doju: there's no exit condition there

Doju: apart from timing out

Doju: no wonder why it's timing out

cegprakash: before starting bfs u need to push start to the queue and make it as visited

VicHofs: I did though

cegprakash: make it visited first before pushing

Doju: like what's even happening there lol

VicHofs: don;t you see it?

VicHofs: Doju the timeout isn't 50ms

cegprakash: no

cegprakash: u are not marking it visited

VicHofs: I set it as custom

cegprakash: after u push

VicHofs: 10ms for each

VicHofs: cegprakash maybe I misunderstand what you mean then

VicHofs: could you elaborate?

Doju: yes but

Doju: you're just looping until it hits the time

Doju: not exiting when the queue is empty

VicHofs: yep

Doju: that makes no sense

Doju: you want to exit when you've checked all the cells

Doju: aka the queue is empty

Doju: no wonder why it's timing out

VicHofs: but it won't be empty unless I have walls around me 360 deg right

VicHofs: I can time that solution too but idk

VicHofs: *try

Doju: aghhh


Doju: yes

Doju: that

cegprakash: this is what u need VicHofs

Doju: also add in if neighbor in targets return neighbor

Doju: VicHofs what your code was doing is this:

Doju: Oh ok imma loop over all the cells, nice

Doju: no target found but all cells are visited?

Doju: oh i need to go back to start. Oh i need to go back to start. Oh i need to go back to start. Oh i need to go back to start. Oh time is up

cegprakash: lololol Doju

VicHofs: ok I'll switch it around

Daher: Hello

Zenoscave: cegprakash are you legend?

cegprakash: no Zenoscave

cegprakash: but I'll

cegprakash: adding enemy tracker

cegprakash: I'm done with random bugs pushing me high

cegprakash: and me wondering why the same bot stucks at 100+ rank

Doju: Oh lol i've been here writing some code

Zenoscave: Do you do BFS for pathfinding still/

Zenoscave: ?

Doju: and meanwhile i've climbed from 100 to 30 in silver

cegprakash: Zenoscave ofc

cegprakash: same bfs code I added in wood2 I'm using still now

Zenoscave: When do you stop BFS on target or on no more neighbors?

Doju: both

cegprakash: I only do bfs on turn 1 at game start

Doju: or depends on what you want

Doju: anyways you always stop it when the queue is empty

Doju: but if you hit a target that you like you can stop it earlier

Doju: also

Doju: anyways you always stop it when the queue is empty

Doju: VicHofs

Doju: xD

Doju: I think i'm gonna time out with my current plan

Doju: looping pretty much over every cell for every cell and doing a bunch of math

Doju: on every move

stakka: how do you determine a target / desired position for a pac? not talking about the pathfinding aspect, but wondering where to send them in the first place

Doju: stakka that's the point of the contest pretty much

Doju: it's up to you to figure it out

stakka: thought so

stakka: fair enough :D

Doju: but i'll tell you that you can get decently far with naive approaches

Doju: if you consider rank 40 in silver as decently far then i'm speaking form experience

stakka: just wondering because I saw you discussing BFS

stakka: that would imply you're looking beyond just your neighbours

Vidundret: :crab:

NickStahl: Doju, your doing great :) I gave up

Doju: NickStahl noo

NickStahl: If you keep it up you will end up in gold!

Doju: you can still climb

Doju: i'm almost definitely gonna get gold if i get this thing working

Doju: but it might take some fine-tuning

VicHofs: Ok I fixed the whileloop

NickStahl: Doju, I know, but tomorrow I am away for the whole day and I'm kind of done with it for now :)

Doju: Ah okay NickStahl

VicHofs: still timing out tho

VicHofs: :upside_down:

Doju: VicHofs send in a new round of pseudocode xd

VicHofs: its the same tho lol

VicHofs: except with the while loop considering if the queue is empty

NickStahl: I should work on some algo stuff so I can implement something better next time than if, then elses :)

Doju: so your while loop now contains "or queue is empty"

Doju: now you need to make sure you aren't pushing the same cell into the queue multiple times

Doju: make sure you're catching it if it's already visited

VicHofs: def BFS_target(self, start, targets):

VicHofs: The visited thing is working I'm pretty sure

cegprakash: VicHofs I literally gave u the code

cegprakash: u are not making the start visited

cegprakash: before the while loop

VicHofs: oh my bad

VicHofs: in the pseudocode I really am not

VicHofs: but in the actual code I am

Default avatar.png maddoggg: print("Hi")

VicHofs: visited = {start}

Doju: that wouldn't cause it to time out though

cegprakash: are u popping the queue on the first line of ur BFS?

cegprakash: Doju it will

Doju: right, good point

MonZtaDeluxe: anyways - i'm in silver - i give up (tried to code again from scratch, my new concept is too slow) - cya next contest :)

Doju: cegprakash no it wont since it gets set as visited when the next cell over checks it

cegprakash: I can't see a remove (pop) in his pseudo code

Doju: yeah

Doju: if you're using a deque make sure you do deque.popleft()

Doju: instead of deque.pop()

MonZtaDeluxe: guys - c++/c# - is there a huge difference in performance?

cegprakash: I also don

           for i in moves(dictionary 'compass' of directions linking letters to moves):

for move in insert:

cegprakash: don't understand why he has 2 nested loops

cegprakash: he just needs 1 loop

cegprakash: or 1 more to check the level..

Doju: true

Doju: it's a miracle how that wasn't timing out before hahah

Doju: but it's good that it's getting fixed

Doju: learning opportunity

cegprakash: yeah beginner mistakes

cegprakash: bfs timeout was one of the hardest things to understand when I was in college :D

Doju: or not-enough-coffee mistakes

Doju: im going all in, calling this new movement method "magic()"

Doju: just to make sure it works

Doju: It's a pain how i built this thing

Doju: needs to work in a recursive loop

cegprakash: what

cegprakash: did u just say recursion :O

Doju: yeah i have some collaboration logic working recursively

lifetimeLearner007: i'm doing monte carlo but getting timed out frequently, till then I've higher points. When I run that in local, I get output but in CG,its timed out. any suggestions?

Doju: nothing fancy

Doju: lifetimeLearner007 your machine is faster than the CG servers

cegprakash: sometimes when I have 2 bugs 1 bug compensates another and ends up being a good bot. But when I fix 1 of them other bug is exposed and it becomes a disaster

Doju: Maybe make the depth variable based on the time elapsed

Doju: cegprakash yup, it happens

lifetimeLearner007: doing only depth 1 so far. (facepalm)

Doju: hm

Doju: python?

Doju: :D

lifetimeLearner007: JS

cegprakash: lifetimeLearner007 depth=1 good till silver

cegprakash: may be few have reached to gold as well

lifetimeLearner007: I'm trying to reach silver, cegprakash

Doju: what on earth

Doju: isn't that such a pain to implement?

seronis: the server has a weird ranking formula where merely fighting a lower rank person will lower your own rank, even when you beat them

Doju: at least as far as i've understood

lifetimeLearner007: if i fix this timeout, then i think i have a shot to reach silver

cegprakash: u are facing bfs timeouts too?

struct: seronis the ranking difference has to be quite big for that to happen

lifetimeLearner007: i guess that's the reason, cegprakash

seronis: i hadnt actually submitted anything in several days so my rank was like 2300. havent lost a match yet in this submition but my rank keeps jumping both up and down

Default avatar.png RustyCrown: how come i cant read the type of enemy pacs?

struct: that is normal

lifetimeLearner007: ur rank depends on other bots too, seronis. so, if other bots are better than urs, then u'll go down

struct: people keep submiting

lifetimeLearner007: hardly 1.5 days left

Default avatar.png RustyCrown: oh so you cant know what type they are?

struct: RustyCrown you can know the pacs type of enemy

Doju: yes you can

Braykin08: If you are bronze and up, you only see enemy pacs that are in your line of sight

struct: they give it in inputs

Doju: why can i not collapse a class in the editor

Astrobytes: Hover over the line numbers

Doju: clicking on the arrow only collapses the __init__ Astrobytes

Astrobytes: Works OK for C++ :shrug:

Doju: and it's only this one class

Doju: irritating :/

Astrobytes: Just tried in Python and works fine for me?

Doju: other ones work fine but it's just one that doesn't

Astrobytes: What's different about it?

Doju: i don't think there's anything different

Astrobytes: Take a good look to be sure

Doju: oh 2 don't work

Doju: lemme see if there's something in common

Doju: can't really think of anything

AntiSquid: i see people who were at #2 in gold dropped to #60 or worse, i would be fking angry, dunno how they feel lol :D

Doju: that must be a pain

Doju: so close to legend

AntiSquid: the gold boss divide doesn't make much sense, you get lucky and get promoted or get unlucky and get dropped

wlesavo: true

BenjaminUrquhart: I got lucky and rank increased

wlesavo: my legend submit could easily end up at #100 in gold

KCrown: how many people in the gold and legend leagues? anyone know?

BenjaminUrquhart: gold has 433

BenjaminUrquhart: legend has 72

Astrobytes: KCrown

KCrown: that is a lot ... lol

cegprakash: wait what

cegprakash: I can't see through enemy pac?

Nerchio: you can

cegprakash: i turned off kill and at turn 18-24 I don't know what my pacs are doing

cegprakash: may be my pellet tracking has bugs :O

cegprakash: this is sad news

VicHofs: I am removing from the queue cegprakash

VicHofs: sorry wasn't here

Doju: VicHofs is the queue ever empty

VicHofs: not sure I'd have to debug to find out for sure

Doju: print something out when you know it's empty

VicHofs: which I am doing now

Default avatar.png TheNirl: good god these achievement bleeps scare the bejeezus out of me

VicHofs: same lol

VicHofs: back when I didn't know what they were

cegprakash: better to print everything u push VicHofs say if u start bfs from 0,0, it should then print 0,1 then 1,0 then 1,1 then 2,1 then 1,2 then 2,2 and so on

VicHofs: yep that's what I'm doing now

VicHofs: I'll report afterward

VicHofs: ty guys

Doju: cegprakash VicHofs do be careful with that though - it can time out because of the prints

cegprakash: lol no Doju

VicHofs: yeah I gotchu

cegprakash: it's just 35x17 points

Doju: cegprakash oh yes it can if you print enough things

cegprakash: I print thousands of characters on errorstream

cegprakash: :D

Doju: i'm not sure what i printed

Doju: maybe a bit more than just the cells

Doju: but i debugged a timeout which was caused by my prints for 2 hours

cegprakash: my pellet tracking got screwed as I added tracking dead pellets

ZarthaxX: Doju yeah happened to me on a contest..

ZarthaxX: was getting pure timeouts on submit only

ZarthaxX: :(

HiIamFriend: my brain is burning

HiIamFriend: i will start over

HiIamFriend: fuck it

semera: just interesting question for me, how much time did you spent with writing, improving and bugfixing movement resolution?

HiIamFriend: movement is cancer

Doju: movement is fun

semera: movement is nice, but resolution... :D

Doju: although a pain to fix

Icebox: recursion is cancer

HiIamFriend: some shitty enemy codes stuck in in corners and you have nothing to do

HiIamFriend: lovely

Doju: oh right movement for pellets only is fun

Doju: movement for dealing with enemies isnt fun

Doju: xd

HiIamFriend: exactly

Doju: Just making a new movement thing that will run on pure magic

Doju: hoping it'll give better results than my current, very naive, approach

Doju: Maybe i should time things before i start adding more features...

VicHofs: Doju BFS is running forever when checking for empty queue

VicHofs: why does the queue have to be empty tho

Doju: agh

Doju: it'll be empty when you have checked all the cells

VicHofs: I think mine is never empty alright

Doju: then you're adding already visited cells into the queue

HiIamFriend: and why did they have to make imputs so cancer

VicHofs: Yeah but doesn't that lead to a timeout?

VicHofs: checking every single one

Doju: yes, it does

Doju: no

Doju: lol no

VicHofs: what

HiIamFriend: scan pallets

HiIamFriend: move to big ones

HiIamFriend: then move to small ones closes to you

HiIamFriend: i guess

VicHofs: ya ik

HiIamFriend: or if you are smart

HiIamFriend: you can check areas with most pallets

Doju: i check every cell for every cell and it takes me 100 ms on python with no optimization

HiIamFriend: but i am not a mas ermind

VicHofs: yeah that's tough

Doju: you can most definitely run it from one cell to all the others in time

VicHofs: huh

VicHofs: idk then

VicHofs: I rewound my code back to when it wasn't timing out

Doju: that was a mess

Doju: honestly use manhattan rather than that version

VicHofs: I don't really get what's wrong with it still tho

VicHofs: like I get that it times out

VicHofs: but idk why

Doju: you're adding things to the queue even though they've been checked

Doju: therefore the queue is never empty

Doju: and it will run forever

VicHofs: I'm working on a movement base tho

VicHofs: I think I know what you mean

VicHofs: but I'm registering move sequences instead of just the cells

cegprakash: can I double collide on a speed turn?

Edrevan: yes

cegprakash: oh

Edrevan: speed is a "normal" move, its just that pacs that have speed get 2 moves in one turn

Edrevan: So everyone moves, then the pacs that have speed move again. And you do collision everytime

cegprakash: so the path finding is 1 move at a time

cegprakash: right?

Doju: VicHofs i'm doing like 40 bfs per turn and it runs in 6 ms

cegprakash: not based on targete

Doju: Okay maybe not 40

VicHofs: lemme explain cause I think it wasn't clear

Doju: more like 20

VicHofs: from the pseudocode and what not

HiIamFriend: why palets input is a string

VicHofs: I use strings to determine moves

HiIamFriend: so anoying

VicHofs: L for left, U for up and so on

Doju: k

VicHofs: those are in a dictionary containing what moves they represent


VicHofs: and I go checking every combination of moves by using string concatenation

VicHofs: for example

Edrevan: cegprakash Yes, one move at a time. If your pac is in 1,1 and you output "MOVE 3 1", it does a pathfinding to find the shortest path between 1 1 and 3 1. Let's say it finds 1,1 -> 2,1 -> 3,1.

VicHofs: the queue starts containing just

VicHofs: so essentially nothing in string terms

Edrevan: cegprakash Then if your pac has speed, its first move will be from 1,1 to 2,1. Then its second move will be 2,1 to 3,1

VicHofs: then for each of the directions I concatenate that empty string with the letter that represents a move

cegprakash: okay so I change my sim to let it collide twice

cegprakash: :D

VicHofs: so lets say when I try + 'U' it's invalid

VicHofs: because there's a wall there

VicHofs: None of the next combinations tried will start with a U.

Edrevan: cegprakash yep :)

VicHofs: the rest is just base BFS

VicHofs: works the same in logic

VicHofs: and idk what's wrong with this lol

Doju: then you can't go around walls

Doju: ah

Doju: just


Doju: there's some decent pseudocode there

Doju: have a read

VicHofs: I can go around

VicHofs: I just can't go through

VicHofs: the moves won't start with U

VicHofs: but I can still have, for example, RRULL

VicHofs: provided no walls interfere

VicHofs: I did it by registering moves because at first I didn't know the game calculated the shortest path on its own

VicHofs: so I would need the sequence

VicHofs: to get there fast

VicHofs: so now that I know about that mechanic I -could- theoretically rewrite it without the moveseqs but idk if I have the energy for that at this point lol

VicHofs: I'd basically have to rewrite the whole logic

MattSOrme: hmm, just started getting the weird flush error again :/

MattSOrme: I don't know how i fixed it last time

Kellthazar: tat[[

Kellthazar: thats weird, cant get the codesync extension working on my sister notebook

Doju: I seriously need to do this math with numpy...

MarekM: :)

lifetimeLearner007: Hey guys, look at this game:

Default avatar.png jhpark21: honestly so screwed


romanshevchuk: which place should I be in order to be promoted to the next league?

Cappefra: technically first... you need to be up enough that your submit fights the boss and mostly wins

Cappefra: then you're placed first and you get promoted

romanshevchuk: woah and I thought 20-30 would be good enough

Zandy156: anyone higher than the boss gets promoted

Cappefra: it is, if you get to around 20 or 30 in average if you keep resubmitting the same code you'll end up being promoted because of the randomness

romanshevchuk: what if the boss is some legend level algorithm?

Cappefra: well then it would be the legend boss :D

romanshevchuk: :D

cegprakash: I've never been able to catch up my 3 day old bot which had full of bugs :D

cegprakash: so I just keep submitting that code once in a while

cegprakash: hoping with mere luck it'll enter legend

cegprakash: lul

cegprakash: and I've no idea why that bot works

cegprakash: and my latest code does not

cegprakash: I mean I know why it does not because I lose games.. But I don't know why it loses :D

cegprakash: now that many good bots reached legend may be my pleb bot has a chance

Cappefra: lol

cegprakash: to get to the boss and actually wreck him

Cappefra: good point, that gives me hope

Default avatar.png PippiCoder: guys, got a question

Default avatar.png PippiCoder: I'm a bit of a noob with bots, how do I handle multiple pacs?

Default avatar.png PippiCoder: lol

Default avatar.png PippiCoder: I don't get this x y thing, it just says that its the coordniates of the closest gem?

cegprakash: u get all visible pellets

cegprakash: store them in an array and find the closest

Default avatar.png PippiCoder: Good shit, thanks bro

Default avatar.png PippiCoder: Any other tips? xD

cegprakash: it's like u are programming into a pacman to work for u

cegprakash: have fun PippiCoder

cegprakash: that's the tip

cegprakash: :D

Default avatar.png PippiCoder: finally being a manager

Default avatar.png PippiCoder: I need to call my mom

Default avatar.png PippiCoder: She will be proud

cegprakash: u got promotion?

Default avatar.png PippiCoder: Not yet xD

Default avatar.png PippiCoder: I mean pacman manager

Default avatar.png PippiCoder: I got pacmans under me

Default avatar.png PippiCoder: Pacman team

Default avatar.png PippiCoder: lol

cegprakash: lolz

AlluringChair: ok i'm done, i've wasted countless hours on trying to fix my code which is over 1000 lines and still almost nothing works as it should. i should've started simple i guess

cegprakash: what league u in

Default avatar.png Xlos: Honestly I think having unit tests would be a very good idea at this code size

Default avatar.png Xlos: I'm too lazy to make them though

AlluringChair: what are uni tests

Default avatar.png Xlos: For each function you make, you also write a function to test if it works

Default avatar.png Xlos: or several

AlluringChair: i'm still in bronze cause my code either times out or have some none type error at some point

Default avatar.png Xlos: for example for sort and array, you would create a function that puts in some elements and see the output is sorted

Default avatar.png Xlos: Yeah it's hard to debug from the site output

AlluringChair: also i've made a stupid overcomplicated road system.

AlluringChair: and i'm basing everything else on it

Zandy156: definitely should start simple

AlluringChair: and it's probably cause of all m problems

AlluringChair: the cause*

Zandy156: you could always start over

AlluringChair: eh it's too late, i'm leaving in 6h and i still have to go to sleep.. anyway, at least i've learned my lesson not to overthing everything before implementing basics

stakka: that is a valid lesson indeed

AntiSquid: so i can beat boss more often in the IDE but can't beat mid gold bots :D

cegprakash: AntiSquid exactly

AntiSquid: are you using enemy prediction cegprakash ?

cegprakash: the bottom bots are all bots like ours

cegprakash: killing each other

cegprakash: so we never get caliberated high

AntiSquid: huge bottleneck

Durkin: woot woot

cegprakash: AntiSquid just testing it AntiSquid getting rekt

AntiSquid: game are like this

cegprakash: my bot suddenly started using switch unnecessarily predicting opponent will not move

AntiSquid: i actually beat it by a decent margin

cegprakash: I now assume opponent will kill me if I go near him

AntiSquid: ya good idea

cegprakash: but that's the same strat bot that's in rank 40 as well.. (3 days old bot)

AntiSquid: my Tuesday bot ranks highest so whatever :D

AntiSquid: it's like beating boss is a step back

tomatoes: i think most bots focus on collecting, not killing

Clagus: are dead enemy pacs always visible? or only if I can see their location?

tomatoes: always, each turn

thethiny: I think in gold always, in silver not always

thethiny: but idk

Clagus: tomatoes thx!

Clagus: ok, I'm gold so good to know thethiny

thethiny: cool then!

EvModder: whoops, just submitted code crashes on move 1

EvModder: free +1 for everyone else in legend i guess

thethiny: I just checked, I can always see MY dead pacs lol

AntiSquid: boss kills 2 of mine i still win

AntiSquid: if i submit my rank will sink though :D

tomatoes: i changed 1.0 to 0.5 in one place and jumped from 200+ to 20 :thinking:

Kukiss: nice one

cegprakash: wait what

cegprakash: 9 win out off 19 caliberated to #25

cegprakash: 9 win out of 10*

cegprakash: Did my bugs got fixed :O

cegprakash: 12 wins in 13 go go go

cegprakash: finally my anti accident code is working

Zenoscave: anti accident?

cegprakash: yes

cegprakash: accident = meeting in corners by accident

cegprakash: and end up dying

Zenoscave: How do you do that? enemy tracking?

cegprakash: when not in vision

cegprakash: yes

Zenoscave: Seems like enemy tracking is a good idea.

Zenoscave: Perhaps there are other uses for it

cegprakash: well most of my loses and randomness in ranking was mainly because of random accidents

cegprakash: that's why I spent today to do that

cegprakash: this might reach legend but I may be over confident

cegprakash: 15% rank 25

Zenoscave: How do you keep your pacs from blocking each other.

cegprakash: I simulate collisions

Default avatar.png SparshMc07: hej duo

Zenoscave: Excluding entire target path of previously chosen pacs seems overkill

MattSOrme: oof. come on. So close to promotion!!!

cegprakash: alright I overreacted with the initial boost


cegprakash: problem with simmingn

cegprakash: 1 bad move and I'm ruined

Kukiss: but it is probably hard to say was it a very much edge case or there something big broken ..

Kukiss: i looks like a very specific case

Kukiss: it*

thethiny: My best submit is not good enough

thethiny: Quitting time :D

MattSOrme: can i get bumped up just by other people challenging me and losing?

thethiny: this was the most learning experience I've ever had in my life

thethiny: the amount of algorithms I had to come up with, search, learn about, and optimizations, is sth I've never encountered before.

thethiny: And the sense of promotion, even if it meant there are people better than you, makes the learning experience better

Kukiss: competitions like these happen here few times a year, look here from time to time ;) or watch your email

thethiny: I'm surely gonna!

EvModder: alright, time to resubmit my bot and see if not crashing on the 1st move every time helps :'D

MattSOrme: If i could just boost my league score by just 1 point for just 1 minute that'd be great

BenWo: evening all

EvModder: hallo :)

cegprakash: I definitely have some bug in collision

cegprakash: this shouldn'tb e happening


BenWo: I'm never gonna get this done before the contest ends :/

cegprakash: turn 134:

BenWo: rofl wow that ending

cegprakash: oh I get it now

cegprakash: I don't have collision check in my mutation

cegprakash: damn

BenWo: oh nice, I just fixed a bug too

cegprakash: I'm debugging this 1 seed for like 1 hour

cegprakash: :D

BenWo: lol that was me last night

BenWo: except i think it was 3 hours to figure out an infinite loop

cegprakash: that hurts

cegprakash: ouch

BenWo: yeah, finally got there though

BenWo: turns out I was accidentally setting 2 nodes to be each-other's parent node :unamused:

cegprakash: lolol

cegprakash: 10/10 wins after fixing that collisoin bug

cegprakash: caliberated at rank 35

BenWo: niiice

cegprakash: this is the chance!

cegprakash: 12/12 win

cegprakash: go go go

NinjaDoggy: see you in legend!

cegprakash: 13/13

cegprakash: now plz nobody in gold submit and take away my rank lol

**seronis submits

seronis: *in a completely diff puzzle

BenWo: hah

NinjaDoggy: cegprakash you have >50 against boos right

NinjaDoggy: boss*

**BenWo submits. In silver.

NinjaDoggy: don't push it higher pelase

cegprakash: boss is a crap

cegprakash: he is there lucky

NinjaDoggy: LOL

cegprakash: coz he is not facing the bottom guys

NinjaDoggy: it's so true

NinjaDoggy: if boss was resubmitted

NinjaDoggy: it'd be rank like 50

cegprakash: so I only test against #2

NinjaDoggy: but testing against boss is relaly good though

NinjaDoggy: if you have like 80% WR against boss you can drag it down each submit

NinjaDoggy: :P

cegprakash: sometimes I climb so well and someone at bottom submit and if it's a loss then I drop big

AntiSquid: interesting, boss is crap ?

BenWo: yeah you'll get legend cegprakash

cegprakash: I better

BenWo: you're top 5 gold already

cegprakash: I was #20 at gold when legend didn't even open

cegprakash: look where I'm now :(

AntiSquid: ya nothing you can do with this randomness

seronis: well in a perfect world with infinite CPU cycles the server would just keep auto battling everyone against everyone they havent yet battled and ranks wouldnt be so random

NinjaDoggy: well... i'm not sure that's the issue even

NinjaDoggy: it's hard to assign ranks to bots

NinjaDoggy: when A beats B, B beats C, and C beats A

seronis: no. treat them no diff than a player. thats the whole point of rank

AntiSquid: it is but this system is horrible @_@

NinjaDoggy: which often is the case

AntiSquid: ceg F

cegprakash: AntiSquid add anti accident.. this way u reduce the randomness

NinjaDoggy: anti accident is also anti optimal...

cegprakash: once u caliberate well

seronis: if you have fought everyone then you first just look at your total win/loss ratio and that becoems the score for beating you. a 2nd pass sums score

NinjaDoggy: depending on how safe you play it

seronis: so cyclic wins like RPS have no factor

cegprakash: NinjaDoggy I've a buffer for controlling anti accident

AntiSquid: looks like you might need to resubmit multiple times ceg

NinjaDoggy: ok yea nvm you're right

NinjaDoggy: round robin would fix it

NinjaDoggy: but...

NinjaDoggy: it would also incentivize beating bad bots?

cegprakash: Okay I shuffled the top 10 drastically

NinjaDoggy: as opposed to beating other top bots?

cegprakash: rank 2 guy is now rank 9

seronis: no. because 1 top bot with a high win/loss ratio is still more points for that one win

AntiSquid: i rather have tourney bracket than this mess :D

cegprakash: as I kept testing against rank 2 he dropped to rank 9

NinjaDoggy: ok no, tourney bracket would be horrible

AntiSquid: (tourney bracket is a mess)

NinjaDoggy: then the RPS would suck :(

MattSOrme: ooh, almost there. come on!! 3 more places!

NinjaDoggy: imagine being the overall best bot, but you get seeded against your counter

AntiSquid: what are you struggling to achieve MattSOrme

MattSOrme: gold

AntiSquid: NinjaDoggy that's basically this contest

MattSOrme: just need a couple more people to challenge me and lose. Don't wanna risk a resubmit

cegprakash: I have a 0-5 against Psyho

cegprakash: and 2-1 against boss

NinjaDoggy: true... but it would make matters worse

NinjaDoggy: wait you've been testing locally vs psyho and u'r 0-5 against him?

cegprakash: no

cegprakash: I was testing against Mickah

NinjaDoggy: ok just submit like 3 more times, bump him into legend and then u can go after

MarekM: day ago, I was 9th gold... after day of coding, at best 187th gold

NinjaDoggy: ezpz

cegprakash: I dropped him to #8

NinjaDoggy: resubmit 3 times, bump psyho and then go to legend once he's out of the way

AntiSquid: so you optimized vs #2 well done

NinjaDoggy: poor michah...

NinjaDoggy: what did s/he do to deserve this

AntiSquid: just optimize vs psyho, drop him and then optimize vs michah again

NinjaDoggy: nonono

NinjaDoggy: that's too much work

NinjaDoggy: just bump him to legend

NinjaDoggy: and then optimize against boss

NinjaDoggy: drop boss to like 26

NinjaDoggy: and then ezpz legend urself

AntiSquid: i just find it funny he didn't optimize vs boss

AntiSquid: he might have promoted

AntiSquid: was being sarcastic with the optimize vs #2

cegprakash: u never get games against boss

NinjaDoggy: yeh that's kinda true

cegprakash: what's the point in optimizing against him

NinjaDoggy: # games vs boss is too low :(

NinjaDoggy: like i've had contests where i had like 80% WR against boss

NinjaDoggy: i submit, get 3 games

NinjaDoggy: and go 2-1

AntiSquid: cg scared of mass promotion

NinjaDoggy: and don't do anything :(

AntiSquid: but not scared of bottleneck

NinjaDoggy: better sacrafice a few good bots

NinjaDoggy: than let a whole herd of bad bots into legend

NinjaDoggy: i guess :(

AntiSquid: and sure no bottom legend bots got lucky promotions right

cegprakash: 3-2 against boss.. give me more taste of the boss

AntiSquid: surely*

cegprakash: oh no not psyho

cegprakash: 0-7 against psyho

AntiSquid: 3-2 ? sounds like you can barely beat it

cegprakash: damn

cegprakash: lol just gimme more games against boss

AntiSquid: 3-2 can be luck honestly

cegprakash: I am beating psyho on IDE

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

AntiSquid: black magic

AntiSquid: maybe leave bot where it is and go improve if you don't promote

cegprakash: 2-7 against psyho

cegprakash: and I'm #2

cegprakash: I will not do the same mistake of resubmitting

MattSOrme: i'm like joint 2nd in my league. Just need that last little bump

cegprakash: 96% #2

cegprakash: it's like watching the last over of a t20 match

cegprakash: just don't give me psyho :(

cegprakash: gimme the boss

cegprakash: 0.06 behind the boss

cegprakash: hoping ppl will push me

cegprakash: :D

cegprakash: time to eat some food

BenWo: good idea, stop watching :)

AntiSquid: lol i helped

AntiSquid: just beat boss for you

AntiSquid: cegprakash i won vs boss, you promoted

BenWo: lol nice

cegprakash: One does not simply level up on Codingame. Oh wait... I totally did!

cegprakash: thank you <3

cegprakash: I'm getting totally rekt on legend

cegprakash: 3 wins in 13

cegprakash: :D

cegprakash: so the last thing I added to my 3 day old code is anti accident

cegprakash: :D

MattSOrme: is no one testing silver?? come on people, bump me plz

AntiSquid: wtf is anti accident

cegprakash: once u see enemy

cegprakash: u know where he is

cegprakash: if he is not in ur vision

cegprakash: u know his previous position and his previous turn

cegprakash: u also know ur current turn

cegprakash: so with these info u can avoid accidents

cegprakash: AntiSquid

Zenoscave: ceg do you do it probabilistically?

cegprakash: no probability

seronis: but you wont know where all of them are which means you have unknowns that cant be tracked so its pointless

cegprakash: just turn difference

Zenoscave: or just avoid any "possible" places

AntiSquid: someone promoted psyho

cegprakash: also at turn 0 u can mirror ur own position to enemy

AntiSquid: or beat boss, whichever

cegprakash: usually when u promote to a league u would expect to be at 70% rank

cegprakash: but I'm 77/78

cegprakash: :D

MarekM: gratz!

seronis: why 70%? id have guessed 95%

cegprakash: I was #30 gold out off 200 when I got promoted out off silver

seronis: that seems like the exception and implies you made a great improvement instead of minor one

AntiSquid: it's not an exception

AntiSquid: it's very common that once you promote you go past 50% of the next league

AntiSquid: the division doesn't really make much sense as it is

BenWo: they would have to demote for bad performance to keep it making sense that way

cegprakash: lol

cegprakash: we need a demote boss then

cegprakash: :D

BenWo: well, if the demoted people then faced the lower league boss they would probably drag it down

AntiSquid: or just drop the bosses . top 15 are legend, next 20% or so gold, rest top 50 % silver, rest bronze ... done

BenWo: yeah that's an option, it also uses demotion

AntiSquid: and submits you only first within 100 rank range

AntiSquid: fight *

MattSOrme: ugh, i hate testing against players that don't play the same

cegprakash: the real contest actually happens in legend. all other leagues are just to build some hacky code to beat the top 2,3 bots and spam submits until u get calibrate to face them

EvModder: or instead of spam submit just sleep on it lol

seronis: sounds like bad balance. by silver that should be the situation

EvModder: that's the balance that comes from the players, not the system i think

AntiSquid: you can't lose if you don't participate

Default avatar.png Xlos: moving twice in one turn makes things complex

Default avatar.png Xlos: sometimes it seems it would be better to move 1 to access the situation

EvModder: a lot of people don't put in the time to make something really competitive from what i can tell

AntiSquid: that's true

EvModder: i've already spent at least 10 hours on this game, and will probably do another 4-8 over the next day

cegprakash: Xlos right

cegprakash: u can have if else for that or even a sim to decide it

Default avatar.png Xlos: kind of a nontrivial if else man

cegprakash: then do a scoring based on board state

seronis: the system itself would have been better to just have 'speed turns' that occur where only speeded players react

seronis: and you always properly analize each turn

BenWo: that would have been really nice

seronis: its how it works in the backend. the turn counter going above 200 verifies that

BenWo: yeah, it would have to in order to path around corners

BenWo: finally seeing results from my pathing rewrite

cegprakash: seronis if u bring that a pellet can disappear suddenly when u are watching it

cegprakash: opponent would have been hidden previous turn and he would have snatched it and went back hiding

BenWo: lol ninja pac

cegprakash: yeah and that's not nice

seronis: not at all. a speed turn just ignores any order you give non speeded pacs

seronis: and works identical every other way

cegprakash: you don't understand what I'm saying seronis read again

cegprakash: now u can't do UP followed by a DOWN

seronis: whic you SHOULD be able to do

cegprakash: but if u ask it ur way u can do UP followed by a DOWN

cegprakash: yes

cegprakash: and that's a drawback

cegprakash: because a pellet can disappear while u are watching it

Zandy156: he wants to read the input in between though

cegprakash: wait what

BenWo: a pellet could disappear while watching it now though

cegprakash: mm

seronis: what im suggesting prevents magic disappearance

BenWo: if a speed pac goes across your path

cegprakash: the purpose of speed is ruined

seronis: a while() loop should occur during speed turns is what i saying instead of how it currently skips that while loop

seronis: the purpose of speed is to get 2 moves, not be stealthy

seronis: the only thing speed turns should have done was ignore input from not speeded pacs

cegprakash: that way simming would be too easy

cegprakash: ofcourse

cegprakash: codingame loves challenge

cegprakash: now u have to do lot of collision calculations on same turn voila

seronis: i love challenges.. i dont like flawed systems. different apples

cegprakash: this is flawed system?

cegprakash: lol

seronis: a speeded pac cant make a uturn. no reason to prevent that. yes its a flaw

cegprakash: that's L turn

cegprakash: not a U turn

cegprakash: u need 3 moves for U turn

cegprakash: or 4

Icebox: he's talkint about LR

seronis: no. you move to a cell and then move immediately back

Icebox: or UD

Icebox: and yet, just cause you don't like a design choice, doesn't make it a flaw

cegprakash: exactly

cegprakash: what will u achieve with an U turn?

seronis: moving into an intersection, gaining line of sight, making new decisions

MattSOrme: it would speed up getting dead ends

seronis: or grabbing a pellet at a dead end

MattSOrme: line of sight wouldn't work cos you don't get info

seronis: basically making decisions at every step, instead of making a decision then going retarded for a turn

cegprakash: if u have been following last 3 contests there is a trend going on in Codingame with hidden information

cegprakash: this one is very less compared to Ocean of Code

Icebox: or planning your movements far enough ahead that you don't waste a move with speed 2 on a dead end

seronis: never heard of this site till 2 weeks ago so no, no prior challenges

seronis: and line of sight would work if speed turns were real turns

cegprakash: seronis in legend I do 20 turns prediction that's like 40 turns prior prediction

Icebox: as I said, if your bot wastes its 2nd move on a dead end and you don't end up using your speed boost to the full potential...

MattSOrme: oh come on. Rank 2. Just waiting for the promotion. Not submitting shit till it happens

cegprakash: if u want it ur way, then I would go even 60 depth

Icebox: then maybe the problem is your bot and not the design "flaw"

Default avatar.png Xlos: Anyone know any master/gold players that use a killing strategy?

Default avatar.png Xlos: All the ones I view are fairly vanilla

cegprakash: MattSOrme which league?

MattSOrme: silver

cegprakash: if Bronze don't resubmit

seronis: curious why wouldnt bronze resubmit? I dont understand why that would be relevant

Icebox: because there are enough people to push him up or boss down

Icebox: the bigger the league, the more people submitting, the more movement in rankings

seronis: ah gotcha

seronis: ty

cegprakash: when legend Icebox

Icebox: stopped working on my bot on friday

cegprakash: just add anti accidents and path finding

cegprakash: I am assuming u already have path finding

cegprakash: so just add anti accident

Icebox: I think you missed my message above :D

cegprakash: u never said u will not start again

Icebox: meh

Icebox: I guess I could

MattSOrme: damn. kktus messed me up :(

Kktus: =p

MattSOrme: was pretty much 50/50 on matches, but knocked me down

Kktus: i fixed a bug on last submit

Kktus: but nice AI, i was struggling with you too =)

Kktus: (see you soon in gold)

MattSOrme: im praying ha

MattSOrme: Want to get knocked up by others though instead of risk a new submission. But im still working on it

MattSOrme: when i first submitted it landed me in 14th, and i've drifted up to 2nd from there :D

Kktus: nice

Kktus: i think if you wait a little you will pass the boss

Kktus: but you can also develop a new feature of you bot and pass gold quicker

MattSOrme: i'll submit again if im still not gold before i give up adn go to bed

Kktus: See you tomorrow !

MattSOrme: Aight, screw it. Its late and im tired. no ones gonna push me up, so gontta re-submit

MattSOrme: bye second place :'(

thethiny: it's weird how sometimes I time out, then I hit replay and it works

BenWo: yep that's weird

BenWo: what does your turn timing come out to usually?

Default avatar.png Exa65536: Anyone know what the maximum memory usage is?

thethiny: @BenWo no clue it just doesn't work

BenWo: what about when it works?

thethiny: works fine no issues

thethiny: it only times out at frame 1

BenWo: ah ok



thethiny: and here it doesn't time out

BenWo: you'll probably have to put in a lot of print statements to figure out

thethiny: the first print isn't even working

thethiny: which says width x height

thethiny: I think it's timing out on the imports

AshKetchum: thethiny get the referee seed from game parameters in the first replay, and paste it in options to test it

thethiny: it is the same seed

thethiny: seed=198905106014823712

thethiny: I just hit replay and it works

BenjaminUrquhart: I know where the issues in my code are, but I'm not motivated to fix them properly

BenjaminUrquhart: send help

BenWo: :blowfish:

thethiny: "name old_road" not defined

thethiny: Less music and more coding please

thethiny: :(

thethiny: I fixed the error and now I'm losing to clyde :D

thethiny: damn man it's a tue

thethiny: tie

BenWo: ooh more music and more coding please

BenWo: I forgot to put my music on

Braykin08: Rookie mistake

Zandy156: I just realized an important part of my code does nothing.

Zandy156: gotta love python

thethiny: I had an attack mode going on

thethiny: but it's not working

thethiny: like not activating

thethiny: turns out I forgot to call the function :D

BenWo: haha

BenWo: well that's an easy improvement

JohnCM: haha you might realize if you attack you might perform poorer

JohnCM: i turned off my attack after a few tries XD

BenWo: it's certainly situational

Default avatar.png Exa65536: Dangit. None of my losses (timeout or otherwise) reproduce when I tell it to re-run them in the IDE.

Default avatar.png Exa65536: so I can't see what's going on and try tweaking things

wi_lius: @Exa do you generate random numbers in your code?

Default avatar.png Exa65536: no, my code is deterministic (aside from timing). Is there a way to get cerr output for the last ply? It looks like I can get the cerr for all the moves except the one where I actually timed out.