Chat:World/2020-05-12
VicHofs: ok basically I'm trying to avoid timeouts by running algorithms only up to a set amount of time @thethiny
VicHofs: i.e. timing a while loop and breaking after an elapsed timme t
VicHofs: *time
Icebox: so you DO want to measure bot time while in-game... :upside_down:
VicHofs: what
VicHofs: then I didn't get -your- question either lol
VicHofs: I want to time code runtime
Icebox: you want to measure elapsed time while your bot is in a battle
VicHofs: that's about it
Icebox: yeah
Icebox: then forget what I said
Icebox: profilers are for debugging purposes
Icebox: basically if you want to optimize some piece of code and what to find out how is the 50ms divided across the parts of your code
VicHofs: yeah I was reading through the docs just to be sure and couldn't find really anything that fits
Icebox: that's what a profiler would do
thethiny: http://chat.codingame.com/pastebin/d04ce1e4-9950-408c-8e95-5ec94e75401c
Icebox: for measuring runtime in-game
thethiny: here you go
Icebox: just go for time.time()
thethiny: then
VicHofs: I might just try that when debugging other code tho so thanks anyway @Icebox
thethiny: Profiler.submit(profile_fn, timeout)
VicHofs: wait that looks like something that raises a flag after a timeout tho
thethiny: yes
VicHofs: is that correct @thethiny?
thethiny: you can just check the flag in your functions
thethiny: or just submit your function to an executor with a timeout
thethiny: if it times out just catch it
VicHofs: ty I'll try that
BenjaminUrquhart: chat crash in 7 minutes
thethiny: :(
thethiny: when will it come back
BenjaminUrquhart: some time
eulerscheZahl: that's the final countdown
thethiny: @eulershceZahl write me a bot so I can submit it
thethiny: @eulerscheZahl *
eulerscheZahl: i'm still busy writing my own bot
VicHofs: I'll take five @eulerscheZahl
thethiny: yeah but it doesn't work that way
thethiny: others come first
eulerscheZahl: i have to extract more information, damn fog
thethiny: hahaha
VicHofs: fog?
VicHofs: you mean the FOV?
BenjaminUrquhart: 4 minutes
VicHofs: LOS
thethiny: FOG
eulerscheZahl: yeah, line of sight, fog of war
thethiny: it means inability to see others
BenjaminUrquhart: we are blinded by fear
VicHofs: yeah I just figured you would've dealt with that by now @eulerscheZahl lol
eulerscheZahl: partially
VicHofs: what are you having trouble with
eulerscheZahl: i remember when i saw a cell earlier and there was no pellet
BenjaminUrquhart: same
VicHofs: wym
eulerscheZahl: but tracking the opponent location is a nightmare
VicHofs: How would you even track it tho
thethiny: that's super easy, barely an inconvenience.
VicHofs: prediction?
BenjaminUrquhart: public void resolvePelletDiscrepencies() {...}
thethiny: the opponent is always on the grid
thethiny: pfffffft
ZarthaxX: are you really trying to track him toad
eulerscheZahl: if i see the opponent twice with a few turns between, i try to find possible paths and remove pellets along the way
o_imej: any ideas about how to calculate distance ?
eulerscheZahl: but there is more information hiding:
BenjaminUrquhart: 1 minute
thethiny: abs(x-x2) + abs(y-y2)
VicHofs: damn you're far off lol @eulerscheZahl
eulerscheZahl: https://www.codingame.com/share-replay/461308137
VicHofs: try manhattan distance @o_imej
eulerscheZahl: check the red stone at the top right
o_imej: thetiny i don't think tha's would work
eulerscheZahl: opponent gains 0 points in the first turn, then 10 at once
eulerscheZahl: => speeding
BenjaminUrquhart: ABANDON HOPE, WE ARE LOST
thethiny: You said red stone and I assumed minecraft
eulerscheZahl: if i detect that, it's a save kill, 2 vs 1
ChooJeremy: You don't see point gain though so you wouldn't even know they gain 10 points
BenjaminUrquhart: bye guys
VicHofs: did someone say redstone
eulerscheZahl: and i already have the killing feature but only when i see the opponent
o_imej: there's obstacles between two points which means the formula won't work all the time
thethiny: do you have the ability to see score?
BenjaminUrquhart: yes
thethiny: how?
VicHofs: o_imej what you're looking for is probably an algorithm then
thethiny: wb y'all
VicHofs: try BFS
Gonny: that was underwhelming
BenjaminUrquhart: oh cool it restarted
thethiny: exactly
VicHofs: @thethiny it's in the input
thethiny: In Bronze?
VicHofs: first line, format: -your score- -opponent score-
VicHofs: yes @thethiny
thethiny: oh my god I never noticed
thethiny: WHAT A BIG GOOD
thethiny: GOOF*
VicHofs: I'm in bronze too
VicHofs: yeah idk what you plan on doing with that tho lmao
thethiny: if my score is < his score I just eat next pellet
thethiny: else I go to big pellet
thethiny: also if is score is double mine then I can assume he's speeding
VicHofs: idk I'm going big pellet as a priority lmao
VicHofs: gee
VicHofs: I can't take this y'all smart
thethiny: I said I can assume he's speeding but I'm not gonna do anything with that info lol
VicHofs: sweet
VicHofs: hey um quick question
thethiny: yes?
VicHofs: I've been thinking about this but I thought it wasn't worth asking
VicHofs: @everyone
VicHofs: can you use machine learning in this biz
ChooJeremy: I don't see why not if you wanted to
VicHofs: I mean
BobLaserShark: You can always use ml. The question is should you?
VicHofs: wouldn't anyone just win hard with a well trained rcnn
BobLaserShark: Maybe. The main thing with training a nn though is getting training data
thethiny: I think if you do it locally then absolutely
thethiny: but you won't do it as rnn
thethiny: ml*
VicHofs: idk tho I've never done it for a game
thethiny: you'll do it as RL
thethiny: DQN Agent
VicHofs: yes but u can do RL with an NN
thethiny: I think it was called 3 Star or something like that
VicHofs: yep
thethiny: 3CA DQN
BobLaserShark: neat might also be worth looking at
VicHofs: yeah ik
eulerscheZahl: it's back already :o
thethiny: yes
thethiny: just in time for you to write me a bot
VicHofs: I mean you could see all the pacs' locations with a nice RL model
VicHofs: plus track them using an RCNN info feed
VicHofs: I'm not crazy enough to try but if anyone wanted some ideas lol
ChooJeremy: By RCNN you mean interpreting the game's UI screen (that we see) to find pacs?
VicHofs: yes
ChooJeremy: cause I'm pretty sure your code won't be able to get that info
VicHofs: well I mean a pre-trained one
VicHofs: yeah that's what I was thinking
VicHofs: dependencies tank hard in challenges like this
BobLaserShark: I've done live analysis of a UI before for AI. It's less than ideal
VicHofs: but if you managed to do it locally it would be pretty sweet
BobLaserShark: Are you able to use locally run code to control?
ChooJeremy: Yeah if you do it locally I think the only thing you can do really is run your neural network against it
ChooJeremy: Would probably kill your learning if you feed it screen information first but can't give it that same information during the actual thing
VicHofs: @BobLaserShark I've never done it for a game before so I'll just take your word for it
thethiny: my bot is 811 lines of code yet without including switching and speeding
thethiny: what have I done
VicHofs: @ChooJeremy ye probs
VicHofs: @thethiny probably a better job than me
VicHofs: I'm at 157
eulerscheZahl: 1027 lines of madness
thethiny: It should be more than 800???
Ken_Fool: did the bronze bot got better? havent played in 2 days but now it is adapting its type, was sure it wasnt before?
VicHofs: yes Ken_Fool
Ken_Fool: ouch
VicHofs: Inky exists now
ChooJeremy: 555, including speeding but it's "if cooldown == 0 speed"
VicHofs: y'all crazy bruh
BobLaserShark: What you have to do is use a genetic algorithm to generate the code to solve the challenge :)
VicHofs: don't
BobLaserShark: thousands and thousands of line :smile:
VicHofs: stop this is giving me anxiety.
BobLaserShark: Run it on a super computing cluster.
HPC goes brrrrrrrrrrrr
thethiny: SethBling wrote an GA that works in Lua using 400 lines that plays Mario World 2
thethiny: you don't need thousands of lines
BobLaserShark: The GA isn't made by the code, it makes the code
thethiny: ?????????????????
BenjaminUrquhart: that's not ho it works
BenjaminUrquhart: how*
BobLaserShark: Have a GA generate potential code solutions and evaluate it
thethiny: oh no that's not what GA does
thethiny: you need code, GA generates Solution
thethiny: not code
BobLaserShark: I'm smashing a fly with a mallet here :)
thethiny: Smashing some bugs, ey?
BobLaserShark: There's technically nothing keeping a GA from generating code. It all depends on what the output vectors are.
This is just the most horrible but possibly feasible solution I could think of rn
thethiny: you can do that but to write lines of code you need a huge tensor
thethiny: really huge
thethiny: we're talking about a thousand line
thethiny: each line has n characters
thethiny: the model would weigh in GBs, and inference will be in seconds
BobLaserShark: I have access to a supercomputer. This is all feasible, though I believe strict tensors would not be the most optimal way of generating the data
BenjaminUrquhart: use a ga to generate the next challenge
thethiny: 😂
BenjaminUrquhart: totally feasible /s
Kellthazar: Is it possible to run the java/kotlin class of your Bot AI directily on the gameSimulator?
Kellthazar: I tried but my code get stuck on the Scanner(System.in) input call
BobLaserShark: Neural net's input for the next challange:
BobLaserShark: Neural net's input for the next challenge:
BobLaserShark: "The next codingame challenge should be based on a semi-related exercise. There are a couple exercises from previous codemeet challenges. I will accept a few more if I have the time to implement them, I'm sure many people have them already.
As always the end goal is a functional interpreter of F# like the one we designed"
BobLaserShark: Sounds like we're writing an interpreter :rofl:
Ken_Fool: wow i accidently discovered multiline cursor in vs this challenge already has been worth for me XD
berries: is anybodies bot timing out randomly for no reason?
Ken_Fool: mine did in the beginning but not anymore, for me it had something to do with others speeding and me not
Ken_Fool: does it time out at the same point ?
Doju: matriculation exam results coming in in a minute :(
Doju: wrong smiley fac
Doju: D:
Ken_Fool: gl
jrke: All the best
berries: nah im in wood 2 lmao
berries: i just got the code working and it wasnt timing out
berries: but now it does it randomly
thethiny: I'm giving out on my bot
thethiny: It refuses to move
thethiny: 😞
seronis: berries any possibility you are failing to queue an order ?
berries: what do you mean by that
berries: like output a move
berries: it shouldnt be
seronis: like NOT outputting a move
seronis: and going back to the next input
berries: it should be outputting it
berries: but idk ill check in the morning
thibpat: :sparkles: Spring Challenge time :sparkles: I'm streaming some coding to climb the silver league :rocket: https://twitch.tv/thibpat
aCat: youre not already in silver?
aCat: oh you mean climb inside
aCat: silly cat
Uljahn: im waiting for Icebox's stream :/
aCat: or euler's :D
aCat: unshaved ;p
Icebox: Uljahn I'm running into real life problems .-.
aCat: :/ sorry to hear that
Icebox: and I also don't feel like I'm performing well this contest so idk if stream would even be educational enough .-.
Uljahn: np
Icebox: but I'll see how it looks once gold opens
Icebox: maybe I'll get my shit together till then ^^
thethiny: good luck Icebox
Doju: this feels so stupid
Doju: so as not to loop over every cell if they don't need a reset
Doju: i first get a known path cell in the init method and check if that needs a reset before doing all of them
Doju: Does that sound reasonable to you?
Uljahn: are you talking with Automaton2000?
Automaton2000: so they are pretty much the same as if i had the same problem
Doju: just shouting my question into the void and hoping that someone responds Uljahn
Doju: At least i know that Automaton2000 is always ready to respond
Automaton2000: and it's not the only one
Zandy156: Every time I send a loss to my ide I don't lose. How am I supposed to debug like this?
tekki: lol no luck Zandy156
MichaelVonWolfen: How many people got in Silver?
aCat: 566
ionutzxy: silly question: how can I chat privately with one person?
Doju: click on their anem
Doju: name
ionutzxy: and then?
Doju: then just chat?
Doju: it should open a private chat
ionutzxy: it doesn't open anything
Doju: that's odd
Doju: can't you see the private chat that i started with you?
ionutzxy: yes
ionutzxy: maybe one user can restrict the chat?
Doju: if you click on someone else?
thethiny: you can PM someone as a private chat
ionutzxy: no, is frustrating
Doju: thethiny I swear your little profile picture had eyes when i last saw it
Doju: have you changed it?
thethiny: hahahahahaah
thethiny: yes
thethiny: good noticing 😂
Doju: :D
thethiny: I changed it to an illustration
Doju: ahh i think i found the reason for my bot not being deterministic
Doju: i'm storing some cells as a set
Doju: and they
Doju: dont have order
thethiny: I had a similar issue for why my bot wasn't moving according to me
thethiny: I forgot to check if is_mine :D
thethiny: so I was moving enemy
Doju: :D
thethiny: imagine if we could move enemy lol
lifetimeLearner007: that's the problem with set
thethiny: in python sets are ordered
thethiny: but that's in 3.8
Doju: i dont think it's a problem lifetimeLearner007
Doju: or at least not in this implementation
Doju: in fact it might actually be better if my bot is not deterministic so you can't predict it
Doju: but all the outcomes are still of equal value
lifetimeLearner007: maybe revisit the scoring logic?
Doju: i don't have any lmao
Doju: except for the distance
avdg: fixed the scoring logic yesterday
avdg: but I have to merge my searches because my ai does more than 1
Doju: what do people even mean by search?
thethiny: guys I made inifinite loop recursion
Doju: like simulations?
thethiny: I just saw an error I never saw before
thethiny: Unknown error (stacktrace too big)
avdg: looking up in grids
thethiny: that's what she said
thethiny: that's what she also said
Doju: i mean i look up the closest pellet in the grid avdg
avdg: you gotta love recursion ;-)
Doju: is that a search
thethiny: ikr
avdg: yes
thethiny: @Doju everything is anything if you believe hard enough :D
avdg: read and compare is a search
lifetimeLearner007: i thought best action from simulation is search
avdg: but I need to change my system to get more umph (perf) and have more accurate results
avdg: lifetime: it's mostly pruning that you need to do to get the best result
avdg: but that the is a combination of operations that depends on the task
Doju: I kinda wanna flood fill the whole grid on every move
Doju: might be possible with symmetry and all the other optimizations
avdg: I think I have to do that for every pac I have given my current system
Doju: what?!
avdg: and I think I am already close to doing that or maybe more every turn
Doju: why every pac?
avdg: location
Doju: oh sorry
Doju: i mean getting the dist from every cell to every other cell
avdg: already using flat arrays for everything
Doju: flat arrays are nasty :P
avdg: ah, dist is mostly manhatten and bfs (or a* but I don't use)
Doju: MANHATTAN?!
Doju: if you have bfs and a* why don't you use them?
avdg: I use bfs
Doju: okay then why are you using manhattan at all?
avdg: few things
avdg: to determine state of my pac
avdg: but sometimes the bfs is already done then
avdg: or isn't related at all to pathing
thethiny: I also swapped my BFS and A* for manhattan
avdg: if distance is max 2, path is deterministic anyway
Doju: alright
Doju: i just made a distance lookup system using precalc
Doju: so everything is perfect and fast
thethiny: can you explain
Doju: during the first move (and possibly in the future during every move to account for moving pacs) i calculate the distance from every cell to every other cell
Doju: then i just look that distance up whenever i need to access it
Tiramon: ok in theory i just created a pathfinding that should avoid that multiple of my pacs run the same path to gather different pellets ... now i just have to include it in the code
Doju: instead of calculating it every time
lifetimeLearner007: is it efficient for performance? every cell to every cell seems redundant.
lifetimeLearner007: wouldn't it timeout?
Doju: i'm gonna need it for some magic soon lifetimeLearner007
Doju: no currently it has no optimizations and it runs in like 150 ms
Doju: and i'm on python
Icebox: it takes 80us for me to calculate that @lifetimeLearner007 .-.
Doju: u?
Doju: really?
Doju: no way
Icebox: yes u
Doju: what on earth
Doju: manhattan?
Icebox: no, from all to all
Tiramon: those stuff can be really fast if you do it the right way
Icebox: C++ and I'm abusing the fact that the map is mirrored
Doju: aha
Doju: okay
Doju: i might try that as well
Doju: is it hard to incorporate?
Tiramon: oh mirrored is a good point that should half the time
Doju: mirroring and also not calculating paths in both directions
Doju: im not sure how to put that in though
Doju: i feel like i'll miss some cells with my current logic
Icebox: that's not all
lifetimeLearner007: i've no idea how to use mirror to my advantage.
Icebox: I mean that's a good start but not everything
Icebox: you can incorporate the fact that tiles in the line of sight will have distance equal to manhattan distance
Doju: oh right
Doju: but that's only like 5% of the tiles
Icebox: if you take that into account, you will need to calculate only the distance from all intersections
Doju: oooooohhhh
Icebox: to all other intersections
Doju: that's smart
Doju: thanks
Doju: if i run into performance issues i'll try to put that in
jrke: any suggestion till i am in bronze
Doju: wait, you can't use bfs for weighted graphs
jrke: any other
jrke: than BFS
Doju: no need for bfs to get to bronze
Doju: just manhattan distance will work
Doju: or pretty much anything if you dont time out
Doju: will get you to bronze
jrke: no i am in bronze
Doju: oh okay
jrke: want to enter silver
Doju: just make bfs it's not that hard
Doju: ill help you
lifetimeLearner007: I'm stuck in bronze too. is bfs+manhattan enough to clear bronze?
jrke: K
Doju: like the basic idea is
Doju: you have a queue in which you add cells
Doju: then you check those cells for neighbours
Doju: and for every loop in the queue you add 1 to a distance variable
jrke: K
Doju: then for every fitting neighbour (aka is not a wall)
Doju: their distance to the root cell is the distance variable
jrke: understood but i tried it it time out
lifetimeLearner007: prevent revisiting the same cell again.
Doju: yes that's a thing i forgot to mention
jrke: it time out i tried today
TrentT: Jrke are you using c++?
Doju: you don't need c++ for that
jrke: yes
jrke: i know only c++ only that's why
Doju: i mean its better for speed i just meant that timing out shouldn't really be an issue unless you're doing it wrong
jrke: K
thethiny: The #1 spot was C++
jrke: i will try again
jrke: By the way thanks
Doju: np. im sure you can make it work
jrke: yeah
lifetimeLearner007: why is Dfs not a suitable choice for this?
Doju: technically it's just as good for a flood fill than bfs i think
Zandy156: that's what I'm using
thethiny: because I tried it and I'm stuck at 226
Doju: or just as good for getting every cell i mean
Doju: not as good for a flood fill to the nearest matching cell
thethiny: how do you get every cell with BFS without going over the time limit?
lifetimeLearner007: I'm using dfs and if there is a continuous path without walls, it just goes forever in that loop path
Illedan: Reduce memory allocation.
jrke: should i predict whole path or next few turns only
Ikhadem: this collistion is screwing me T_T
thethiny: I', not going over memory, just going over time
Illedan: Using memory is slow.
jrke: anybody to my ques
Doju: jrke i'm just calculating the distances everywhere because it's fast enough
thethiny: since when is using memory slow?
Doju: might even do the paths to everywhere
Zandy156: dfs you have to limit depth or prevent repeat cells
jrke: no i mean i have to predict whole path or just next few turns
thethiny: predict my future
thethiny: will I get wealthy
Zandy156: as many turns as you can in time
Doju: don't know about that
jrke: K
jrke: thanks
Durkin: I'd start with just picking what space gives the most value for that turn. Trying to predict everything is pretty massive, can work it in as you go
Doju: Durkin that's solid advice
daanolav: wait but games are supposed to last for max 200 turns right?
thethiny: yes
daanolav: because I had one of 244
jrke: ya one me for 300+
Zandy156: speed turns show as 2 turns
daanolav: ooh
Zandy156: if you keep track in your code I think it will still end in 200
GarrethDean: are there hidden test cases ?
daanolav: that makes more sense
lifetimeLearner007: the game viewer shows frames, each turn can have multiple frames. If nobody ever uses speed, then it'll be 200. otherwise more
thethiny: no
thethiny: speed will increase the frame counter
thethiny: I idled against myself spamming SPEED
thethiny: and it ended at 200/200
thethiny: meh wtv ignore what I said
thethiny: I completely misunderstood you
lifetimeLearner007: ignored... :P
AntiSquid: this contest gonna reach 4k
thethiny: nice
Icebox: So sad that ranking has been reworked .-.
solaimanope: https://www.codingame.com/replay/461753963
Icebox: imagine the juicy points for getting top 10 in 4k contest
solaimanope: fighting for the last pellet^
anid: Anyone using the dead pacs yet?
thethiny: @solaimanope this is the best match I've ever witness
Doju: lol a reportert for a newspaper just called me asking for an interview
Doju: reporter*
thethiny: nice
thethiny: for what?
Doju: because i'm gonna give a speech at our (web) graduation ceremony
AntiSquid: but that was the issue, this might be the only contest that gets 4k in a long time Icebox
MSmits: Icebox they redid the point-system, you might not get that many more points for a 4k contest compared to a 1k contest
MSmits: the maximum is the same, the closer you are to the top, the smaller the point difference between the two size contests will be
MSmits: if you're 1 in either contest, the points will be identical
Durkin: Yikes, i've got some pretty nasty memory errors going on with my queue pop_front()
shashwat986: So, maybe 150 people in Gold? Or will it be fewer?
wlesavo: 80-100 i would say
Uljahn: 50 or less :relieved:
Uljahn: *fewer
wlesavo: it was 80 for ooc i believe
MrLovaLova: I have written of the solution but I still get an error. Where my If statement I get an error that it is not in a function. Anyone knows why it is like that?
Cyberdog52: how do I get in silver league?
MrLovaLova: while 1: http://chat.codingame.com/pastebin/1163bee1-fe5f-4e1d-85da-9dfa0313122f
Durkin: Need your bot to have a higher ranking than the Boss. More wins against stronger players than the boss gets as a ratio kind of thing, Cyberdog
Cyberdog52: Ok thanks.
MrLovaLova: Could someone look through the code I pasted, why does it complain about that my if statement is not in a function?
Cyberdog52: You forgot :
Vintarel: did you forget the : ?
MrLovaLova: Oh, thank you! :)(Y)(Y)
MattSOrme: I'm adding the stupidest little tweaks now to try beat bronze. So close its upsetting
MattSOrme: Last time i ran i literally ended in second after Inky... :'(
TrentT: Where are you mattSOrme? I'm on 24
MattSOrme: re-running now, hopefully my last bit will be enough to beat it
MattSOrme: ugh. My rank dropped 200 places :/
TrentT: What did you try?
MattSOrme: Think the only thing I really changed was to prioritise a single step to a super pellet over using skills
MattSOrme: but tbh, half the games im losing when i send to ide, i win 95% of the time. So its unclear whats really going wrong
Doju: Can the grid be even in width or is it always odd?
MattSOrme: 29 ≤ width ≤ 35
Doju: huh
Doju: i'm only getting odd maps in my testint
Doju: testing
MattSOrme: maybe. Its the same on left and right, so maybe it is always odd
Tiramon: code says in the generator int generateWidth = grid.getWidth() / 2 + 1;
int generateHeight = grid.getHeight() / 2 + 1;
Tiramon: so i guess it's always odd
Doju: seems like it
Doju: ahh do i do manhattan distance
Doju: or do i get the distance 9 times
jrke: hey doju
Doju: this is stupid hah
Doju: jrke hey hey
MattSOrme: YAY. I won!
jrke: its give output 0 or 3765..
Doju: jrke umm what gives that output?
jrke: what u suggested maybe any error in my code
Doju: don't copy paste any code here but
Doju: what does it vaguely look like?
Doju: does it have a loop through every cell
Doju: and a queue
Doju: with a neighbouring cell thing in it
Thiesjoo: MattSOrme what did you do to get into silver? I made many tweaks, but it's still not working out
Tiramon: why not copy paste?
Tiramon: as long as it is not top100 code ;)
Doju: Tiramon i copy pasted a little bit of code here to ask some questions and people didn't like it
Doju: once just a super simple function where i asked which was cleaner
Tiramon: ok depends on the problem, but if something isn't working best way to help is see the code or a replay
Doju: and once i wrote some pseudo-code that didn't even exist in my own code and people told me not to do that
jrke: yes doju i won,t copy it here
MattSOrme: Lots of things Thesjoo ;) As long as your base logic is solid, just keep watching matches you lose and looking for problems
Tiramon: and even if your pacs work good, could they be more effective
MattSOrme: I'm python too, so while other people are searching 50 moves deep, im around 10
Doju: if people are searching 50 moves deep they can't be searching very wide
MattSOrme: Depends how you're trimming i guess. Thats something i need to go back to at some point
Doju: there's this thing that you can't get any smart trapping plays or anything
Doju: if you're trimming aggressively
MattSOrme: My pacs are the least aggressive they can be. They never hunt or try to kill
Doju: do you have that in your search?
Doju: value for killing enemies
MattSOrme: I'll add some easy killing in later. Its on my todo list. But an enemy thats gone down a dead end isn't my problem yet. Got bigger fish to fry
Doju: oh hahah
Doju: alright
MattSOrme: still got silly decision making
Doju: i was so impressed by euler's trap that he managed to do a few days ago
Doju: i want to replicate that
MattSOrme: ??
Doju: but i think that was using actual logic and not searching
Doju: he used 2 pacs to trap an enemy in a corridor with no other exits
MattSOrme: ah yeah. I'd thought about that, but the effort vs reward to program that, and the cost of calculating it...
Tiramon: in one game i killed 2 pacs with one that try to do the same ;)
Doju: hmmm
Doju: i think you could make it relatively cheap if you also sim the enemies
Doju: and give a loot of value
RockyMullet: making my bot ignore big pellets closer to enemy made my bot worse... I blame euler for this https://www.codingame.com/replay/461827144
Doju: if an enemy is trapped between your pacs
RockyMullet: I though first that the "dead" thing broke my bot
MattSOrme: Another thought i had was to check score, and if im ahead just block them in, and change to counter them, but again, is it worth it?
ShannonNorris97: RockeyMullet, in your replay how is it showing that text above the pac's heads? I've not seen that before
MattSOrme: atm im also not using my first turn at all. I treat it the same as every other turn. So probably some huge gains there
RockyMullet: yeah they dont really mention in it in the statement
RockyMullet: you just add stuff after your output
DollarAkshay: Morning people
RockyMullet: like MOVE 0 1 2 Hello
RockyMullet: hello DollarAkshay
ShannonNorris97: Oh wow, that's awesome. That's gotta be so helpful for debugging. Thank you - I'm gonna use that now
RockyMullet: yes mostly when I watch a bunch of games in the search of bugs, to undertand what let your bot to that decision helps a lot
Doju: RockyMullet super helpful indeed
Doju: watching my bots go RANDOM when there are still lots of unexplored cells atm :d
Doju: Question:
Doju: should I be working with coordinates (x, y) or cell instances that i have in my grid?
Doju: currently i have both and its super messy
wlesavo: lb feels so random, same code can place between 70 and 20, probably due to many quite simmilar bots
Doju: should i have for example my manhattan distance function taking coords or cells as input?
dbdr: wlesavo it can also be that you are strong against one strategy and weak against another
wlesavo: dbdr rock paper scisors? that couldn't be... :smiley:
dbdr: :D
dbdr: personally, I think paper is the strongest
RoboStac: yes, everyone should switch to paper at the start as it's the best
dbdr: :+1:
Doju: yes yes definitely everyone do paper, it's the best
Doju: *sharpens scissors*
dbdr: lol
wlesavo: in real life when we played rps to decide smth i always played rock, just because i usually didnt care and would let people decide if they wont to win or lose
RockyMullet: Doju personnaly I acces my cells data via positions in a 2d array, best of both worlds
wlesavo: everybody knew that and still would play scisors sometimes
dbdr: clever
dbdr: you get them used to rock
dbdr: then play scissors if you actually care
Doju: RockyMullet well I kinda do that but it's such a pain to go "self.grid.grid[pos.y][pos.x]" every time i need a cell
wlesavo: no, i mean they played scissors, i was consistent :slight_smile:
dbdr: so they lost?
**dbdr checks the RPS rules
Doju: Btw is there some preferred pac type?
Doju: like as default
dbdr: I think it's fixed
wlesavo: yes, they thought that i will change smth
dbdr: id 0 is rock, id 1 is paper, etc
wlesavo: but i didnt
wlesavo: it lasted for like 4-5 years :slight_smile:
Doju: uuhh.. any ideas
dbdr: 3d chess :D
Doju: i need to check a cell for its distance to the center
Doju: but my bfs thing doesn't work if there's a wall there
dbdr: wlesavo reminds me of https://www.youtube.com/watch?v=EZSx3zNZOaU
RockyMullet: Doju yeah I doing this in C++ so I made a simple macro just to be lazy and write it fast hahaha, to get a cell at a position
Cyberdog52: Doju try to represent the grid as a graph of nodes
Cyberdog52: Then you do not have walls at all
Doju: Oh yeah i do have that
Doju: but i need the distance to the center of the map
SabertheLost: is the length not same as the depth of your bfs
Doju: by path first and if unreachable, manhattan
Cyberdog52: So what is the center of graph? There may not be a definitive solution
Doju: that just seems like a horribly inefficient thing
SabertheLost: Then first time do it and save the value to the length to the center.
Doju: uhh i dunno i'll just do manhattan hahah
SabertheLost: Find the center, do bfs from the center, update each cell with the length from the center as you find them
Doju: oh riiight i'd need to write an edge case for the precompute function
Cyberdog52: There may be multiple centers
Doju: that does it even if the middle is a wall
Doju: i guess i could try bfs from center cell and from every surrounding cell if that fails
Doju: but that's stupid
Doju: i'll just do manhattan
wlesavo: dbdr i thought they would play rps :slight_smile: still funny though
dbdr: it's pretty close though
dbdr: it's like a 2 option RPS
wlesavo: 3 actually
dbdr: you should do the opposite of what you should do
dbdr: this glass or that glass
dbdr: what's the 3rd?
wlesavo: both
dbdr: lol
dbdr: what about drink neither?
wlesavo: are you also australian? :smiley:
wlesavo: thats not an option, you accepted the duel
dbdr: drink, but spit it out all over the other
MattSOrme: why does the leaderboard tabs not work for companies and schools?
wlesavo: i thought at some point the zorro man will just kill the guy while he was distracted
dbdr: too simple
MattSOrme: ah, it does, but my URL had some junk in it for some reason
dbdr: it's a pretty good movie I think
dbdr: I like parodies :)
wlesavo: i think next time the contest should be with the battles decided by coinflip
Doju: oooooohh i've been doing this in such a stupid way
dbdr: would be a good troll community multi for April 1st
dbdr: but make the rules super complicated to hide that fact
AntiSquid: and post fake referee on github ?
dbdr: yeah, just said tht in MP :D
dbdr: PM
DollarAkshay: Why is CG slow ?
DollarAkshay: Oh looks like my chat messages are not going through
avdg: many participants
avdg: ah dunno
dbdr: DollarAkshay they are not going through
avdg: social distancing on networks is quite hard and unwanted I guess
Quidome: is there a discussion somwhere on the collision rules
Quidome: I am starting to build them in :D
dbdr: read the source, Luke ;)
Quidome: Uh yes, that's an option
Quidome: use the source, even better
dbdr: don't believe anyone. how do you know if they are correct otherwise ;)
Quidome: but no luck I am not on Java
dbdr: read, not use
Quidome: youre doing wel dbdr
dbdr: thanks!
Quidome: This collission part is a big thing to build, hope i finish today
Quidome: would be a big step :)
ashikujjaman: how leadboard is calculated?
RockyMullet: true skil https://en.wikipedia.org/wiki/TrueSkill
Quidome: youre position is roughly the place where you have a 50% score against your neighbours
RockyMullet: Quidome not bumping into your own pacs helps a lot
Quidome: yes sure
Quidome: That's why i am on it :)
RockyMullet: good good :)
Illedan: I have a stupid if stopping the first pac in my list if he wants to go to the same cell :D
Doju: Is storing functions in a dictionary clean in your guys's opinion?
Quidome: I almost have a minmax on one move, which should solve the problem
Doju: like i have some different methods of calculating possible target cells and currently my system is just ifs and elses
Doju: but it's ugly and horrible
wlesavo: you should've fight the ifs, not join them Illedan :slight_smile:
dbdr: I have an easy way to get rid of ifs
dbdr: if (condition) { ..} => while (condition) { ...; break; }
wlesavo: nobody will call your bot as bunch of ifs after that for sure
dbdr: mission accomplished
dbdr: here's the bill
wlesavo: for i in range(condition)
Doju: aahh what is that atrocity
Doju: does it even work?
wlesavo: sure
Doju: what? in python range requires an int
wlesavo: python True is equal to 1
Doju: Oh right
Doju: sure
Doju: it'll run once
Doju: and i now need to go look at r/eyebleach
wi_lius: condition && (function() {
console.log('true');
})()
Doju: maybe i should just bodge this together
Doju: throw an exception handler on it
Doju: hide it and never look at it again
dbdr: ╰─➤ python3 Python 3.5.2 (default, Oct 8 2019, 13:06:37) >>> True + True 2
dbdr: seems legit
RockyMullet: even truther
Doju: such truth much wow
fasil: heyyyyyyyyy
fasil: shall we develope an app for coding challenge
RockyMullet: hey :sunglasses::point_right::point_right:
RockyMullet: an app for what
Doju: 👉😎👉 Zoop
fasil: anyone intrested
Quidome: you mean CG?
GlitchyByte: So, defeating Inky moves you to Silver. I defeat it when I run it. How do I know if I defeat it when I submi?
DollarAkshay: You move to silver if your Rating is higher than the boss
DollarAkshay: Make sure you are defeating the boss > 50% of the time
DollarAkshay: more than 50% of the time*
GlitchyByte: I guess I am not clear as to how rankings are calculated. Is it explained somewhere?
GlitchyByte: But even the info you just gave me is useful. Thanks for that.
wlesavo: GlitchyByte just submit and see what happens
GlitchyByte: I did!
Uljahn: search the forum, rank is calculated using TrueSkill (google it)
GlitchyByte: Thanks Uljahn!
Tiramon: nice last ifx moves me up in the top 200
MattSOrme: eww. only just realised im still trying to send command and track for my dead pacs :/
MattSOrme: wondered where the messed up behavious was coming from
MattSOrme: treating random squares like walls... its cos it still thought a pac was there :/
Tiramon: main reason why silver bot crashs ... forgot to skip dead pcas ;)
MattSOrme: what input tells me its dead? I don't see any in the inputs?
Tiramon: typeId == "DEAD"
MattSOrme: ah
MattSOrme: that'll do it
MattSOrme: thx
Tiramon: if (typeId == "DEAD") continue
Tiramon: solves most problems in silver ;)
Tiramon: quote: typeId: the pac's type (ROCK or PAPER or SCISSORS). If the pac is dead, its type is now DEAD.
MattSOrme: Well for the most part i was still looking alright, my alive pacs were running round, and game wasn't crashing
GlitchyByte: How long does it take to compute my ranking? I see it changing all the time. Even after Last Battles has completed 100%.
Tiramon: around 17min my last submit
RockyMullet: GlitchyByte it still change because other people are submiting
RockyMullet: so you can ballte those new bots, changing your own ranking, or just having them improve and being ranked over your bot, meaning you go down
MattSOrme: my bot was getting cornered even though it could run away. So hopefully that stops now :D
RockyMullet: MattSOrme live to fight another day :D
MattSOrme: looks like that fixed it :D
MattSOrme: map no longer shows zombie pacs
AlexRSS: I'm trying to debug my code but for some reason when I click play my code, it's not showing any of the debug prints
AlexRSS: Anyone had anything similar?
MattSOrme: probably timing out in previous turn?
GlitchyByte: Scroll to the top of the output. Or make sure you are using the IDE code and the submitted one (should say IDE CODE) on your avatar.
GlitchyByte: Scroll to the top of the output. Or make sure you are using the IDE code and NOT the submitted one (should say IDE CODE) on your avatar.
AlexRSS: Thanks, it was all hiding at the top
AlexRSS: Are the x and y variables meant to update to show the current position of the pac, or do they just show its position at the start?
Doju: AlexRSS i believe it's the current position
Doju: or no i don't believe, i know.
anid: any idea when gold opens?
AntiSquid: yay 28 hours of people constantly asking when gold opens
TheNiv: Why on each turn only one pac recieves a command if I use a for loop to print a command for each pac
Icebox: because everything has to be in one print TheNiv
Tiramon: quote: A single line with one or multiple commands separated by |. For example: MOVE 0 5 7 | MOVE 1 16 10.
Pranab: can ny1 hlp? how to get t
Tiramon: get what Pranab?
Pranab: how to get multiple input as x,y to move the pac to different position
Pranab: all of my pac is going to same positon
Tiramon: so you don't want input, you want output ... ok
Tiramon: almost at the bottom of the statement it says Output A single line with one or multiple commands separated by |. For example: MOVE 0 5 7 | MOVE 1 16 10. MOVE pacId x y: the pac with the identifier pacId moves towards the given cell
Tiramon: so if you want to send commands for different pacs you hav to change the pacId in the command
Tiramon: and if they should move to different locations you should change the x,y parameter
Pranab: how to change it?
Tiramon: by printing out the string with another parameter , best read from a variable
cegprakash: MadKnight should I mutate only on last depth?
cegprakash: because if I mutate on depth1, I'll have to recompute everything from depth 1
AntiSquid: you got the theory wrong ^
cegprakash: :'(
cegprakash: what do I do now
Illedan: Just do full random mutation with 10% chance on each move or something
cegprakash: and recompute everything?
cegprakash: that's going to be time costly :(
Illedan: What are you doing btw?
cegprakash: meaning I need to give 20ms for search and mutation each
Illedan: Monte carlo?
AntiSquid: you're using c++ you should be fine on time ceg
Illedan: C++ doesn't automatically write fast code..
AntiSquid: not what i said
Illedan: Kinda was :)
AntiSquid: just saying he has enough time due to the language he picked
AntiSquid: well if i write it to run unnecessarily slow of course it won't work
Illedan: My point still stands :P You can still write slow code in C++
AntiSquid: of course you can
AntiSquid: but that's optional
wlesavo: cegprakash do what bluster did for ooc, paint a map by arrows, then mutate one arrow on your path
cegprakash: Illedan my sims dropped from 90K to 6K
AntiSquid: that's like A*Craft :o
AntiSquid: brilliant idea
cegprakash: if I mutate arrow on the path it'll give invalid moves
cegprakash: I've restricted my movements to only valid
cegprakash: meaning depth2 movement depends on depth1 movement of all the pacs
wlesavo: you can precomputr valid moves for each cell
cegprakash: mm.. not sure if that's a big performance improvement.. but I can try
Smartasskilling: Can anyone help me with mars lander episode 2. I'm coding in python and i need a way to calculate where the flat surface is
Clagus: ask again in 6 days :D
wlesavo: Smartasskilling thats the easiest part, check neighbored y coors
AntiSquid: funny username
Smartasskilling: So I just compare it in the input for statement and save that to a var?
Smartasskilling: Nah it doesn't work
NormantasStankevicius: Guys, how do you find the next best pellet to go to?
Doju: i don't
Doju: or i do, but the logic is only
Doju: the best pellet is the closest one
Doju: + favor super pellets just a bit
AntiSquid: still working on that, don't think i select it correctly NormantasStankevicius
TheNiv: Do you need to print the commands in new lines?
TheNiv: or all of them in one line?
NormantasStankevicius: Yeah, but there might be another location, with a bit further, but there are like 5 pellet cluster there
Clagus: NormantasStankevicius you could try to go to the big ones
Clagus: TheNiv all in 1 line
Clagus: separated by "|"
Rafal.Py: how do I append command to show some info on my pellet MOVE 0 5 7 | MOVE 1 16 10
Doju: NormantasStankevicius yes that's true and my aprroach is flawed. I have an idea to fix it though
AntiSquid: one single line, never more than that TheNiv , see statement for how to format it
TheNiv: Thank you, I missed the '|'
Doju: and that idea also allows me to simulate things pretty efficiently
Clagus: MOVE 0 5 7 SomeInfo | MOVE 1 16 10 SomeInfo
TheNiv: Where is this statement? AntiSquid
Doju: by concentrating a bunch of moves into chunks
Rafal.Py: The Clagus, is Someinfo 1 word or can it be something else?
AntiSquid: just below the viewer, you can scroll down and it gives a lot of info about the game TheNiv
TheNiv: Oh so I just didn't see it. I'll look again
Tiramon: Rafal.Py you can write any string, as long as it does not contain a |
Uljahn: 7 chars max?
Uljahn: hmm, 7 digits but not chars
Clagus: Rafal.Py it's very short try it out yourself
Kellthazar: Howdy :)
muy31: sweet, my AI went from buggy to smart!
MattSOrme: sometimes im not sure if im making my bots smarter or dumber
AntiSquid: yes that's very difficult because the ladder is random
wlesavo: yeah like a single point between 10 and 20
wlesavo: and its even worse at lower ranks
AntiSquid: i look at individual replays and check my overall winrate, but it's difficult to tell why some things don't work when you get no bugs
eulerscheZahl: my rank mostly depends on my performance against kovi. how shall i get a realistic view that way?
wlesavo: kovi-based mmr
AntiSquid: also so far trying to predict the opponent always drops my rank no matter what, i think the bad plays ruin it, you overestimate the opponent sometimes
eulerscheZahl: 182 battles vs kovi, next one got 37 battles vs me
kovi: +performance of others vs. me....
eulerscheZahl: oh, illedan is climbing too
eulerscheZahl: but you spam submits destabilize the ranking
Hjax: last night i hacked together some buggy horrible search thing and watched it beat my heuristic bot
MattSOrme: hmm. Im still getting timeouts, but when i send to ide it doesn't
Hjax: my poor search takes so long to spin up, ill need to port this to C++ eventually
eulerscheZahl: my new submit has timeouts too :cry:
hearthewarsong: Is there a way to download some kind of gamelogs? I remember some1 created statisctics in ooc, but I cant find how (couldnt find in case of ooc neither).
eulerscheZahl: these were my stats
eulerscheZahl: https://www.codingame.com/playgrounds/53705/contest-tools-and-workflow/introduction
Hjax: eulerscheZahl you are doing some monte carlo thing right? how many iterations of it can you do on the server?
kovi: szia hearhtwarsong!
eulerscheZahl: i discarded that idea
Hjax: oh did you? got some fancy new thing?
eulerscheZahl: and my eval is by far the most expensive part
eulerscheZahl: MC even failed to quickly pick up the super pellet sometimes, i have a proper search now
eulerscheZahl: with ideas to make it better. but 50ms isn't much
JohnCM: yea monte carlo can't work properly - you can only see a very limited depth
JohnCM: bfs works better for longer distances
AntiSquid: you have a guide on how to parse any replay eulerscheZahl ? :p
dbdr: MSmits is making MC work, isn't he?
eulerscheZahl: of course AntiSquid. you don't? :D
AntiSquid: no
eulerscheZahl: wanted to test tech.io
JohnCM: haha his is only good at the start
JohnCM: i would say monte carlo is good at the start with enemy pos and type known
eulerscheZahl: you can define a docker container there and get pretty much any library you want that way
AntiSquid: i mean the view in the frame, not the std out
JohnCM: euler won me a few times because he could predict where my pieces would head to and intercept them
JohnCM: still quite impressed with the trapping part haha
Doju: euler's trapping is amazing
MattSOrme: do we know what rules/changes might be in gold? if any at all
AntiSquid: no more changes
eulerscheZahl: no changes
MattSOrme: so its just to group top players?
eulerscheZahl: there was even a newsletter about it. even silver changes weren't planned
JohnCM: i think my bot is still missing something
Hjax: Summary of new rules: You can now see your pacs favorite color, just to force everyone to fix their bots again
JohnCM: new rule: each superpellet now has a name
ntroPi: Oh no, they ate Kenny!
dbdr: I was thinking about superpellet making you able to eat any other pac
dbdr: like in the original, kind of
Doju: Oh that'd be interesting
llllllllll: and giving you boost at the same time
Hjax: that would be cool, but a super pellet never really survives more than 10 frames
JohnCM: haha when you eat a superpellet, you will be invincible for 10 turns
AntiSquid: superpellets are now neutral pacs that play as if they were a 3rd player, they are controlled by whichever is 1st place bot at the time of the game is played
JohnCM: lol.. that makes no diff to the current game actually
JohnCM: since most bots get an equal number of superpellets
AntiSquid: but the neutral pacs will clear pellets
JohnCM: i'm trying so hard to beat euler's bot. now i have like 20-30% win rate. got to change some heuristics
AntiSquid: why focus on one bot?
JohnCM: i find euler's bot quite all rounded
AntiSquid: i mean i can get a win vs a lot of top 50 bots, but that doesn't change much
JohnCM: so if can win his bot most likely can win the rest too
Hjax: i dont know what my winrate against euler is, probably <5%
wlesavo: yeah, optimizing against a single bot is not a good idea for sure
Hjax: ran a few test games, my only win was a euler timeout
dbdr: I just realized, euler optimized his pseudo to minimize pings :D
AntiSquid: what do you mean
eulerscheZahl: yeah, timeouts are a problem now :( i added more tracking
dbdr: hard to type without tab
AntiSquid: eulerschezahl
dbdr: so people white euler => no ping
JohnCM: https://www.codingame.com/share-replay/461963771
Maliamnon: Is there some indication of when your rank is "stable"?
JohnCM: lol how did i lose so much late game
wlesavo: ezpz AntiSquid
dbdr: s/white/write/ :D
wlesavo: white euler lol
AntiSquid: contest ends Maliamnon, that's a good indication
wlesavo: JohnCM strange nicknames in that replay
muy31: why is promoting so problematic? i beat the boss everytime
Hjax: your rating needs to be higher than the boss when you finish calibrating muy31
JohnCM: haha what nicknames?
muy31: can i just resubmit and hope i get lucky?
wlesavo: JohnCM oh, nwm, it works now, somehow i saw blinky and inky names instead of real ones
wlesavo: similar to a preview
JohnCM: you know i spent like 4 hours modelling enemy behavior and it made my bot worse
Hjax: muy31 thats probably time better spent improving your bot
JohnCM: then i scrapped the whole thing
JohnCM: XD
JohnCM: cause the bot became too cautious
muy31: Hjax remember me? who tried to implement an entirely new path algorithm and failed until it just started working? do you really think i want to do that again?
muy31: now my bot is definitely better than my old one
ashikujjaman: how can I play my bot with my friends bot
muy31: and it should be good enough to be in silver
Hjax: if its good enough to be in silver it will promote
Vintarel: JohnCM it happens to me all the time, always trying to improve but it's always worse xD
JohnCM: ya.. actually i'm kind of curious if ga can work for this now
muy31: it's not like those currently ranked 500 - 600 in silver will beat my bot
ashikujjaman: please help me how can I play my bot with my friends bot of spring challenge
JohnCM: like have some parameters for eating up a pellet and exploring based on the total game score. and also whether or not to attack
muy31: ashikujjaman delete the AI bot agent and add a new one
JohnCM: i tried monte carlo and it didn't work out very well (at least after the first few frames)
Uljahn: you both should be in top-1000 i guess
JohnCM: and you need an additional heuristic for the super pellet if not it will be like a one in a million or worse chance of finding it
Vintarel: what is ga ?
JohnCM: genetic algorithm
muy31: ashikujjaman, under Players, wher it says your username and the boss name
ashikujjaman: muy31 didn't understand can you play your bot with my bot?
muy31: but you have to be in the same league i think
ashikujjaman: muy31 ashikujjaman
muy31: oh yes
muy31: here you are
Yitzhakpro: i cant rly understand how can i preevnt them from stucking
muy31: yes, delete it
muy31: https://www.codingame.com/replay/461970315
muy31: then click on the plus
Vintarel: ga seems difficult on this problem :o
muy31: and add a new opponent
ashikujjaman: thank you muy31 and you have a nice bot:heart_eyes:
muy31: thanks ashikujjaman
Doju: wow i'm beating inky almost every time
Doju: time to submit, i guess
Tiramon: Vintarel GA isn't more complicated than other simulation based stuff
Csipcsirip_2: anyone using SA ?
Vintarel: Tiramon haha ok, I just find that any simulation looks difficult to use in this problem
Hjax: i think cegprakash is @Csipcsirip_2
AntiSquid: no
AntiSquid: that can't be
AntiSquid: nvm missread @_@
AntiSquid: lol dropped kovi randomly
Csipcsirip_2: first time I try this algo, but it's very unstable atm. might be buggy tho
Doju: oh hold on
AntiSquid: onto what
Doju: I'm making my path_length way too large
Doju: i dunno
Doju: something
Tiramon: maybe his path_length.. if it is so long it should be stable enough
Doju: yes that's good
Doju: length 200 paths
Tiramon: so you plan right from the begining to the end?
Doju: Oh i'm upping it for every cell in the queue
Tiramon: as long as you have not used speed
Doju: no, i'm just doing a bfs wrong lol
Illedan: WTF
Illedan: how did this go this high
ZarthaxX: lol
ZarthaxX: many ppl in the contest hate you coz of that Illedan :D
JohnCM: congrats illedan
JohnCM: i think cause a lot of ppl at the top resubmitted at the same time too
Illedan: still my code from saturday, just changed a number
ZarthaxX: lol
Doju: hahah
JohnCM: i'm having my all time high rank of 80 now
JohnCM: i think sure drop
AntiSquid: so everything after saturday is a pile of bugs in your bot Illedan ? :p
eulerscheZahl: i told you to uncrash your bot Illedan
Illedan: Does it crash?
Illedan: I made some small fix for that
eulerscheZahl: i mean you did what i told you and how you are at the top
eulerscheZahl: and now*
Illedan: Pure luck
Illedan: I did nothing more to track enemies :D
Illedan: I'll accept it
eulerscheZahl: my basic tracking works
eulerscheZahl: the improved tracking causes timeouts
eulerscheZahl: (╯°□°)╯︵ ┻━┻
eulerscheZahl: too slow
Icebox: oh god my new bot just got it's first win since sunday
Icebox: \o/
Illedan: :rocket:
JohnCM: woohoo
Illedan: Small step for a man, giant leap for pacman
NormantasStankevicius: ^
Icebox: the fruits of 2h sleep per day and 2k lines of C++
JohnCM: wow you got to sleep more man
Icebox: those sims aint gonna write themselves
AntiSquid: sims https://imgur.com/GZEslCX
Icebox: ofc
Icebox: what else were you thinking about?
Uljahn: Icebox: you switched to c++? so no streams in py3 anymore? :broken_heart:
AntiSquid: oh right did you do silver open stream ?
Icebox: I can still stream in py3 :3
Icebox: AntiSquid no I didn't feel confident enough to get to silver in 2-3 hours
AntiSquid: huge bronze
JohnCM: all the best icebox
JohnCM: you can do i
JohnCM: it
Illedan: Do you want a stream from wood - silver?
Illedan: :thinking:
JohnCM: i'm quite interested to see who wins this competition, and also what algo they use
JohnCM: shall wait till the end of the competition
Hjax: the winners always use some form of arcane magic
Hjax: :P
Uljahn: you mean pragmas? :smirk:
Icebox: you shall unroll thy loops
eulerscheZahl: the winners almost always write a forum post, explaining the strategy in huge detail
JohnCM: shall wait for yours then euler. i have faith in your bot
JohnCM: i'm still thinking about how you so effectively trap me at a dead end
muy31: euler made
muy31: JohnCM his b*
muy31: JK
JohnCM: lol
AntiSquid: :/
eulerscheZahl: i just bruteforce killing options
eulerscheZahl: and if i find one, i take it
JohnCM: that's the monte carlo you were talking about right
JohnCM: but that's a lot of steps in advance, close to 5 steps of predicting the opponent
JohnCM: like there's one case i go get a superpellet in a dead end, and your pac just entered the dead end too
JohnCM: resulting in a kill
eulerscheZahl: i discarded my monte carlo
eulerscheZahl: and the killing is a distinct search which doesn't even care about collecting pellets.
anid: any idea what the gold cutoff could be?
eulerscheZahl: between rank 50 and 100
JohnCM: yup i can see that
JohnCM: i played many simulations against your bot
anid: :( was hoping on top 200 :P
JohnCM: must thank you for helping me improve my heuristic values
JohnCM: it kind of worked
Doju: I'm trying to get the "depth" of my breadth first search
Doju: should i queue the neighbours into the original queue or is there a smarter way?
MattSOrme: is the boss just created by copying the bot in that position? when its time?
Doju: everything that i looked up didn't deal with lengths
Illedan: Click on the League icon above the viewer
ntroPi: Doju, have a second queue and swap when done with the first.
eulerscheZahl: yes, it will be a player chosen by CodinGame. it will be tomorrow 6pm CEST
eulerscheZahl: so gold opens in about 25h from now
wlesavo: damn, so even fatality also there
MattSOrme: and there was me thinking CG just had a couple good bots ready to go
NapTown: Doju you can walk back parents
eulerscheZahl: taking a usercode is way easier for them :D
MattSOrme: yup
Doju: NapTown i was doing that but it's slow and unnecessary since i dont' need the actua paths
MattSOrme: makes sense
eulerscheZahl: but they check the code at least to see if funky things are going on
eulerscheZahl: like a kill switch
Doju: ntroPi ooh that's an itneresting idea
kovi: fatility it not fatility here, a kill may cause pellets...and the game
kovi: it is not finisher i mean
NapTown: Doju maybe keep a depth value for each parent and +1 each child
Doju: actually i got a better idea
Doju: im gonna stick some other objects in the queue
Doju: after adding every child
Doju: and += 1 the depth when i hit the other objects
ntroPi: as a marker? swapping is probably faster.
Doju: really?
Doju: huh maybe i need to swap then
BenjaminUrquhart: eulerscheZahl not sure if you addressed this in a more recent submit (this is obsolete), but your pac suicided https://www.codingame.com/replay/461967018
ntroPi: Don'T worry too much about it, it's not like your marker idea would be super slow.
Doju: although my queue runs at o(1)
Doju: so i think it
Doju: it's pretty fast
Doju: if i add markers, that is
wlesavo: kovi yeah, not even sure if it is worth implementing
eulerscheZahl: thanks BenjaminUrquhart. i still do the same nonsense :(
BenjaminUrquhart: np
BenjaminUrquhart: also found a bug in my own code
eulerscheZahl: i don't find a way to survive when taking 2 cells at once
MadKnight: don't make bugs in your own code BenjaminUrquhart
eulerscheZahl: but i don't check in range 1
BenjaminUrquhart: thanks MadKnight
Counterbalance: argh... 1 - 2 = 1.84467e+19
Scarfield: ?
Counterbalance: a bug in my scoring
Scarfield: noo
BenjaminUrquhart: solid math
Counterbalance: score += 1000.0 * (players[0].pacs.size() - players[1].pacs.size());
Scarfield: xD
eulerscheZahl: oh wait... i just don't see you up there BenjaminUrquhart
Adnmaster: how can we understand if one of our pac's is dead?
eulerscheZahl: you are hidden
Adnmaster: for example if my pac is dead i dont want it to move
Adnmaster: how can i understand the id of the pac that is dead?
eulerscheZahl: and my advanced tracking is too slow as it is
Kellthazar: pac.type == "DEAD"
Adnmaster: oh
Adnmaster: ok
Adnmaster: thanks
BenjaminUrquhart: ah
[CG]Thibaud: (in Silver only)
Kellthazar: typeId
Adnmaster: not in bronze?
[CG]Thibaud: before, they're not given to you
Kellthazar: Oh, yes...
Kellthazar: Good point
Adnmaster: ok
Adnmaster: so im in bronze i cant use it
Scarfield: you dont get input for that pac if its dead, if in bronze set all pacs to dead in end of turn, the ones of yours you get input for set to alive
[CG]Thibaud: if you try to move them, the referree will make you lose
BobLaserShark: Out of curiosity, does anybody know if `math.sqrt(x)` or `x ** 0.5` is faster in python3? I can run a bench if not
Vintarel: the difference might be in microsec :D
Icebox: sqrt @BobLaserShark
BobLaserShark: Yeah, but I'm computing it a couple thousand times per update, so shaving some time off would be great
Illedan: Benchmark it BobLaserShark. And try caching too
Icebox: afaik all math functions are written in C so math.<anything> is usually faster than any python equivalent
Adnmaster: is there no way to get the id of a dead pac?
Doju: computing sqrt a couple thousand times per update D:
Scarfield: "you dont get input for that pac if its dead, if in bronze set all pacs to dead in end of turn, the ones of yours you get input for set to alive"
Doju: i wonder what you're doing
Scarfield: MCTS?
BobLaserShark: to be fair, I probably shouldn't be worried too much about speed when I'm writing in python :laughing:
Icebox: ^
Doju: BobLaserShark i think the opposite is true
MarekM: opposite, 100ms is very short time :)
BenjaminUrquhart: 50ms is shorter
wlesavo: true
zarif98sjs: any idea how many people will advance to gold ?
eulerscheZahl: anid 04:44PM any idea what the gold cutoff could be? eulerscheZahl 04:44PM between rank 50 and 100
BobLaserShark: I was more looking at it from the fact that if I wanted speed, I should be using a different langauge
Doju: i swear to god i never write "if x == True" on the first try
Doju: it's only when i get the syntax error that i realise i wrote "if x = True"
eulerscheZahl: if x:
Doju: and
Doju: that was an example
NapTown: if x yes
Doju: the "True"
Doju: just when checking anything
Doju: also what the hell
eulerscheZahl: you should switch to pascal then
Doju: how is it possible that i get the sound for a usb disconnecting
eulerscheZahl: if x = 3 then x := 4;
wlesavo: :=
Doju: when i get a static shock from my chair
BobLaserShark: I had a c++ program that wasn't behaving properly... took me a few hours to track down the error being
`if (importantVar = 1)`
Doju: and i'm not even touching anything linked to my computer
wlesavo: that gives me some flashbacks
eulerscheZahl: or basic which has = for both check and assign
Scarfield: you are in a simulation Doju, glitch in the matric
Scarfield: matrix*
BobLaserShark: I... do not like basic
Doju: I actually quite like this syntax x := 4
eulerscheZahl: maybe because it's a horrible language
eulerscheZahl: basic
shashwat986: gratz eulerscheZahl
shashwat986: rank 3
BobLaserShark: Better than matlab though
shashwat986: erm 4
eulerscheZahl: going up and down, was 2nd before
wlesavo: write in pseudo code a <-- b
eulerscheZahl: and below 100 with my broken submit :D
BobLaserShark: a <-- b actually means something in c++
Peudoki: people breaking their code gave me 5th place :D
eulerscheZahl: we are still in the relaxing stage of the contest
BobLaserShark: http://chat.codingame.com/pastebin/f8b5a40d-b175-4e27-962d-d7ba4a156bd5
eulerscheZahl: the last weekend is when everyone suddenly improves
BobLaserShark: Why it do that?
categorical.logician: <>
BobLaserShark: http://chat.codingame.com/pastebin/9af02880-318d-4190-8342-508fb3ea772e
Peudoki: By that time we can be legends
BobLaserShark: It do it again :(
eulerscheZahl: while x-- > 0
Scarfield: click the link and see, too many new lines or too much text chat creates a pastebin
BobLaserShark: int x = 10; while (x --> 0) { cout << x << endl; }
jrke: hey any suggestion how to pass bronze
BobLaserShark: @jrke git gud :)
jrke: means?
Scarfield: lol, win and also dont lose
jrke: plz give me any suggestion
RoboStac: looking at a random loss in your last battles you have real issues targetting the same spot with multiple pacs and don't appear to have a fallback for when there aren't any visible pellets
RoboStac: https://www.codingame.com/replay/462011320
RoboStac: oh and the enemy gets all 4 big pellets which shouldn't ever happen
jrke: K thanks
kovi: it could happen, if you trappped all 4 and kill 4 out of 4/5 pacs ;)
eulerscheZahl: that gameplay reminds me of https://www.youtube.com/watch?v=azl5jxcXCZk
BenjaminUrquhart: I think I broke my submit, cool
BenjaminUrquhart: let's see how this turns out
Tiramon: wow nice 142 ... thats far better than i expected
Doju: Is there a penalty for bad submissions?
Doju: like is it bad to submit something that time outs instantly
Doju: if you fix it
BenjaminUrquhart: if you fix it, you're fine
Doju: because i want to experiment with a constant that i have
Doju: to see which value gives me the best winrate
JohnCM: haha even if you submit the same constant you'll get different results
Doju: :|
JohnCM: but the range is normally += 100
JohnCM: so you can still gauge
JohnCM: if you suddenly rise by more than 100 ranks probably is a good thing
Doju: this calls for science
Tiramon: and alot of patience
Tiramon: what about running it localy against your own bot?
Doju: oh sure, that's a good idea
BenjaminUrquhart: usually my initial placement when submitting (when I first get a submit percentage) is around 300
Doju: thanks Tiramon
MattSOrme: what happens if you submit again while its still testing?
BenjaminUrquhart: when I submitted just now, it was 500
BenjaminUrquhart: MattSOrme it resets
AntiSquid: if you submit that way enough times you unlock a fun mini game where you need to spot different objects in pictures MattSOrme
ZarthaxX: aka captchza
ZarthaxX: fuck :(
MattSOrme: I just got an x and y the wrong way round, so fixed it and re-submitted
AntiSquid: you ruined the excitement ZarthaxX
MattSOrme: but it was only about 56% through testing
Doju: AntiSquid you get to participate in training a self driving car
ZarthaxX: MattSOrme no problem with that
ZarthaxX: u can submit at any time, just make sure to have your best submit for the end of the contest there :P
muy31: how are y'all coding which squares are in your Line of sight?
Doju: i get the row and column of the pac
muy31: obv same x or y, and then ...
eulerscheZahl: http://chat.codingame.com/pastebin/c2e13508-763a-455b-89d9-9ed9c327b4d0
ZarthaxX: mb squido lol
Doju: then split the lists at the position of the pac
Illedan: Lol, code that ended 2nd earlier ended 31 now :D That luck earlier
Doju: and loop through the lists until i hit a wall
eulerscheZahl: Illedan :D
jrke: hey i have line of sight working properly collion are solved and defence and attack also but how to collaborate with other pacs
aangairbender: do you guys use any kind of tree search here?
dbdr: or reverse, Illedan
AntiSquid: i get 50 rank difference twoo inbetween submitting same code
dbdr: be optimistic
Illedan: Unlucky now?
Illedan: Try again? :P
dbdr: yeah
njaber: BenjaminUrquhart By "that way", do you mean "when it's still battling"? What would happen if I tried to make an AI that automatically submits itself and waits for the battles to finish to submit again? Would that work/be allowed?
eulerscheZahl: 3rd submit
eulerscheZahl: to decide
BenjaminUrquhart: njaber you get x submits per hour
Illedan: Ok
BenjaminUrquhart: or something like that
AntiSquid: no, jst submit until 2nd again, obviously that's your rank so spam submits
dbdr: isn't there a problem now? Play in IDE does not happen, network timeout
jrke: anybody to my ques
njaber: IS the exact number written somewhere?
aangairbender: maybe faq?
BenjaminUrquhart: I think it's something like 10 idk
Csipcsirip_2: my submitted bot is MCTS. but it does not seem to work very well aangairbender. trying to change it to something smrter
dbdr: why the smurf Csipcsirip_2?
aangairbender: I am just thinking about beginning of the game
aangairbender: players know all info about game
dbdr: "Network error: status -1"
AntiSquid: this randomness makes life really difficult
AntiSquid: i add a feature and then i have to tripple check to make sure it's not bugged because of random ladder outcome
dbdr: AntiSquid usually there is something to fix that will make yourr bot more consistent
dbdr: I just had that today
eulerscheZahl: to download the error log dbdr
Csipcsirip_2: I needed an account without attached gmail account to get eulers offline debugger to work
AntiSquid: /ban alts
jrke: watch this close call battle and suggest me if anything wrong
jrke: https://www.codingame.com/replay/462021469
kovi: leaderboard frozen
BenjaminUrquhart: n e g a t i v e o n e
dbdr: Csipcsirip_2 you can just do a password reset
kovi: leaderboard works again
dbdr: I had a gmail account originally
Csipcsirip_2: really? cool gonna try that
NickStahl: jrke, lot of collisions within your own bots and looks like your bots are often targeting the same pellet
jrke: how to avoid that?
muy31: when a pac finds a pellet, disable the other pacs from finding it
jrke: K
NickStahl: jrke - collision of own bots: Calculate the path your bot is going for and if your second bot is going the same way, do something else until that is not the case anymore :)
NickStahl: and what muy31 says
dbdr: (╯°□°)╯︵ ┻━┻
jrke: thats the problem i am not able to calculate where my bot will go
NickStahl: But... I'm too lazy to program it myself, so better listen to the other guys here.
NickStahl: jrke, it's not that hard, lookup BFS algoritm
AntiSquid: dbdr maybe i need to fix something to make the bot rank consistent, but now i am heading towards top 50 with a bot that got 150 previously, this is ridiculous :/
dbdr: if it's because your bot plays great in some settings and badly in others, why is it ridiculous?
dbdr: maybe depending on map size, number of pacs, opponent style, etc...
AntiSquid: are you sure it's just that?
dbdr: I cannot be
dbdr: I'm saying I often observed that
dbdr: and that's constructive
ZarthaxX: the variable size is a factor
ZarthaxX: unless i guess you make a good top bot, it may generate that variations
ZarthaxX: :thinking:
AntiSquid: well will try to check if that's the case for my bot, need to stabilize somewhere @_@
Peudoki: this game is quite random because of the fog, so random results are normal
eulerscheZahl: even top players randomly walk into opponents and lose against sub-100 opponents
NickStahl: AntiSquid, maybe the amount of dead-ends... Walking into those is costly.
kovi: the problem is the low number of games in top
Csipcsirip: thanks dbdr it works
Peudoki: I have a friend who I sometimes test against, he is 190th, I'm 3rd and he can beat me 10-20%
dbdr: :+1:
Doju: oh are you seriously saying "if something":
Doju: doesn't return True if something is an instance of a custom class
BenjaminUrquhart: "if something:" basically means "something" exists
BenjaminUrquhart: oversimplified but whatever
Doju: it's returning false when i try it on my cell class :/
Counterbalance: Doju https://docs.python.org/3/reference/datamodel.html#object.__bool__
Doju: ooh thats exactly what i need
Doju: thanks
Doju: i was trying to google __if__ xd
Counterbalance: :)
Doju: Hmm, "If a class defines neither __len__() nor __bool__(), all its instances are considered true."
Doju: it's still not working even though i defined __bool__() as True
Doju: but i think i can figure it out from here
Counterbalance: then maybe the variable is undefined after all?
Doju: it's defined
Doju: i just printed them out
Doju: <__main__.Cell object at 0x7f29ec4f7a50>
Doju: wait what?
Doju: there's something else going on
berries: should i use a dfs?
Doju: I thought of using dfs at first but ended up doing bfs
Doju: can't really say which one is better
aangairbender: berries dfs doesn't search shortest path
aangairbender: but any path
berries: okay yeah i thought it should be shortest path but i wasnt sure
cegprakash: but dfs can help u avoid getting into choke points
Doju: ooh true cegprakash!
berries: what do you mean by a choke point
cegprakash: so use both Doju
cegprakash: only one opening @berries
Scarfield: dead end, but what are you intending to do with dfs/bfs berries?
Saiz: so is there anything besides somehow running the game locally I can do to actually debug my code? prints aren't enough to look at my tree
cegprakash: what tree
MonZtaDeluxe: oh - big pellets info is delivered from the beginning?
cegprakash: u can use debugger
Doju: MonZtaDeluxe technically every pellet's info is known at the beginning
Scarfield: not really, locally is the way, make your script print out the games state, use that print to setup your local run, and debug
Scarfield: the games state when you have an issue
SamuelTheBad: big pellets can always be seen, if that's whatchu mean
Saiz: guess that works... thanks, might try it.
MonZtaDeluxe: okay i see - but you won't get an update, if the opponent gets it, right?
berries: Scarfield just modifying my algorithm because i finally got my pac to eat things
Doju: For the big pellets you can deduce it
Doju: for the small ones no
Scarfield: its no longer there, so ^
SamuelTheBad: well, if an opponent gets it, you won't receive it's location next time
SamuelTheBad: oh, that's exactly what you asked. yeah, sorry
berries: also is anybody's pac timing out for no good reason sometimes?
Scarfield: ah okay, i would suggest starting with bfs for shortest path, anyway one thing at the time :p
styphoiz: bad codee
berries: like all the ones im losing my pac had timed out
Doju: I don't really know why my depth thing is not working...
Doju: it's going waay too high but the bfs itself is working
Counterbalance: berries your bot probably takes too long on some turns. Print the time each turn takes; you won't see the time on the turn that times out but it gives you an idea about how much time your bot takes
Doju: oh i'm a dummy
Counterbalance: store the result of System.getCurrentTimeMillis() (IIRC) right after you read the first line of the turn input (the scores), and do it again right before you print the command and print the difference to stderr
muy31: hey eulerscheZahl you still there?
Ramzel: has not provided 1 lines in time
muy31: what's the significance of implementing a break if a location has already been found eulerscheZahl
muy31: for your line of sight code
RoboStac: you can have maps that wrap round in a line with no walls, so if you don't do that you have an infinite loop
muy31: oh i see
IAmNoob: hi:))
muy31: but what if you already found that position from another pac
RoboStac: you need a different found positions per pac
Hjax: my vision loop just breaks if a pac sees its own location
Doju: RoboStac oh i didn't even consider that
Ramzel: Only BLINKY still has pacs standing!
Ramzel: Can u explain it?
Doju: luckily as a consequence of my function it doesn't matter
Doju: Ramzel your pacs are dead
DecH0: Hello All
Doju: Hi DecH0
Ramzel: Why are my pacs dead?
IAmNoob: they got killed
SamuelTheBad: you get that message usually when you do something "illegal"; attempt to move a dead pac, time out, or move to an invalid coord
Doju: i'm guessing you either timed out or gave an invalid command
IAmNoob: for example
VicHofs: Ramzel you probably timed out
Ramzel: Thanks so much
VicHofs: I'm having issues with that too
muy31: so do we now get dead pacs?
VicHofs: muy31 yes
muy31: for bronze?
[CG]Thibaud: in Silver only
VicHofs: yes
Scarfield: in silver its input as typeid
SamuelTheBad: yeah, your pacs get killed in bronze
VicHofs: pacs die in bronze too but they don't spawn dead no
Counterbalance: no-one reads their mail huh
SamuelTheBad: you'll have to filter it by whether you receive an input line for that pac next turn
VicHofs: @Counterbalance ?
Counterbalance: we got a mail about silver changes
Ramzel: Is there a way to get cords of pacs before any turn?
BenjaminUrquhart: no
SamuelTheBad: if you mean where they where at the end of last round, you'll have to store their old position yourself
VicHofs: Ramzel in bronze only if you can see them
VicHofs: @Counterbalance yeah I saw that
Ramzel: I m writing in c++, only thing i do in game loop is reading input(packing it into vectors), and printing last element of other vector? The error i get is: Ramzel has not provided 1 lines in time
muy31: timeout
eulerscheZahl: wow, 4000 players already
dbdr: \o/
Ramzel: So is reading input to slow?
VicHofs: anyone else getting seemingly randdom timeouts in python tho
VicHofs: * random
eulerscheZahl: Ramzel do you start the timer before reading the first line?
eulerscheZahl: then you are waiting for your opponent to take an action and what not
Hjax: this contest is crazy huge
ZarthaxX: biggest contest after accountant?
Scarfield: is your output in the format: MOVE pacId x y Ramzel
anid: Oh, just saw that it crossed the 4K mark
Ramzel: Yes it is
S1L3nCe: Ramzel, check array out of bound access or in loop condition
Hjax: utg only had 2162
AntiSquid: 4k celebration!
Ramzel: I think thats not a problem S1L3nCe
Doju: AntiSquid no we're too busy coding
AntiSquid: then why you in chat
anid: :D
Doju: errr you got me
VicHofs: Automaton2000 can celebrate with yall ask em
Automaton2000: so i cant use it
Doju: i'm trying to find this stupid bugggg
VicHofs: plus AutomatonNN too
Doju: but nope its not happening
anid: Hey AutomatonNN
AutomatonNN: eulerscheZahl is there an actual problem in the corner case of expert rules in the 1000 turns
Scarfield: maybe start looking for a smart bug, could help :p
AutomatonNN: kovi is the last contest boss cause i can't solve the problem
VicHofs: yo eulerscheZahl did you write this mf
anid: Hmm eulerscheZahl, must be a pain now that it knows ur name
Hjax: i wish those bots were banned
Scarfield: magu-s did, but it loves euler
VicHofs: yeah wtf
Hjax: is kovi ever not calibrating
Scarfield: 600 submits yet? :p
eulerscheZahl: the bot got much better actually
eulerscheZahl: initially it pinged me about once in 4-5 messages
ZarthaxX: Hjax nope
ZarthaxX: only when sleeping
Scarfield: I still hope for someone making an A-W-E-S-O-M-0-2000 bot someday
Hjax: there should be a cooldown on submits lol
ZarthaxX: there is
ZarthaxX: u start getting captchas
SamuelTheBad: Enemy timed out but game ended in a draw? The probability hurts.
Hjax: lol
Scarfield: oh thought you meant there was an awesomo bot xD
AntiSquid: image recognition mini game ZarthaxX
AntiSquid: you're supposed to train an NN for it and continue to submit spam, see how far you go
anid: just found this link
anid: should it be public?
Scarfield: Technical Details You can check out the source code of this game on this GitHub repo.
Scarfield: its in the statement :)
anid: No, this is the code for the bosses
Scarfield: yea, juist the wood bosses
eulerscheZahl: in the past CG even linked to the bosses in an email to help the users getting started
eulerscheZahl: it's still a very basic bot
ZarthaxX: AntiSquid so your theory is that kov i has it?
AntiSquid: has what
ZarthaxX: the NN that makes he spam submit
eulerscheZahl: for kutulu we didn't publish the wood boss. but that beast had 1000 lines :D
AntiSquid: should get extra xp for beating extra hard wood bosses
Waffle3z: down to the last pellet https://www.codingame.com/replay/462073775
anid: :)
AntiSquid: no food waste
Waffle3z: interesting that I won since I let them get 3 super pellets
Waffle3z: not only that but they're in 1st place
ntroPi: On the other hand you ate two of his pacs, those are tasty too. Your bot is less of a pelletarian than others it seems.
anid: I dont see a no further rules message here
anid: http://chat.codingame.com/pastebin/3eaf877a-188b-48bd-a219-2e59f50c9ecf
anid: could there be new rules in gold?
Scarfield: "You can now see pacs that have died."
eulerscheZahl: We've just opened the Silver league with a few modifications that you can find here. There won't be any change to the game after that.
eulerscheZahl: from an email that CG sent6h ago
anid: thanks
Doju: no this can't be...
Doju: my precalc is timing out
Doju: on the first cell
Doju: what?!
eulerscheZahl: BFS?
Doju: yes
anid: first cell requires highest computation
eulerscheZahl: you screwed up implementation
Doju: yeah eulerscheZahl i think so
eulerscheZahl: probably visiting each cell more than once
Doju: nope
Doju: wait no
Doju: hold on
muy31: make sure
Doju: oh i might be
Doju: i thought i wasn't because i was testing the length of a set
Doju: but its a set...
Doju: no, the list's length is only around 200 when i time out
AntiSquid: Waffle3z i think you should also ping them when you brag about beating them, it's like the cherry on the cake
Doju: this time i got like 7 cells done because i wasn't printing anything out
Doju: but still thats so slow
Doju: and i was doing the whole thing (although with the wrong depth readings) in like 100 ms
Doju: it just ran very fast locally
Doju: wait no, are you serious
Doju: it was timing out because i was printing stuff out
Doju: lmao
muy31: lol
MSmits: quick question, if a pac is this what the speed over time looks like: 0,2,2,2,2,2,1,1,1,1,0,2,2,2,2,2 or do i have an off by one error somewhere?
Doju: i just debugged my prints for 2 hours
MSmits: if a pac is chain-speeding i mean
eulerscheZahl: looks fine MSmits
eulerscheZahl: chat is laggy again
MSmits: k i was confused by the 4 1's
muy31: yeah i think so
muy31: cooldown time
eulerscheZahl: after SPEED you get 9(=cooldown) 5(=speed) as the next input
BenWo: afternoon all
eulerscheZahl: confused me too at first
MSmits: yeah
eulerscheZahl: now i just accepted it
MSmits: yeah as long as it is correct I am fine with it
Hyslach653: hi everyone, i'm trying the mars lander game and im having an issue where it says that i didnt provide an input in due time. could anyone hand me a tip or sth? very much appreciated thnx
MattSOrme: jeez, theres nothing like putting yourself against a top player to show how crap your bots are :(
muy31: Hyslach653 you are timing out
MSmits: it's the best way MattSOrme
eulerscheZahl: which one just crushed you?
Hyslach653: yes, but I already declared input and there is no way my code is taking that much
MSmits: botting is a skill that takes a lot of time to learn, even if you're already a good coder
MattSOrme: I put myself against aka. I wasn't expecting it to go well
BenjaminUrquhart: I'm fluctuating between 200th and 80th
BenjaminUrquhart: cool
BenjaminUrquhart: Stable Leaderboard:tm:
eulerscheZahl: oh dear https://www.codingame.com/share-replay/462093924
AntiSquid: 50 - 15- here BenjaminUrquhart
AntiSquid: 150 *
MattSOrme: woohoo
MSmits: haha MattSOrme well done
MattSOrme: i'll take it!
MSmits: you get the wreck-Euler trophy: :trophy:
BenjaminUrquhart: I'll join the club https://www.codingame.com/replay/462094565
NinjaDoggy: lol fix it!
MSmits: lol
AntiSquid: hey NinjaDoggy long time no see
AntiSquid: are you joining the contest?
NinjaDoggy: yep
NinjaDoggy: gonna make my bot decent today :D
eulerscheZahl: and i see now way to really prevent that nonsense from happening
eulerscheZahl: adding a lot of random noise to the game
NinjaDoggy: first one is unlucky
MattSOrme: i've got a few things planned to try, but yeah, rounding corners on a double is a pain
NinjaDoggy: second one though :thinking:
eulerscheZahl: second is bad tracking, agreed
Hjax: are we beating euler for fun now? I want to play https://www.codingame.com/replay/462095728
eulerscheZahl: but the first one is way more common
MattSOrme: If i can beat euler, i def shouldn't be 400th
eulerscheZahl: come on... did you get that in the first try Hjax?
MSmits: eulerscheZahl do you also still lose when you are being followed, meaning you know a dangerous pac is behind you?
Hjax: 2nd try
MSmits: and then turn around a corner and forget him
AntiSquid: euler to see mine check your battle history
NinjaDoggy: LOL
eulerscheZahl: i still have very basic memory of previous turns
NinjaDoggy: euler got lucky first and still got rekt :P
AntiSquid: Hjax any top 10 replay is good :p
MattSOrme: Hjax is aggressive. chased you down!
MSmits: ah ok, thats on my list to fix... i still do that
eulerscheZahl: there are some cases where i can tell where the opponent is with 100% certainty even without seeing it
eulerscheZahl: but for the other cases :/
MattSOrme: my bots are dumb enough to avoid your smarts
MSmits: hmm you can tell only 1 turn cant you? After that you dont know what they do
eulerscheZahl: i have another idea to fix that. but that's something for the last day
eulerscheZahl: correct, i don't know usually
eulerscheZahl: there are some corner cases
eulerscheZahl: let me find the replay
MSmits: pun intended?
eulerscheZahl: https://www.codingame.com/share-replay/461308137
MSmits: frame?
drykberg: hi there :) ... i just landed here and did the descent thing. Where do I start? :S
eulerscheZahl: right at the start
eulerscheZahl: top right corner
drykberg: badly worded question
eulerscheZahl: i know that red starts there (symmetry)
drykberg: hi im a retard, dont take me seriously
eulerscheZahl: then opponent gains 0 score => probably SPEED
eulerscheZahl: then gains 10 score, so it must be speed
eulerscheZahl: and i can even tell the direction
MSmits: oh nice
AntiSquid: https://www.codingame.com/contests/spring-challenge-2020 drykberg
eulerscheZahl: and that knowledge is enough for a kill already
MSmits: so did you code a lot of heuristics for this or is it an actual search ?
drykberg: i was kinda under the impression there would be one big game here with many stages, getting increasingly hard... but now it seems there are many little coding challenges, is that right?
eulerscheZahl: added the tracking today (the replay is old). my search knows where the opponent is for the first few turns
AntiSquid: do the contest: drykberg see link
MSmits: nice euler
NinjaDoggy: hm...
AntiSquid: drykberg it's this kind of squid: https://www.youtube.com/watch?v=fkrQS7dCrFQ
NinjaDoggy: cornering with 2 pacman for kill seems hard af
drykberg: or anti linux squid?
MSmits: lol AntiSquid, you will forever have to explain that
BenjaminUrquhart: so uh
BenjaminUrquhart: Hjax
BenjaminUrquhart: that happened
BenjaminUrquhart: https://www.codingame.com/replay/462100306
BenjaminUrquhart: your top pacs both turned into rock and got beat by my one paper
Hjax: my bot is terrible lol
AntiSquid: maybe i need to change avatar to this? http://www.bytebrothers.org/NoSquid.GIF
Hjax: dont look at it
drykberg: its a trap, people wanna call u squid xD but no...
drykberg: whatever, thanks for the tip
Hjax: my bot does get some freak wins against top bots though: https://www.codingame.com/replay/462101280
BenjaminUrquhart: I beat kovi once but I lost the replay cause I was too focused on fixing a bug that appeared in it
BenjaminUrquhart: (this was when kovi was #1)
MattSOrme: in those trapped scenarios isn't it better to wait for the enemy to change, then you change to counter? rather than pre-countering?
NinjaDoggy: it's better to not get trapped in the first place :P
ChooJeremy: Wow BenjaminUrquhart that's amazing you turned to paper on a pac that's trapping 2 scissors and caught out a change to rock
BenjaminUrquhart: ChooJeremy yes I noticed, don't applaud me cause it was a complete accident
AntiSquid: there was one map where scissors was right at the end and enemy rock next to it, do you wait or do you change?
MattSOrme: True but thats the trapped persons problem. Having 2 bots in a deadend, just makes it worse
AntiSquid: the rock basically can speed and next turn take the kill
AntiSquid: it's symmetrical, there's no other person's problem :p
AntiSquid: it was right at the start
Doju: Oh that was dumb...
cegprakash: rocks and scissors can move fast than paper right because of their weight?
BenjaminUrquhart: well yes but actually no
ZarthaxX: u kidding right
Doju: i've been running my vision and pathfinding on only the visible pellets
Doju: while updating the grid and being all dumbfounded why my pacs couldn't find the pellets
Kellthazar: Doju i consider unexplored cells too
AntiSquid: yes 1 kg rock is heavier than 1kg paper
Doju: Kellthazar yes so does my grid but my pacs didnt hahah
Doju: now they do tho
BenjaminUrquhart: found more bug
BenjaminUrquhart: yay
cegprakash: yay
berries: i need a heuristic search dont i
BenjaminUrquhart: would be a good idea
berries: also how can we keep track of where the pacman was the turn before
AntiSquid: uhm .
ChooJeremy: You need to save it in a variable somewhere and don't reset it
AntiSquid: in an array ?
AntiSquid: or anything else
berries: okay
BenjaminUrquhart: I just have a field in my pacman object that is set to the previous position whenever I update the current position
berries: that makes sense
BenjaminUrquhart: public void updateLocation(Pair location) {
this.previous = this.location; this.location = location; }
eulerscheZahl: order matters
eulerscheZahl: oh wait, now i get what you are doing
Doju: i store the whole location history
Doju: works for 200 rounds
Doju: maybe not smart if you're doing 2 million
SemChumboPT: you know the starting point of your oponents and on first sight of one (counting the steps backwards) you can mark that space empty of pellets
SemChumboPT: Also you can know their using speed at the start based on score analysis
AntiSquid: akara-chudra 1 point above the 2nd, so does that mean he is better or just luck ?
MSmits: 1 point is not much in a game like this
NapTown: SemChumboPT you don't know the exact path they took tho right? you couldn't mark them empty with 100% certainty
MSmits: but it is *likely* he is similar or better, but not certain
AntiSquid: 8 to 9 , 2 points difference
MSmits: it depends on who submitted
AntiSquid: oh wait just 1 nvm
MSmits: my bot works especially well against people who maximize pellet collection and arent so aggressive... the top bots are like that. So my bot has a lot of trouble getting through the 20-40 ranks with all the killers, but once it is past that it does fine
AntiSquid: so you optimized vs specific bots?
MSmits: i dont have any code to prevent dying except the most basic stuff
MSmits: no, thats just how my bot is
SemChumboPT: Naptown only on very begging on first site, maybe step 5 or 6, because it would impossible for them to went other way
MSmits: it is good at getting a lot of pellets but nothing else
MSmits: so if the opponent doesnt hunt me i am fine
cegprakash: 4048 ppl in leaderboard already.. can we hit 5000?
NapTown: SemChumboPT right
AntiSquid: just want to see this contest beat even the accountant, despite the forced submits
MSmits: once i get rid of some of these preventable deaths i should see some improvements
SemChumboPT: But I have problems already just keeping up qith my Pacs :)
MSmits: its not an easy contest for sure... i think most people hit a wall pretty quickly
MSmits: pun intended
NapTown: SemChumboPT instead of marking them empty or unknown, i was thinking of doing a probability of pellet from 0 to 1, but i don't know if i feel like it lol
Counterbalance: ur so punny ;)
MSmits: :)
AntiSquid: i still have a large TODO MSmits and my mood is inversely proportionally to the size of the TODO
NinjaDoggy: aww shoot
MSmits: same AntiSquid
SemChumboPT: Right now i lack the ability to search for paths so I just printed the idea out for you guys programmers :)
MSmits: I have to code more this week than I actually feel like doing, just to get the list done.
SemChumboPT: i'm more a 1600th in bronze league programmer
AntiSquid: you don't have to
MSmits: sure :)
MSmits: share anything you want
AntiSquid: talking to SemChumboPT
BenWo: yeah sitting middle of bronze league is stretching my knowledge already
MSmits: me too
sunksuperset370: how do we make a move
sunksuperset370: i am really confused
BenjaminUrquhart: It's in the statement
sunksuperset370: i am trying to put in the x and the y position in the code
BenjaminUrquhart: MOVE id x y
sunksuperset370: but its not working
AntiSquid: i mean you can easily go beyond bronze i am sure, if you try SemChumboPT
SemChumboPT: I'll try...
sunksuperset370: i also put in the id then the x position then the y postion
sunksuperset370: i can't work it out
sunksuperset370: can anyone help
sunksuperset370: ?
BenWo: sunksuperset370 - you need to do a "print MOVE pac_id x y"
BenWo: what language you working in?
sunksuperset370: javascript
BenjaminUrquhart: console.log("MOVE id x y")
Counterbalance: noooo
BenjaminUrquhart: k flame me
sunksuperset370: do i have to right it in a string form
Counterbalance: oww they changed it
Counterbalance: wow
sunksuperset370: or variable form
BenWo: yeah the command has to be a string
sunksuperset370: ok thanks
sunksuperset370: but how do you know which position to go to
sunksuperset370: it only shows me the postion when i play the code
BenjaminUrquhart: that's for you to figure out ;)
BenWo: it also sends you a list of all of the pellets
BenjaminUrquhart: easy start is to select the nearest pellet
sunksuperset370: ok
sunksuperset370: i will try
VicHofs: why would you not select the nearest pellet
VicHofs: I couldn't think of a reason
BenjaminUrquhart: hyper-aggressive bot that kills others
Adnmaster: sunksuperset370 you could make a code that goes to a random power pellet
sunksuperset370: i mean i can't figure out where is the nearest pallete
Doju: VicHofs if there's a path that will lead to more pellets in the long term
njaber: I found the Keybindings in the option, is there a way to bind launching our code?
sunksuperset370: the starter code i am given doesn't make any sense
VicHofs: how tf do you implement that lol @Doju
sunksuperset370: the code doesn't have any x or y variables to start with
Doju: VicHofs the search things that the top guys are doing
sunksuperset370: it's all confusing
VicHofs: I'm already running BFS for nearest pellets and timing out sometimes
Doju: VicHofs and actually i'm gonna do a different thing that might lead to a similar result
njaber: VicHofs that's the point of the challenge ;)
VicHofs: how
Adnmaster: it gives you input and you have to extract the data from the input
sunksuperset370: ok i will try thanks
TheTwister: Guys my code gone save if I just close the browser?
VicHofs: @njaber ye but idk how lol
Doju: are you sure that you're timing out because of the bfs?
VicHofs: probably Doju
BenWo: TheTwister - not if you submit
sunksuperset370: i am new to coding so that's why its confusing
VicHofs: when I remove it and set to random choice it doesn
VicHofs: 't
VicHofs: time out
sunksuperset370: i thought if i enter a contest it might help me get better
BenWo: I mean, it saves if you submit...
Doju: VicHofs and are you using it the sensible way aka flooding till you find a pellet
VicHofs: yes
Adnmaster: sunksuperset370 search this in google: hackerrank, codewars,
BenjaminUrquhart: Doju join the silver gang
VicHofs: if by flooding you mean using BFS and breaking when a pellet is found
Doju: BenjaminUrquhart i'm working on it
Doju: I need some logic for not committing suicide and not grouping up too much and i think im good
sunksuperset370: i can't search that
sunksuperset370: i am using a school chromebook
sunksuperset370: its blocked for me
Adnmaster: why?
Doju: lol
Adnmaster: oh
sunksuperset370: i am a student from a school
BenjaminUrquhart: why does your school block google
sunksuperset370: i can't buy a laptop to do this on
BenjaminUrquhart: :thinking:
sunksuperset370: no the term hacker is blocked to search
BenWo: lol
Adnmaster: you can play clash of code on codingame?
BenjaminUrquhart: lame
VicHofs: what the heck
BenWo: codewars is still good though
llllllllll: tfw you spend ~30 min if your life to add emojis to your actions in order to ease debugging https://www.codingame.com/share-replay/462127854
Doju: thats amazing
sunksuperset370: isn't clash of code ended
Doju: im gonna steal your idea
Doju: thanks bye
BenjaminUrquhart: TIL cg viewer supports emoji
NinjaDoggy: lol same
BenWo: I didn't know that was possible
BenWo: thank you
Adnmaster: sunksuperset370 no, you can always play it when you want
SamuelTheBad: that's pretty good
njaber: That's so cool
llllllllll: haha, welcome
Doju: whatever the question is
sunksuperset370: um ok
Doju: emoji is always the answer
Doju: or maybe 42
njaber: Hey I'm from that school
njaber: Doju
Adnmaster: how much do you know coding? sunksuperset370
sunksuperset370: barely much
sunksuperset370: i am new to coding
Doju: njaber not the school but the answer to the life, universe and everything
sunksuperset370: i started taking online lessons about a month ago
BenWo: sunksuperset370 - is there a reason you chose javascript?
Doju: i cant english again
Doju: life, the universe and everything*
njaber: Doju I know I was just joking
sunksuperset370: yes its the easiest and fun language to learn
sunksuperset370: other ones are confusing
njaber: Are there Keybindings/way to add keybindings for "Play my code" and/or "Replay in same conditions"?
Adnmaster: sunksuperset it would be better if you learned python3, its an easier language
BenWo: I agree, using this to learn Python better myself
Adnmaster: javascript is used for web
njaber: js can be used for many things, I personally find js mroe practical then python in many situations
sunksuperset370: wait then which language is used for making programs like apps or games
sunksuperset370: same
zams: sunksuperset what other languages have you tried before?
sunksuperset370: none
SemChumboPT: I'm doing this in PHP :)
njaber: for games it usually things like Java/C#/Cpp
njaber: C++*
SemChumboPT: it's the only one i know
sunksuperset370: heard that java script was used for a lot of thing
sunksuperset370: *things
AntiSquid: "was" ?
SemChumboPT: but i sow a video linked that a guy was doing it on Python, maybe it's a good start to learn
sunksuperset370: *is
Adnmaster: sunksuperset370 C# are used for applications, and you can use many other languages for apps but if you're new to coding it would be best for you if you learn easy programming languages like python3
Adnmaster: and to use javascript you need to know html and css, too
sunksuperset370: woah
njaber: Adnmaster that's not tru, you can do NodeJS and don't need any knowledge of html/css
gbiebuyc: nodejs
sunksuperset370: so now i have to learn python3 to compete in this competition
Adnmaster: hmm...
sunksuperset370: make me think
gbiebuyc: JS is fine
njaber: sunksuperset370 if you can manage js don't change, python is slower anyways
SemChumboPT: there are plenty of options.... good thing Codingame accepts them all !!!!
Wolisunde: while that is technically true, I'd recommend python or c#, or java if you already know some
Adnmaster: njaber what is nodejs?
Wolisunde: for new coders
sunksuperset370: heard about node js
sunksuperset370: wait node is like a terminal thing
sunksuperset370: not a language
shashwat986: Adnmaster it's basically a framework for javascript
njaber: Adnmaster an engine that runtime environement for JS that isn't linked to browsers
jjdb210: How are people labling their pacs?
Adnmaster: ok
Adnmaster: nice, ill look that up
Wolisunde: ^
sunksuperset370: yep i need answer to that too
ChooJeremy: jjdb210 you can print a string after the command to label it
sunksuperset370: how are they labling their pacs?
ChooJeremy: like MOVE 0 27 10 LABEL
njaber: add the text you want to appear abovev the pacs after the command you send them
jjdb210: That should be in the documentation
njaber: it is
Adnmaster: sunksuperset370, if you want you can keep coding javascript, codingame accepts it. My opinion is python3, but the choice is yours
njaber: wait
sunksuperset370: ok thanks
sunksuperset370: but what should i do
sunksuperset370: now
njaber: I though I saw it in the documentation
Adnmaster: you can keep coding javascript
Wolisunde: start with python
jjdb210: I don't see it under OUTPUT (which is where i would expect it... but thank you
AntiSquid: lol i started with JS
Wolisunde: or if you already know javascript, stick to what you know
Counterbalance: njaber it's under the debugging tips
sunksuperset370: all the variables are inside other loops, and its telling me to print it outside the loops
jjdb210: ah yes, i see it ther enow
jjdb210: thank you
AntiSquid: well python long time ago, but never used python since highschool
sunksuperset370: this wouldn't work
AntiSquid: i mean pascal * not python
AntiSquid: i did use python more recently lol
ChooJeremy: No you print it inside the loop
ChooJeremy: cause each loop represents a turn
sunksuperset370: ok let me try that
Adnmaster: sunksuperset370, the program gives you input like the x and y locations of your pack, and you need to print an output for example: console.log("MOVE 0 10 10")
sunksuperset370: can't believe i was that dum
AntiSquid: any language is fine really
AntiSquid: when you start
sunksuperset370: i can't find the position of the pac
sunksuperset370: how am i supposed to know where to move
BenWo: not dumb, just needed to learn the basic code structure the site expects
Ramzel: I m on the second place in wood 1 league will i got promoted?
Wolisunde: x & y: the pac's position
Wolisunde: look under game input in the directions
MSmits: you need to be 1st Ramzel
Adnmaster: you can see the statement thats under the screen for details sunksuperset370
MSmits: above boss
shashwat986: See? this is what happens with me: https://www.codingame.com/replay/462134545
Ramzel: Ouch no
shashwat986: https://www.codingame.com/replay/462135587
MSmits: thats the only reason the boss is there
sunksuperset370: where are the detaild
sunksuperset370: it only tells me the summary of the turn
Quidome: wow 4k submitters :D
sunksuperset370: not the details befor the trun starts
shashwat986: I time out in the actual ladder, and my same bot plays when I copy to IDE
jrke: hey shashwat
shashwat986: eulerscheZahl ^ vs you
shashwat986: hey jrke
Adnmaster: if you scroll down the summary you can see it sunksuperset370
sunksuperset370: i am scrolling
sunksuperset370: only see game summary
sunksuperset370: nothing else
Adnmaster: are you sure?
sunksuperset370: only player has pacs standing
sunksuperset370: player wins with 331 pellets
sunksuperset370: thats all i see
Adnmaster: oh, not that
sunksuperset370: then what
Adnmaster: don't scroll down the console output, scroll down the screen
sunksuperset370: wait the game schreen
Adnmaster: have you found it?
sunksuperset370: the pac id is always 0 in this league
sunksuperset370: constraints
Adnmaster: yes, because there is only one pac
sunksuperset370: not there are two
sunksuperset370: blue and red
BenWo: right, both have id=0
Adnmaster: that is your opponet
sunksuperset370: then which one am i suppoed to move
BenWo: but yours has mine=1
Ramzel: Yey welcome Bronze
SabertheLost: Question, if pacman moves two steps in one turn. Does he see all pebeels he passed+
MSmits: well done Ramzel
Adnmaster: console.log("MOVE 0 10 10"), this will move pac with (id=0) to x:10 y:10
sunksuperset370: isn't a string used with
sunksuperset370: rather than ""
ChooJeremy: Saber pretty sure it doesn't
Adnmaster: well use which one you like
Adnmaster: it can be different in javascript than python
sunksuperset370: so now my pac moved
sunksuperset370: but how do i know to move at a different place
BenWo: :thumbsup:
Adnmaster: you can change 10's
sunksuperset370: and how am i ?
Adnmaster: ?
Doju: is it bad to access an instance variable with a method?
sunksuperset370: sorry
sunksuperset370: what
sunksuperset370: am i supposed to do
Doju: like i have a dict called dist with distances to all other cells
Adnmaster: console.log("MOVE 0 20 20")
Adnmaster: this will make the pac move to x:20 y:20
sunksuperset370: yes
sunksuperset370: then waht
BenWo: Doju - within the same class?
Adnmaster: if you're new to coding i think it will be better for you to train before this contest
Doju: do i have to call it with cell.dist[other_cell] or is it ok to have a function called get_dist that returns self.dist[other_cell]
Doju: BenWo yes
AntiSquid: lol and miss the contest? imo contest helps the most
sunksuperset370: the board is ramdom all the time
Doju: indeed
Adnmaster: thats there to prevent cheat
sunksuperset370: thn what i a suppoed to do
eulerscheZahl: shashwat986 08:08PM https://www.codingame.com/replay/462135587
that's an interesting replay. in frame 17 i tried to kill you with paper and block with rock - trapping my scissors too :o
AntiSquid: hardcoding *
BenWo: Doju I think either way is fine, I usually find having a "getter" can be useful
AntiSquid: which isn't cheating
Adnmaster: yeah whatever they're all the same :D
MonZtaDeluxe: you have to implement Keyboard Controls, then you can control your pacman with the arrow keys
sunksuperset370: what am i suppoed to do?
sunksuperset370: i don't find anything
AntiSquid: how is hardcoding cheating? lol
sunksuperset370: i am wood league 2 at the start somehow
Doju: sunksuperset370 MonZtaDeluxe is messing with you
Doju: yu can't control your pac yourself
BenWo: sunks - this is where I generate my output for a bot: ' '.join(["MOVE", str(self._id), *[str(_) for _ in self.get_dest()]])
Adnmaster: you need to make calculations and give the pac x and y
Kellthazar: Oh... discover a silly bug on my code.
sunksuperset370: and how do i do tha
sunksuperset370: how make calculations
Adnmaster: you need to know that
sunksuperset370: as told earlier i am new to coding
sunksuperset370: so that is something that i don't know
sunksuperset370: like where do i find the information where to move
Kellthazar: Hahah
Adnmaster: you need to learn it to make code in this competition
Kellthazar: You need to learn then :D
sunksuperset370: and where do i learn that
Doju: here.
BenWo: I think that kind of question is suited for youtube tutorials and such
Adnmaster: wait...
MonZtaDeluxe: i think you can learn coding in the internet
Adnmaster: what was the name of that learn platform again...
sunksuperset370: js
MonZtaDeluxe: Adnmaster i think it's called internet
sunksuperset370: good one
Kellthazar: A channel that I recommended for begginers is Coding Train
Adnmaster: :sweat_smile:
Kellthazar: by Daniel Shiffman
CTRL-ALT-D3L: codecademy as well
ChooJeremy: Isn't codingame supposed to be a learning platform?
Adnmaster: got it: udemy
sunksuperset370: i learned at codecademy
ChooJeremy: Starting with the easy challenges and move upwards
Adnmaster: you can use udemy
BenWo: spoilers, but might be quickest start for here -> https://www.youtube.com/results?search_query=codingame+javascript
sunksuperset370: but how do i know hwere to move to if i don't know the board
BenWo: that's kind of a huge question
sunksuperset370: please help for the sake of humanity
BenWo: it depends on your strategy
Adnmaster: it gives you the information of the board as row variable
MonZtaDeluxe: read the description
sunksuperset370: whrer are those
MonZtaDeluxe: below the screen
MonZtaDeluxe: on the left side
Adnmaster: if i give him a function i made, is that cheating?
Doju: sunksuperset370 i'd say just go for a random pellet or closest pellet for starters
Wolisunde: i don't think it much matters @Adnmaster
BenWo: Adnmaster - I don't personally care, I don't know how helpful it would be
sunksuperset370: all positions are filled with palets
Adnmaster: def isWall(wid, hei, list1): http://chat.codingame.com/pastebin/67f1b2e6-99f4-43d4-a17e-9c070b2b5da1
Adnmaster: oh
Adnmaster: didnt work anyway
BenWo: it worked, it auto-pastebinned it
Adnmaster: oh wait it did
Adnmaster: ok
sunksuperset370: let me try
drykberg: is it somewhere broken down, what strategies/logic people use in each tier ?
Adnmaster: wait dont use that, its python3
sunksuperset370: where do i have to paste it at
sunksuperset370: ok
Adnmaster: at the beginning, but thats for python
sunksuperset370: ok
sunksuperset370: what do i do
BenWo: @sunksuperset370 - check out the youtube link I pasted
sunksuperset370: that is a search link
sunksuperset370: its not a youtube video
BenWo: with every result being a tutorial about how to use javascript on this website to solve a puzzle
Wolisunde: this is the first competition of this style I've done before. How much of the code am I allowed to change?
Counterbalance: all of it, Wolisunde
Wolisunde: :D
Adnmaster: sunksuperset370 you can watch videos about this competition in youtube
sunksuperset370: i don't think so
Bastett: well, leave Main in place (or equiv for various languages)
Doju: Wolisunde that's such an innocent question haha :D
Adnmaster: why not
sunksuperset370: restriction mode is activated
sunksuperset370: like parental lock
Adnmaster: oh
sunksuperset370: yeah
drykberg: do i need to know pathfinding algo to do this well?
sunksuperset370: sucks to be me
Wolisunde: @drykberg not at first
BenWo: drykberg - depending on how well you consider "well"
Wolisunde: at the highest levels, you'll be facing people who do know these things, though
sunksuperset370: does anyone here have the app zoom
sunksuperset370: zoo
ChooJeremy: Basic BFS is probably good enough to get you to silver at least
sunksuperset370: zoom
Adnmaster: i have
sunksuperset370: zoom?
Doju: ChooJeremy i don't think so
Doju: Except if you also do other things
VicHofs: ChooJeremy def not
sunksuperset370: adnmaster do you have zoom?
BenWo: yeah not BFS alone
Adnmaster: yes sunksuperset370
Doju: i've got some more than basic bfs and i'm 572 in bronze
sunksuperset370: ok i will give you the link and enter the meeting
ChooJeremy: Oh true that's fair
Adnmaster: ok?
VicHofs: grrr I keep timing out for no reason whatsoever
VicHofs: lmao
Doju: but i have absolutely 0 consideration for the enemy
sunksuperset370: https://zoom.us/j/2819809238?pwd=ZlI4dnNGNFI0dFRBZk51N3BOTllVdz09
VicHofs: anyone else getting this?
sunksuperset370: this is the link
Doju: or any other pacs, for that matter
Kellthazar: https://www.codingame.com/replay/462154600
BenWo: haha
ShannonNorris97: Do you not even do switch when there's an enemy near you yet Doju?
BenWo: Doju - I ended up just making my pathing consider my own pacs to be a wall
Kellthazar: is dbdr bot broken?
Doju: ShannonNorris97 I just spam speed all the time
sunksuperset370: adnmaster you are muted
ShannonNorris97: Oh wow - that's interesting. Your algorithm must be much better than mine for the other aspects then because we're quite close on the leaderboard and I have been taking them into account
ShannonNorris97: My route finding isn't great though
ShannonNorris97: *pellet finding
RockyMullet: 99% of the time speed is better
eulerscheZahl: Kellthazar he uses Rust. it has release mode on submit but debug mode in the IDE
VicHofs: how many ms does your BFS take Doju
eulerscheZahl: so he's likely to timeout
dbdr: https://cg.spdns.eu/wiki/FAQ
RockyMullet: me I switch only if I 1 cell away from an enemy who can eat me, or if I catch an enemy in a dead end
eulerscheZahl: :D
eulerscheZahl: saw that link coming
Doju: VicHofs from every cell to every other cell around 125 ms on a medium map
Doju: with 0 optimization
PatrickMcGinnisII: iswall(*b,x,y) { return (b[y][x]==NULL?0:(b[y][x]=='#'?1:0));}
PatrickMcGinnisII: does this work?
eulerscheZahl: next: how to set a seed?
VicHofs: holy shit @Doju
dbdr: next FAQ?
eulerscheZahl: yes => turn on expert mode
dbdr: how to mesure time
Doju: VicHofs you're just have something wrong in your code
eulerscheZahl: that too
RockyMullet: not sure why its even an option
dbdr: broken inputs on CSB
Doju: it shouldn't be taking a second
Counterbalance: precomputed 36481 distances in 934 μs
BenWo: hey Doju - seems you might now, what's the best way to get the ms elapsed back from CG?
VicHofs: it doesn't tho that's the weird thing @Doju
VicHofs: it only times out here
VicHofs: If I try it on a different IDE with a map sim it works
eulerscheZahl: BenWo depends on your langauge
BenWo: python
Kellthazar: eulerscheZahl thanks
Kellthazar: I like Rust
Doju: BenWo I'm just taking time.process_time() for the start and end in python
eulerscheZahl: https://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python
Kellthazar: The Nannou framework is amazing
dbdr: :) 3 hungarian flags in top 10, Kovi T1024 :flag_hu:
BenWo: gotcha, thanks guys
Doju: VicHofs that's probably because your own pc is faster than the server
dbdr: Csipcsirip come join us ;)
eulerscheZahl: and top8 all with 33.xx score
eulerscheZahl: so close
dbdr: yeah
VicHofs: huh yeah maybe @Doju
MonZtaDeluxe: that moment when pathfinding works like a charm <3
Hjax: last time i measured my pc was about 5x faster than the server
VicHofs: how do I do the pastebin thing
Hjax: the server is not particularly fast
eulerscheZahl: many lines turn into a pastebin here
VicHofs: I wanna get a second opinion if yall dont mind
Doju: umm
Doju: dont send lots of code
VicHofs: no in pseudocode
Hjax: if you send lots of code it gets converted to a pastebin link
Doju: alright
dbdr: did someone ever paste a legend bot in the chat by accident?
Hjax: that would be amusing, i doubt it
eulerscheZahl: once i was close to accidentally PMing to to MK :D
eulerscheZahl: wanted to click the editor, hit his avatar
Doju: lol
dbdr: i think we've all been close :D
Hjax: Jirotech has broken the 33 barrier, 34.01 now
dbdr: especially as there used to be a big that moved the focus to the chat by itself
Hjax: Jirotech is the best against kovi confirmed
dbdr: haven't seen it for some time, must be fixed
dbdr: *a bug
eulerscheZahl: i sometimes managed to open a leaderboard, search for a user and hit enter
eulerscheZahl: focus changed to chat
dbdr: :)
eulerscheZahl: i also wanted to PM a user on his profile. then something else loaded, shifting everything. so i unfollowed :D
Hjax: wow what a jerk euler, unfollowing people :P
dbdr: as long as it's not "delete your account" without confirmation...
Hjax: that only happens if youre name is struct
eulerscheZahl: there is a confirmation but no captcha
Hjax: your*
eulerscheZahl: surprisingly easy to delete
dbdr: kovi shuffled things around again :)
dbdr: now top5 is close :)
Doju: Oh wait, can you not give getters extra arguments?
Hjax: kovi is trying really hard to make the leaderboard meaningless
Doju: it's throwing an error :/
Hjax: someone should show him cgbenchmark so he stops submitting
eulerscheZahl: he knows that tool
eulerscheZahl: we had the discussion on ocean of code
Hjax: he just doesnt want to use it?
eulerscheZahl: i don't use it either
Hjax: i didnt use it in utg, i might use it for this contest
Hjax: i usually just do lots of self play against previous version of my bot, runs much faster than games on the server
ChooJeremy: first time I've heard of cgbenchmark
Hjax: running 3 games simultaneously on my desktop, i can run 1000 test games in like 30 minutes
ChooJeremy: Determine what the best value of constants should be?
Doju: Oh i need to do that...
Hjax: ChooJeremy no its a tool that runs test games against bots and collects results
VicHofs: I can share pseudocode right
Counterbalance: and small snippets
VicHofs: sickc
Doju: sicc
VicHofs: is this ineffective at all?
VicHofs: http://chat.codingame.com/pastebin/b6e4f892-9c06-4383-a723-5ccc82bb4ed0
Hjax: youd think my 6 core 12 thread machine could run more than 3 games simultaneously , but that maxes out the cpu
ChooJeremy: Hjax right so that seems like determining the value of constants would be one of it's use cases?
ChooJeremy: Like provide multiple different codes with say DECAY = 0.9, 0.8, 0.7 and test them all
Hjax: you could do that yes
VicHofs: I can run this BFS real quick on my PC but idk about the servers so I need a second opinion
VicHofs: and I keep timing out so...
Kellthazar: Yesterday I tried to run my code in debug mode using the Refereer.
Hjax: bfs with python is going to be a bit painful i think
Hjax: 50 ms is not a lot time in the land of python
Doju: Hjax nope
VicHofs: Doju's on the same boat that's why I'm asking his opinion
Doju: Hjax well if you do every cell to every other cell on every move then maybe
Hjax: every cell to every other cell will eat your time in any language
Kellthazar: VicHofs, its better to calc all the paths before the game loop
VicHofs: huh Kellthazar
Hjax: even if you abuse the symmetry to speed it up, takes me about 90 ms in java on the server
Doju: VicHofs the thing is
VicHofs: like having all the combinations ready and just testing them?
Hjax: (i dont abuse symmetry though, so i could do it in 45 if i did)
Doju: that goes from a cell to a target cell
Kellthazar: Yeah... Flood Fill BFS, I learned that lesson days ago
Doju: you don't really need that
DragonJ: dude I beat the boss and still am in the same league
VicHofs: Doju wym
Hjax: DragonJ you need to be higher ranked than the boss, not just win a game against it
VicHofs: DragonJ you gotta rank higher
Doju: VicHofs you want to start from a specific cell and end in any cell that fits some criteria (for example it's a pellet if you want to find the nearest pellet)
Doju: because what i image you're doing now is
Kellthazar: Use a map to store all the pre computed data: Map<Point, Map<Point, Path>>
Doju: for every pellet you run that bfs function
Doju: and take the closest one
VicHofs: I'm confused isn't that the same thing you just sasid
VicHofs: *said
Doju: it's not
Doju: but so what is the goal that you're trying to achieve?
Doju: is it finding the closest pellet?
VicHofs: my BFS works like this
VicHofs: yes
Doju: so you run that for every known pellet?
VicHofs: it starts the sweep from the pac's location
VicHofs: no
Doju: oh
VicHofs: I run it for each pac
VicHofs: it breaks when I find a pellet
VicHofs: close to the pac in question
Doju: oh yeah right i misread your pseudocode
VicHofs: that's why I don't understand the timeouts
VicHofs: on my pc max I've gotten was idk 30ms?
VicHofs: And that's with no limits
Doju: maybe it's the string concatenation?
Doju: or in general just working with strings
Doju: why don't you profile that locally?
VicHofs: I thought maybe it was but then I looked up the std runtime and it just wouldn't make sense from what I've seen
BenWo: woo, my pacs are battling :D
Doju: uhh but seriously that's waaayy too slow
Doju: when i used that it ran in like 1 or 2 ms per pac
Doju: with little optimization
VicHofs: when you used your BFS implementation u mean?
Doju: when i used my bfs implementation similar to that one
VicHofs: similar how, with strings?
Doju: atm i'm precalculating all the distances
Doju: so basically doing that but with no end condition except exhausting the queue
Doju: and saving the distances
VicHofs: what the heck lol
Doju: for every cell to every cell
VicHofs: I tried doing that a while ago and it was a timeout for suure
Doju: with 0 optimization and it runs in 125 ms
VicHofs: doesn't that timeout too tho?
Doju: only in the start
Doju: not on every move
Doju: although if you optimize it you can get it running in stupidly fast times
VicHofs: but how do you know where to go during the game?
WillNess: can pacs wrap around the map vertically and horizontally?
VicHofs: only horizontally WillNess
BenWo: My current submit is running BFS for 4 pacs in 0.5ms
Doju: like somebody here did that in like 60 us or something
VicHofs: BenWo -_-
Doju: VicHofs i go through the precalculated distances and get the smallest one
Counterbalance: VicHofs your bfs looks a bit odd to me; it should look more like this:
Counterbalance: http://chat.codingame.com/pastebin/8e036790-d69c-442c-a8da-7518fba529b8
VicHofs: but only at the start of the game?
Doju: VicHofs i calculate the distances at the start of the game and go through them on every move
VicHofs: hm @Counterbalance
Doju: Isn't Vic's basically doing that though?
VicHofs: Doju but how do you account for changes in the pellets then
MattSOrme: why can i beat top 10, but still place 400th? :/
VicHofs: MattSOrme probably luck
BenWo: because you can't beat top 400?
Doju: VicHofs i look up the distances between the pac and all the known pellets and pick the smallest one
MattSOrme: BenWo thats just mean... but also apparently true
Doju: WAAIIT
Doju: VicHofs the visited set should be outside of the loop
VicHofs: is it not?
Doju: VicHofs i just explained lol
VicHofs: oh shit
Doju: oh oops
Doju: read your old message
muy31: YEah! just finished my AP CAlc BC exam!
cegprakash: #fr
Doju: gratz muy31
VicHofs: cool muy31
muy31: thanks
Doju: i also got my matriculation exams results today
VicHofs: cegprakash oui oui mon ami
cegprakash: just trying to spy in :D
cegprakash: ignore me
cegprakash: I don't know French
Doju: lol
VicHofs: oui kashikomarimashita understood
VicHofs: no srsly tho lol
Doju: whaaat
Doju: is l'argent also silver?
VicHofs: I can't figure out the timeouts
Doju: in addition to money?
VicHofs: argent means silver
VicHofs: in french yes
VicHofs: money too
Doju: huh. the more you know
VicHofs: why do you think the periodic symbol for silver is Ag? ;)
Doju: because latin
eulerscheZahl: Ag = argentum in the periodic table
Doju: and not french
Doju: wati what?
muy31: si
cegprakash: #Ag
Doju: yeah latin
Kellthazar: Argentina... Land of Argentum
cegprakash: #Hu
VicHofs: yeah think what you will
Doju: but VicHofs anyway
VicHofs: yall KNOW Mendeleev was a Croissant Addict
cegprakash: what is channel for Hungary
cegprakash: #Hg
muy31: Mercury
VicHofs: yeah Doju
Doju: you are timing out because your visited set gets emptied on every loop
sunksuperset370: so i had a question
sunksuperset370: do we have to use node to calculate the information
VicHofs: I think I sent you the wrong one maybe Doju
VicHofs: cause its not here
Doju: if that's actually what your code is doing and not just a mistake in the pseudocode
cegprakash: there's no spoiler on France chat
Kellthazar: sunkusiperset370, node? Like nodejs?
cegprakash: #Ro
Kellthazar: #Br
sunksuperset370: yeah
VicHofs: no
VicHofs: of course not lmao
VicHofs: I'd be F'd big timme
sunksuperset370: then how do you calculate the information
Doju: lol there's your bug
VicHofs: you just take the input from the file
VicHofs: sunksuperset370 what language are you using
Kellthazar: Your code should do that
sunksuperset370: js
Kellthazar: In the language of your choose. The Codingame API will run the code for you.
Doju: Vic is the visited set outside the loop?
sunksuperset370: i have a default code there
cegprakash: #HU
VicHofs: yep Doju
VicHofs: I think I'm gonna try and refresh if I can't figure it out cause
cegprakash: #HUN
sunksuperset370: so how do i know what the information is before i starte the turn
VicHofs: I can't figure out shit
VicHofs: lmao
sunksuperset370: neither can i
Doju: also where's your queue?
VicHofs: sunksuperset370 sweet we're one and the same then
VicHofs: Doju outside too
sunksuperset370: ?
VicHofs: 'cause I can't figure shit out either :)
sunksuperset370: am i outside?
BenWo: well, bronze 190, higher than I thought I'd get!
VicHofs: no lmao
sunksuperset370: then what
VicHofs: @sunksuperset370 I mean we're both stuck my dude
sunksuperset370: yep
VicHofs: that is it
Doju: I think i have to start implementing probabilities now
VicHofs: gee
BenWo: I need to start prioritizing the super pellets
Doju: or should i do combat first?
kovi: ok, i managed 3x34 all hungarian
VicHofs: honest opinion
VicHofs: combat
VicHofs: ol
VicHofs: lol
BenWo: Doju - I'd say combat will give you more benefit
sunksuperset370: how do i know what the information is if i can't see it
Doju: Ok i'll do that, thanks VicHofs and BenWo
Doju: or at least i'll try to make them not commit suicide
BenWo: at least enough to be defensive
BenWo: lol right and that
VicHofs: roll down the window with the game sunksuperset370
VicHofs: the info's laid out there
sunksuperset370: ok i know about that
VicHofs: it's using an input() function or an equivalent
sunksuperset370: how do i change a move after one move
sunksuperset370: like the target cordinate after the pac is there
BenWo: sunksuperset370 - use variables
sunksuperset370: can the pac detect palets
sunksuperset370: if so that would be helpful
VicHofs: yes try implementing BFS
sunksuperset370: BFS?
Astrobytes: You are given visible pellets in the input
sunksuperset370: ok
BenWo: yes - you can code it to detect pellets
VicHofs: it's short and sweet and not as annoying as A*
sunksuperset370: lol
sunksuperset370: lol
BenWo: BFS = Breadth first search
Astrobytes: A pac can only see those pellets in direct line of sight
Doju: no
VicHofs: @sunksuperset370 Breadth First Search look it up
Doju: sunksuperset370 don't do bfs
Doju: if you're completely new to coding
muy31: no do it
Counterbalance: sunksuperset370 you might want to try this one first, it shows you the basics of how these types of games work: https://www.codingame.com/training/easy/onboarding
VicHofs: is he new tho
Doju: yes
VicHofs: sheeit
VicHofs: then yeah don't lol
sunksuperset370: dude onboard is easy
VicHofs: you'll just be more confused maybe
sunksuperset370: this was the first one finished in 1 min
Doju: okay so i'd say
VicHofs: @sunksuperset370 damn aight
VicHofs: okay my doggie
sunksuperset370: F*** u
sunksuperset370: sorry
VicHofs: what
sunksuperset370: didn't mean that
VicHofs: okay...
sunksuperset370: you called me doggie
Doju: a solid start would be to find the closest pellet using manhattan distance
sunksuperset370: sorry
muy31: sunksuperset370 ther you go
sunksuperset370: didn't mean
sunksuperset370: it
Doju: sunksuperset370
VicHofs: doggie isn't an insult lol
Astrobytes: Accidentally typing insults :thinking:
muy31: VicHofs it is
sunksuperset370: the word doggie just makes me feel unconfortable
VicHofs: must be some weird american thing
cegprakash: I have added 6 TODOs for today
cegprakash: :D
sunksuperset370: sorry should have told you that earlier
cegprakash: 2 of them improves performance
VicHofs: in the UK it aint
sunksuperset370: i am not amerian
sunksuperset370: I am living in america but
VicHofs: where u from bro
sunksuperset370: i was bored in india
sunksuperset370: Asia
Doju: sunksuperset370 i'd recommend you to find the closest pellet using manhattan distance
VicHofs: oh ok
Doju: for starters
VicHofs: yeah try what Doju siad sunksuperset370
VicHofs: *said
sunksuperset370: how do you find manhattan distance
BenWo: google
muy31: just x1-x2 = y1-y2
muy31: +
muy31: not equals
Doju: absolute of those
muy31: yah
Doju: abs(x1-x2) + abs(y1-y2)
BenWo: not considering tunnels ;)
Doju: don't consider them.
sunksuperset370: uummmmm
sunksuperset370: you guys just made it confusing
VicHofs: look it up if u need to
muy31: algebra
VicHofs: it's simple
sunksuperset370: x1-x2+y1-y2
Doju: so you ahve a position (x1, y2) and a position (x2, y2)
VicHofs: you can get it down in non time
Doju: the manhattan distance between those is abs(x1-x2) + abs(y1-y2)
cegprakash: abs(x1-x2)+abs(y1-y2)
sunksuperset370: what is abs
Doju: where abs just takes the absolute value (aka positive value) of that
Astrobytes: absolute value
sunksuperset370: abs?
muy31: | |
Astrobytes: |value|
muy31: |-2| = 2
muy31: |2| = 2
muy31: no
sunksuperset370: i know what absolute value is
sunksuperset370: how far from 0 the number is
muy31: yes
Doju: yes
Astrobytes: OK then, abs is just usually the name of the method in most languages to get that
muy31: like Java: Math.abs
sunksuperset370: ok
muy31: or JS: MAth.abs
sunksuperset370: so i have to find the abs of the pelet position from the pac
muy31: yes
Doju: erm
Astrobytes: Well, the Manhattan distance
muy31: with the aim of looking for the closest pac
Doju: ^
Astrobytes: Which uses the absolute value
sunksuperset370: the abs of pellet and abs of pac
cegprakash: manhattan distance = turns needed to reach a position
muy31: sort of
dbdr: this top 3 :D
Doju: abs of pac_x - pellet_x
sunksuperset370: ok
Doju: and abs of pac_y - pellet_y
muy31: yes
sunksuperset370: abs of pac position - abs of pallet postion
Doju: then add those together and that's the distance between the pellet and the pac
sunksuperset370: how do you write that in the code
Astrobytes: |pacX - pelletX + pacY - pelletY|
cegprakash: eulerscheZahl is block pro
cegprakash: :@ :@
Astrobytes: woops, too late
Doju: umm
Doju: Astrobytes that's not right?
Astrobytes: Yeah, I missed two |
Astrobytes: :P
muy31: Math.abs(pacX - pelletX) + Math.abs(pacY - pelletY);
Astrobytes: ^
sunksuperset370: do we have to declare a variable for the pacs position to get the manhattan distance
muy31: sunksuperset370 you in middle school? keep coding and asking for help
sunksuperset370: yes
sunksuperset370: i am in middle school
sunksuperset370: really
eulerscheZahl: what are you talking about cegprakash?
muy31: i believe you i started in elementary with Khan Academy Js
sunksuperset370: i stared in middle school with codecademy
Astrobytes: sunksuperset370 you get your pac position in the input
sunksuperset370: about a monther ago
sunksuperset370: ok
Astrobytes: Which language sunksuperset370?
muy31: JS
sunksuperset370: javascript
Astrobytes: ah k, didn't see that
muy31: i suggest you read a bit on parse-ing
BenWo: hate it when I forget an asterisk
muy31: parsing
sunksuperset370: what does the parstint do
muy31: yeah read on it google
Astrobytes: That's what you should look up sunksuperset370 ;)
Astrobytes: It will help you learn
sunksuperset370: i can't search up things on google
sunksuperset370: restriction mode
Doju: that's quite a hinderance to learning
sunksuperset370: school computer
Astrobytes: oh I see
cegprakash: I have 7 TODOs now
sunksuperset370: most of the things are blockd
muy31: ParseInt() returns an integer value
muy31: w3schools.com
sunksuperset370: like the return ()
sunksuperset370: right
muy31: no
Astrobytes: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
sunksuperset370: then we can log the information
muy31: it reads it from the console to use in the code
muy31: its the opposite of logging
sunksuperset370: well console.log(return());
AntiSquid: every single time i look at the leaderboard even the top 10 looks different
muy31: console.log("Hello world");
muy31: returns Hello World
sunksuperset370: i know about that
muy31: but readline()
sunksuperset370: how do we use it then
muy31: is different
muy31: and parseInt is different
Astrobytes: So if you get an input of a string like "I am 37 years old" and you parseInt that, you get an int, 37
Doju: what
Doju: that's neat
Astrobytes: I think
muy31: The input comes from the game itself
muy31: the game gives you a string input
sunksuperset370: so it is returning the numbers from the string
Astrobytes: Either way, it reads the input as integer other than string
sunksuperset370: oh ok
muy31: readline() gives you the string
AntiSquid: https://www.w3schools.com/jsref/jsref_parseint.asp ParseInt if interested
muy31: ParseInt gives you the next integer
Counterbalance: that parseInt gives a NaN (not a number)
muy31: default JS codingame code usually looks something like:
sunksuperset370: a number inside a string
sunksuperset370: ?
muy31: const a = readline().split(" ");
AntiSquid: parseInt("40 years") + "
";
var g = parseInt("He was 40")
AntiSquid: first one gives 40, second one Nan
muy31: const b = parseInt(a[0]);
muy31: and etc....
ShannonNorris97: I can't believe I never knew that you could use parseInt to extract a number from a string. I always though it changed the type, but didn't realise it could actually pick a number out
Doju: ShannonNorris97 ikr that's neat
muy31: JS will try its best anyway
Astrobytes: if you look in the Pacman default code you'll see: var inputs = readline().split(' '); const width = parseInt(inputs[0]);
Astrobytes: then const height = parseInt(inputs[1])
sunksuperset370: what does the .split do
Astrobytes: So that's the width and height of the grid, separated by a space
muy31: Ok, say you have a string sunksuperset370
AntiSquid: and generates array
muy31: LIKE: ABBA
Astrobytes: It splits the string according to a given delimiter, such as a space
sunksuperset370: but there are no spaces in ABBA
muy31: yes, so for ABBA. if you make the delimiter "B",
muy31: it will return an array ["A","A"]
Astrobytes: So you get "100 500", split(' ' ) will give you ["100", "500"]
Astrobytes: parseInt those and you will get 100, 500
sunksuperset370: it splits spaces, and alike stirngs
muy31: "bob ate oranges" split("o") = ["b", "b"," ate ", "ranges"]
Astrobytes: If you give it a sentence like "I am new" it will split the sentence into words if you say split(' ')
sunksuperset370: so it returns an array of the strings
muy31: yes
Astrobytes: Yes
muy31: parseInt converts a string to an integer
sunksuperset370: oh ok
sunksuperset370: thanks
muy31: so parseInt("100") = 100
sunksuperset370: so how do i write a mahhantan distnce in the code if the x and y is in a loop
muy31: get the code out of the loop, by storing it somewhere
Astrobytes: You need to store those x and y positions
muy31: usually arrays do the trick
muy31: in most cases
sunksuperset370: ok
muy31: using .push or something
cegprakash: sunksuperset370 welcome to codingame <3
sunksuperset370: why the heart
cegprakash: love new ppl joining
muy31: anyway sunksuperset370 read https://www.w3schools.com/js/default.asp
sunksuperset370: oh ok
cegprakash: I don't love you yet.. I love u if u wreck Astrobytes' bot
muy31: tutorial on every JS method
sunksuperset370: thanks muy31
Astrobytes: lol cegprakash :D <3
muy31: welcome
sunksuperset370: which level is astrobutes bot at
muy31: silver
sunksuperset370: like which league
Astrobytes: Don't ask
sunksuperset370: oh ok
cegprakash: I think his noob bot is in Bronze sunksuperset370
cegprakash: u can catch it in few hours
Astrobytes: No I'm bronze :(
muy31: lol
sunksuperset370: oh ok
sunksuperset370: whih level is sliver
Astrobytes: Hey, I'm on dihydrocodeine, gimme a break
muy31: yeesh Astrobytes
sunksuperset370: yeh
sunksuperset370: give em a break
sunksuperset370: man
Astrobytes: How I've coded anything is beyond me
DragonJ: In CSB I just boosted my opponent ...
cegprakash: omg Astrobytes got corona?
sunksuperset370: beginner's luck i guess
sunksuperset370: wait
sunksuperset370: what?
Astrobytes: I had that in March cegprakash, now I have a lower-back problem, was at hospital and everything
cegprakash: Did u just say Hydrochloroquine
sunksuperset370: what is that
sunksuperset370: oh wait
sunksuperset370: i know
sunksuperset370: its a medicine for maleria
Hjax: he said dihydrocodeine, a painkiller
Astrobytes: No, dihydrocodeine, very strong synthetic opioid painkiller
cegprakash: too mcuh computers Astrobytes?? get a bicycle and go for jogging once u become strong
muy31: sunksuperset370 you completely distracted my btw
sunksuperset370: yep i would suggest that too
muy31: *me
Astrobytes: No cegprakash, I was fit and healthy previously, it's just one of those things
sunksuperset370: ok oh
muy31: i can't go back to coding right now
sunksuperset370: ok
Hjax: i wish you a speedy recovery Astrobytes
Earthborne: Do print (debug) messages get printed if I timeout later same round, or is it not necessarily so?
Astrobytes: thanks Hjax
sunksuperset370: same
sunksuperset370: i wich that too
sunksuperset370: *wich
sunksuperset370: *wish
cegprakash: "Tolerance and some of the most common side effects – drowsiness, nausea, and vomiting, and confusion – generally develops with long term use."
sunksuperset370: ok i will go to coiding now
sunksuperset370: *coding
sunksuperset370: ttyl if need help
muy31: sure man
Doju: gl sunksuperset370
Hjax: im surprised my bot is holding on so well at rank 100
muy31: good luck in your future endeavours
Astrobytes: I've been on it almost a week, it's not as bad now, but it's brutal for trying to keep a clear head and think, that's for sure
cegprakash: they say that drug is addictive
Ceej: Are we allowed to get help on debugging?
cegprakash: don't get addicted
pde-bakk: hey smart people, does the 50ms time limit for the spring challenge start after the last gets() call?
pde-bakk: or at the start of the gameloop?
muy31: Ceej you can get help on anything
Illedan: After your first input reading.
cegprakash: start of game loop
sunksuperset370: ms?
AlexRSS: Umm, bit confused right now
muy31: about programming
AlexRSS: I'm in Wood 1 so no kill conditions yet
Illedan: pde-bakk, read 1 line of input, then start the timer.
sunksuperset370: mood 2
sunksuperset370: wood2
sunksuperset370: there is no wood 1
Braykin08: mood2 sounds way better
AlexRSS: But I keep losing the bot test with the message "Only PINKY has pacs standing"
muy31: sunksuperset370 sshhh
thethiny: Wood 1 > Wood 2 > Bronze
muy31: don't do this sunksuperset370
sunksuperset370: but i started in wood 2
pde-bakk: so start the timer after I get the my_score and opponent_score? or after I get all my pac and pellets information? cegprakash
AlexRSS: Wood 1 is multiple pacs but otherwise same as Wood 2
BenWo: yeah other way around
muy31: thethiny what's with that?
berries: bronze > wood1 > wood2
thethiny: @muy31 🤷🏻♀️
sunksuperset370: ok
sunksuperset370: ttyl
thethiny: It's good to see the same people on
cegprakash: reading inputs is like 0.001 ms.. don't worry about that pde-bakk
AlexRSS: Anyway yeah, any idea wtf's going on? There's no kill conditions for my pacs in this league but they still seem to be dying
thethiny: they die if you run out of time
DragonJ: why cant I get speed to carry my pod in CSB?
cegprakash: after reading inputs u can have a timout for 45 ms pde-bakk just to be safe
pde-bakk: im using ruby and i placed Time.now around the gets.split call and it took 100ms
AlexRSS: This is happening around turn 30-40
AlexRSS: Or do you mean time the process out?
thethiny: @pde-bakk the first call is 1000ms
Ceej: Any idea why my pacs work just fine for the first 10 moves and then start to go back and forth repeatedly?
muy31: thethiny you dont neet the @
Doju: Ceej maybe they don't see any pellets?
berries: ceej mine did that when i had it so it would always go in one direction first
berries: when they didnt see any pellets
muy31: Ceej is in wood tho
berries: so if you were at a wall it would go back and forth between two spots
muy31: he sees all pellets
Hjax: Ceej its a good idea to assume the whole map has pellets until you have a reason to believe otherwise
NinjaDoggy: nice...
NinjaDoggy: seems like you can get silver without caring about enemy pacmen
Hjax: oh hes in wood? maybe your pacs just keep changing their mind? try printing out their destinations
berries: yeah my alg is really dumb right now, i havent implemented a bfs yet so i can only see one pellet away
berries: like i can see more but my alg doesnt care about it yet
NinjaDoggy: berries
NinjaDoggy: you don't NEED bfs
NinjaDoggy: to care about pellets more than 1 away
NinjaDoggy: just estimate their distance
berries: wdym by estimate
NinjaDoggy: with Math.abs(x1-x2) + Math.abs(y1-y2))
Doju: manhattan
NinjaDoggy: assume no walls
Astrobytes: educated guess using Manhattan distance
Ceej: I have the pacs move to the closest pellet near them, it worked when I only had one pac
NinjaDoggy: ofcourse later you want BFS to get better values
Maliamnon: i gave my pacs maps :) They are happier now.
NinjaDoggy: but for now estimation is good
berries: okay okay
Doju: Oh right, i'm not putting super cells into the grid
Doju: no wonder my pacs aren't finding them
RavenKZP: nice combo on escaping bronze :P
NinjaDoggy: lol yeh :P
RavenKZP: now its 5 :D
sunksuperset370: how do we use the .push thing
BenjaminUrquhart: by using it
sunksuperset370: lol
sunksuperset370: but how
MonZtaDeluxe: .push(object)
sunksuperset370: who do we write it in the code
MonZtaDeluxe: with your keyboard
sunksuperset370: i am trying to push the x value of the pack
pde-bakk: what language?
sunksuperset370: how to i write it in the code
MonZtaDeluxe: or you can use the screenkeyboard and click with your mouse
sunksuperset370: js
AlexRSS: My pacs were 'dying' because of timeout btw, thanks whoever said that :-)
cegprakash: well now Silver league is getting flooded
cegprakash: did someone break Bronze boss?
NinjaDoggy: oops mb
NinjaDoggy: ;)
sunksuperset370: i am using javascript
pde-bakk: yeah I didnt update my code since this afternoon and got to silver just now
pde-bakk: sunksuperset370 sorry idk anything about javacript
sunksuperset370: ok
sunksuperset370: sorr
pde-bakk: na dw
Hjax: what do you mean silver is getting flooded cegprakash?
RavenKZP: NinjaDoggy u won ICE&Fire?
pde-bakk: i assume its pushes an element to the last spot of an array?
sunksuperset370: muy31 are you online
NinjaDoggy: 3rd yea
sunksuperset370: no
MonZtaDeluxe: "what is an array"? :)
NinjaDoggy: close to winning until recurse smashed us :P
RavenKZP: i know i remember u someow :P
NinjaDoggy: XD
NinjaDoggy: why does dbdr time out every time i run him locally
NinjaDoggy: ._.
mlomb: welcome to rust in the ide
NinjaDoggy: rofl
eulerscheZahl: NinjaDoggy https://cg.spdns.eu/wiki/FAQ
NinjaDoggy: ahhh thx
NinjaDoggy: so... how does he test time limit
NinjaDoggy: he just submits everytime to test?
Astrobytes: lol, the only thing on the FAQ is the Rust issue :D
muy31: sunksuperset370
muy31: i am now online
thethiny: @muy31 I know I don't need the @ but it makes it more obvious that this is a targeted message so others don't have to read it
muy31: ok then
pde-bakk: i do agree with @thethiny
muy31: whatever, it's not like it matters
thethiny: 😂😂
pde-bakk: nah but otherwise it kinda looks like its just a word in a sentence
pde-bakk: not a big deal but w/e
muy31: how do you like this:
muy31: while(true){ System.out.println("@");
muy31: }
thethiny: unfortunately this will cause an inifinite loop
thethiny: so we won't like it
sunksuperset370: how do i get the x and y positions of both pallet and pac to one loop from two
UndisclosedPandaFTW_dc3a: sup im new
pde-bakk: thats what he wants isnt it?
BenWo: welcome UndisclosedPandaFTW_dc3a
muy31: sunksuperset370 save it somehow
pde-bakk: make a struct, a class, an array or whatever you want to save every pac and pellet you get
andr: any hints to beating bronze?
muy31: ^
sunksuperset370: but the variables are saved as const x and y in both loops
thethiny: @andr yes, beat the boss :P
muy31: resave it
sunksuperset370: if i push them the array will be pushed not the whole variable
sunksuperset370: but how
NinjaDoggy: @andr don't worry about opponent, just focus on tracking pellets and eating them :)
andr: @thethiny thanks that was super helpful :D
sunksuperset370: do i resave it
sunksuperset370: how
muy31: var array = [];
pde-bakk: beating bronze isnt easy dude, its not really supposed to. but I managed to do it without using the combat system, and just focusing on pathfinding
sunksuperset370: ?
seronis: @andr never step into a cell direction beside an NPC your type cant eat
muy31: For loop stuff...
sunksuperset370: how does that
andr: @NinjaDoggy do you mean I shouldn't waste moves on SWITCHing?
sunksuperset370: work
muy31: const x; const y;
NinjaDoggy: yep, just speed whenever you can
muy31: array.push(x);
NinjaDoggy: and eat as many pellets as you can
NinjaDoggy: i got like 5 points above the boss doing that
sunksuperset370: ok enter in private chat
andr: Huh
sunksuperset370: muy31
MonZtaDeluxe: NinJaDoggy what league are you in?
pde-bakk: yeah same but i still think that killing other units gives you more map control and that simportant @ninjadoggy
NinjaDoggy: silver... of course
llllllllll: does anyone know how can I register my company? e.g. I work at Bosch, but our company is not registered, so it shows no logo, etc
NinjaDoggy: i agree, but as far as beating bronze goes
MonZtaDeluxe: and you got into silver with only speeding and eating pellets?
NinjaDoggy: that's all that really matters
MonZtaDeluxe: not attacking?
NinjaDoggy: yep
pde-bakk: yeah okay, agreed then
pde-bakk: i mean, your pacs shouldnt suicide either but okay
MonZtaDeluxe: wow :/ i think i do something wrong
AntiSquid: nice rank doggy
NinjaDoggy: thanks :D
andr: @seronis didn't quite understand your point about not stepping in, tell me more pls
NinjaDoggy: jumped like 3k ranks today XD
AntiSquid: tons of motivation right there
eulerscheZahl: usually that would result in a negative ranking
NinjaDoggy: :P
NinjaDoggy: true
seronis: @andr however your pathfinding works it needs to be able to tell if you are trying to step into the cell directly beside other enemies. because that means in the same turn they can enter that cell. So never do that unless your type eats theirs
AntiSquid: meanwhile i just fumble around with the high res clock check how fast my stuff is
andr: @seronis ah thanks makes sense
AntiSquid: still at 0.2 ms per turn
NinjaDoggy: yea but honestly... don't bother with enemy pacs till silver
NinjaDoggy: focus on making your own pacs not run into each other
AntiSquid: maybe i should use the time
NinjaDoggy: and attempt to distribute them across the map better
seronis: and if you are ALREADY next to an enemy, who can already eat you, switch to what eats them so they suicide on attack
andr: @NinjaDoggy yea them bumping into each other is annoying, any hints on that?
AntiSquid: i didn't even distribute them properly yet
seronis: you shouldnt attack. its not reliable. but defender can always win
NinjaDoggy: many ways to do it... personally i did 2 things
AntiSquid: not always
seronis: always
andr: @seronis tried that defense thing, works like 30% of the time :D
seronis: because attacker cant choose a new type AND move at same time
NinjaDoggy: 1: have my simulation account for bumping and not allowing that
AntiSquid: lol don't get so dramatic, also no
NinjaDoggy: and 2:giving a negative bonus for having pacmen close to each other
NinjaDoggy: in my eval
NinjaDoggy: which also helps with distributing them across the map
NinjaDoggy: combat is overrated unless you can trap kill i think
NinjaDoggy: they can just run away from you and if you chase you don't collect anything while they do
AntiSquid: maybe i need to rewrite, anything i change in my eval results in rank loss (or maybe ladder is just random)
NinjaDoggy: yea... local maxes suck :(
Doju: Do you guys think it's better to just write a bunch of sloppy code
Doju: to get more functionality in
Doju: or should i try to polish my existing things
AntiSquid: i have a bunch of sloppy code doju
llllllllll: depend
llllllllll: s
AntiSquid: does that answer your question?
NinjaDoggy: lol
Peudoki: I'm doing bunch of sloppy code
BenjaminUrquhart: if you don't have sloppy code during a contest you're not trying hard enough
NinjaDoggy: you should make your code modular
AntiSquid: sloppy code is meta
Doju: antisquid ok so very polished code it is
NinjaDoggy: so you can modify one part without messing up everything else
llllllllll: sloppy code > all
Doju: :D
NinjaDoggy: but in each part, make it sloppy :D
BenWo: sloppy code > unfinished code
thethiny: as I said earlier: if x == 1:
x = 1
thethiny: part of my code
llllllllll: ^ big true
Doju: hahah
AntiSquid: why thethiny why ?
BenWo: lol
thethiny: just to be sure
Doju: rofl
NinjaDoggy: make extra sure x = 1
llllllllll: you can never be certain enough
VicHofs: @thethiny brilliant.
Doju: i think you need to do this:
AntiSquid: do a bitwise check too thethiny
vmakaev: The system here doesn't support multiple files, or am I missing something obvious?
andr: @NinjaDoggywhat do you do when the pac can't see any pellets around?
thethiny: hmm interesting, bitwise is better
Doju: if x == 1:
for i in range(10): x = 1
llllllllll: add some comments like "if x is one, then x is one"
NinjaDoggy: @andr that's the most important part to getting out of bronze
thethiny: omg Doju that's even better!
llllllllll: and do some typechecking
NinjaDoggy: track what pellets exist/don't
cegprakash: Hjax too many ppl coming into Silver quickly
NinjaDoggy: assume a pellet exists until you see that it doesn't
thethiny: https://www.codingame.com/replay/461660263
VicHofs: if x=1:
VicHofs: while True:
VicHofs: x==1
AntiSquid: true cegprakash, go back to bronze
VicHofs: dfinitely gna work swer
NinjaDoggy: :rofl:
Doju: thetiny nice, so that's what you're spending your time on
thethiny: yes XD
VicHofs: do Halo next @thethiny
Doju: if i use my ability
andr: @NinjaDoggy thanks, gonna ask some more later :D
Doju: is the cooldown on the next round 10 or 9?
NinjaDoggy: who cares... just use it when up :P
VicHofs: personally idk
NinjaDoggy: are you really going to plan ability usage XD
thethiny: 9
thethiny: we tested it out
VicHofs: DAMNIT IT KEEPS TIMING OUT
VicHofs: im gonna find this server
Doju: NinjaDoggy no, i'm just improving one bit of my code
VicHofs: and say mean things
Doju: VicHofs still working with strings?
VicHofs: yes :(
Doju: seriously you need to compile that function
Doju: no not compile
VicHofs: might try and change it
Doju: i mean profile
VicHofs: but bro am I lazy
VicHofs: profile how
Doju: i'll send you some input
Doju: you can make a generator
andr: what language are you using?
Doju: and run your code locally
VicHofs: I'm confused what
VicHofs: andr u mean me?
Doju: actually no
andr: @VicHofs ye you
Doju: just make the input yourself
andr: @VicHofs cant imagine a runtime so slow
VicHofs: p to the y to the thon @andr
Doju: aka print out all the input you get from the game and copy that into your own locally running code
VicHofs: @same here mate
andr: @VicHofs oh wow something fishy there
Doju: then you can compile it
VicHofs: yeah ik
Doju: why do i keep saying compile
Doju: profile
VicHofs: @Doju idk if that's even worth doing at this point lol
thethiny: Why use Class when you can have unlimited Dictionaries
Doju: yes it is
thethiny: :^)
cegprakash: NinjaDoggy lolol
Doju: otherwise you're gonna spend ages trying to make meaningless improvements to the speed
Doju: i profiled my thing and found out that i was running a function n too many times
Doju: and guess what?
Doju: that function was also running n times
Doju: or looping n times*
Doju: and n was the number of cells
BenWo: well you were thorough at least
thethiny: when people ask me why do I use python for competitions? I reply with: if 10 > x > 0:
print("X in range 10 to 0")
Doju: that doesnt work lol
thethiny: try it
VicHofs: that's that one snake right
thethiny: in this competition it's width > x >= 0
Doju: ohh thats what you mean lol
thethiny: yes
Doju: okay yeah
thethiny: lol
Doju: is that not in every language?
thethiny: nop
VicHofs: I have that going too lol
cegprakash: that's syntax error
thethiny: it's not syntax error in python
VicHofs: nah it aint
thethiny: and that's the best thing about it
cegprakash: that's bad then
thethiny: why bad?
cegprakash: if it works
VicHofs: wym
cegprakash: coz what if all 3 are of diff types
thethiny: that's your fault, not python
VicHofs: lmao
VicHofs: faxx
thethiny: also python can handle types easily
cegprakash: > 4 > 7.2
thethiny: another example
cegprakash: this can return true
thethiny: c++: if (x == x2 && y == y2)
thethiny: python:
if (x, y) == (y, y2):
cegprakash: no I use p == p2
thethiny: I meant x2 y2*
Doju: okay, you guys say wonky code is goood in a competition
Doju: wonky code it is
cegprakash: I've a Point class
cegprakash: with == comparator
VicHofs: python king
thethiny: yes but python has it by default
thethiny: saves you time to overload operators
cegprakash: but u can't do p == p2
thethiny: u can
VicHofs: u mean override?
thethiny: def __eq__
cegprakash: u have to do px, py == p2x, p2y
thethiny: no
HKG: you can overload operators in C++ too
VicHofs: gee guys this is taking yall nowhere
cegprakash: VicHofs right
cegprakash: I go continue my TODOs
thethiny: class Point(self): http://chat.codingame.com/pastebin/d1afdaa3-3e81-44fb-9b39-4b8145ceb004
cegprakash: python can be good to build something quickly but python runs too slow I wouldn't recommend
thethiny: yes
thethiny: but my code is running in 2-3ms so I won't mind
cegprakash: lol
cegprakash: fine then
VicHofs: 2-3?
thethiny: yeah
cegprakash: every ms is important for me
VicHofs: what kind of sorcery is this
cegprakash: I run 10000 iffs in every 1 ms
VicHofs: are you doing pathfinding?
MattSOrme: same, most of my code runs in a couple ms, its only my search that takes the rest of the time
Astrobytes: cegprakash not everyone is using a search
cegprakash: it doesn't have to be a search to use lot of iffs
thethiny: @VicHofs yes
cegprakash: minimax with pruning is lot off iffs too
VicHofs: wtf how bro
Astrobytes: I meant your importance of every ms
Hjax: minimax is a search too
VicHofs: BFS?
thethiny: max depth of 5 @VicHofs
cegprakash: I'm now working on removing my iffs
Astrobytes: *ifs
HKG: hope you optimalized your datastructed for cpu caching
VicHofs: oh so you're ending it prematurely when no results are found?
thethiny: yes as well
VicHofs: oh ok
VicHofs: gotcha
Doju: i seriously need to put in some kind of probabilities
VicHofs: mine runs for longer in essence makes more sense lol
BenWo: I've had that in the back of my mind Doju but really don't know if it'll be very consequential
Bastett: I'm going crazy. My pellet tracker isn't clearing visibly empty spaces on the board. Yet all my tests pass. Hoping I don't have a bad assumption somewhere
Doju: BenWo look at this https://www.codingame.com/share-replay/462263619
Doju: argh
Doju: that's just painful to watch
Adnmaster: guys im new in bronze any strategies?
thethiny: @Bastett make sure your x+1 and these are right
thethiny: @Doju why do you print BFS, you mean that you're moving?
BenWo: sure
BenWo: but if your 2nd pac hadn't died it would be an easy win
AntiSquid: iffs = Illicit Financial Flows @Astrobytes
AntiSquid: IFFs *
thethiny: iff means if and only if
Doju: thethiny i'm looking for the next cell basically using bfs
Doju: well precalculated bfs but still
thethiny: @Doju I know but why are you printing it
Astrobytes: IFF = Interchangeable File Format
thethiny: that too
Astrobytes: *Interchange
thethiny: YIFF = I don't wanna explain
Astrobytes: And yes, I'm old
Doju: thethiny well i mean why not print it if it lets me know what's going on?
AntiSquid: there we go again, i make a change, i test it, it goes really well, i submit and then i get annoying random losses and feel like reverting to old code
AntiSquid: annoying
thethiny: @Doju I know, I'm just asking if BFS means that youre moving or if it means that youre using BFS in this turn, then DFS later
MonZtaDeluxe: i don't remember his name but to that guy who told me to ignore everything else and just eat pellets: thank you very much amigo
VicHofs: lmao
VicHofs: yo the weirdest thing
Doju: thethiny i'm using bfs every turn
llllllllll: what is this Hungarian dominance on the leaderboards
VicHofs: y'all who were here a while ago
AntiSquid: MonZtaDeluxe it was NinjaDoggy
Doju: if it returns nothing i fallback to random
Bastett: BFS -> Breadth First Search
MonZtaDeluxe: ah yeah - exactly - thank you
VicHofs: is that sometimes I don't time out at all
Doju: then it says random
VicHofs: But sometimes it does
VicHofs: like wtf
Doju: i just climbed 150 ranks by giving just a little more priority to super pellets
Bastett: Huh. I am clearing the empty cells correctly, but something is putting them back in.
AntiSquid: people dropped about 150 ranks since yesterday (those that didn't improve enough anyway)
MattSOrme: nice doju. Almost reaching silver then?
Doju: MattSOrme pretty soon if i not just put in not suiciding
Doju: or even not going for the same pellet probably
BenWo: submitting
MattSOrme: Bastett, are you updating a copy?
BenWo: :-/
THEASIAN: :grin:
Doju: actually i wanna test upping the super pellet priority just a bit more
Bastett: MattSorme we'll find out as I debug I guess :)
Bastett: I must have a bad bitmask calculation somewhere I suppose
Bastett: I don't appear to be reinitializing the arrays
ijc90: i just got to silver and i got NO IDEA what to optimize
ijc90: it seems like others do almost the same but just win
cegprakash: lol
cegprakash: no
ijc90: what are your strategies?
Dav1dS: im curious, is anyone doing pathfinding in either js or python?
thethiny: python yes
ijc90: im doing BFS to calculate distance
cegprakash: ijc90 check euler's bot
cegprakash: all bots are diff from each other ijc90
Dav1dS: i tried astar to calculate distance and it timed out
Dav1dS: in both python and js
VicHofs: A* is gonna take too long
VicHofs: stick with BFS
Doju: how come?
Doju: it's faster than the bfs that everybody is using
llllllllll: I use a* and it works fine
Doju: if you're going to a single target
llllllllll: (python)
Dav1dS: so BFS would be better for this sort of map?
thethiny: when you have too many walls
thethiny: A* is slower
Doju: oh relaly?
VicHofs: I'd say so anyway
Doju: okay
thethiny: I tried both
thethiny: with A* it was 3.2s
thethiny: with DFS it was 2.8
thethiny: BFS*
Doju: but yes Dav1dS BFS is fine and it returns a perfect result
Hjax: bfsing between all combinations of points at the start of the game and storing the results in an array is pretty convenient
Hjax: you have a whole second, even python should be able to manage that
BenWo: bronze 25 :D
llllllllll: I do the same, yeah
Astrobytes: And if you do what hjax said you can use the distance as an admissable heuristic for your A* if you wish to use it for further pathfinding
ijc90: i do BFS and i limit interactions to "N" so i can calculate on real time
ijc90: but precalculating everything makes sense!
cegprakash: AntiSquid climbing up in SIlver
Hjax: that 1000 ms is basically pure gold
Hjax: precompute everything you can
Hjax: because 50 ms is not a lot for a turn
HKG: are there any IDE plugins for this site?
Bastett: Hmm, maybe sight range isn't what I thought it was
HKG: I'd rather use my own IDE instead of the bult in one. ;_:
Hjax: i just copy paste my code from my IDE HKG
Astrobytes: Look for CGSync and CGLocal in the forum HKG
Bastett: no, documentation is clear, sight lines are infinite in cardinal directions
Bastett: hmm
Hjax: you cant see through walls Bastett
BenWo: silver :smile:
Astrobytes: gz BenWo
Bastett: Hjax nah this isn't a wall problem
Bastett: it's probably a bitmask off-by-one
BenWo: thx
Bastett: bitmask is correct... man
THEASIAN: damndang yall so much smarter than me
VicHofs: welcome to the club @THEASIAN
THEASIAN: Thx man
muy31: i dk how i promoted, but i did
Astrobytes: gj muy31
Doju: I have a bunch of ideas but implementing them will lead to variable optimization hell
thethiny: tell me about it T_T
Derthek: and they dont guarantee success :D
AlexRSS: Finally figures out making them loop the edges when following pellets
Doju: Derthek yeah and that
AlexRSS: Now just need to make them stop eternally headbutting if they meet each other
Bastett: Ah hah. The removal and masking is good... but it thinks there are visible pellets when there are not
andr: My each "improvement" drops me 100 rank places, wtf :D
Doju: Although as a temporary imporvement i think it's time that i dig my old flood fill function back out of its grave and do pathfinding with pacs as obstacles
thethiny: I have in the same scope: x, _x, __x. I need a better naming scheme haha
Maliamnon: 13 in bronze, c'mon!
Maliamnon: :)
Bastett: Dur. Visible pellets are new each turn. Clear the fsking array.
Derthek: Doju, do you have a good reference for flood fill? never heard of it (:
cegprakash: come on Maliamnon
cegprakash: if someone is at #13 in Bronze I would just suggest resubmit
cegprakash: :D
Maliamnon: 9th now, 65% of battles done
Doju: Derthek i'm not really sure if that's what it's called but i'm basically doing this but instead of a single specified end point i have a set of criteria https://en.wikipedia.org/wiki/Breadth-first_search
cegprakash: I was at rank 26 at 87% and got promoted
cegprakash: with only 70 games anything is possible
Astrobytes: Derthek check out redblobgames.com
AntiSquid: thanks for announcement cegprakash
AntiSquid: but what does climbing mean ?
thethiny: I put you as CEO of trolling
AntiSquid: sorry for demanding clarity
muy31: if i advance 100 places, ill be the best at Java
muy31: BET
thethiny: in silver?
muy31: yaah
thethiny: nice
AntiSquid: you can advance 100 places and then drop back 100 places with same bot muy31
AntiSquid: doesn't mean anything
thethiny: I was 86 in bronze now I'm 227 without submits
thethiny: :D
thethiny: people stop submitting
muy31: ssh, no one cares about the technicalities
AntiSquid: wow ... that's just stupid
AntiSquid: ssh ? muy31 what are you trying to do
muy31: advance ofc
BenWo: rank 600 silver I still see people insta-timeout
MonZtaDeluxe: guys DFS is for distance between 2 positions, right?
Doju: BFS
Doju: for that
Colios13: yeah cuz of the dead pac
MonZtaDeluxe: i would use BFS rather for looking "what's around me"
Colios13: Someone still have a mahattan in silver?
thethiny: Guys don't forget that multiline coding is possible
cegprakash: lol Colios13 I would be surprised
thethiny: guys how many people are there in silver rn?
Doju: MonZtaDeluxe depth-first doesn't always give you the shortest path
cegprakash: 744 and climbing fast thethiny
thethiny: woah, thanks
thethiny: 745 now?
thethiny: cuz I just got up 1 rank
MonZtaDeluxe: Doju i know, but in every recursion step i check the path distance
Colios13: Me i have cegprakash but wanted to know if someone have a better manhattan than me
MonZtaDeluxe: i take always the min
Doju: alright, you do you
MonZtaDeluxe: shortest path is usually dijkstra i guess
cegprakash: better manhattan is actual walking distance
MonZtaDeluxe: i think i should switch to dijkstra for shortest path
cegprakash: Colios13 use actual walking distance
MonZtaDeluxe: between 2 points
Bastett: Right. Rewriting my class based data structure into an array of unsigned ints has improved performance massively
Bastett: depth search goes deeper now before timing out
Doju: MonZtaDeluxe well sure anything works i guess
AntiSquid: thethiny when i look at my ranking results i am calling bullshit, but he never answers the phone
cegprakash: MonZtaDeluxe plz don't use dijkstra it's not a weighted graph it's an unweighted graph plz use BFS
thethiny: nice
MonZtaDeluxe: ok sorry dijkstra is wrong
Bastett: but my pacs are morons. So I've broken the search algorithm in the rewrite
Astrobytes: made me laugh AntiSquid
MonZtaDeluxe: my problem is i already have BFS for checking my environment
Bastett: job for tomorrow
MonZtaDeluxe: i can also use BFS for checking the distance between two points?
Doju: just do what everyone does and check the distance from every cell to every other cell during the first move
Astrobytes: Yes MonZtaDeluxe
Doju: except if you want to care about the pacs
Doju: then that wont help you
MonZtaDeluxe: i currently assume that pacs are like walls
Doju: sure then do bfs on a per turn basis
Colios13: Yes i know i should use BFS but i just wanted to know if it's possible to do much better than this with manhattan it's more like a challenge
cegprakash: BFS tutorial as many ppl keep pinging me : https://www.youtube.com/watch?v=vf-cxgUXcMk
Astrobytes: The tutorials from Amit on redblobgames.com are absolutely foolproof tbh, they even have interactive examples
MonZtaDeluxe: okay i see how i can check distance now with BFS - there's also a "frontier" and stuff - didn't consider that
MonZtaDeluxe: thanks
cegprakash: MonZtaDeluxe BFS = level order traversal.. suppose u start bfs from Point A and u reach Point B in 4th level then the distance between point A to point B is 4
MonZtaDeluxe: Yep i just have seen that - thank you!
MonZtaDeluxe: is already implemented
MattSOrme: hmm. got a weird one where i have a list of 3 positions, but when i iterate over it, only 2 are being picked up :/
MattSOrme: neighbours 3 ['6,3', '4,3', '5,2'] here 6,3 here 5,2
cegprakash: Is it possible to see throw an enemy pac?
Astrobytes: Check the ref cegprakash, it shouldn't be (logically) but check the ref anyway
muy31: honestly, i think they should have made the wood 2 boss better
muy31: so that bronxe wouldnt be so packed
cegprakash: disagree..
cegprakash: wood2 is all about moving all the pacs
cegprakash: it's a drastic change already
cegprakash: from wood1
muy31: really, i submitted my wood 1 code and immediately promoted to bronze
Flyingkid: that's good
muy31: i meant wood 1
Astrobytes: muy31 Bronze is just so packed since we have more participants than usual
Flyingkid: thats where the fun begins
muy31: they should make wood 1 boss better
Flyingkid: full rules are bronze league (mostly)
cegprakash: Astrobytes here is the code https://github.com/CodinGame/SpringChallenge2020/blob/d71009713f346163031ad2ad99198a0ef60f56a3/src/main/java/com/codingame/spring2020/Game.java#L959
cegprakash: but I can't understand it
cegprakash: it's so hacky
cegprakash: in problem statement it says "The line of sight of the pacs is blocked by the walls."
cegprakash: so I'm assuming it's not blocked by other pacmen
Astrobytes: Hmm, I'm a bit high off these pain meds but it looks like that yeah
AlexRSS: What is dfs that people keep talking about? I'm using manhattan distance at the moment and have seen people talking about dfs as what to replace that with
thethiny: "pain meds" ;)
Astrobytes: I'd have to read through it a bit more carefully tho, which I'm not really able to right now :/
thethiny: @AlexRSS basically instead of getting distance, you get the points you have to step on
thethiny: distance from 0,0 to 0, 4 is 4
Astrobytes: In fact, I'm gonna go watch a movie or something. Can't code. Gn all
thethiny: DFS from 0,0 to 0,4 is 0,0 0,1 0,2 0,3 0,4
Doju: night
AlexRSS: And doing that you can check along the way for issues like collisions or other pacs
thethiny: yes
thethiny: you give them a score
thethiny: and then you return the path with the highest score
tonowak: can someone help me with understanding how the movement resolution/collisions work?
muy31: shortest distance to your choice
muy31: first shortest distance
tonowak: like, how can cancelling create new collisions?
tonowak: and how to implement collision resolution?
muy31: if a pac is behind another
muy31: when the one in the front collides
Maliamnon: Silver! :)
thethiny: wd Maliamnon!
muy31: Crossing paths or landing on the same cell as another pac will cause a collision to occur. This is how collisions are resolved: http://chat.codingame.com/pastebin/a063cf43-866f-495e-b5d7-70728cfb3f2d
thethiny: 32bal 3ndi bs a3ref 5alle9
tonowak: ok muy31, I see. Yes, I know the rules, but that is not really clear to me how to implement those rules in my bot ;)
thethiny: you don't
thethiny: these are implemented
muy31: honestly, you dont need to worry about collisions too much, just avoid them w/ your own pacs
muy31: are you trying to use minamax or something
tonowak: yes, I'm writing a sim
muy31: i don't recommend cause timeout
tonowak: I still want to try ;)
muy31: euler tried to implement Monte Carlo and said it screwed everything up
tonowak: that's interesting. How it screwed up?
muy31: ask him, i dont know the details
NinjaDoggy: cuz euler bad :P
muy31: but if Monte didn't work minamax probably wouldnt either
tonowak: I'm not going for minimax, I'm also going for some form of specialized monte
NinjaDoggy: monte would work
NinjaDoggy: euler bad :P
muy31: well good luck ig but it is a lot of calculations don't you think>
tonowak: ok, so how would the pseudocode of movement resolution look like?
muy31: you want the rules or something
MonZtaDeluxe: actually i'm think about -> why no floodfill for distance? :/
tonowak: next_turn_pacs = pacs.move_all() if next_turn_pacs.pac[i].position == pacs.pac[j].position:
resolve_collision()
?
tonowak: though, that doesn't check if a cancelling can create another cancelling...
muy31: just recheck if the new x's and y's are duplicates of another
thethiny: the best thing about python is using the variable's name as a string
thethiny: 😍
muy31: pac's x's and y's
muy31: keep checking until no more duplicates are found
tonowak: of another older, yes?
muy31: yes
muy31: or of all
muy31: then if speed, once more for each speeding pac
tonowak: ok, so when I detect one collision, then I should order the pacs to just not move, and repeat while there is a collision, yes?
muy31: yes i believe that's right
tonowak: hmm but something about the order of collisions is wrong
tonowak: like, what if three pacs are trying to go into one cell?
muy31: is it possible to look at the chat from yesterday?
tonowak: I cancel two of them
muy31: they all bounce
muy31: back
OlgaVDB: hi guys, are anyone else's pacs moving slowly when debugging? I see blue ones moving with normal speed (with occasional boost) and mine look like they're "frozen"...
tonowak: alright, the pseudocode I gave doesn't include this :(
muy31: i had a replay once with some weird cool collisions, but i didnt save it anywhere
muy31: it would have been useful to you
tonowak: I'll ask for a pseudocode on discord
muy31: BenWo do you remember?
thethiny: guys don't u hate rush coding :D
AlexRSS: Just got into bronze. How is the line of sight thing actually implemented?
duckquackduck: if any pacman is using speed boost, and others are not, then it will look like some pacs are moving slowly @OlgaVDB
AlexRSS: My old code which is feeding commands for pellets out of the pacs line of sight doesn't crash immediately as expected, just after 30 turns or so
barbora: you can check the referee to see how the collisions are resolved
Caled: (
BenWo: sorry what muy31? been debugging
tonowak: barbora I checked and the code is not readable
MattSOrme: im debugging so much more than coding tonight, its upsetting
muy31: do you remember that one replay w/ the collisions that you explained
muy31: from yesterday or so
BenWo: ohhh
muy31: yeah it could be useful to tonowak
njaber: found it https://www.codingame.com/replay/461585269
BenWo: let me look at my history, was that a replay of your bot?
muy31: yeah
muy31: against kellthazar i think
njaber: It's the one I just sent
AlexRSS: Ahh wait figured it out I think
njaber: Wait
njaber: no
njaber: I thought it was this one
muy31: njaber no it has me in it
OlgaVDB: well, they move normally in the beginning and then after 10 moves or so visibly slow down
njaber: Wasn't this the one we were talking about yesterday?
AlexRSS: Am I right that if Pac 1 can see a pellet, then Pac 2 can have a command to navigate to that pellet?
tonowak: oh god, there is really a lot of weird collisions going on in this replay
njaber: You can have a command to move anywhere, even if you don't see there
MattSOrme: Been playing the same match over for the last hour+ :(
thethiny: my pac 3 went into sicko mode https://www.codingame.com/share-replay/462332080
njaber: I manage to deduce what I think are the collision rules Yesterday, if you have a question don't hesitate to ask
BenWo: found it > https://www.codingame.com/replay/460845826
BenWo: from frame 28
muy31: how did you find it anyway?
muy31: History?
BenWo: yeah just my browser history
tonowak: thanks for the replays! BenWo njaber
BenWo: I opened about 20 replays from around that time, lol
muy31: lol
tonowak: njaber yeah I'm trying to write a movement resolution, but I'm having a hard time understanding how to code the given rules
njaber: From my understanding the resolution goes in this order : http://chat.codingame.com/pastebin/9d46d643-121a-487c-80cf-3d2e22a124d3
njaber: What, why is the beginning of the message both in the message and the pastebin?
BenWo: makes it easier to read
njaber: I should correct myself on step 3
tonowak: "incopatible" in step 3, you mean any pacs on the same cell?
njaber: 3) If 2 OR more pacs ... move them all back
njaber: Only pacs of the same team or of the same type
njaber: all moving back from a single set 3 happens at once
BenWo: pacs can't occupy the same cell, except if one can eat the other
DollarAkshay: I think I might break topp 100 with just lazily changing heuristic numbers
DollarAkshay: XD \
DollarAkshay: :trophy: :100:
tonowak: I see. I think I understand. You wrote it in a really clear way, that should be in rules. Thanks njaber!
njaber: np
thethiny: @njaber yes that's exactly how I perceive the rules
AntiSquid: it's doable DollarAkshay
njaber: The part that isn't really clear in the rules are setp 2 and the fact that step 3 works even with 3 or more pacs (ex: 1 red scissors, 1 red rock, 1 blue rock)
Doju: Question:
njaber: I think what I wrote as step 2 is what's this is supposed to mean : "a pac can't cross the path of a stronger pac: it will be blocked"
BenWo: finally found my bug, had to do with the new "DEAD" type of course
Doju: i have a list of Pac instances. If i want to access a specific one by id
Doju: do i have to loop through the entire list and check its id and see if it matches or is there a smart way to do that?
DollarAkshay: Rank 107 :P Need a boost guys
BenWo: Doju - I put them in a dict just so I could find them easily
BenWo: pac_list[pac_id] = Pac(input())
Doju: BenWo that's what i had 10 minutes ago but i decided to instead make the dict have keys for my pacs and enemy pacs
Doju: and i dont wanna bother with stacking dicts
BenWo: i have one dict for my pacs, one for enemies
Doju: fair enough
Doju: but anyways your response sounded like there is no smart way to do it
Doju: so i'm just gonna do it the naive way
BenWo: I'm not exactly an arbiter of python knowledge, lol
njaber: Wait wat, the error output gets cropped after a certain number of turns? I have the the same number of lines each turn but after frame 98 of my game only the first few dozens of lines are printed (always the same amount for each turn after 98, that seems strange to me
DollarAkshay: I guess its based on number of characters then
DollarAkshay: One of your lines must have a lot of characters
njaber: The number of charaters doesn't chage between turns either
njaber: I print the map as charaters
njaber: so the number of charaters is always the same
DollarAkshay: Send the replay file
njaber: I don't think logs are shown in a replay are they?
BenWo: they are
DollarAkshay: I think they are
cegprakash: MCTS at what depth guys
cegprakash: :O
DollarAkshay: I tried running min-max for all my pacs. I was not able to go beyond depth 1 on python XD
Doju: lmao
njaber: https://www.codingame.com/replay/462344863
cegprakash: lmao
avdg: not sure if I will continue on my bot or not for now
avdg: this contest is just temporary and other stuff has more impact long term :p
cegprakash: njaber we can't see ur error streams. And yes there is a limit. I've faced this before
njaber: I can see the error stream when I watch the replay tho
njaber: and what's strange is the limit seems to change after a certain number of turns
cegprakash: avdg there are stuffs important than CG?
DollarAkshay: I just verified. The error stream shows up in replays
cegprakash: no njaber the limit is for each player.. not each turn
cegprakash: u can't DollarAkshay if it's someone else's replay
njaber: I meant per player per turn, but if you mean a limit for the whole game, my error output still continues to display, jsut less lines then before that point
cegprakash: anyone can decode my eval with what I print on error console.
cegprakash: :D
cegprakash: thanks that it's hidden
DollarAkshay: Can you see my logs in this repaly : https://www.codingame.com/replay/462346249
DollarAkshay: ?
njaber: They'd just need to remove error outputs from non-IDE matches
cegprakash: no DollarAkshay
njaber: Nope can't see
DollarAkshay: Oh nevermind
DollarAkshay: My bad
cegprakash: my win rate has went down to 42% as I parked my bot for a long time
cegprakash: lol
cegprakash: and it has played 386 games already
cegprakash: :D
cegprakash: I think ones in the middle of the ladder gets lot of matches
njaber: Basically I have : http://chat.codingame.com/pastebin/0e947c72-6e0c-42f6-8d21-937d0a83ad8d
Clagus: guys, is it possible to perform BFS for all possible cell pairs in the 500ms of the first turn?
Doju: Clagus eeasily
BobLaserShark: Yes
Clagus: damn... I think I need that
thethiny: guys when you say BFS for all pairs
njaber: Clagus I do it in 13ms
Clagus: O_o
thethiny: do you mean from my dest to pel, or from pel to pel
cegprakash: njaber lot of spoiler lolz
DollarAkshay: Whaat no i dont think its possible from all cells
njaber: cegprakash yeah I know, I do'nt really care XD
cegprakash: Clagus I do that in 1 ms
DollarAkshay: You wont have enough computation for other stuff
Doju: there was someone who did it in the order of microseconds
Clagus: ;_;
njaber: DollarAkshay not each turn, but at the start of the game
Doju: something ridiculous like 60 or something with some stupid fast optimizations
DollarAkshay: BPS from each cell ? :O
DollarAkshay: BFS*
Doju: yeah
DollarAkshay: Damn I should do that then
Clagus: it's like 90k pairs
avdg: cegprakash yes :p
avdg: did patched uglify (now terser in the past)
avdg: people liked that
avdg: *(now terser) in the past
avdg: though there is some work there too that I like to do
avdg: but it's for something else
DollarAkshay: 104 :P
cegprakash: 35x17x35x17=354025/1000000000 = 0.000354025
DollarAkshay: Need a boost guys :P
cegprakash: so mine runs in like 0.3 ms
cegprakash: which is < 1 ms
avdg: but for my ai, I probably have to rewrite my bfs logic, which is now implemented as 2 overlapping bfs and is slightly broken
Clagus: cegprakash but only for !wall
cegprakash: yes can be faster than 0.3
avdg: (aka can be tuned better, and some disconnect between different logics, like few pieces having their own life without coordinating)
DollarAkshay: Yes Rank 98 :D
BenWo: didn't expect this.... frame 55 https://www.codingame.com/replay/462353350
thethiny: Frame 55 https://youtu.be/iLBBRuVDOo4?t=10
cegprakash: thethiny more like : https://youtu.be/j9V78UbdzWI?t=81
thethiny: exactly
BenWo: LOL
WillNess: @Slyracoon23
cegprakash: njaber u track opponent positions?
njaber: Yes
thethiny: every step or sometimes?
njaber: Always
thethiny: and how accurate are you
njaber: been working on that for 3 days
thethiny: woah
thethiny: I only track big pellets
thethiny: if they're gone
thethiny: then
thethiny: https://www.youtube.com/watch?v=iLBBRuVDOo4&feature=youtu.be&t=18
cegprakash: lol
cegprakash: u don't have to track big pellets thethiny it's already given in input in every turn
thethiny: I track if they're gone I mean
njaber: I don't always know where he is but most of the times there is a pretty small range, I still need to integrate a few infos tho, like collisions with my pacs along a corner, eaten pacs, and pellets which were taken, I only take pellets which weren't taken into account rn, but all these should be pertty easy to add now that I have the core algorithm
cegprakash: with what I see in ur logs njaber I think it's not worthy to implement it lolz
thethiny: For me I think tracking enemies is not worth it
thethiny: if enemy distance is < 2 then I either run away or eat it
njaber: I know what I want to do with it, and I know it's worth for what I want to use it for, not gonna spoil that tho
thethiny: okay then
thethiny: good luck :D
cegprakash: wow
Clagus: I wish there would be option to see the battle with fog of war enabled
njaber: Yes
Kellthazar: I always check the path between the last and current enemy as "explored"
DollarAkshay: Prett cool option
njaber: Kellthazar all possible paths? or just shortest path?
Clagus: ^
Kellthazar: The shortest one...
thethiny: if all paths then all grid
thethiny: lol
Clagus: I guess that could work for higher leagues :D
Doju: what do you mean by last and current enemy?
njaber: Not always accurate then, I'm tryign to get it as accurate as I can with the given info
Clagus: las and current position of bot with id I would assume
Kellthazar: last and current position of an enemy I mean
thethiny: I'm sure you track frame 1 correctly though ;)
njaber: I'm happy with its speed for now, but I think there are a few optimizations I could do still
Doju: waaaaaiiiitt
cegprakash: omg big spoiler Kellthazar but thanks and it's risky
Doju: you can see their id!?
thethiny: yes
njaber: Yes
Doju: oh that's a smart play
Doju: and it's a pretty valid one
Clagus: if you can see them :D
njaber: My algorithm would never work if I didn't see ids
Doju: huh, that's interesting
Doju: also i need to go to bed
cegprakash: I just want to see njaber wreck eulerscheZahl's bot
Doju: an hour ago i was ike
Doju: like:
Clagus: 1 question, so you guys say its viable to do Dijkstra at the start of the game
Doju: "I'll just implement this adaptive pathfinding real quick before bed"
cegprakash: no Clagus
cegprakash: BFS
Clagus: to get all distances between all pairs?
cegprakash: yes Clagus
thethiny: why, can someone please explain
thethiny: I still haven't found a use for it
Doju: then i stumbled on a million bug and a few function rewrites and here we are an hour later with no real improvements
Clagus: isn't Dijkstra an example of BFS? :P
cegprakash: u can do that with bfs in 0.0003 secs
Doju: million bugs*
cegprakash: yes dijkstra = BFS + heap
DollarAkshay: BFS is a special case for Diskstra
cegprakash: in BFS u don't need a heap
DollarAkshay: Where all edges have equal weight
Clagus: oh ok
Clagus: oh right right
njaber: cegprakash it may happen once I implement the actual move descision algorithm, I got a neat idea in mind
cegprakash: :D
cegprakash: looking forward for ur implementation
cegprakash: and seeing the replay
cegprakash: so that I can counter it
cegprakash: if not at least steal it
cegprakash: :D
Kellthazar: Yeah, but, it's risky, but I think is helpful for my heuristc. :D
Doju: or actually i did improve something: added recognizing the enemies, but that's it
Doju: anyways cya everybody
Kellthazar: One thing I added now...
thethiny: I added 2 with 2 and I got 4
Kellthazar: "real" distance to a cell
cegprakash: lol finally
Kellthazar: considering the pac velocity
njaber: cegprakash I doubt it's gonna be easy to reverse engineer without any hint so countering/stealing would probably be pretty hard. I think my algorithm will look very AI like and it will be hard to udnerstand what the descisions behind it actually entail
cegprakash: someone asked if there are ppl in SIlver using manhattan
njaber: Tho I don't plan on doing any AI
cegprakash: but u actually did exist
cegprakash: :D
Kellthazar: My last submit drop my rank a lot... lol
thethiny: why would manhattan be bad
Kellthazar: Still calculating though...
cegprakash: thethiny because there can be walls in between
cegprakash: so mahattan is not the real walkable distance
thethiny: I understand
thethiny: but if you only move by 1
thethiny: then manhattan would suffice
thethiny: because if there's a wall
MonZtaDeluxe: actually i'm thinking about scraping my bot and switching to sim
thethiny: manhattan would give 2
thethiny: not 1
cegprakash: u have to use some distance
cegprakash: wait what
MSmits: manhattan targeting is better than targeting a random pellet
cegprakash: manhattan will give 2 when there is a wall? it should give Infinity
MSmits: bfs targeting is better than manhattan targeting
Clagus: manhattan got me to bronze but not much further :P
MSmits: cooperative search between pacs is better than bfd targeting
MSmits: bfs that is
thethiny: @cegprakash it would give 2 if a wall is between you and the pellet
cegprakash: which is wrong
cegprakash: A#B
cegprakash: should not return 2
cegprakash: it should return INF
MSmits: of course it should, it's manhattan distance :)
MSmits: not real travelled distance
MSmits: 2 is correct
cegprakash: okay but it's wrong
cegprakash: we need real distance
MSmits: it's not the real distance, but its not wrong
thethiny: I'm not saying it's right, I'm saying it's correct
thethiny: 2 is correct but not right
njaber: And I'm here saying it's left
Cappefra: it's a right implementation of the manhattan distance, it's a wrong representation of reality
MSmits: it's a great way to get out of wood is what i tis
Cappefra: you're just saying the same thing with different words :D
Cappefra: yeah exactly
MSmits: I used BFS to get out of wood
njaber: agreed
MSmits: but I did not need to have done that
Kellthazar: Cooperative search...
cegprakash: not sure what I should write. I don't know who is right and what is correct I'll be right back
Cappefra: Same
MSmits: yes Kellthazar, consider all your pacs at once instead of letting each pac do his own thing
Cappefra: btw MSmits I just changed my entire AI's brain to try and implement my first ever Monte Carlo
Kellthazar: Really nice approach...
MSmits: thats great
MSmits: this is also the first time i am doing this MC thing
Kellthazar: Time to do a big refactor I guess...
thethiny: I scrapped my bot entirely now let's start from scratch
Cappefra: any tips? It's still a bit stupid and I can't really do many iterations before timeout
MSmits: how many
thethiny: 1 too many
Cappefra: I'm doing it cooperatively, meaning it's one monte carlo for all pacs and not one for each
MSmits: yes
njaber: A simple cooperative search is assigning each pellet to the closest pac, and then each pac chooses the closes from the list of peallets given to it
MSmits: but how many iterations do you get and how deep do you get on each iteration
Cappefra: and I can make around 50 cycles of depth 5 (so distance 10 if with speed)
MSmits: 50 is not good
Cappefra: without considering enemies
MSmits: is this in 50 ms?
Cappefra: yeah
MSmits: I get between 30-100k
MSmits: depending on the map
Cappefra: wait
Kellthazar: Anyone tried a neural network training + GA solution, on its not case?
Cappefra: wot
gh2oost: Does anyone know why c# stopwatch can incorrectly measure?
Cappefra: 100k?
MSmits: to deph 8 also
Cappefra: wtf
MSmits: yes, on a simple map
Neon_Tuts: hi
MSmits: c++ helps, but thats only a factor of 3-5
Cappefra: ok wtf am I doing wrong lol
MSmits: so you're doign something wrong indeed
MSmits: there's many things it can be
Cappefra: yeah that's a 10^3 factor
MSmits: a thing that helped me a lot is not creating lists of neighbors
MSmits: during the simulation
MSmits: I already have the lists for each cell
MSmits: and i just loop over them
Hjax: i get like 25k iterations at depth 8 with 2 pacs, less with more pacs
Cappefra: yeah not a bad idea, I can use the 1000 ms for that
Hjax: and yeah i precompute neighbors
Cappefra: are you guys doing it recursively though?
Cappefra: recursion might slow me down
MSmits: why would we?
Hjax: no? why would you do that
MSmits: the whole idea about monte carlo is that you pick random moves
MSmits: no need to use recursion for it
MSmits: in fact, i was going to do beamsearch first and it was too complicated. Mostly because it included recursion
Cappefra: Ok the way I implemented this idea was calling this randomization function recursively on the new chosen position
Kellthazar: So everyone in high rank is using Monte Carlo?
Hjax: no
MSmits: no idea
MSmits: some are
Hjax: my current bot (rank 110) isnt, my monte carlo bot isnt uploaded yet, nor is it finished
MSmits: euler said he started with it and then stopped, which is weird since he always does MC when I don't
Hjax: although i may replace monte carlo with a different search soon
Cappefra: Ok I'll have to think about this and change it tomorrow evening
Hjax: monte carlo was just the quickest search to write
MSmits: I'm definitely not replacing it
Cappefra: I have to wake up in 6 hours
MSmits: I like it a lot
MSmits: it's easy to modify and fast
MSmits: i have a bunch of low hanging fruit to do instead... like Hjax killing me
MonZtaDeluxe: https://www.codingame.com/share-replay/462375570 lel wtf "hey guys may i join you? :D:D"
Hjax: lol
Cappefra: btw I'm doing hungarian algorithm for the first assignment pacs -> superpellet
Cappefra: if anyone wants to try that
Hjax: dont lose to my silly heuristic bot
cegprakash: what depth do ppl usually do in UTTT using MCTS MSmits
MSmits: cegprakash the idea about mcts is that depth is variable. Different branches of the tree go to different depth
MSmits: some branches will be 5 deep when others are 20
cegprakash: why not maxflow Cappefra
thethiny: I haven't won a single battle for days now, therefore I can't submit a new bot
thethiny: I wanna sleep 😭
cegprakash: whats the deepest you'll go and how do u decide depth if the game doesn't ends MSmits
DollarAkshay: I used MCTS for UTT
Alshock: The quantit we use to assess mcts efficiency is more the number of rollouts than the depth of the tree
DollarAkshay: I can tell you . One sec
reCurse: It's also a terrible metric and should stop being used
MSmits: cegprakash you dont decide depth, it just increases until the game is solved or the calculation time is up
MSmits: its impossible to give you a depth really
Alshock: @reCurse If there's a much better one I want it
cegprakash: do we do it like a BFS until timeout?
cegprakash: because dfs can timeout on some stupid path
MSmits: ow come on dont ping re curse just after someone brings up uttt
MSmits: thats just cruel
reCurse: I started
Alshock: wut? I was answering
MSmits: oh ok, sorry missed that, tired
MSmits: 1 am here, needz my sleep
Alshock: same ^^
MSmits: Alshock about measuring rollouts, it works as a metric when everyone is more or less doing the same thing
DollarAkshay: I was
MSmits: but when people are modifying their search in all sorts of creative ways, it loses meaning
Alshock: I must be too stupid to find creative ways to tweak a mcts
MSmits: they are game specific mostly
cegprakash: MonZtaDeluxe https://www.youtube.com/watch?v=j9V78UbdzWI&feature=youtu.be&t=81
Alshock: well your multiple agents is an example I guess?
DollarAkshay: I am exploring about 135k Nodes on Turn 2 in MCTS ( 100 ms)
MSmits: for example, in some games its a good idea to do a simulation from each child in a single rollout
MSmits: that makes rollouts a lot more expensive
cegprakash: DollarAkshay is it a BFS?
sunksuperset370: hello
sunksuperset370: again
Alshock: I don't agree, that makes N rollouts for just 1 selection
sunksuperset370: cegprakash
DollarAkshay: No no its not a bfs
Alshock: You can't count that as just 1
DollarAkshay: You search which ever node has the best cost
sunksuperset370: its me again
MSmits: if you count it as multiple, then your rollouts get cheaper
cegprakash: then u might timeout on some stupid path and waste a lot of time
MSmits: because selection is expensive
sunksuperset370: so had a big queston
MSmits: and you're doing it only once
MSmits: for maybe 10 rollouts
sunksuperset370: what to we get if we win the contest
cegprakash: after every 10 nodes u see if this is a okay path
DollarAkshay: WOW MSmits is rank #1 on UTT :O
Alshock: Oh so that's not just my selection that's no good, its cost is not supposed to always be neglectible?
DollarAkshay: Nice
sunksuperset370: h bhai
sunksuperset370: he bhai
Alshock: yeah I'm a real noob for that kind of algorithms sry x)
sunksuperset370: what do we get if we win the contest
MSmits: thanks yeah, for about a month or twonow. I dont think anyone resubmitted though
DollarAkshay: @sunksuperset370 Samsung Monitor
sunksuperset370: wait really
DollarAkshay: Yes
sunksuperset370: are you sure
lifetimeLearner007: what is UTT by the way?
sunksuperset370: yourn't not playing with me
Alshock: ultimate tic tac toe
cegprakash: it's UTTT not UTT
DollarAkshay: Curved LED Monitor
sunksuperset370: oooooook
MSmits: yes, without the Toe you can't win
njaber: sunksuperset370 https://www.codingame.com/contests/spring-challenge-2020 bottom of the page
sunksuperset370: thannnkksss
DollarAkshay: No T-shirts this time ?
sunksuperset370: thanks
MSmits: DollarAkshay I think there will be
Alshock: @DollarAkshay i think you can ask them to keep the screen and send you a T-shirt instead
cegprakash: lot of goodies promised DollarAkshay
MSmits: it's pretty standard
cegprakash: for country and school rankings
MSmits: company i think
MSmits: not country
cegprakash: top 100 companies will get goodies right?
DollarAkshay: They used to give T-Shirts for top 10 before
MSmits: doubt that it will be top 100
Alshock: top 1000 players get curved screens right? :P
DollarAkshay: Dude Top 100 is waaaay too many companies
MSmits: anyway, I gotta get some sleep, hf :)
cegprakash: but lets just say they give goodies for all top 100 so that it reaches codingames' ears :D
Alshock: GN
cegprakash: but I've to get into top 100 for that first
cegprakash: (╯°□°)╯︵ ┻━┻
DollarAkshay: Imagine if I created a company and invited all the top players
njaber: gn
DollarAkshay: XD
DollarAkshay: Easy goodies
cegprakash: DollarAkshay that would be illegal
cegprakash: and disqualification
Alshock: unless you actually hire them?
cegprakash: why is astronomia playing for the past 1 hour on my headphones
DollarAkshay: Sure ill hire them Salary : % of profit Profit = 0$ XD
BenWo: lol
BenWo: lucrative
DollarAkshay: Expected Work hours = 0
njaber: cegprakash you too XD?
DollarAkshay: Probably opened taht link someone sent i chat
njaber: yup
njaber: I wasn't listening to the coconut song before that so honestly it's an upgrade XD
njaber: was *
mrawson: quite surprised - got thru first 2 rounds simply targetting close pellets.reckon that's going to get harder!
DollarAkshay: I added emoji's to my Output Message based on the score difference :P
Alshock: You're a genius, why did google not contact you yet
cegprakash: nice feature DollarAkshay
DollarAkshay: XD
cegprakash: why is ur name prefix Dollar? u earn in Dollars?
cegprakash: I thought u earn in Rupees
thethiny: RaCiSt
DollarAkshay: LMAO IDK its just an old user name
DollarAkshay: Just stuck with it
cegprakash: DollarAkshay: https://www.codingame.com/share-replay/462385965
cegprakash: I missed to see ur sad smiley
cegprakash: when I rekt u at the end
DollarAkshay: haha
sunksuperset370: how do we split arrays from a variable that is declared to extract information from loops
cegprakash: share the ascii value for DollarAkshay will be useful for my bot
cegprakash: for those smileys
DollarAkshay: if enemyScore == 0 or selfScore > 1.4 * enemyScore: http://chat.codingame.com/pastebin/9af2e08c-25ca-4b30-ac49-26d8f252875c
DollarAkshay: if enemyScore == 0 or selfScore > 1.4 * enemyScore: http://chat.codingame.com/pastebin/528cedeb-c387-4875-861e-a2841102150a
cegprakash: use diff >= 3 diff <=3
DollarAkshay: Ehh this copy paste is bugged
cegprakash: should work better DollarAkshay
Alshock: @sunksuperset370 which language ?
sunksuperset370: javascript
Alshock: well string.split(separator) ? Unless I misunderstood the question
cegprakash: use -_- only when scores are equal
sunksuperset370: alshock
Alshock: sunksuperset370
sunksuperset370: can we talk in private
sunksuperset370: like you /join my name
Alshock: now that sounds hot
sunksuperset370: no
sunksuperset370: not that
DollarAkshay: Sliding into DM's
sunksuperset370: tyep
sunksuperset370: just type /join sunksuperset370
DollarAkshay: Any interesting replays ?
Maverun: wtf it mean when it said 5526 alone for Temperatures puzzle?
DollarAkshay: @Maverun Sorry I dont understand what you are trying to say
DollarAkshay: Which testcase are you failing ?
Kathrin: sounds like a test case with only one value, namely 5526
Maverun: http://chat.codingame.com/pastebin/6401a7b6-08cc-4b46-9ff2-dcf1f5dade3e
DollarAkshay: @Maverun try this test case 1 5526
DollarAkshay: Answer should be 5526
cegprakash: this website gives live world population numbers lol : https://populationmatters.org/the-facts/the-numbers?gclid=CjwKCAjwkun1BRAIEiwA2mJRWelUZ62h_AixoEAUlQeIz17PB5fhD7feeRLoq0BuSfbiZdFRBNUHGRoCuTIQAvD_BwE
cegprakash: may be Thanos was right
Maverun: how do i create test case?
DollarAkshay: Choose Custop
DollarAkshay: Custom*
DollarAkshay: Found it ?
Maverun: ah I am supposed to be in expert mode for custom gotcha
cegprakash: http://chat.codingame.com/pastebin/2cd00b50-5baa-4138-88cb-69013e4398a1
cegprakash: ^ For you Maverun
Maverun: what.. is that?
DollarAkshay: LOL cegprakash XD hes not even asking about Spring Challenge
Maverun: ah i see, I see my prob, Thanks...
DollarAkshay: No Problem
cegprakash: oh no I gave away my simulation testcases
AntiSquid: now you misguided him so he won't get out of bronze
Alshock: good job
cegprakash: somebody said unittests and I wanted to brag
cegprakash: because I spent time to build testcases
cegprakash: :D
AntiSquid: i test if 0 == 0 too
Alshock: 'member kids, to test is to doubt
Kathrin: You see me impressed, that you write tests for the simu. I skip that professional but boring attitude for more surprising bugs
Alshock: Idk how orwell phrased it, infinitive or ing?
Alshock: @Kathrin then our codes never fail to surprise, that's the real chill of programming xD
DollarAkshay: MSmits your bot beats me by a huge margin. I always end up chasing your stupid pacs.
DollarAkshay: https://www.codingame.com/share-replay/462394178
DollarAkshay: The rage emoji only comes when I face you as an opponent
DollarAkshay: XD
cegprakash: wait u chase pacs :O now u gave away what u do with ur tracking lol
AntiSquid: he is offline
Alshock: never chase unless some heuristic or simu told you that it's a good idea in this specific case
Alshock: he went to bed about 15 minutes ago
DollarAkshay: Yeah I have a score for killing an enemy pacman.
DollarAkshay: Should probably not bother with enemies that have speed ability on them
AntiSquid: his "stupid pacs", do you think msmits will let you get away with bad mouthing his pacs ? DollarAkshay
Alshock: those emojis tho
Alshock: the best invention ever
DollarAkshay: TY. I would like my Samsung Curved LED monitor now
AntiSquid: replace the emojis with your avatar
cegprakash: I have bookmarked DollarAkshay's smiley code
cegprakash: will add that feature later
Alshock: You only need three sheets of papers with emojis and I can trick you into thinking that your whole wall is a flat screen
AntiSquid: uhm is there a list of emojis i can pick from?
AntiSquid: not sure what's available
njaber: all Unicodes I guess
DollarAkshay: https://www.emojicopy.com/
AntiSquid: https://getemoji.com/ ?
AntiSquid: ok thx
DollarAkshay: Yeah both are good
njaber: The coffin emoji for when you kill a pac tho
AntiSquid: alright i got a really annoying idea for emojis
sunksuperset370: how does the time out work
sunksuperset370: this is confusing
njaber: timeout happens when your code has a crash, or when it doesn't output it's moves in 50ms
AlluringChair: does anybody know if pacs can see through the teleports? It only says that they have visioin in straight line, so i'm assuming they can
njaber: they can
AlluringChair: thanks
AntiSquid: not all emojis work for me
njaber: Tell me the coffin works : (
DollarAkshay: Make sure you save your file as UTF-8
BenjaminUrquhart: just don't use non-ascii chars /s
AntiSquid: well i wanted to output like 5 and rotate them, but i guess i don't shift the string properly https://www.codingame.com/share-replay/462410190
AntiSquid: maybe i will add them into an array, shift the array every round and join it when i output
AntiSquid: this is more important than the contest afterall
njaber: yeah, seems like some of the emojis aren't supported by whichever font CG is using
ShlOk: hi
berries: anybody have any reccomendations for videos or websites i could use to better understand heuristics and bfs
cegprakash: after a great performance optimisation I get same no. of sims
cegprakash: or lesser
cegprakash: wuuut
pmor: you didn't optimize the critical path
cegprakash: critical path?
sunksuperset370: anybody know how to do things in the wood 1 league
pmor: critical path is the codepath that takes the most time
cegprakash: okay all my current sims are valid sims
cegprakash: that makes sense actually
cegprakash: or not
cegprakash: may be what u said
pmor: are you able to identify functions are taking the most time
cegprakash: I didn't measure each action :D
cegprakash: but I'm optimizing collision now
pmor: msvc has a decent profiler
cegprakash: I use visual studio code
cegprakash: u mean that?
thethiny: yes
cegprakash: how do I use it
pmor: visual studio 2019
pmor: not sure if code has one
thethiny: https://docs.microsoft.com/en-us/visualstudio/profiling/?view=vs-2019
pmor: also, which language are you using?
cegprakash: I am using microsoft VS 2017
cegprakash: c++
pmor: 2017 has it too
pmor: its under Debug->Performance Profiler
pmor: Though theres little reason not to use vs2019
thethiny: guys how do you pick what pellet to go to next?
thethiny: I know you're picking the clsoest one
thethiny: but if you're doing BFS you need an endpoint
thethiny: what's the endpoint?
pmor: Before I rewrote my bot for bronze, I just chose the closest pellet with the highest value.
thethiny: and then?
thethiny: currently this isn't satisfactory for me as I have tons of disconnected paths
pmor: that was it. it got me through the wood leagues
Durkin: MInes just adding up the total points (or 1/2 credit for non-confirmed points) on a path to a square, and dividing by distance
Durkin: choose from top given that
thethiny: thanks
Kellthazar: Im changing my strategy... After all the big pellets gone, Im using the pellets only for control if the cell was explored or not.
cegprakash: how do I clear the profiler results before the breakpoint
Kellthazar: Im tuning my heuristc to prioritize unexplored areas or paths.
thethiny: I'm doing this now
pmor: that's not how to profile....
thethiny: and I got from 196 to 925
pmor: don't use breakpoints, run in release
pmor: do the Cpu Usage profiler
pmor: you want the profiler to collect as many datapoints as it can on its run
pmor: if you sit at a breakpoint, it will get a lot of datapoints AT that breakpoint
pmor: Best to have a loop of your code that runs for like 5-10 seconds
pmor: That should show you your hot paths. And then you can start diving down into the callstack to see what lines of code are taking the most time.
cegprakash: I made profiler work
cegprakash: it found the place where I spend too much time
pmor: Next step is to figure out why and fix it :)
cegprakash: https://ibb.co/Sr6jdBG
cegprakash: looks like my eval is too slow
pmor: you can click into that function and msvc will show you which lines were hit the most
cegprakash: how
cegprakash: I don't see anything like that
pmor: in the function name column, to the right theres a little arrow with lines of code
pmor: click on that
cegprakash: I can't find it
cegprakash: I'm happy with function level
pmor: https://ibb.co/cwj4JDz
cegprakash: thethiny u don't need an endpoint
cegprakash: just BFS to all pellets
cegprakash: and store difference to all pellets
cegprakash: and choose the pellet with minimum of these distances
cegprakash: u run BFS to find the pellet not otherway around
pmor: for wood league I didn't even do that...I would just iterate over all the pellets and get their manhattan distance
thethiny: @cegprakash I really don't understand it
pmor: bronze i'm having to do bfs though
thethiny: I tried to but I fail
cegprakash: thethiny say u start BFS from ur current pacman position
cegprakash: lets call this point A
thethiny: sure
cegprakash: u run a BFS until queue becomes empty
thethiny: how do I run BFS without endpoint?
cegprakash: now u have distance from ur pacman to every position in the map
cegprakash: u don't need an end point for BFS
cegprakash: u only need the root
cegprakash: just like a DFS
thethiny: so I just need to visit the adjacent cells?
thethiny: no endpoint?
cegprakash: yes
cegprakash: just visit all adjancent cells until u visit all cells
thethiny: okay makes sense
thethiny: then okay I get the distances to all pellets
cegprakash: and never visit a cell more than once
cegprakash: yes
thethiny: don;t I have to do this every turn?
cegprakash: no
thethiny: why not?
thethiny: my position changes
cegprakash: u can precompute this at turn 1
cegprakash: u can have something like dist[x1][y1][x2][y2] on turn 1
thethiny: okay and then I just go to the shortest distance from point A at turn 1, right?
cegprakash: and this distance array never is going to change through the game
cegprakash: no matter where the pacman is
thethiny: I lost track
cegprakash: see
thethiny: after I finished the BFS, now I have an array of all distances
thethiny: what's next?
cegprakash: once u get the board
cegprakash: http://chat.codingame.com/pastebin/f8ae27e9-779a-458c-8ec7-3b4afa54c07a
cegprakash: something like this
thethiny: okay?
cegprakash: now u can compute distance from every point to every other point
cegprakash: u don't need any pacman position here
thethiny: ahaaa
cegprakash: u can store these distances in a 4D array
thethiny: and since I've done this
thethiny: all I need is to index it by where I am rn
cegprakash: yes
thethiny: since I have this info already
cegprakash: refer this
cegprakash: that's all
cegprakash: makes sense?
thethiny: does that mean I have to do BFS from every point?
cegprakash: yes
cegprakash: that's right
thethiny: I thought that would be computationally expensive
cegprakash: that still runs in 0.0003 seconds
thethiny: wuttt
cegprakash: yes
cegprakash: u can measure it
pmor: it is, but first turn you're given 1s
cegprakash: if u don't believe me
thethiny: this is a huge game changer then
cegprakash: it is
thethiny: there's still 1 issue though
cegprakash: collisions?
thethiny: I will send you a replay if you don't mind
cegprakash: send
thethiny: frames 26 + https://www.codingame.com/share-replay/462442970
MattP34: has anyone had issues with timing out with python on an input line?
MattP34: mine is timing out getting the info for the last pellet
cegprakash: thethiny pellets are not on ur vision?
pmor: I'm out - @cegprakash - good luck on turbocharging your scoring function
cegprakash: sure pmor thanks gn
thethiny: it is trying to go to the closest pellet then once it moves it changes its mind
thethiny: because the closest pellet changes
MattP34: for i in range(visible_pellet_count):
x, y, value = [int(j) for j in input().split()] print(i,file=sys.stderr) nodes[x][y].value = value
thethiny: nodex[y][x].value
cegprakash: thethiny u are using manhattan that's why it's not working
thethiny: not [x][y]
cegprakash: with BFS distance this will be fixed
cegprakash: closest pellet will be always the one u are moving towards
cegprakash: so don't worry
thethiny: okay
thethiny: I will try that
thethiny: thank you very much
MattP34: the issue I get is the console only print i to visible_pellet_count - 2
MattP34: so if there are 9 pellets it only does the print statement 8 times
MattP34: and it happens on random moves not every time
cegprakash: MattP34 click reset code
cegprakash: and try with default code
cegprakash: it should work fine
cegprakash: and then fix slowly from there MattP34
sunksuperset370: console.log(Hello World);
sunksuperset370: lol
sunksuperset370: this is how you say hello world in javascript
SurajMishra2209: reset -_-
SurajMishra2209: rank 746
Ikhadem: how do you show decision above the pac heads in that animation frame?
berries: are they coding the boss bots to make them better
berries: cuz it seems like its getting harder to beat it
kdhakal: how do i change the direction?
kdhakal: i know about " " and "#" but how do I check them?
Kellthazar: Change direction?
Kellthazar: Of the pac?
Kellthazar: Ikhadem any string appended to the command will be displayed
Kellthazar: SPEE 1 <MSG>
Kellthazar: MOVE 1 13 2 <MSG>
Kellthazar: etc...
kdhakal: Kellthazar yes of the pac. how do I check for walls?
Kellthazar: kdhakal, hmmm... you can ignore them
Kellthazar: I mean, the pacs only see the "walkable" cells...
Kellthazar: If you tell it to go to a point, the game engine will take care of the movement for you.
kdhakal: my pac is stopping in the corner:disappointed:
Ikhadem: thanks
Kellthazar: Well, in this case, you can check if the pac is in the same place for more than one turn.
Kellthazar: and tell him to try to go to another direction
kdhakal: could you explain that in code plz
Kellthazar: your pacman could be an object, and have two properties: currentPosition, lastPosition
Kellthazar: even the currentDirection that he'is going
Kellthazar: if currentPosition == lastPosition
Kellthazar: try another direction
kdhakal: thanks I'll try that
Kellthazar: But this is not the best approach to take this problem... :)
Kellthazar: you receive the grid layout on the begining...
SamuelTheBad: the best approach to the problem is to avoid it happening :wink:
SamuelTheBad: i say in agreement, having still not implemented any proper pathfinding myself
Pranab: help any1. how to find if a pac is dead?
SamuelTheBad: assuming you're in bronze, you'll have to use the fact you don't receive an input line for a dead pac
Pranab: okay thanks
Dav1dS: wow! I added some basic collision detection and avoidance and my rank jumped 200 points
thethiny: is there a way to hide the IDE?
AlexArb: (about the "get a better job" form)¿in which country is OK to ask for a Minimum annual salary of over 20k USD? Mine is 2.7k and can't complain lol