Chat:World/2020-05-09
thethiny: lol
BenjaminUrquhart: I can't without knowing what you need help with
thethiny: lol x2
BenjaminUrquhart: so technically, no I can't atm
BenjaminUrquhart: clearly
thethiny: what do you need help with?
thethiny: oh
my_genjutsu: i ned notch apple
thethiny: damn
ZarthaxX: he is just a troll thethiny
ZarthaxX: leave him
BenjaminUrquhart: https://i.pinimg.com/originals/de/c2/90/dec2907a04bdc0e5ddfe3ae001a310e3.png
eulerscheZahl: others websites got creative with troll handling. like only users who are themselves trolls can see a troll
eulerscheZahl: and the troll doesn't even know that he was flagged
BenjaminUrquhart: I can't tell if this is reverse psychology or not
TheAtomicStopwatch_c7ec: he's a troll
thethiny: can we take a moment to appreciate the graphics of the game
BenjaminUrquhart: moments has passed, carry on
BenjaminUrquhart: moment*
my_genjutsu: oh no a website that i barely visit is going to separate me with other "trolls"
thethiny: Guys what good debug things I can show on top of the pac?
thethiny: What are some useful messages?
BenjaminUrquhart: whatever you want
thethiny: I know but I mean what should I put
thethiny: currently it's visible pellet count
TheAtomicStopwatch_c7ec: jack stop spamming the chat with pleas of help
thethiny: maybe heading direction? Total pellets towards direction?
BenjaminUrquhart: I put destination and how much time elapsed between start and that pac's processing
thethiny: okay, thanks
thethiny: https://www.codingame.com/share-replay/459261393
thethiny: check this behavior at 41-50
thethiny: a paper that can't eat a rock
BenjaminUrquhart: struct already found that
thethiny: oh okay
thethiny: I saw this in the rules but never saw it in action
RubenFilipe: u won tho
BenjaminUrquhart: btw we're at 1997 bronze players
BenjaminUrquhart: RubenFilipe is him versus himself
BenjaminUrquhart: he better win
RubenFilipe: I noticed xD
RubenFilipe: A tie would be fairer tho
Ken_Fool: omg the sun is out
Ken_Fool: gn8
BenjaminUrquhart: :wave:
Ken_Fool: gl
LelouchVC2: gn
RubenFilipe: gn
Neabfi: is it a bug the fact that the paper can’t eat the rock ?
dbdr: it can. did it collide with something else maybe?
aCat: welcome again chat ;-)
dbdr: for those who don't know: if the chat is dead, try discourse
eulerscheZahl: *discord
eulerscheZahl: 2 typos in 1 word
dbdr: :trophy:
dbdr: what's the second typo?
dbdr: I guess it's time to parse that type_id parameter :)
LelouchVC2: Fucks sakes, my code keeps giving order to dead pacs
LelouchVC2: It shouldn't be, I only use the pacIds it gives me :((
dbdr: one easy mistake is to confuse the pcaid with the rank of the pac in your list of pacs
LelouchVC2: What's that?
LelouchVC2: All I have is an if statement, if "mine" is true, then it saves the Id given
LelouchVC2: And those Ids are updated every turn, so idk why it's spitting out dead pac numbers :/
LelouchVC2: Other than that bug my pacs are ripping faces off opponents
dbdr: my mistake was to save those live pacs in a vector, then assume the id of the pac is the same as the rank inside the vector
LelouchVC2: What rank?? Where do you get that?
JohnCM: maybe you should store the pacid in a struct datatype together with the rest of the pac parameters? that way won't get mixed up?
LelouchVC2: That's where it is
JohnCM: haha i'm just saying, haven't seen your code so I don't know what the problem might be
LelouchVC2: Sitting comfy in a vector of a class
JohnCM: then print the pacid when it is assigned, and when it is printed in the statement
JohnCM: maybe there is an overwrite somewhere due to misreferencing
JohnCM: or when you copy the id over, you may not have copied the data, but rather copied the pointer instead
LelouchVC2: The variable is only accessed 3 times, once to assign, twice to output.
LelouchVC2: There's no pointerrs in my code :((
JohnCM: hmm.. does it give orders to only X number of pacs, where X is the number of surviving pacs
LelouchVC2: The Ids are initalized to -1, so the if statement is definitely going off, and the Ids are being assigned
JohnCM: means.. is the length of the orders correct
JohnCM: like "MOVE 0 12 1|MOVE 1 23 2" for surviving pacs 0 and 1
LelouchVC2: The length of the vector is 5 for the max number of pacs. But the loop variable is one that starts as 0 and is incremented everytime the if statment goes off
LelouchVC2: If statement goes off if bool mine is true
JohnCM: then you may not have saved the right pacid
JohnCM: you may have saved your loop index instead
LelouchVC2: cin >> pacId
LelouchVC2: pac[myPacs-1].id = pacId
LelouchVC2: Haven't been saving the index :/
JohnCM: anyhow just make sure your input pacId is the same as your output pacId. you can do a sanity check by just input and output the pacId without the rest of your code
LelouchVC2: I've wanted to, the shitty thing about this bug is I need to wait for a pac to die before I can see where the issue is
JohnCM: pac[myPacs-1].id = pacId
JohnCM: if you save this like that... how do you reference it?
JohnCM: i assume myPacs is your loop index
LelouchVC2: In the loop governed by "visiblePacCount" i have an if statement checking for "mine" to be true
LelouchVC2: Everytime it's true, myPacs++
LelouchVC2: So it keeps track of how many pacs are accounted for
JohnCM: i see.. then when you reference it you loop from 0 to myPacs -1 right?
LelouchVC2: Exactly
LelouchVC2: And it outputs all the pacs even if they're dead
LelouchVC2: It deffinitely resets to 0 every loop
LelouchVC2: every game loop*
JohnCM: haha your code sounds right
JohnCM: but i have a simple solution to your problem
JohnCM: add a list "alivepacs"
JohnCM: append the pacId of the alivepacs into that list
JohnCM: when it comes to output time
JohnCM: skip whatever pacId not in that list
JohnCM: you'll use one more array, but at least it makes sure you don't output anything you shouldn't
LelouchVC2: I was about to do that, but I'd end up using the same conditions that are somehow failing now
JohnCM: not true..
JohnCM: you can print out the list "alivepacs" during debugging and see where your code goes wrong
JohnCM: both at the input section and output section
JohnCM: it's better than just using myPacs as the index, harder to debug
JohnCM: anyway, good luck!
LelouchVC2: Thanks <3
JohnCM: btw, anyone knows how can you fight against an earlier version of your own AI? like can you trace back the submissions you made earlier and fight each of them
LelouchVC2: One AI needs to be submitted, the other on your IDE
LelouchVC2: that's the only way to put them against each other
JohnCM: oh... ok that's what i thought too
JohnCM: means only the latest version of your submitted ai vs your current one
JohnCM: fair enough
Gorbit99: generally speaking that's not really a good idea anyway
jacek: happy Caturday
Doju: Heya everybody
Doju: woow, Nerchio still holds second place?
eulerscheZahl: the ranking really doesn't matter yet
LelouchVC2: Euler, send me your code
LelouchVC2: I'll use it
eulerscheZahl: sorry, against the rules
eulerscheZahl: and it's incomplete anyways
LelouchVC2: Aww
LelouchVC2: I suck ur pp?
Doju: Where can you even read the rules?
Doju: I can't find them
eulerscheZahl: https://www.codingame.com/rules
LelouchVC2: This guy has the rules handy
Doju: aha, gotcha
jacek: he IS the rules
eulerscheZahl: Article 8: Exclusion
LelouchVC2: Article 13: Gay
eulerscheZahl: article 15 gives a link to the rules. so i need the rules to find the rules? :D
LelouchVC2: You must be born within the universe to create the universe
Doju: Well, i wrote like 7 lines of really vague pseudocode to someone
Doju: i guess i'm a criminal
jacek: :police:
eulerscheZahl: :cop:
Doju: what even is the point of this "Obfuscating your code as well as creating obstacles to its reading and understanding."?
eulerscheZahl: you don't want CG to see what you do
Doju: Why?
ltmoran: My code is pretty obfuscated and I'm not even trying
LelouchVC2: ^
dbdr: https://hastebin.com/urexugedaz.rust
dbdr: did I get this right? :)
eulerscheZahl: some players compiled the program offline and submitted a binary, encoded in a base85 string
Doju: Oh
LelouchVC2: Some players are too intense for me
eulerscheZahl: that way they get higher performance as they can set the compiler options
Doju: I see.
eulerscheZahl: but it prevents cheat detection
eulerscheZahl: (several players using the same code)
whadk: how do you stop a command going to a pac when it dies because I used only the pacs in the inputs but sometimes the pac dies after the command is given
dbdr: I guess it would also be useful if someone found a security flaw and abused it
ltmoran: if (myScore < enemyScore):
dbdr: say a way to make the opponent bot crash
Doju: I think my visibility function thing is gonna be waayy too slow...
Doju: checking a bunch of squares for every pac on every move
LelouchVC2: OMG
LelouchVC2: IF THE PAC IS DEAD
LelouchVC2: WHY IS IT GIVEN TO ME IN THE LOOP
whadk: because it dies after youre given the input
jacek: it isnt?
whadk: sometimes that happens
LelouchVC2: kill me daddy
whadk: same
eulerscheZahl: dead pacmen are not given, you must have a bug in your code so you don't reset
eulerscheZahl: or maybe printing 2 lines in 1 turn sometimes
dbdr: it's easier to complain about the referee than to fix your code ;)
dbdr: but less useful
whadk: theres probably a way to fix it though
whadk: even in the other case
JohnCM: just make sure you output only one line per turn
whadk: ok ill try that
JohnCM: also a line ends with a newline ('\n'), not a straight bracket ('|')
LelouchVC2: Dead pacmen are not given?
LelouchVC2: Tell that to Satan
whadk: ahh thats it
whadk: thanks
JohnCM: glad to help
LelouchVC2: Can't be denied
LelouchVC2: It's giving my the pacId of a deadpac
LelouchVC2: I outputted the Id given right after the pac died
JohnCM: maybe you have the same issue as whadk
JohnCM: make sure you only output one line at a time per game turn
LelouchVC2: It's only 1 line, otherwise it would have given an error on the first turn
JohnCM: haha i made the ai bot timeout before by outputting multiple lines
JohnCM: the referee did not catch it
LelouchVC2: Lol, that's intense
JohnCM: i was wondering why i got 1st with only 1 game turn
LelouchVC2: I thought it was strange my code wasn't working. I copied and pasteed code that was working earlier thinking I had broken something
LelouchVC2: but still didn't work
dbdr: there is nothing to catch. if you output several lines, it means you give actions for the next turns in advance
Doju: There are no other kinds of cells than wall, empty, pellet and super pellet, right?
Doju: and pac
LelouchVC2: There's the mitochondria
LelouchVC2: the powerhouse of the cell
Doju: Oh right i'll add that thanks
LelouchVC2: <3
LelouchVC2: I'd be at least top 300 if this fucking thing was working
Doju: What are you working on?
LelouchVC2: my code is consistently ahead of the opponents I put it up against
LelouchVC2: keeps giving orders to dead pacs
LelouchVC2: I check the pac Id given RIGHT after a pac dies, it literally gives me the id of a dead pac to use
Doju: that's odd
LelouchVC2: I went through my code and up and down, and now this output confirms it :((
Doju: At least it's still better than mine
LelouchVC2: LoL
Doju: my pacs are currently chasing pellets that don't exist
Doju: they are completely blind
LelouchVC2: They're dreamers
Doju: Indeed
Doju: Also I have to figure out a fast way to get dead ends
Doju: I guess I could adapt my BFS to that
Lentaq: borrow Lelouch's code, apparently he's good at finding dead things >:)
Doju: hahah xDD
LelouchVC2: Damn Lentaq do me dirty like that
LelouchVC2: Nothing i can do. I looked my code up and down, there was nothing wrong in the logic or semantics
JohnCM: all the best guys! i'm trying to get my rock scissors paper mechanic right. haha right now my rock is still running away from an opponent scissors
LelouchVC2: I output the pac Ids I get after the turn, and they literally have the dead pac in them
shashwat986: LelouchVC2 are you checking the `mine` flag?
Doju: JohnCM I have no RPS mechanics at all :|
LelouchVC2: Its the sexiest flag ever shashwat986
JohnCM: haha you don't need them at first
LelouchVC2: Yes i check it
JohnCM: but for the top 200 increasingly ppl use them
shashwat986: XD
LelouchVC2: That's the only time I take in pacIds
Doju: I think once i get this vision system working i'll climb to somewhere around 400
JohnCM: i once lost a game in 5 turns cause the opponent transformed and killed both my pacs
Doju: Then i need the dead end thing
Doju: and speed
shashwat986: I tried to avoid collisions, and instead of going up the rankings, I just lost 30 ranks
shashwat986: dunno what's wrong XD
LelouchVC2: ikr, that's me every time i fix a bug
LelouchVC2: The bug was keeping me strong all along
shashwat986: ha
JohnCM: it's a "feature" then
LelouchVC2: If this broken website isn't working properly tomorrow I'm done with the contest
LelouchVC2: Wasted so much time debugging when it's literally just giving me wrong info ;(
LelouchVC2: What languages is everyone using?
JohnCM: at least you now know debugging:) that's a plus
LelouchVC2: I've always known debugging? :oo
JohnCM: i'm quite grateful to codingame actually. i started this site about a week ago, and i massively improved my coding skills already
JohnCM: i'm using python.. but i never implemented any bfs, dfs, dijkstra, a*, string parsing by my own. i mainly copied from other sites. doing the code on my own helped
LelouchVC2: Only thing this site has made me learn is how to right shit code to win clash of code and make me learn A LOT of binary to hex to decimal conversions because why the fuck no
BenWo: I'm using python as well
BenWo: also, using cg to learn python :unamused:
LelouchVC2: Well, I'm outta here
LelouchVC2: I love you all
LelouchVC2: <3
LelouchVC2: Except Carlos
JohnCM: lol:)
shashwat986: That's why I like challenges more. It's different and fun
shashwat986: chai LelouchVC2
shashwat986: *ciao
LelouchVC2: <3 shashwat986 I'll be seeing you in my dreams
shashwat986: https://www.codingame.com/share-replay/459303134
When your code switches in exactly the same way every time
shashwat986: (I mean, it's me vs me, but still XD)
cegprakash: hey anyone knows which file the execution starts in referee?
cegprakash: I saw pacman.java there's nothing there
cegprakash: alright game.java
cegprakash: found it
cegprakash: fix it shashwat986
cegprakash: or may be u are playing it safe
cegprakash: it's hard to predict enemy type.. say if u are paper and enemy is rock and u think he's going to change to scissors (as per minimax) so you change to rock but instead he remains a rock and wrecks you
cegprakash: so I think what u are doing may be safe..
cegprakash: and can work
akshat: What timezone does CG follow for league opening?
eulerscheZahl: 6pm CEST
akshat: Thanks!
eulerscheZahl: central european summer time
WaRiOrOfCoDe: does any one know in contest if pac is killed is pac_id given as input?
WaRiOrOfCoDe: I am trying to find if my pac is alive
cegprakash: you will only get alive pacs in input
cegprakash: if your pac is dead you won't get it as input
WaRiOrOfCoDe: okay thanks
whadk: i just realised if you use the newline character to only output one line it makes no pacs get any command in the next round
eulerscheZahl: but hard to tell if yo killed an opponent pacman
whadk: but how else are you supposed to avoid dying after a command is given and losing the game as a result
whadk: because bad command pac doesnt exist
kovi: euler - true...would be nice to get some score for it
eulerscheZahl: i'll add a killing feature anyways
cegprakash: whadk u need to use pipe symbol
whadk: at the end of the line?
cegprakash: on same line
whadk: ok ill try that too then
cegprakash: something like this
cegprakash: MOVE 0 2 5 |MOVE 1 26 3 |MOVE 2 24 7
cegprakash: but a new line at the end
cegprakash: u shouldn't have a trialing pipe as well
whadk: so a \n at the end of the line
whadk: thats what I was trying before causing no command recieved
whadk: I think im doing something wrong
cegprakash: u have to print exactly 1 line
whadk: yeah I do MOVE 0 2 5 |MOVE 1 26 3 |MOVE 2 24 7 \n
WaRiOrOfCoDe: yo i am still getting my killed pac_id as input.
whadk: without the \n the pac dies after a command is given
cegprakash: yes
whadk: so I get bad command
cegprakash: u need a \n at the end of line
whadk: and with the \n it gives no command to the next round
cegprakash: don't use \n after every pac
cegprakash: what league are u in whadk
whadk: yeah i mean \n after the line
whadk: bronze
cegprakash: check ur inputs
cegprakash: may be u are missing to read something
cegprakash: or try default code
cegprakash: it should work just fine
whadk: I'm getting a similar error to WaRiOrOfCoDe
cegprakash: you probably have messed up something
whadk: probably
WaRiOrOfCoDe: i' ll try that
WaRiOrOfCoDe: i mean it runs fine for few turns then i get pac_id as an input
whadk: yeah same
cegprakash: take a backup of ur code and try ur default code
whadk: is the default code supposed to update when you pass a league
whadk: mine is the same given in the wood leagues
cegprakash: no. same code works
whadk: oh ok
cegprakash: just that other pacs will not move
cegprakash: but it won't crash
cegprakash: take it to debug
mark7: How to create unordered map of following. unordered_map<pair<point, point>> point is a custom class
cegprakash: whadk u can always use error stream to debug
whadk: I do
whadk: sys.stderr.write
cegprakash: mark7 u need to overload < operator
whadk: (python 3)
cegprakash: for Point class
cegprakash: http://chat.codingame.com/pastebin/7d0a9ebb-7388-4c75-816b-8f1734c80fe1
mark7: Thanks
mark7: geeksforgeeks told ==
cegprakash: oh may be..
whadk: oh now i see
cegprakash: I used < for map
cegprakash: unordered_map I'm not sure
mark7: Maybe because point
mark7: pair*
cegprakash: bool operator == (Point &other) { return x == other.x && y == other.y; }
AntiSquid: 2k people in bronze wow
AntiSquid: :D
aCat: yeah, and silver in monday....
aCat: leagues should be open sooner
mark7: Now it atleast works
mark7: but gives timeout
mark7: We need Hash Class
mark7: http://chat.codingame.com/pastebin/c6aab5c6-24bd-4789-bba1-16e0207e25ff
AntiSquid: how will that help acat? you can open legend tomorrow, everything still gets flooded
Enknable: if the boss is good
Enknable: it will filter..
AntiSquid: if it's good it may filter you too
AntiSquid: back to square one
Enknable: what u mean?
AntiSquid: people think they get a league of their own with just a few players in it when a new league opens
Enknable: maybe i misunderstood. I thought you meant that if you open a league everyone will just get in
eulerscheZahl: frame 60 my first collaborative kill :) https://www.codingame.com/share-replay/459317850
akshat: wow! <3
Are you running GA or pure heuristics?
Enknable: that little red guy looks so scared :cry:
eulerscheZahl: monte carlo for general movement, full search for kills
PiterYeh: eulerscheZahl cool, but what makes it collaborative?
eulerscheZahl: 1 pac chasing the opponent, the other blocking the path
eulerscheZahl: that would not work if i would move each of my pac independently
PiterYeh: oh right, so it's frame 70, not 60
PiterYeh: awesome, gg!!
eulerscheZahl: it starts at 60, seeing the kill long before
Enknable: "TRAP TRAP TRAP"
cegprakash: it's easy to counter that akshat
cegprakash: if he become a paper
cegprakash: then eulerscheZahl wasted lot of turns
cegprakash: may be trapping with all 3 can work
cegprakash: but isn't enough
cegprakash: but chasing is bad
PiterYeh: if he knows that the enemy cannot switch shape because of the ability cooldown, then it's a cerain kill with no opportunity for counterplay
cegprakash: that's what I think
cegprakash: oh yes the cooldown
JohnCM: wow eulersche I just lost to your AI
JohnCM: but i'm surprised mcts can actually run in time
JohnCM: by my experience with ultimate tic tac toe, it can run at most 5 ply before timeout
eulerscheZahl: i will do something about the chasing later, one thing after another
eulerscheZahl: but true cegprakash, chasing is bad with a non-retard opponent
eulerscheZahl: or at least risky
eulerscheZahl: and JohnCM it's monte carlo, not MCTS
ForceMajeure: lol https://www.codingame.com/replay/459323211
dbdr: the lb is full of retard opponents right now I think
dbdr: as in ignoring death
eulerscheZahl: of course, still early in the contest
dbdr: I'm just getting ready for it :)
eulerscheZahl: and my new feature partially broke the bot is i submitted a semi-finished thing :D
eulerscheZahl: afk now
mark7: Is there a modified version of BFS to calculate path of all pairs in map?
wishesto: could someone explain me more about how to use ability in pac and also how to count cooldown
ltmoran: Search for all pairs shortest path
mark7: I get Timed out FASTER
ltmoran: cooldown per pac is counted for you
JohnCM: ah i see.. monte carlo for the next move
JohnCM: awesome.. implementing rock scissors paper technique got me to 130th place
aCat: euler what MC depth you are using currently?
wishesto: i use if ability_cooldown == 0 then use skill but it not really work
JohnCM: now time to use bfs... lol i've been using manhattan dist for the longest time
Doju: How does Monte Carlo relate to this? I'm not really familiar with how it works
Doju: or what it even really is
wishesto: how to use skill when skill is ready
Doju: atm i just understand that you throw a bunch of random numbers into something and get a result from it
Csipcsirip: you move to random directions and calculate the collected pellets. you do this until timeout and then step the startmove of the best sequence
ltmoran: Monte Carlo basically predicts with a probability where the pac should move
wishesto: i use python thanks
Doju: Oohh
Doju: that's smart
ltmoran: there's an 80% it should move here
ltmoran: The hard part is working out the percentages lol
Doju: so it's basically like BFS but intead of getting the shortest path it gets the most pellets?
aCat: sadly nope like that
aCat: :P
ltmoran: It will tell you which cell you should move to
ltmoran: And in the calculation for which is the best cell
JohnCM: i think euler's monte carlo is purely meant to predict where his opponent would head into
ltmoran: You can take into account num of adj pellets
Csipcsirip: in pure MC there are no probabilities
JohnCM: not really to collect pellets
Doju: Ah I see
ltmoran: "In computing, a Monte Carlo algorithm is a randomized algorithm whose output may be incorrect with a certain (typically small) probability"
JohnCM: you can't really monte carlo hidden information states unless you visit them
Doju: Aha...
Doju: okay, thanks for educating me
Csipcsirip: you shouldnt do fully random moves tho. move to a random pellet for example
JohnCM: and your simulation won't work cause you don't have the true figures (unless you use the overall view of the map, which you don't)
ltmoran: Yeah but if you don't reset the board state every turn you get a lot of information wuick
ltmoran: Every time a pac reaches an intersection, you get all the data for that row+col
JohnCM: ya this is an information game, once you get that perspective you can get better algo
JohnCM: think of minesweeper
JohnCM: like my information algo without bfs can reach.. wow 100th place now
JohnCM: XD
Doju: :o
ltmoran: I think I overengineered mine...
Doju: I have a system that might actually work
ltmoran: And it still is not getting results
Doju: pretty efficiently at that
wishesto: how to use skill when skill is ready i use python thanks
Doju: wishesto get the cooldown and if it's 0 give the command
ltmoran: if ability_cooldown==0: print("SPEED {pacID}")
JohnCM: my pacs are still colliding with each other and wasting a lot of moves
JohnCM: lol gotta fix that
Doju: I'm basically going all in on python ideologies with my bot
ltmoran: THat's why I'm losing the games I'm losing
Doju: even with the pellets im asking for forgiveness instead of permission
Doju: guessing they're there unless they're not :D
Doju: I think that will get me to like 400th place once it's done
Doju: but i'm gonna try to apply some logic to also guess that some pellets are missing
Doju: based on dead ends
Doju: and a few other things
Doju: Can you split a list like you would a string in python?
Doju: Like in a similar fashion. the same syntax doesn't work
Doju: ff15
JohnCM: lol... you have to use slicing like array[i:j]
Doju: JohnCM ugh thats ugly but i guess there's no other way to do it then
Doju: thanks
ltmoran: Alternatively you could join the list using "" as the delimiter and then split it based on the char you want
Doju: Weelll i have instances of a class in the list so maybe that's a bit complicated Itmoran
Doju: oh its ltmoran and not Itmoran
Doju: yeah I could technically
Doju: then use str.split
Doju: I think indexing will be cleaner and faster though
mark7: http://chat.codingame.com/pastebin/e68d8a9f-a1bb-4a08-8ba3-72e9eef42f0b It times out in first turm?
ltmoran: It's not like speed is a huge huge issue in thist contest
ltmoran: Probably because you have a quad nested loop lol
ltmoran: You have a max of 1 second for the first turn
ltmoran: So I imagine that loop isn't running quickly enough
Doju: I'm using python, never underestimate python's ability to time out :D
mark7: Thats why I searching for smart way to calculate distances
ltmoran: I haven't had any issues with it yet though
Doju: Do you have bfs?
mark7: YES
Doju: and how are you using it?
mark7: BUT I Am CALCULATING EVERY PAIR
ltmoran: You should just use heuristics
Doju: I had bfs at first like so that i check every single pellet and compare the distances
Doju: but that's insane and you should just use a single bfs flood fill until you hit a certain criteria
Doju: aka the cell is a pellet
mark7: Okay :thumbsup:
Doju: But that won't help you if you calculate every pair
Doju: Don't really know how to help with that
Doju: hmm
Doju: isn't it n^2
mark7: Maybe just goto Super pellet
mark7: :joy:
Doju: mark7 if you really want to get every pair you could maybe optimize it with symmetry
ltmoran: Pretty sure it isn't n^2
Doju: how come?
ltmoran: Floyd -warshall at least
Doju: bfs is O(n)
Doju: right?
Doju: every cell is checked once
eulerscheZahl: right
eulerscheZahl: O(nodes+edges) in general
eulerscheZahl: but here the edges only differs from nodes by a constant
Nerchio: wow
Nerchio: 10 hours later i am still top 5
Doju: Yeah i was surprised by that as well Nerchio
ltmoran: But there are n^2 pairs
eulerscheZahl: resubmit and you might be lower
Doju: a few hours ago you were still second
Doju: ltmoran what? you check every cell for every cell
Doju: and also you dont even need to check every cell
Doju: you can just take the path backwards if it's already calculated
eulerscheZahl: floyd warshall = O(n^3) BFS for each cell = O(n^2)
ltmoran: Number of Nodes choose 2
ltmoran: Therefore there are n^2 pairs
mark7: http://chat.codingame.com/pastebin/7ea1ca8e-9efc-4483-9b3d-06404efe627a
Nerchio: hahaha omg
eulerscheZahl: that's for a full graph with lots of edges it
ltmoran: which can each be computed in O(n) time
eulerscheZahl: itm [ŧab?]
dbdr: there is a bounded number of edges
Nerchio: i opened the first replay today and look at this
Nerchio: https://www.codingame.com/replay/459332968
eulerscheZahl: oh, it's an L
dbdr: 4 is O(1)
ltmoran: It's not the number of edges though
ltmoran: It's the number of nodes
Nerchio: last 70 turns lol
ltmoran: Because the n^2 comes from all pairs for each node
eulerscheZahl: he successfully blocks you Nerchio
eulerscheZahl: by converting to scissors it would be a draw
Nerchio: i know but its funny
Nerchio: close match
Doju: Oh wow
Doju: do some people have like hiding strats? :o
Doju: pellet is unreachable and you are winning -> hide
eulerscheZahl: i'm pretty sure that was random
Nerchio: yeah
Nerchio: i mean
Nerchio: it was for like 80 turns
Nerchio: thats not a strat :D
Doju: :D
Illedan: nice kovi
kovi: thx illedan
kovi: shameless resubmit, to pull down romka
akshat: Can we do recursion in c++ lambdas?
Nerchio: i wonder if weekend will be more busy in terms of people submitting than friday
Nerchio: probably yes
ltmoran: yeah pretty sure you can akshat
Clagus: are there going to be anything more than a bronze league? :P
Nerchio: silver gold legend
Clagus: yeah I know in theory, but why you guys are not promoted?
cegprakash: my sister found a 1 line code to reach from wood2 to wood1. Always go to the last visible pellet :D
Nerchio: because next leagues open in the next few days :p
Nerchio: silver on monday idk about the rest
Clagus: ok :D
ltmoran: Best program has got to be keep track of previously visited locations and move randomly, just not to the ones you've already been to
Illedan: Not 1st. Maybe top 50.
ltmoran: Probably not top 50 either lol
Doju: Could THAT be top 50?
ltmoran: Maybe with some modifications it could do pretty well
Clagus: maybe top 1000, I think I'm doing something smarter and I'm around top 600 :P
Thiesjoo: I reached top 600 with that sort of algorithm
ltmoran: With some modifications though
ltmoran: I reckon it could do pretty well
Thiesjoo: Now to just add enemy avoidance
Doju: Ah im so confused
Doju: abot negative list indexes in python
Thiesjoo: It just counts from the end of the array right?
Doju: like
Doju: if you have this [::-1]
Doju: then it just goes backwards, ok
Doju: if you have this
Doju: [1:3:1]
Doju: sure, makes sense
Doju: just like you'd expect
Doju: but if you have [1:3:-1] it returns nothing
ltmoran: When you specify three
Thiesjoo: That is really weird. I don't know python good enough for that
ltmoran: The last one is the step size
ltmoran: So what [1:3:-1] means is
ltmoran: And since the start is less than the end
ltmoran: it's going to return nothing
Doju: ooooooooohhhhh
Doju: i thought it was like
Doju: grab list from 1 to 3
Doju: then flip that backwards
Doju: now it makes sense, thanks ltmorgan
ltmoran: if you wanted to do that
Doju: moran* xd
ltmoran: it would be [1:3][::-1]
Doju: ummh, what if i want to go backwards and also have the 0th element included?
Doju: so if i do [3:0:-1] it doesn't give the 0th element
Doju: and [3:-1:-1] doesn't work since -1 is the last element
Doju: [3:-1:-1]
Doju: lol
Doju: that's -1
ltmoran: why do you need to grab it in reverse though
ltmoran: Why not grab it normally
Doju: and then reverse it?
Doju: well yeah i guess that works as well
Doju: thanks again
ltmoran: Then you don't have to mess with step size
BenWo: wouldn't [3:1:-1] work?
Doju: BenWo no then it doesnt give the first two elemtns
Doju: Oh right i can just omit the second index
BenWo: are you wanting to have elements from 0-3 ?
Doju: [3::-1], that works
BenWo: yeah that was my next thought
Doju: nothing really
ltmoran: Surely that's more readable?
Doju: actually it's not in the context of this code
Doju: i have a row and a column of a grid
Doju: i need lists starting from the pac to all the edges of the map
Mentalist: 2100 people in bronze wow
Doju: and i think it's just a bit cleaner this way
Posejdon: 3000
AntiSquid: shows 2895 total for me
cegprakash: "the pac will be able to move by 2 steps during the next 5 turns"
does this mean if I print SPEED this turn I cannot move two turns this turn?
cegprakash: so I append MOVE command with same pac ID twice?
Mentalist: yeah shots 2088 for me. CG is broken
Beerus: any constraints for width and height/
ltmoran: THe speed thing is annoying actaully
ltmoran: There's basically a half turn
CodingCaptain: cegprakash no u command MOVE and it moves 2 cells
ltmoran: But it will move your speedy pac one more square on it's originally course
cegprakash: oh I need to print the target with distance 2
CodingCaptain: cegprakash yes
TrentT: Can someone confirm if there is any way to tell the opponents pac types? (Rock, paper, scissors)
dbdr: it's in the input TrentT
TrentT: Okay thanks, I see that now
cegprakash: does anyone know what's the singular form for Scissors?
TrentT: AutomatonNN what is singular for scissors?
AutomatonNN: what do you mean by that?
TrentT: Automaton3000 can you help?
ltmoran: types are ROCK, PAPER, SCISSORS
cegprakash: but I want to use singular
cegprakash: for my type
cegprakash: because Rock and Paper are singular
cegprakash: I want to keep it uniform
ltmoran: yeah but that's silly
ltmoran: THe type that's given in the input is plural
ltmoran: Singular of SCISSORS is SCISSOR btw
cegprakash: I read somewhere scissors has no singular form
ltmoran: Why does it matter though?
ltmoran: It doesn't actualyl have to exist
cegprakash: but when I want to borrow a scissor should I ask "Do you have a scissors?"
ltmoran: would you care to pass me your double-bladed cutting implement for a short period of time
Doju: my vision thing is finally done
Doju: after all it was only like 20 lines but still it was a pain
cegprakash: okay I'll name it DOUBLE_BLADED_CUTTER
cegprakash: this resolves the confusion
MSmits: wow, your bots must be awesome that you got to the point of making sure your code is spelled correctly :P
cegprakash: solid foundation is important
MSmits: allright
dbdr: I just got to the point of having the hard talk with my bot
dbdr: he knows about death now :(
MSmits: ahh I see
shashwat986: :( that's a tough stage to be at.
MSmits: should i do this before or after a search to optimize routes
shashwat986: Ah, I was a parent once
shashwat986: now my pacs are running around eating everyone in sight
Doju: This is still pretty ugly but oh well
Doju: http://chat.codingame.com/pastebin/01610c78-af1d-407f-958f-97c23706bd41
dbdr: I think it's pretty orthogonal MSmits
shashwat986: i need to have a different talk with them. moderation
dbdr: you need both
MSmits: ah ok
Illedan: My bot thinks of the afterlife
MSmits: Doju
MSmits: it's indices
Doju: Thanks
dbdr: but might depend on your data structures
Doju: right
dbdr: good to give it a little thought in advance
Doju: Gotta make sure the grammar in my comments is correct
Doju: priorities :DD
MSmits: yeah :)
eulerscheZahl: dbdr about being mortal or about committing murder?
dbdr: being mortal
dbdr: my bot is a pacifist
dbdr: only kills by ignorance
eulerscheZahl: mine is evil
**dbdr is not surprised
**shashwat986 can do that? whoa
Illedan: I had to disable kill mode. It was worse :P
MSmits: I think I'm gonna make mine evil first and then do the search
Illedan: Chasing a pac loses a lot of turns
MSmits: yeah
dbdr: :peace:
eulerscheZahl: https://www.codingame.com/replay/459317850 frame 60-70
shashwat986: what do you guys feel about having different strategies for different pacs?
shashwat986: worth it? not worth it?
Doju: shashwat986 interesting
Doju: but make them cooperate
Nerchio: chasing pacs is worth it guys
Nerchio: you can show you are a tougher guy
Illedan: I like that stra euler
MSmits: Illedan, you could put more heuristic on your kill mode to estimate loss of time
Illedan: I score a kill the same as picking 1 seen pellet :P
dbdr: need to implement pinky, blinky, clyde, etc :)
Nerchio: nice one euler :)
dbdr: inky is the 4th
Doju: Oh you have trapping strats
Doju: that's so cool
dbdr: at least we kno the boss names :D
eulerscheZahl: who will be the gold boss? Mrs pacman?
dbdr: should be a ghost I think
cegprakash: talking about gold already?
dbdr: https://pacman.fandom.com/wiki/Tentacle_Ghost
dbdr: well, the real contest starts in legend
eulerscheZahl: i thought there were only 4
dbdr: need to talk about sth before that
dbdr: 4 in the original
ltmoran: There's Inky, blinky, pinky, sue
cegprakash: I think inky pinky ponky father has a donkey
Doju: Uhh do you guys think it's smart to have a probability that the pellet is eaten value for each cell?
eulerscheZahl: and one of them was bugged, targeting the wrong cell
Illedan: Sure Doju
MSmits: makes sense Doju
dbdr: yes, because of overflow or sth like that :D
Doju: Alright. that's next on the list after i get these things done then
eulerscheZahl: for now i just have 0.99^(turn-lastSeen)
cegprakash: mostly bronze boss is a ponky and silver boss is a donkey
dbdr: pellets rot with time
MSmits: eulerscheZahl do 0.99 * (200 + lastSeen - turn)
MSmits: cheaper
MSmits: or something like that anyway
eulerscheZahl: ?
eulerscheZahl: is that some performance hint again?
MSmits: no Math.pow
MSmits: :)
eulerscheZahl: i don't care
wlesavo: hm, my last seen only concerns opponent pacs rn
dbdr: an exponential can be done as a simple multiplication
MSmits: I know, I am just trolling
eulerscheZahl: and if i feel i have to get it faster, i cache it
dbdr: just use the previous value
kovi: i do turn by turn multiple
Nerchio: i dont consider probability yet :joy:
the_joker_100: https://www.codingame.com/replay/459368010
the_joker_100: any way to avoid this ??
the_joker_100: any tips???
MSmits: dont speed :P
MSmits: just grab the super and go
eulerscheZahl: you are running into the opponent paper with your stone. of course this is avoidable
eulerscheZahl: 2nd death
the_joker_100: i have not even thought bout combat yet
the_joker_100: i just cant avoid striking one of my own
the_joker_100: lmao
MSmits: the tip is to think about combat then :)
wlesavo: lol
MSmits: I am going to try that today
Nerchio: remember when doing fighting simulation don't use Math.pow
the_joker_100: i got this problem where my own pacs run into each other and i cant find a way to detect that??
MSmits: lol
the_joker_100: my mid is goin crazy
the_joker_100: mid*
MSmits: KaPOW!
MSmits: the_joker_100, maybe stomach flu
wlesavo: MSmits did somebody from your ai class joined?
MSmits: yes Thiesjoo
the_joker_100: @MSmits what??lmao
MSmits: not my AI class btw it's physics
the_joker_100: mind*
MSmits: he's in my colleagues CS class
wlesavo: MSmits i meant your class where you are learning, not teaching
MSmits: ohh
the_joker_100: i entered top 600 hot damn
Nerchio: so you can't see enemy speed turns left ye?
wlesavo: wait what
MSmits: doubt it. It's a very small class, few students and they're all older and busy with other stuff in their life. They could barely finish the first assignment in time, wheras I finished all in 4 days
wlesavo: Nerchio i didnt checked that, just assumed i can, is there 0 on the input?
Nerchio: i think you can too
Nerchio: but somebody said you cant
Nerchio: and its faster to ask in chat xD
ltmoran: Well it's give isn't it?
MSmits: would be sad if you couldnt
MSmits: that would make the game more random
MSmits: but all you really need to know is whether the pac is speeding or not. You can guess the speedturns left from the cooldown. Unless that is also hidden
cegprakash: if I print 5,5 as target from 4,4 will I move to 5,4 first or 4,5 first?
Nerchio: ok i debugged it you can see it
MSmits: dont think that is possible cegprakash
Nerchio: i just wish the description would be more clear
MSmits: I didnt see any 2 by 2 areas on a map
MSmits: generator probably doesnt make them
Nerchio: in almost every game there is a problem with description what info you get about opponent
MSmits: but anyway, at some point you really should not rely on referee pathfinding
cegprakash: MSmits cool then
MSmits: that is meant for starters
Nerchio: you also get information about their ability cooldown btw
cegprakash: so if RIGHT_DOWN is a valid move then DOWN_RIGHT will never be a valid move
wlesavo: Nerchio also just checked that
MSmits: The only weird think about pathing I found was that there is no way to go back and forth on a dead end and end on the same turn you started
MSmits: same cell that is
Nerchio: yea you need to go 1 sqm
Doju: Okay vision is semi-done now
Nerchio: wlesavo i see what you did there
Nerchio: https://www.codingame.com/replay/459375929
Nerchio: 16-17 :p
cegprakash: wait what we can't do a DOWN_UP
cegprakash: oh yes
MSmits: allright no more chatting. Rest of the day is coding. I want to try and get a search and fight mode this weekend if I can
cegprakash: makes sense
cegprakash: yeah me too
ltmoran: except I won't be able to ;)
wlesavo: Nerchio :slight_smile:
Nerchio: i feel like at the very top there might be a lot of stalling
Nerchio: nobody wants to switch etc
ltmoran: Can't you just keep the code that you submitted that got you into 3rd or seomthing
ltmoran: then try something new
ltmoran: then if it doesn't work
ltmoran: resubmit your old code?
wlesavo: sure you can
the_joker_100: can anyone tell me how to detect whether my own 2 pacs are goin to collide???
the_joker_100: pls????
Nerchio: looks like i need to start working on the rock/paper/scissors more
Nerchio: you guys are getting trickier :D
ltmoran: Check if the position of your pacs remained the same for two turns in a row
cegprakash: have a collision target map the_joker_100
ltmoran: then do something about it
the_joker_100: what??
shashwat986: is anyone caching the paths between two points? It's timing out for me
cegprakash: don't let two of ur pacs go to same location the_joker_100
the_joker_100: yeah i did check that @cegprakash
the_joker_100: but sometime even if they dont intend to go to smae square they do collide
mark7: the_joker_100 Check for 2 cells not one
the_joker_100: @mark7 could u explain?
ltmoran: You maintain the last positions of your pacs
ltmoran: then you check if they haven't moved for two turns
mark7: may be they are two cells away so check wether a pac is near 2 cells
ltmoran: then you can reverse them or something
the_joker_100: so i need a history of where my pacs have been to?
cegprakash: 1) don't go to same cell on same turn, 2) don't go towards same target on same cell. These two should guarantee u don't colllide
cegprakash: *same turn
Doju: oh nice! vision works
Doju: and it's not even that slow
ltmoran: What sort of win:loss ratio is good for the past battles?
ltmoran: Or does that not matter at all?
cegprakash: ltmoran u need like 65% against like all opponents
cegprakash: even if u lose 80% against 1 or 2 opponents u won't climb the ladder LelouchVC2
ltmoran: Well i'm winning like 70-80%
ltmoran: And I'm stuck at around 200-300
cegprakash: yeah that means u have < 50% win rate at 200-300
cegprakash: and ur rank improves if u have a profile picture
cegprakash: eulerscheZahl do topcoder SRM tonight at 9:30 PM
cegprakash: that's IST
cegprakash: like 6 hours from now
Nerchio: your rank improves if you have a profile picture than antisquid likes
Doju: Noow we're talking
Nerchio: that*
Doju: non-blind pacs are much better than blind pacs :D
shashwat986: Nerchio !!
shashwat986: Are you caching the paths between two points?
Nerchio: no
shashwat986: hm
Nerchio: but i have very efficient path algo
Nerchio: working on ints so i can do it every turn
shashwat986: oh, that's a good idea
Nerchio: even in java :joy:
shashwat986: let me try to do the same thing
shashwat986: yeah, same boat. I'm on ruby
Doju: Is there any way to overlay something on the game?
Doju: it'd be reeally handy to see what my pacs are seeing
Nerchio: which one would you guys prefer to read
Nerchio: http://chat.codingame.com/pastebin/7b7773f1-f293-48ef-b856-01097da15291
Nerchio: 1 or 2
the_joker_100: im much comfortable with 2
shashwat986: 1
Nerchio: i prefer 1 ofcourse but maybe it's hard to read for some :p
jrke: 1 for me also
the_joker_100: i just dont have the habit of no 1
cegprakash: 1
the_joker_100: im the only noob here
Nerchio: yeah in my first contest i was writing 2 all the time but 1 feels so much better for me now
shashwat986: i think 2 is clearer if you have even one more condition
cegprakash: we have all been there the_joker_100
shashwat986: for 2 conditions, 1 is clear enough
Nerchio: i feel like simplifying if statements is important in the challenges
Nerchio: otherwise you spend a lot of time debugging later
ltmoran: otherwise your code just piles up
RockyMullet: woah hoyl mother of drift, I was 50th yesterday and I'm now 24th
RockyMullet: no way I can resubmit haha
Nerchio: you will have to resubmit sooner or later RockyMullet
Nerchio: might as well do it now :D
RockyMullet: I'm over euler when he was like 6th yesterday, this cant be right
RockyMullet: Nerchio I know, I just wanna believe I'm good for a moment haha
RockyMullet: A little lie to help self esteem
Nerchio: euler is working on some nasty traps of pacs :D
dbdr: it's as if this game had a RPS component ;)
Nerchio: he posted it earlier
Nerchio: https://www.codingame.com/replay/459317850
Nerchio: 60-70 :D
BenWo: alrighty, bronze league. now the work begins
wlesavo: lol its a trap
shashwat986: My first move is taking 978ms XD
RockyMullet: shashwat986 no waste ! :)
Thiesjoo: Yesterday i was rank 400 and now with the same code i am rtank 1200. What's going on here
AntiSquid: lol
Doju: Indeed
mark7: shashwat986 what you do that much
Thiesjoo: I saw euler laying traps
Doju: euler's traps are freaking amazing
shashwat986: I am trying to precache all paths between all points on the map
AntiSquid: no ... all the bots below rank 400 aren't even taking all game rules into consideration
shashwat986: it's not happening
RockyMullet: shashwat986 I do that, and I'm pretty sure I'm not the only one, what language are you using ?
mark7: shashwat986 I am trying the that but I get times out
Doju: my bot gets absolutely demolished by euler's
Doju: 126 to 26
ltmoran: How can I play Euler's?
Doju: you delete the default ai
Thiesjoo: Delete default ai and add Euler
Nerchio: you cant debug vs euler
Doju: okay now it was 162-110
Nerchio: he's abusing code that crashed in ide
Nerchio: crashes*
shashwat986: RockyMullet what language do you use? I'm using ruby
Doju: Oh huh i haven't played against myself yet
Doju: this'll be interesting
RockyMullet: oh ok, im using C++, so maybe the problem is not the algo
ltmoran: How do I delete the default AI
Doju: ltmoran you click "DELETE" :D
ltmoran: I guessed that might be the case
Doju: It went 142-118
ltmoran: Except I can't find the delete button
Doju: below the ai
Thiesjoo: Set your IDE to advanced mode
Doju: at the bottom
Doju: oh rightt there's that
Thiesjoo: In settings in the left bar
shashwat986: RockyMullet you're storing the best PATH between every two points?
shashwat986: or just the distance?
Nerchio: nerchio vs nerchio is pretty hilarous
Nerchio: https://www.codingame.com/replay/459409055
ltmoran: Had to change the IDE type
Nerchio: i can't ever win against myself
mark7: https://www.codingame.com/share-replay/459409397 shashwat986
Doju: Don't you have any randomness in your ai?
Nerchio: no why would i do that in this game
Nerchio: randomness means you don't know which move is better and in ideal situation you should always know
Doju: hm, fair enough
shashwat986: Doju randomness makes it very hard to debug as well, because the pacs' behaviour aren't reproducible
RockyMullet: maybe I'm dumb but I cant find it in the statement, how to do I make pacs write debug text over there head ?
shashwat986: add it to the end of the command
Doju: You just add it after the command RockyMullet
shashwat986: MOVE 0 1 2 MSG
RockyMullet: shashwat986 I'm storing the distance and the first move to do to get tehre
RockyMullet: oooh thanks guys
Doju: okayyy time to implement speeding up
Doju: maybe that'll push me up the ladder a bit
RockyMullet: with a bfs
cguzman: @Nerchio what approach are you following?
Nerchio: get more pellets than your opponent :neutral_face:
Thiesjoo: Wow that is a good strategy.
ltmoran: I wish I'd thought of that
Doju: there are sooo many things i could still do...
Doju: i don't even acknowledge the enemies atm
Thiesjoo: My todolist is pretty large
Thiesjoo: I now know if i will die from the enemy, but what now?
Thiesjoo: Fleeing is an option
RockyMullet: run or switch
cguzman: Why didn't I think in that? I was just walking through the maze. Very smart @Nerchio
wlesavo: let your eval decide
NormantasStankevicius: 2100 people in bronze >.>
BenWo: I just made it to bronze. All my code does is move all of the pacs towards pellets.
ltmoran: I have a 500 char line
ltmoran: I should probably fix that
Doju: BenWo yup that gets you to bronze
wlesavo: oh, the bogol guy submitted, i though i saw the avatar somewhere
eulerscheZahl: i'll follow him and submit too
Nerchio: who is bogol
eulerscheZahl: and i crashed
eulerscheZahl: (╯°□°)╯︵ ┻━┻
wlesavo: blame him for this eulerscheZahl
wlesavo: Nerchio it is a quite interesting game in contributions\
cguzman: is there a tutorial to configure all this in an IDE?
eulerscheZahl: i think that's the closest to what you are asking for: https://www.codingame.com/playgrounds/53705/contest-tools-and-workflow/introduction
eulerscheZahl: of course there are other ways, i just describe with i'm doing
ZeroByter: When u move with speed, in order to actually use speed u gotta MOVE 2 cells away, right?
aCat: yep
aCat: 2 or more
eulerscheZahl: yes. and both have to be free
Doju: that's suuch a pain
eulerscheZahl: why?
ZeroByter: Hmmm
ZeroByter: Trying to use speed but it's not working, but it's not a bug or something, I gotta fix it
Doju: eulerscheZahl atm my bot just searches for the closest pellet using BFS
Doju: but to make that work i have to do the same BFS on the first pellet
AntiSquid: feeding AutomatonNN euler lines :o
AutomatonNN: ?
AntiSquid: don't act innocent AutomatonNN
AutomatonNN: so if i want to work in the players that i saw it in the replay there
shashwat986: did it!
shashwat986: I've been able to pre-cache all paths from all points
Doju: nice, how long does it take?
shashwat986: had to use the fact that the map is symmetrical. Now to re-write all my wrapper functions
shashwat986: 484ms.
shashwat986: half of what it was taking earlier
Doju: so just about half of the original time
shashwat986: yeah
RockyMullet: nice
ZeroByter: Oh man I haven't even checked what is my execution time lol
whadk: can other people see debug messages you put on your pac
Doju: i think they can
whadk: oh ok
Nerchio: they can on the screen but they can't read them from input
Doju: ugh implementing the 2-long movement is going to be suuch a pain
whadk: why do you need bfs to find the nearest pellet out of curiousity?
Doju: seriously what
Doju: how do you even do it
ZeroByter: Just so I get this straight. When u have speed (and assuming u use it correctly), u r supposed to move across 2 cells at a time?
Doju: yup
ZeroByter: Weird
ZeroByter: Not doing it for me
Doju: when there are pellets next to my pacs they only move 1 cell at a time even with speed :(
BenWo: can you just ignore the immediately adjacent cells when they have speed?
wlesavo: not really
BenWo: I mean in his pathfinding
Doju: what if there's nothing to get outside of the immediately adjacent cells
RockyMullet: or time to ruin all that nice drifting with a resubmit
BenWo: well... either the game ends before then, or you didn't need to use speed at that point
RockyMullet: I just take a last look at it... before I have to let it go :cry:
Doju: hkm
Doju: my rank actually dropped by 600
Doju: when i turned speeding on
RockyMullet: you need to be moving by 2 cells otherwise you are just wasting a turn
Doju: yup
eulerscheZahl: what if there is a last pellet in the corner?
eulerscheZahl: don't pick it up?!
RockyMullet: well then you can waste a turn :P
BenWo: if there's one pellet left, and you're next to it, just grab it instead of using speed
BenWo: it costs a turn to activate speed anyway, right?
Doju: well yeah
BenWo: so using speed is only faster for pellets 4+ cells away
Doju: isn't it 3?
BenWo: it might be 3, I'm not sure how the turns are calculated
Doju: hmm yeha
Doju: that might be smart
Doju: except that... no
Doju: xd
BenWo: if the pac just moves 2 squares on one turn, then cell 3 would be simultaneous for with and without speed
Doju: that's gonna be messy to implement for me
Doju: so i'm just gonna do another round of pathfinding
Doju: from the closest pellet
BenWo: I'm better at thinking this stuff than actually programming it, lol
Doju: that's kinda good though, isn't it?
Doju: no lines of codes is better than some lines of code
Doju: if they achieve the same result
Doju: there has to be a better way to do this...
Doju: oh, maybe just check if the neighbors of the pellet are also a pellet
Doju: and the path is linear
akshat: I
akshat: I'm not sure how to implement BFS in this, should I find the most profitable route for each pac assuming pellets at unexplored area or just find it for nearby cells upto depth 5? Need some guidance here please.
MadKnight: akshat u should find a way how to find your opp
Doju: Hm... I'm currently just assuming there are pellets everywhere unless i see they aren't there
Doju: and pathfinding to the imaginary pellets
MadKnight: how to fight your opp i mean
Doju: or actually, superposition-pellets :D
MadKnight: u gotta beat him and not just collect stuff
Doju: wdym, i'm a pacifist
MadKnight: make problems for him
akshat: Okay...
Doju: maybe he is too
Doju: _p
Doju: :P*
MadKnight: fix your p
Doju: :p
Doju: Okayyy now i have pathfinding on pathfinding
Doju: lets see if this helps
MadKnight: why do u have it on it ?
BenWo: so you can find your way to the path?
Doju: MadKnight because I want to utilize the speed
Doju: my old thing was just pathing to the nearest pellet
Doju: and if it was next to the pac, the speed was useless
Doju: now i'm getting the closest pellet to the closest pellet
Doju: (which, by no means is perfect)
AntiSquid: MadKnight how's your bot? i have 10 lines of C++ at #571
NormantasStankevicius: you mean take the cloest pellet near you xd?
Doju: NormantasStankevicius not really. I'm first finding the closest pellet to the pac and then finding the pellet closest to that
Doju: that rhymed
the_joker_100: uhhhhhhhh
NormantasStankevicius: uhhhhhhhhhh
eulerscheZahl: AntiSquid you can do the same with 5 lines of ruby
Doju: uhhhhhhhhhhhh
NormantasStankevicius: that is a way doju tbh
NormantasStankevicius: right now I have a simple path
NormantasStankevicius: testing what is better for now closest pellet or most valuable pellet, but I will need to thing of a way
eulerscheZahl: almost 3k players already :o
aCat: 2.1k in bronze ;p
eulerscheZahl: quick poll to the new players here: how did you find CodinGame? friends? forum post? ...?
NormantasStankevicius: eulerschezahl, while that is great, it's quite scary also, this competition might be a meat grinder
Uljahn: Automaton2000: 2pac or not 2pac?
Automaton2000: looks the same as in the game
Doju: https://imgur.com/kpf26qy
Doju: why is id different? and it's throwing an error
NormantasStankevicius: Doju is that python?
Doju: yes, python
Doju: i just changed their order.. that used to work
AntiSquid: the instafluff streamer has a lot of viewers
Doju: Oh its a function
eulerscheZahl: that instafluff used to be "TheSauce"
eulerscheZahl: first appearance in fantastic bits i think
eulerscheZahl: then he left
AntiSquid: maybe this contest does beat the accountant in participation count
NormantasStankevicius: AntiSquid just opened his streams, looks professional
AntiSquid: really?
AntiSquid: i think there's too much going on on his screen
aCat: link?
Gh0stm4chine: yeah link please ?
AntiSquid: clouds and teddies and god knows what else, way too cluttered for my taste
eulerscheZahl: https://www.twitch.tv/instafluff/videos
aCat: thx
AntiSquid: no offence to the guy though
NormantasStankevicius: Antisquid true
aCat: omg
aCat: unwatchable
AntiSquid: idk i skipped through it like usually, there's few good points he makes
Doju: oh wait this is recursive now...
aCat: I believe so, but watching is too much
AntiSquid: i remember thibaud asking on discord which streamers do we like / follow
AntiSquid: if they like one of the really big guys they kill the website :D
eulerscheZahl: i muted the streaming channel on discord
aCat: I like to take a look on thibpaut from time to time
aCat: never tried to watch clashes :P
Doju: yeah doing 2x pathfinding works pretty well NormantasStankevicius
AntiSquid: is life really not worth anything to you ?
AntiSquid: watching clashes @_@
aCat: 'never tried'
aCat: ?
Uljahn: watching someone clashing in c++ could be fun though
aCat: bleh I imagine shortest code in Java ;p
eulerscheZahl: only if the neighbor's cat suddenly enters the house :D
AntiSquid: or if they get a random burglar during stream: https://www.youtube.com/watch?v=LTGfzq2UNlU
akshat: Do you guys create totally new instances of your pacs and pellets array or just create once in the start and then update them?
akshat: What is preferable?
Doju: Pacs are new instances, pellets inbedded into the grid
Doju: for me
Doju: imbedded*
akshat: Okay..
the_joker_100: how do i check which one of my pacs sees an enemy??
Doju: Might change it so that i create pacs only once though
Doju: its getting kinda messy
anid: makes sense to create pacs only once, so that you can store all of the information that a pac sees easily
anid: and its previous target
Doju: yup
RockyMullet: the_joker_100 if an enemy pac in in the input, one of your pac sees it
the_joker_100: but which one sees it??
RockyMullet: you can make a line of sight check after that
Doju: the_joker_100 you might want to do something like i did
the_joker_100: what did u do?
RockyMullet: just travel in 4 direction until you find a wall, thats your pac's line of sight
Doju: my pac class has a method that returns cells that are visible to it
the_joker_100: kk
the_joker_100: that would be really helpful
the_joker_100: ty
RockyMullet: you can use the same thing to determine which of your pacs sees pellets
the_joker_100: kk
the_joker_100: yeaaaaaah
the_joker_100: damn dint even think of that
RockyMullet: so the pac on the other side of the map doesnt travel all the way there, making all your pacs staying together, which is not good
Doju: RockyMullet that's exactly what i'm doing
Doju: no more phantom pellets
RockyMullet: good good
Doju: this actually seems to be working super well
RockyMullet: my pellet gathering still sucks, but that change made it way better
Bastett: Ugh. I should read harder. I assumed pac id was unique, not unique per team.
RockyMullet: Bastett yeah same hahaha, was confused by all the bugs it created
Doju: This is silly
Doju: my pacs leave the last one or two pellets at dead ends untouched
735487: wow i see some bug https://imgur.com/a/iStXdza. I won but shown as second
Doju: cycya
eulerscheZahl: amurushkin the avatars above the game are different too
eulerscheZahl: sometimes it happens that it loads a different game than the one you selected
Doju: slightly wonky speeding apparently gets me to rank 600
735487: ah did not see that avatars different. anyway it looks cool :)
Doju: i wondwer ow much how much it'll improve if i fix it
Bastett: noice, down goes Blinky
Bastett: with my rather naive "find the closest food" strategy
Clagus: gj Bastett
Clagus: guys do you know if I can try my code in some other way than through web ide? I'm so sick of keeping all my code in one file... I would like to have multiple files, nicely split code, but then it would be hard to copy-paste it to web ide and run or submit
Bastett: I've written a little bash script to build my source files into one
Bastett: it's one line of bash
Bastett: find src/ -name obj -prune -o -name bin -prune -o -name '*.cs' -exec cat {} \; > game.cs
Clagus: oh, ok, I thought it would be harder to do that
Bastett: that ones finds all .cs files in src/ excluding bin/ and obj and compiles into game.cs
Clagus: sick
Clagus: :D
Clagus: so i should run it in my solution folder?
eulerscheZahl: you can add usings anywhere in the code, not only at the top?
mark7: close fight eulerscheZahl https://www.codingame.com/replay/459468906 May be a bit better pellet searching algo and I will be in top 50
eulerscheZahl: i'm coding in C# for many years, why didn't I know about that?
Bastett: for c#, usings would need to go inside the namespace declaration of each file
mark7: MY current submit improved My rank by 1000
Bastett: otherwise you'll get duplicate usings, and they'll fail to compile
Doju: mark7 woah, what did you do?
mark7: I rewrote whole code
eulerscheZahl: i see. i don't even define a namespace
Doju: oh i see haha
mark7: first in c++ then delete that wrote again in java
eulerscheZahl: and my bundler removes duplicate usings
Clagus: the file was created but is empty...
eulerscheZahl: do you have a C# project Clagus?
PiterYeh: eulerscheZahl what are you using for bundling? I'm coding in visual studio but i have just one big file
mark7: in java writing to error string takes to much time
Clagus: yes :D
mark7: There are scripts available for java
Clagus: i'm not that dumb xD
eulerscheZahl: a bit of python PiterYeh, i run it as a post-build event
eulerscheZahl: http://chat.codingame.com/pastebin/555910f7-2f09-426c-84e1-23e7cb2c2944
PiterYeh: noice
PiterYeh: thanks
eulerscheZahl: next question Clagus: windows or linux?
Clagus: windows
eulerscheZahl: i'm not sure if the code will work then
Clagus: yeah, it seems not
Bastett: you can use Windows Subsystem for Linux
Bastett: or write the same thing in Powershell or Linqpad or whatever
eulerscheZahl: you can install a linux
Clagus: yeah i will try it in powershell
mark7: Or just modify the code alittle bit
dbdr: always a good idea to install linux :)
Clagus: thanks for the tip anyway :)
dbdr: that said, a python script should work on windows, maybe needs some minor change
mark7: Yeah use linux
dbdr: if eulerscheZahl coded in a dirty way ;)
eulerscheZahl: i was referring to the batch command not working
Bastett: Python isn't my friend. I got so frustrated with virtual environments, and py2/3 incompatibilities
eulerscheZahl: find src/ -name obj -prune -o -name bin -prune -o -name '*.cs' -exec cat {} \; > game.cs
Bastett: I'm sure it's better now, but it annoyed me
dbdr: oh, sorry, thought it was a pure python script
AntiSquid: how many people will promote i wonder
eulerscheZahl: mine is
AntiSquid: will they still got for the around 50% ?
eulerscheZahl: but Clagus tried the bash from Bastett
Bastett: this chat needs threads like Slack or something :P
eulerscheZahl: CG doesn't want to make players sad, now that we got so many
eulerscheZahl: i predict a large silver
AntiSquid: you can have separate chat rooms, create as many as you want #chat_name .... #another_chat
dbdr: I dunno, CG systematically overreacts
AntiSquid: just cleak any of those Bastett
eulerscheZahl: and usually there's much less activity on the chat
dbdr: bronze is large, they might be a #50 boss now :D
AntiSquid: lol not in bronze
AntiSquid: uness they want to kill the contest
dbdr: exagerating
RockyMullet: the bronze boss is usually pretty noob friendly
eulerscheZahl: jupoulton at 250 right now
eulerscheZahl: will drop a bit till monday
dbdr: but did you notice: super easy wood bosses in OOC -> super hard in pac2020
Nerchio: you mean the opposite? :p
dbdr: super fast decay of COC CPs, => super slow
AntiSquid: :D
dbdr: etc
AntiSquid: wood supposed to be easy !?
dbdr: I did mean the opposite :)
eulerscheZahl: we don't know the date for the next contest yet
mark7: frame 14 looks like my bot don't like supper pellets https://www.codingame.com/replay/459477995
RockyMullet: wood was only "hard" because the servers were slow and people wouldnt get promoted, so you would fight way harder opponents than the boss
dbdr: probably 2 weeks after this one, at this rate ;)
AntiSquid: what? why
dbdr: or 2 years
dbdr: well this one is very close to OOC
RockyMullet: from what I understand OOC was not planned
dbdr: I know
RockyMullet: still way better than the overlapping ones
dbdr: overlapping?
RockyMullet: yeah, like at the same time
AntiSquid: those were hidden
dbdr: when was that?
RockyMullet: like HS and the accountent
AntiSquid: oh ?
dbdr: I wasn't born at that time
ZarthaxX: LOL
Gh0stm4chine: guys, what's considered a good ranking currently in bronze ?
RockyMullet: Let me tell you the story boi *rock the rocking chair rocking a mullet*
AntiSquid: top 100 Gh0stm4chine ?
dbdr: :popcorn:
eulerscheZahl: https://www.codingame.com/share-replay/459479956 interesting starting constellation. you can't escape with 100% certainty
RockyMullet: no I lie I dont want tell it lol
cegprakash: ppl in bronze are improving so fast
RockyMullet: The Accountant started before HS ended, thats it
**eulerscheZahl skipped TAC, no time
Gh0stm4chine: AntiSquid, top 100 is gold ? or depends ?
AntiSquid: depends obv
AntiSquid: but you asked about bot strength ? what a decent bot is ?
RockyMullet: so did I, HS was my second contest, so I went ultra tryhard, like going to bed at 4am etc, so I didnt have the energy for it
eulerscheZahl: i remember how you tried at HS
RockyMullet: AND FAILED
RockyMullet: haha
eulerscheZahl: and thinking that your bot was a good killer
RockyMullet: I just coded fast so I was #1 early
RockyMullet: then actual good bot shown up :P
eulerscheZahl: but now you know that an early lead means nothing
anid: Surprising that already 3000 people have joined
RockyMullet: yes, life has broken my optimism since
eulerscheZahl: 2975
RockyMullet: I seen some sponsored ad on FB about the contest, first time I see that, maybe CG poored more money in advertising this time
anid: And already more than 70% Are in Bronze
AntiSquid: but why did they advertise this so much ?
AntiSquid: there's no special sponsor or somesuch
RockyMullet: probably because they are now trying to have less contests
RockyMullet: but bigger ones
AntiSquid: sounds ok
RockyMullet: im just guessing here
RockyMullet: yay last submit got me to 34th :D progress !
dbdr: confinement also helps probably
dbdr: and the prizes
dbdr: and marketing indeed
RockyMullet: yeah makes sense
Doju: I'm not sure whether I should be making my code robust to human error
dbdr: also people learned about this one during OOC
RockyMullet: I think the company / school leaderboard must help for some peer pressure too
Doju: or fix the human errors
dbdr: true
dbdr: it's a good addition
Bastett: yeah I got into this in Ocean of Code via work chatter
AntiSquid: do companies want the personalized glass that much ?
Doju: because atm my pacs are just defaulting to going to the middle because their pathfinding returns None
AntiSquid: wroclaw winning a CG glass ... put it in the hallway as decoration lol
cegprakash: [CG]Thibaud our company logo and website needs to be updated on leaderboard
cegprakash: I have emailed u [CG]Thibaud
anid: cegprakash are there others in pandocorp playing?
Bastett: I assume we're restricted to a single core on these simulations. I've not tried any multithreading. Is there documentation about that anywhere?
cegprakash: they might play anid
anid: :) Get in top 10!!!
Clagus: so I made a script in powershell to copy all .cs files to one big .txt file: get-content *.cs | out-file bigBadFile.txt
cegprakash: sure
eulerscheZahl: yes, single core
eulerscheZahl: and you are paused during your opponent's turn
AntiSquid: there are 2 wood players from pandocorp, they are not your alts cegprakash are they ?
Bastett: @clagus you'll probably want to exclude ob/ otherwise you might end up with AssemblyInfo.cs (unless you're only searching in the current directory)
Bastett: obj/ that is
cegprakash: they are not AntiSquid I asked my collegues to register
Clagus: @Bastett yeah - it seems that it only gets files in current folder
AntiSquid: you're not in top 100 on the company leaderboard cegprakash
cegprakash: No I can see it
Bastett: @clagus that works if you haven't organized your code into multiple directories. Good enough :)
anid: Yeah they are 84th
Bastett: Right, bronze. Hurrah.
AntiSquid: oh
AntiSquid: was looking at schools
Doju: "grid = grid.grid"
Doju: clean and legible
Doju: :D
Clagus: @Bastett yeah :D for now I just want to split my single file a bit :P
AntiSquid: nice
Clagus: @Bastett thx for help
shashwat986: Wait, this doesn't even make sense. I fix collisions, and I lose 60 ranks. Maybe my pacs headbutting themselves had some deeper strategic meaning?
Doju: Maybe :P
Bastett: @shashwat986 are both your headbutting pacs abandoning the high value area you were heading to?
Bastett: or is one yielding to the other?
AntiSquid: 60 ranks is noise shashwat986
shashwat986: One's yielding to the other. That
shashwat986: I think it's probably picking up some even more suboptimal path
shashwat986: I need to work on pellet selection
shashwat986: Thanks AntiSquid, I hope you're right
AntiSquid: 2167 people in the same league, ofc i am right
RockyMullet: Is there a way to tell an enemy pac is dead not just out of sight ?
AntiSquid: just resubmit
cegprakash: try changing ur profile pic shashwat986
AntiSquid: why ? it's a nice pic
mark7: really cegprakash changin profile pic doesn't imporve your rank
shashwat986: Oh crap! Maybe it's bringing balance to the pacs, leading them to give my enemies a few more pellets
shashwat986: mark7 I'm sure he was kidding XD
tobk: I fixed my pacs to actually do 2 steps instead of just one when on speed and lost 30 ranks, too...
mark7: Ya me too :joy:
whadk: what order are the visble pacs given in?
cegprakash: if u change ur profile pic u can confuse opponents.. they forgot who you are and they play differently so u win
eulerscheZahl: by id
whadk: are they like left to right or something
whadk: oh ok
mark7: 0, 1, 2, 3 ..
whadk: but what about opponent ones?
whadk: is it yours first or theirs first
whadk: or alternate
tobk: what does it matter?
RockyMullet: yeah it shouldnt
RockyMullet: matter
cegprakash: just store them in an array the way u like whadk
whadk: yeah i was just wondering
cegprakash: just use the indexing convenient to you while printing original index
tobk: never really paid attention to it. i usually put mine in a map id -> pac or (x,y)->pac anyway
njaber: Is there any situation where having our pacman do nothing would be optimal?
whadk: it doesnt matter now that i realise
Doju: oh
shashwat986: njaber blocking an opposing pac ?
Doju: i've been trying to find why my code doesn't work
tobk: yes, when trapped in a deadend and an opp pac that can kill you inthe only adjacnt cell
Doju: my cell.get_neighbours() has no return line -.-
shashwat986: ouch
njaber: Oh right, then I need to count that as a possibility :(
mark7: Does submitting make your rank go back.. Like I submitted and directly my rank went to 1300 from 550?
ZarthaxX: it resets for the submit yes
tobk: anyone using simulations/random plays/GA and the like yet, or mostly still if/else trees?
mark7: if else
mark7: :joy:
Doju: I have absolutely no simulations
Beerus: please show me memory errors instead of timeouts damn it
Doju: also no consideration for pellet values
tobk: thinking about using random plays for finding paths with most pellets...
Beerus: i use mcts
mark7: Ohh I do find path with most pellets like for depth of 35
shashwat986: The fact that i'm able to get so much of my spaggeti code to execute every turn within 50ms just makes me remark at how cool computers are
Doju: Wait, you guys actually put some thought into your pathing?
Doju: mine is still just closest pellet
mark7: Yes.
mark7: What if you dont find any pellet
Doju: pick a random cell and roll with it :D
eulerscheZahl: of course we plan our paths
tobk: I create a heatmap from pellet values, with the 10s spreading a bit to surrounding fields
tobk: but it's not optimal if the spread from the 10 occludes all the 1s on the way
tobk: (i.e. can't tell if a cell has 1 or 0 if there is a 10 closeby)
Doju: Wait, there's no point to bfs if you just simulate everything with random moves, right?
eulerscheZahl: there is
eulerscheZahl: you can only apply moves to a certain depth
eulerscheZahl: then you have a "final" board state and apply some scoring to it
eulerscheZahl: like the distance to other pellets
Doju: ooh
mark7: I dont maintain a board state
Doju: I see
Doju: mark7 then how do you pick which action path to take?
JRFerguson: hi all, is the forum dead ?
mark7: for Every Pac check all four direction go to direction with most pellets and no collision with other pacs
mark7: and some more conditions..
eulerscheZahl: yes, dead
Doju: Can you even do simulation to any meaningful depth with python?
Doju: It seems like speed would really become an issue
mark7: you can
Uljahn: python, simulation, meaningful: choose any two
AntiSquid: which god ? be more specific
JRFerguson: i need help understanding some specifics about movement
JRFerguson: if 2 pacs are next to each other, different type
JRFerguson: one moves left, other moves right
JRFerguson: how is that resolved ?
eulerscheZahl: they are now further away, if the left one is the one moving left
eulerscheZahl: otherwise: the killing pacman will move, the other is blocked
JRFerguson: yeah, stupid question really, thx euler
eulerscheZahl: 2999 players already
Doju: I just got an idea...
Doju: or a few of them, actually
Doju: I don't think I'm gonna need monte carlo
eulerscheZahl: the simulation is the "lazy way" to cover a lot of cases without much code
eulerscheZahl: 3000 :tada: :balloon:
AntiSquid: 3k !
AntiSquid: and it's only first saturday :D
GetSchwifty: #lockdown
Over9000: I got this weird error a couple of times now ...
Over9000: I get the second to last to line of the grid
Over9000: I try to get last line of grid
AntiSquid: nah, it's obviously flawless game design GetSchwifty
AntiSquid: or the prizes
GetSchwifty: or the community ;)
Doju: there's PRIZES?!
GetSchwifty: i'm glad I now have a productive distraction
eulerscheZahl: a monitor for the winner
Doju: Time to make the best bot ever
Doju: or at least try
eulerscheZahl: https://www.codingame.com/contests/spring-challenge-2020 at the bottom
GetSchwifty: no more blind programming!
Doju: GetSchwifty lol
eulerscheZahl: my monitor slowly breaks :(
Doju: I just got a new one but that fancy curved VA one wouldn't hurt
eulerscheZahl: when i open a window for a longer time, i can still see where it was 5 minutes after i closed it
Doju: ouch
Doju: that does hurt
eulerscheZahl: i have that monitor for about 8 years now and in general i really like it
eulerscheZahl: 2560x1440
eulerscheZahl: 27"
Doju: should i have my method for getting a cell's neighbours in the cell class or in the grid class?
Doju: It seems silly either way
Illedan: w00t, that worked :D
Doju: in the cell class i need to pass in the grid
Doju: and in the grid class i need to pass in the cell's pos
Clagus: in the grid
Clagus: cell should not know about other cells
eulerscheZahl: why not?
Doju: i meaannn...
Doju: my cells have parents
Doju: :D
eulerscheZahl: easier to enumerate your movement options when you loop over the list of neighbors
eulerscheZahl: and no more torus pain. just add the neighbors and done
Clagus: I thought it was a theoretical question :D
Doju: yeah it was
Doju: i think :d
Doju: lemme think about this
Clagus: like from the object-oriented point of view, with single responsibility
eulerscheZahl: that's a coding contest, not a design contest
Clagus: but if the other cells are family, then I guess it's ok :D
GetSchwifty: alabama?
Doju: rofl
shashwat986: JRFerguson since they're colliding, but they're different types, the winner moves, the loser gets blocked, and they're both in the same spot for a second
Doju: Im gonna rewrite that in the grid class and see if it's better
shashwat986: wait, what question did i just answer?
Doju: and tbh i need to rewrite it anyways
eulerscheZahl: this one shashwat986
eulerscheZahl: if 2 pacs are next to each other, different type one moves left, other moves right how is that resolved ?
shashwat986: right
shashwat986: thanks
shashwat986: so since we have 2 pacs in the same spot, the winner eats the loser
shashwat986: (at least that's what i understand from the rules)
mortenschioler: 2Pac's in the game?
shashwat986: lots of them, up to 5 per team, I think, in bronze
tomatoes: and winner also eat pellet?
Tiramon: pellets are eaten after fight so yes
Doju: Actually, should my cell class even have a position?
Doju: since that's technically stored in the grid
Doju: extra-actually:
Doju: why do i even have a cell class
Doju: oh right, it needs to have a parent and "explored"
Doju: nvm
mark7: OMG GUYS MY BOT BEAT eulerscheZahl 's BOT THIS IS EPIC
mark7: https://www.codingame.com/replay/459550936
eulerscheZahl: oh i crashed. thanks for reporting
mark7: :joy:
Doju: hahah
mark7: And I jumped out of my chair
Doju: How do you get the neighbours of cell in a 2d array
Doju: in a clean fashion in python?
Doju: i googled around but nobody really has a good method that doesn't rely on imports
shashwat986: Can only I see my STDERR stream?
ZarthaxX: ye
mark7: check x - 1, x + 1, y - 1, y + 1
eulerscheZahl: not python Doju but to get the idea. i removed the torus part on purpose
eulerscheZahl: http://chat.codingame.com/pastebin/47c9a8b6-f093-41ea-a5ca-6b3bb50e52df
mark7: also wrap around like this
mark7: if (curScore.x < 0) curScore.x = height - 1;
if (curScore.y < 0) curScore.y = width - 1; if (curScore.x >= height) curScore.x = 0; if (curScore.y >= width) curScore.y = 0;
ZarthaxX: lots of ifs
mark7: Ya
Doju: Oh yeah eulerscheZahl's method is definitely way better than mine
ZarthaxX: Point move_in_dir(Point& p, int d, int w, int h) { return Point((p.x + dirs4[d].x + w) % w, (p.y + dirs4[d].y + h) % h); }
Doju: thanks
cegprakash: or just do curScore %= (height, width)
ZarthaxX: if u do modulo u can wraparound
perseverent: can you switch speed and move at the same time?
mark7: no
mark7: not woth same pac
cegprakash: but yeah need to handle negative modulo
perseverent: thanks
ZarthaxX: no need if u do what i did
Doju: and yeah mark7 that's pretty much what i was planning to do
Doju: now how would you do the same thing for an n-dimension array?
Doju: not that i need to do it
Doju: just that doing anything like this in a dimension-independent way is, in my experience, almost always the best way
Doju: just a whole lot of ifs and loops?
Tiramon: great had a bug in building my grid ...arg
Tiramon: yay now the testcase is successfull =)
Tiramon: always worth creating some testcases ;)
eulerscheZahl: unit tests, so advanced
eulerscheZahl: i'm lazy
Doju: you have testcases? :o
cegprakash: did somebody say testcases?
Tiramon: i want to make sure my pathfinding works as expected
shashwat986: are there any other ruby devs here?
AntiSquid: MadKnight
eulerscheZahl: not really a dev, he never writes more than 5 lines
shashwat986: XD
AntiSquid: on the leaderboard page select ruby under language
AntiSquid: 29 total
AntiSquid: one might be a dev in real life
mark7: eulerscheZahl another win this one is clear one.. but I need to still imporve my path finding when less pallets
mark7: https://www.codingame.com/replay/459571527
Hvosten: Hi , I'm writing new chellenge in groovy Sometimes I have time out and without changing code, when I gave replay in the same conditions everything works fine. My algorithm is deterministic. So I dont know if there is some problem with groovy here :/
AntiSquid: you could report it on discord or on the forums
Kellthazar: Is anyone using QuadTree to improve the pathfind code?
Doju: Kellthazar definitely not
mark7: What is a QuadTree
Over9000: Hvosten Well some variation in timing is natural, due to server load, scheduling, and other factors
mark7: Ohh like Binary tree
Doju: i mean definitely not me
Doju: someone might be, who knows
Over9000: So if you're always close to timeout it might sometimes hit the limit
AntiSquid: that sounded like it's meant to be a special amazing data structure, you should have joined during last contest, see what name you can find for that kind of tree (ocean of code) Kellthazar
mark7: Looks like bronze leader-board is stuck
Kellthazar: Hahaha... my A* reach the 1000ms timeout if calcs the distance for every point.
cegprakash: mark7 go study for ur exams. Why are u coding instead of studying for exams :p
mark7: My exams got posponed
mark7: and who wants to study Network Mangement
mark7: :joy:
Doju: Oh btw i think you could speed up pathfinding a lot
Doju: if you optimize it so that
mark7: Or just don't do pathfindin
cegprakash: yeah ditch Network Management learn Neural Networks instead
Doju: if one square in a path is in the path from some other square to the same goal you just copy the rest of the path
Kellthazar: I use path find only to calc the "real" distances between walkable floors.
Doju: ooor just make some nodes or something
eulerscheZahl: told you to do BFS
eulerscheZahl: hey YannT is online ping
Illedan: wow 3k players now
YannT: yo
eulerscheZahl: codeforces announced another Kotlin heroes
eulerscheZahl: May 29th
mark7: codeforces div 4 :joy:
YannT: what be dat
mark7: how low would they go now
eulerscheZahl: 2.5h, about 6-10 problems to solve. Kotlin only
eulerscheZahl: tshirts for top50 + 50 random players last time
YannT: sounds cool!
eulerscheZahl: https://codeforces.com/contests?complete=true
YannT: speaking of my first cg tshirt should arrive any day in the post now :)
Astrobytes: *euler warms up the IntelliJ IDEA Java->Kotlin converter*
eulerscheZahl: great
AntiSquid: what do you mean by that mark7 ? (i don't go on codeforces so no clue what you're on about)
mark7: they had 3 type of round division 1, 2, 3
eulerscheZahl: i have my tshirt chance next saturday. let's see how codejam goes
mark7: higher the number easier the problems
mark7: they now also introduces div 4
AntiSquid: ah ok
Kellthazar: I thought that A* was more fast eulerscheZahl, I will try BFS for sure...
mark7: A* don't give shortest path
eulerscheZahl: BFS gives you the distance from 1 node to all others, not just one to one
AntiSquid: why is everyone updating euler about their bots ? all day every day :D
eulerscheZahl: and A* is a heuristic search. you can't be sure to actually find the shortest path
eulerscheZahl: then i'll update you in return. got pushed to #3 :o
mark7: eulerscheZahl is a *GURU* haha
mark7: :joy:
YannT: I used floy warshall to precalc all distances from everywhere to everywhere round 1
YannT: works like a charm
Astrobytes: Uncle Euler the CG Oracle
eulerscheZahl: floyd warshall even has a worse time complexity for grids
eulerscheZahl: but if it's fast enough: sure, why not
YannT: I used it like cells are a graph tho
eulerscheZahl: great algo in terms of codesize
Doju: oh floyd-warshall has weights?
Doju: hmm i might need that
YannT: my complexity is O(N^3) but where N is number of walkable cells, no grid size
YannT: so it's not horrible
eulerscheZahl: and my BFS from each cell is O(n^2)
eulerscheZahl: 20ms on large maps
YannT: yeah mine's more like 100ms
BaconHairkid56: huh
YannT: but out of 1s it doesn't really matter
BaconHairkid56: .-.
eulerscheZahl: fast enough
AntiSquid: flexing the bfs
BaconHairkid56: :worried:
BaconHairkid56: :confused:
AntiSquid: bacon isn't supposed to have hair on it, shave it off before you fry it BaconHairkid56
ekym: lua is the superior language
Astrobytes: Bacon has hair on it when it's alive :(
Beerus: with the exact same conditions i dont get timeout on visual studio but i get timeout on codin ide
eulerscheZahl: 2222 in bronze
AntiSquid: might be vegan bacon Astrobytes
Beerus: how i am supposed to find the bug
Astrobytes: Fair point AntiSquid
AntiSquid: timer 0.00479578 my bfs
AntiSquid: i think that's 4 ms, i win
eulerscheZahl: single cell or whole map?
AntiSquid: every cell to every other cell distance calc via bfs
Doju: waait, you take the bfs all the way to the whole map?
Doju: i just stop it when i get a valid cell
eulerscheZahl: run full BFS from each cell
AntiSquid: it's first turn precalc Doju
eulerscheZahl: that gives the dist from each cell to each other
akshat: Someone please guide me on pathfinding, what should be the stop condition for BFS? If I calculate BFS scores to whole grid from each pac then all the pacs go to the same point, if I give it a limited depth then nothing works :(
eulerscheZahl: empty queue is a good exit condition
akshat: but that's when all the map is traversed
akshat: so all pac has a common target
AntiSquid: my code is unoptimized, i guess c++ is just faster
eulerscheZahl: definitely
eulerscheZahl: and my code isn't speed optimized either
eulerscheZahl: using OOP, not just arrays
Doju: def get_cell_neighbours(cell): http://chat.codingame.com/pastebin/2949db02-d8af-42bd-b528-486db20a4bd1
Doju: i reckon that'll work
AntiSquid: i do use objects, a lot
Doju: not clean by any means but at least cleaner than my original solution
PiterYeh: Beerus if your program takes 45ms per turn to execute on your intel i9 @5Ghz it might take 200ms to run on the overloaded cloud server that CG is using
Doju: Oh right i forgot the warp-around
eulerscheZahl: CG servers are fine now. they added more instances
eulerscheZahl: and there is a match queue anyways. so the performance isn't affected by other games
Quidome: Nice :)
eulerscheZahl: just how fast your submit finishes
Sopu: Is it normal to have a move action that shows up in the standard output but doesn t show up in the game summary?
dbf: yes, today it is great - submits are fast
eulerscheZahl: actually there are 2 queues. high priority for IDE games, low prio for submit
PiterYeh: but still, a server cpu is probably significantly slower that a high end cpu, su maybe he is having this kind of problem
PiterYeh: i wonder, how many instances does CG use? this looks like a lot of work
eulerscheZahl: i only know that they have 2.2GHz to 3GHz
eulerscheZahl: used to be the amazon cloud
[CG]Thibaud: Sopu, maybe your output is desynchornized from the game. Happens if you sned multiple lines of output during a turn. You read 1 turn only, but played x turns
eulerscheZahl: they wanted to move to Azure. not sure if they did it in the end
JBM: time for some Haskell https://www.twitch.tv/cg_jbm
akshat: How do you guys manage that your pacs don't collide to each other?
dbf: [CG]Thibaud, thanks for your hotfixes done yesterday, performance is good today
akshat: when you run BFS
Astrobytes: Ah too early for me JBM, I'll have to watch it later
BenjaminUrquhart: magic
MaxCol06: ?
[CG]Thibaud: :)
MaxCol06: ???????????????????????????????????????????????????????????????
AntiSquid: MaxCol06 please stop
MaxCol06: Ok
AntiSquid: you keep spamming, you summon the wrath of AutomatonNN
Doju: yeah [CG]Thibaud you werre really quick when anything happened
AutomatonNN: 50* 25 now
AntiSquid: see ? now you have to do math
Kazamisa: I saw an achievement called puzzle of the week
[CG]Thibaud: we tried. Ideally, these issues wouldn't happen but well
llllllllll: in which order do pacs start 'looking around' ? N E S W ?
Kazamisa: what is it looked in puzzles I didnt find anything called like that
[CG]Thibaud: it appears in your notifications Kazamisa (every week)
[CG]Thibaud: puzzle changes every week
jrke: hey any CG staff
jrke: here
eulerscheZahl: akshat there are several ways to avoid collision. some kind of random search is the easiest IMO
eulerscheZahl: you could also look into Kuhn-Munkres
eulerscheZahl: aka hungarian method
akshat: Okay, thank you @eulerscheZahl :D
[CG]Thibaud: well I wrote something 2 message above yours jrke :D
[CG]Thibaud: +s
jrke: :slight_smile:
eulerscheZahl: you might have left in the last 30s
jrke: but i can beat a player above my rank in local ide but still my rank doesn't goes above them
jrke: i am submitting again and again if any error but same thing
eulerscheZahl: then you perform worse against other players
jrke: ya to some players
Ken_Fool: is it normal that the codingame ide has no codecompletion?
Ken_Fool: i though i had it a couple of days before
Over9000: Maybe you turned it off in settings (left sidebar)
MaxCol06: http://chat.codingame.com/pastebin/17bc6f07-a739-47e4-815d-9d47c0720573
BenjaminUrquhart: k looks like it's time to work on my bot
thethiny: 12 hours and you're here
thethiny: welcome @Benjamin
BenjaminUrquhart: :eyes:
thethiny: I just woke up
thethiny: it was a power sleep
Ken_Fool: #Over9000 thx for the typ i found the expert mode but nothing about completion mb i try another browser
Ken_Fool: *tip
Uljahn: they fixed it, so it's less agressive now i guess, ctrl+space to manually summon autocompletion
Ken_Fool: yeah i use ctrl+space but it never finds any functionnames and im lazy af
Ken_Fool: it is what it is
Ken_Fool: ^^
Uljahn: indeed
eulerscheZahl: i don't get any suggestions in code completion either. i'm using C#, might be different on other languages
Uljahn: py3 the same
thethiny: you only get code completion if it is in the scope of the window
Ken_Fool: c++ on my end, i did some codingbattles and it had pretty nice completion on stl
Ken_Fool: but that was last weekend or that before
Ken_Fool: #thethiny so never for anything global?
thethiny: window scope not function scope
Clagus: For C# guys: if anyone is interested how I solved copying multiple classes into single file to copy-paste into CondinGame web IDE: https://stackoverflow.com/a/61698295/2941313
thethiny: as in what you currently see on screen
Uljahn: ah, it works in specific cases
Ken_Fool: #thethiny ohh thats interesting
Ken_Fool: thx
Over9000: Oh come on, almost got a draw out of it, and then I block myself: https://www.codingame.com/share-replay/459601262
thethiny: https://imgur.com/a/nKOEVOz
thethiny: this explains how the IDE sees
Ken_Fool: hm mb, i should use some other ide then, but i love the idea of lighweight only using browser
thethiny: yeah same here but I don't wanna instal TWO apps
thethiny: Visual Code + 2 other apps
[CG]Thibaud: there is something off with this autocompletion. I'll tell the devs
thethiny: automaton2000 tell devs there's an issue
Automaton2000: does anyone know if you can
Ken_Fool: i love vscode for reading but i do not want to dev in it. when i add the c++ stuff it gets rly distracting to read
thethiny: extensions
lxnn: Have I misunderstood something, or does SPEED not do anything?
thethiny: you misunderstood something
AntiSquid: yes
Uljahn: yes
thethiny: speed only works if your distance is > 1
Illedan: eulerscheZahl: https://www.codingame.com/replay/459605112 Is that kill on frame 70 intentional? Or Are you going for those pellets?
Ken_Fool: haha just running the code to fix my typos and accidently keep beating the boss lol
Ken_Fool: :D
thethiny: intentional cuz it says Trap
BetterThanJohannes: Why does it time out in c#
Over9000: 98% battles done, and now nothing seems to happen any more :sad:
eulerscheZahl: Illedan not intentional yet, as i don't track invisible opponents
Illedan: aiit
thethiny: then how did you say trap?
Over9000: Woo this latest submit pushed me 100+ ranks!
Illedan: you still wrecked me on this submit
eulerscheZahl: but i have some nice kills
eulerscheZahl: thethiny of course it was intentional in the end. but not planned for several turns
Ken_Fool: wait when my picture is the one highlighted i won?
Ken_Fool: :joy:
eulerscheZahl: https://www.codingame.com/replay/459317850 that was the good kill, planned on frame 60, happened on 70
thethiny: isn't that a waste of 10 frames?
eulerscheZahl: it's a kill after all i think it's worth it
DJBrutalShoe_53cc: bruh im tryna learn java programming but its so diff
thethiny: oh damn this is the best play I've ever seen in my life
PatrickMcGinnisII: http://chat.codingame.com/pastebin/91acd559-2cab-46fe-87e7-88014917392c
PatrickMcGinnisII: http://chat.codingame.com/pastebin/5de10e72-368b-4ede-9693-d16fa9741dd8
MaxCol06: http://chat.codingame.com/pastebin/6202e67a-9deb-4977-bd6e-d8fb45093fb5
PatrickMcGinnisII: So nothing would ever work, smh. I stupid
thethiny: Damn, eurlerscheZahl https://www.codingame.com/share-replay/459612008
Doju: my neighbouring cell finder finally works
Doju: Like the cleaner one
Doju: exceept that i think it should still be in the cell class
jrke: check this antisquid
jrke: https://www.codingame.com/replay/459616884
AntiSquid: ?
AntiSquid: check what
eulerscheZahl: thethiny why don't i kill you at frame 56? debugging time
jrke: replay your pac
jrke: both pac same position from starting to beginning
jrke: sorry
jrke: starting to ending
kovi: hungary dominates the top
eulerscheZahl: :de:
AntiSquid: ya look at my bot's rank, kinda expected imo jrke :p
rewriting some stuff atm
jrke: look at my rank also:stuck_out_tongue_closed_eyes:
AntiSquid: ya ok bad rank :p
AntiSquid: i belarus, russia, germany, romania and then hungary though
AntiSquid: i see *
jrke: https://www.codingame.com/replay/459622010 any suggestion what else can i do
aangairbender: guys earlier Ctrl+S didnt open save dialog, did it?
aangairbender: its so irritating
Illedan: agreed aangairbender
aangairbender: just a habit saving the code every 5 sec
Astrobytes: Same
Doju: same
Ken_Fool: is the battles thingy buggy for you guys too atm?
Ken_Fool: it is rly slow and when i want to get back to my code i get an red popup error message sending me to the contest start page
eulerscheZahl: jrke frame 14 eat the big pellet
jrke: K
eulerscheZahl: and around 80 you have a bad coordiation between 2 pacmen
dbdr: eulerscheZahl #3, gg!
dbdr: too late :D
eulerscheZahl: 4
jrke: yes euler thanks
dbdr: was true at the time
jrke: ranks as changing like flow of water
jrke: every refresh you got another rank
eulerscheZahl: in a small margin it's constant
Cappefra: my next step is going to be handling cooperation between friendly pacs
jrke: ya but in my stage its not constant
shashwat986: What sort of cooperation are you thinking off Cappefra ?
shashwat986: *of
aangairbender: marking next step of friendly pacs as an obstacle in the pathfinding should work well for the first time
Doju: aangairbender that's what i was about to do
Cappefra: @shashwat986 I'm not sure, for starters I just want my pacs to never be stuck with each other
Doju: Cappefra that's pretty easy
aangairbender: I have just realized I marked target cell not the next cell
Doju: just check if a pac has been in the same pos for two moves in a row
Doju: and then do something about it
Doju: So i was wondering just now
dbdr: kovi trouncing me 3-0 feels like OOC all over again :D
Doju: if you want to simulate moves
Doju: recursion seems like a smart strategy for that
Doju: but how do you simulate the enemy?
Doju: if you do the same simulation for the enemy, you just get into an infinite loop
aangairbender: these boys know something about mcts related stuff
aangairbender: I am in legend league in poker chip race with some kind of smitsimax
aangairbender: maybe smth like that will work here
llllllllll: still dont understand how the pacs decide which way to go if they have 2 paths with the same distance
jrke: will all league open on monday or only silver
aangairbender: only silver I guesss
aangairbender: as it was in ooc
jrke: i think silver and gold
lxnn: Is there a way to display debugging messages on the game interface?
Doju: Argh why do my pacs think there are no pellets left when they haven't even explored all of the cells
jrke: input is given only of those pellets which have seen by your pacs
Doju: No i'm using a different method
jrke: so can't say anything
Doju: i'm assuming that there are pellets everywhere unless the pacs see that they aren't there
Clagus: 10 point pellets are always visible right? so they always appear in turn inputs until eaten?
Doju: yes
Snef: yes
jrke: yes
icecream17: so you know where opponent is if eaten
Clagus: wow, so much possibilities
Clagus: yeah I just realized that :D
Illedan: kovi, you have bugs :D
kovi: ?
Illedan: https://www.codingame.com/share-replay/459640470
Illedan: The last pac you lose just stops in the corner :P
Illedan: Oh, nvm. I had 1 more round of speed. Damn tooltip -.-
Illedan: But how do I have more speed than you :/
Illedan: Oh, you only move 1 dist with that last speed
kovi: interesting game for sure. both loss
Illedan: So yeah, bug :D
kovi: i wont call it bug...but weakness
Illedan: Moving 1 less step than you can, while being chased by a hungry Pac? That's a bug.
jrke: how you guys know that pellet is present at this point if there is no visible pellet
jrke: ?
thethiny: you know at the start
Doju: jrke i don't know
Doju: for sure
thethiny: then everytime you eat one you remove it
jrke: i had did but if enemy pac eaten one and enemy pac is invisible the
jrke: n
thethiny: you have to assume pellet is there until proven otherwise
Doju: thetiny to that you also need to add that every time you see a cell is empty you remove it
thethiny: yes correct
jrke: K means i am right
jrke: i did same thing
Doju: If you really want to get efficient with that strategy
Over9000: Oh the symmetry: https://www.codingame.com/replay/459646325
Doju: you could try to guess which pellets the opponent's pacs have eaten
thethiny: BTW guys don't use euclediean distance use manhattan
Illedan: Use the real walking dist.
Doju: thetiny dont use manhattan use BFS
jrke: i know were using that only
thethiny: @Over9000 you fail to recognize warps
thethiny: if you go from the side you come from the other side
Over9000: Ah I know what you mean
Over9000: No that's intentional, it doesn't see anything useful there because the other one ate it all
Doju: xD
Over9000: I do recognize warps
thethiny: okay
Doju: fair enough, Over9000
jrke: is this in each map that if you go from the side you come from the other side
jrke: ?
thethiny: yes
Doju: not in every map
Doju: some maps are closed
Over9000: Yes, if both sides have floor there
thethiny: oh not each map
jrke: then how can we came to know which map have and which haven't
thethiny: does anyone have the seed from Benjamin?
thethiny: I saved it in notepad but I forgot that you can't undo in it
Doju: jrke i'm not sure if you can do that with manhattan distance in a smart way
Doju: but it's pretty easy to integrate into bfs
thethiny: @ BenjaminUrquhart
BenjaminUrquhart: oh um
BenjaminUrquhart: which one
thethiny: the infinite loop
pwahs: can someone tell me the maximum size of the map?
thethiny: Constraints 2 ≤ Number of pacs per player ≤ 5 29 ≤ width ≤ 35 10 ≤ height ≤ 17
pwahs: I couldn't find it in the rules
RockyMullet: 29 ≤ width ≤ 35 10 ≤ height ≤ 17
BenjaminUrquhart: seed=-7826971533994987500
BenjaminUrquhart: hold up I broke something in my submit
thethiny: Thanks ben
thethiny: yes I saw that
thethiny: you're rank #493 now
BenjaminUrquhart: cause I broke stuff
thethiny: @ Over9000 try the seed
arnial: we can't access to the silver league yet ?
thethiny: nop
jrke: no it will open on monday
james1729: Does anyone know if pacs can see across warps
arnial: haaa ! try to improved my AI cause i thought it wasn't good enouth to rank up
thethiny: yes they can @james
thethiny: you should always try to improve your rank
thethiny: after all there are only 3 winners
thethiny: and 97 complimentary moral awards
arnial: yes but we will have ne rules after that
icecream17: and a lot of gold awards too!
pwahs: @arnial, no, rules are done
icecream17: and silver, and bronze, and wood
icecream17: everyone gets a prize
thethiny: The new rules, I doubt they exist, will continue from here
thethiny: @icecream17 I don't think wood get awards
arnial: you think the rules are setlled ?
muy31: CG points!
thethiny: it said that the rules are settled
muy31: thats the prize
thethiny: in the video it says so
Thiesjoo: Wow i started bullying my enemies and i went up 500 places
thethiny: hahaha
jrke: hey anybody knows how to get smallest value func in c++ min() isn't working
Scarfield: min will work for 2 intergers, are you trying it on an array?
Clagus: can a pac see through the "teleport" pass (through the edges of the map)?
Cappefra: Yeah Clagus I think so
RockyMullet: yes
Clagus: thx
KiwiTae: RockyMullet o/
MadKnight: hihi
KiwiTae: MadKnight u joined the contest?
BenjaminUrquhart: KiwiTae looks like it
BenjaminUrquhart: 1309th bronze in ruby
AntiSquid: hi kiwi
KiwiTae: ohoh o/ hey AntiSquid ~
AntiSquid: o/
KiwiTae: just submitted smth after blindly coding for a few hours >,<
Doju: I don't even know how it's possible to beat the top players
PiterYeh: I remember that in C++ you can use pragmas to enable a -O3 optimized build. Does anybody know if there is something similar for C#?
Doju: like they probably simulate every move
Illedan: Doju, you need to eat more pellets than them
KiwiTae: Illedan good call
Doju: Illedan oh riiight thanks
Doju: I have 400 damn lines of code and i'm #732... :/
Illedan: 755 lines
RockyMullet: hey KiwiTae !
BenjaminUrquhart: lines don't really mean anything other than complexity though
Doju: Although i have no RPS or enemy logic
Doju: or anything advanced really
eulerscheZahl: PiterYeh you don't need anything like that for C#. We get release mode in the arena since recently
eulerscheZahl: but only for C# and Rust
PiterYeh: oh alright, thanks
PiterYeh: i can evaluate like 30 nodes in 50ms. I guess i just suck :/
Kellthazar: Evaluate the distance?
icecream17: http://chat.codingame.com/pastebin/a7437757-3ebf-4847-a117-d400ef2f6878
PiterYeh: evaluate a game state and his neighbors (the next turn)
Doju: actually before i start doing anything i should just try to go for super pellets only
KobeL: how do speed turns work? are they not moving towards your target give in your output for that turn,
thethiny: they do 2 moves in 1 turn. Not 1 move for 2 turns.
KobeL: so do you need to provide a second output within that turn?
thethiny: no
thethiny: example:
KobeL: Ok that's what I was expecting, hmm
thethiny: you're at 0, 0 and you want to go to 0, 3
thethiny: if speed is on
thethiny: you become 0, 2
thethiny: if speed is off
thethiny: you become 0, 1
thethiny: it's still 1 turn
Uljahn: just specify a target 2 steps away
KobeL: Uljahn that's it, that's why some of my pacs weren't making their speed moves
icecream17: is this "flood" correct?
icecream17: http://chat.codingame.com/pastebin/5ab484f5-b2d2-4188-9061-6edc861dba0c
Illedan: Anyone have a seed with 5 pacs and a complex map?
Doju: Illedan are you pushing those simulation levels? :P
Illedan: I'm not simulating. (yet)
Uljahn: seed=4029809621905664000 but no teleports
Doju: wow
KobeL: how do you get the seed from a game?
BenjaminUrquhart: options tab
Illedan: Enable Expert mode under settings kovi
Illedan: *KobeL
thethiny: next to your name at the bottom
ZarthaxX: Illedan not searching?
KobeL: found it thx
Illedan: Search yeah, sim no.
KobeL: seed=7146388042811426800 relatively complex 5 pac
Kellthazar: My BFS algorithm took 379 ms to calc all distances... =/
ZarthaxX: whats the difference..
ZarthaxX: u mean u are not doing a depth search?
Illedan: :D
ZarthaxX: lol
BenjaminUrquhart: Kellthazar do it all on the first turn
BenjaminUrquhart: you get a full second there
Illedan: Thx for that seed KobeL. It has some features I need to test
KobeL: You're welcome Illedan!
Kellthazar: Yeah, I'm doing, still got timeout sometimes.
Doju: Wait, are these guys seriously doing 30 move deep simulations?
Doju: that's...
KobeL: lol who's doing that?
Doju: 8.5*10^26 different decisions
Doju: i think eulerscheZahl is doing that
eulerscheZahl: no, only 4 turns :D but i might step it up a bit tomorrow
Doju: oh lol
Doju: not sure how i got the number 30 in my head
Doju: ok thats not that bad
Doju: a few thousand
eulerscheZahl: my search is still flawed
YannT: you do the 9^10 order combinations per turn eulerscheZahl? Oo
Doju: isn't it 7,9?
eulerscheZahl: hell no :D
eulerscheZahl: check this: https://www.codingame.com/share-replay/459694476
eulerscheZahl: i only get 1 large pellet
eulerscheZahl: that's something to work on: get 2 at least
YannT: it's 9 possible decisions per pac per turn, and 10 pacs maximum (if doing opponent)
YannT: so 9^10
Doju: oh right the opponent
Aitorcius: how can the pacmans move all together? (without threads if possible)
Illedan: Only depth 4 euler? :P
eulerscheZahl: for now...
eulerscheZahl: i have ideas to get deeper
Illedan: Damn
Illedan: I'm at 22 xD
Doju: whaat
Waffle3z: what are you simulating?
Doju: that's a stupid amount of calculations
Doju: Illedan how
eulerscheZahl: beam search
Scarfield: haha nice avatar waffle :D
Illedan: Pruning.
eulerscheZahl: that's something to put into google ;)
Doju: Yeah i thought pruning would be a smart thing to do
YannT: just expanding a state for all the possible move combinations took too muych time when I tried it :p
BenjaminUrquhart: Aitorcius you can command multiple pacs using a bar-separated line of output
BenjaminUrquhart: "MOVE 0 1 1 | MOVE 1 2 2"
Aitorcius: ouh i forgot that, it is my first bot programming ty too much
Matjaz: Do you guys write all the code in the codingame editor or is there a good way to take the code our and run simulations?
KiwiTae: Matjaz the referee is on github
BenjaminUrquhart: I do it all in the editor
Hjax: i write my code in eclipse, and then paste it into the editor
Aitorcius: Visual Studio
PiterYeh: Matjaz https://www.codingame.com/forum/t/cg-local/10359
Matjaz: I mean, I know I can edit it elsewhere but is there a decent way to partially test or somehow simulate a good part of it without pasting in and running it?
zams: Theres a chrome plugin so you can save the code locally and it will upload it for you
Matjaz: I see, the link above I assume.
PiterYeh: The Java source code for the referee and somulation is open source, so you could run that locally
PiterYeh: https://github.com/CodinGame/SpringChallenge2020
Matjaz: Thanks, I'll check it.
Ken_Fool: gosh im malding
Ken_Fool: i typed only '=' in all my new ifs and was wondering why my code doesnt work >.<
Ken_Fool: time for coffe xD
Marben: Does anybody else experience major issues with the Clojure language? Like lots of seemingly random "not provided 1 lines in time" messages?
Marben: Right now I try to send "MOVE 0 1 1" in a loop and it times out....
icecream17: check the standard error strean
Marben: The funny thing is there is nothing there
Marben: My code was running fine, but some battles are lost in 2 steps (with the timeouts) and if i send the parameters to the IDE those looses are not even reproducible
Dr-D: Maybe some kind of server failures. Sadly they happen during contests
icecream17: oh that's probably the overloaded server dont worry
AntiSquid: so annoying ... send to IDE lost game, suddenly it's a win :/
Dr-D: Uh, 4 more Dart-coders!
thethiny: @AntiSquid randomness?
AntiSquid: i know what it is, just wanted to complain
thethiny: XD
AntiSquid: Automaton2000 explain it to him
Automaton2000: i see the problem in my code
thethiny: Can the seed be consistent?
thethiny: somehow
icecream17: OPTIONS -> manual
AntiSquid: what do you mean?
AntiSquid: play on same seed?
thethiny: if my code has random()
thethiny: it will not generate the same number every run
icecream17: no
AntiSquid: yes you can set random seed
icecream17: of course not
AntiSquid: which language are you using?
icecream17: wait
thethiny: can we make the game server FORCE a seed?
icecream17: no
thethiny: that's what I mean
BenjaminUrquhart: here's a question
AntiSquid: for your game or for your bot's use of random
icecream17: the game does the seed andf the sends inputs to you
BenjaminUrquhart: can we write files to our running directory
thethiny: Squid, what I mean is that don't allow users to have random seed, instead make it always give the same random
thethiny: @Benjamin do ls with permissions and see if you have write
AntiSquid: that's optional thethiny
BenjaminUrquhart: the easiest solution is to not random
AntiSquid: you can't force it on others though
thethiny: yeah that's true
icecream17: do 3895394357315987 * turn mod something so that it's basically random
icecream17: make your own random function that's actually pretty random but consistent
thethiny: that's smart
thethiny: I will do that
AntiSquid: btw it's this kind of squid https://i.ytimg.com/vi/mVmEv2e-e3o/maxresdefault.jpg
AntiSquid: details: https://lh3.googleusercontent.com/proxy/gELpLaYikMSlk6nGorwlwr9AF52jaBi1YgxvLN2nQomN-WwPEEzYRZVYi6aR-msU4iQLzFaKvizrTQBuuEm5
BenjaminUrquhart: http://chat.codingame.com/pastebin/89aff06b-11ab-4755-87c7-132455fceab7
BenjaminUrquhart: so yes, we have permissions to write within our folder
Clagus: moving fast isn't actually moving faster per turn, it's freezing non-fast pacs for 1 turn... right?
BenjaminUrquhart: kind of
Doju: not really
Clagus: but you can't get control of your pac in the second turn of movement
Doju: yes
Aitorcius: how can i avoid collisions? i mean change the direction if the pacmans collied
thethiny: if current_pos = last_pos
Clagus: you can check if they stay in the previous position
Aitorcius: ok
Kellthazar: remember to skip this check if you activate SPEED in the last turn :)
Clagus: and then it's still tricky cause you have to know where are other pacs
Clagus: and that :D
thethiny: uhmm guys what's the best way to get the ms elapsed?
Doju: which language?
Clagus: in what language?
BenjaminUrquhart: get time after receiving input and get he new time after output
BenjaminUrquhart: the*
BenjaminUrquhart: difference of the 2 is the time
thethiny: python currently
thethiny: int((time() - start_time) * 1000)%1000
Schneewittchen: time.time()
thethiny: I feel like this is wrong
thethiny: because I'm getting 80ms
Doju: not sure if it's the best but what i currently do is
BenjaminUrquhart: when do you start it?
Doju: import time
thethiny: I start it after While True:
Doju: t = time.process_time()
Doju: after giving command to a pac
BenjaminUrquhart: do it after you receive the first line of input
Doju: i do elapsed_time =( time.process_time() - t) * 1000
thethiny: oh damn
Doju: how did that
Doju: lol
thethiny: what Benjamin said works wonders
Doju: elapsed time = time.proce
thethiny: now it's 3ms
Doju: why did i get a sad face
thethiny: cuz you wrote : (
Doju: i dont think i did
Doju: oh wait yes i did
thethiny: you used brackets
Doju: nvm
thethiny: anyways thanks all for the help!
AntiSquid: why % 1000 thethiny ??
thethiny: cuz time in milliseconds
Doju: that's modulo
Doju: oh you dont use the starting time?
thethiny: yeah but I think I don't need it since int() already does that
thethiny: good point AntiSquid
kovi: grat illedan
Matjaz: Should I be parsing the map and constructing the graph out of it? Or am I going the wrong direction?
Kellthazar: Yes! Ny pre distances calcs now runs at 40ms.
Kellthazar: My*
Zenoscave: Matjaz that is a good idea to do
Matjaz: And should each space be a node or just intersections?
Illedan: :D
Matjaz: I'm not sure how to decide about that.
Kellthazar: Matjaz that was the strategy I adopted...
Zenoscave: depends on your usage
Zenoscave: YMMV
Matjaz: Alright, I guess I should just give it a go.
Kellthazar: I build a graph composed only by the floors (I skip all the walls).
anid: well done illedan
Kellthazar: 79 - 126 (versus Illedan).
Kellthazar: Oh well
Doju: i got 86 - 121 vs Illedan
Marben: im so confused, ive changed nothing but my time measurment and suddenly im climbing 100+ ranks
Thiesjoo: I got 54-145. Still some improvements to be made
Thiesjoo: Marben people learn and get better than you
Thiesjoo: And if you resubmit your rank is recaculated.
Marben: Thiesjoo of course they do but thats not my point
my point is about the not reproducible timeouts im getting :(
BenjaminUrquhart: 130-130 vs Kellthazar https://www.codingame.com/replay/459735911
Thiesjoo: Oh ok. That's weird. I have not gotten that issue myself.
BenjaminUrquhart: Illedan calm down there
Kellthazar: BenjaminUrquhart, the MSG command is working?
BenjaminUrquhart: you just append text after a command
BenjaminUrquhart: MOVE 0 1 1 message
Kellthazar: Oh, nice! :)
Kellthazar: Thanks
Schneewittchen: Is there a good way to check for dead enemy?
eulerscheZahl: no
Schneewittchen: Well then..
BenjaminUrquhart: I go by "if I can't see it, it doesn't exist"
Schneewittchen: No predictions?
eulerscheZahl: others go by "i can see it, it doesn't exist"
BenjaminUrquhart: not yet
Mystical: What is clash of code?
AntiSquid: something you should stay away from
AntiSquid: play the contest
AntiSquid: https://www.codingame.com/contests/spring-challenge-2020
RockyMullet: I agree with my non squidy friend
Kellthazar: 101 - 126 After some movement rules improvement.
eulerscheZahl: clash of code: short puzzles which you solve in limited time (15min maximum) you play against other users who get the same puzzle at the same time. if there are no other active users, you play against bots who replay the solution of earlier real contestants
AntiSquid: euler enjoys it btw so invite him Mystical
eulerscheZahl: i broke my bot :(
Zenoscave: That's what my description says after all
Zenoscave: invite euler
Schneewittchen: Just happy little mistakes
RockyMullet: bob ross makes me happy
Schneewittchen: *flap flap flap*
Schneewittchen: Cleans the brush
RockyMullet: shake de devil out of it !
njaber: Schneewittchen Dead enemy must have been killed by your pac, so theoricaly you should have seen it, but the problem is you intercept them at corners or something... The enemy dies before you know he was here
RockyMullet: njaber thats annnoying
RockyMullet: hard to tell that an enemy is dead and not just out of sight
Schneewittchen: Jea he could have evaporated behind a corner
njaber: Actually maybe they thought of it and decided to log it to you anyways, I haven't tested it, I just deduced that from the rule
RockyMullet: I'm about to start a "possible enemy positions" just like OOC for those kind of problemes
njaber: Yeah I'm doing the same
AntiSquid: how will you handle missing enemies?
Schneewittchen: Particle fiters gurlz
AntiSquid: maybe they are stuck in a corner
RockyMullet: well you can assume start position is a mirror of yours
AntiSquid: later in the game i mean
njaber: If you do your algorithm well enough you should be able to have it deduce that the enemy must be dead
Zenoscave: Filter positions on MOVE!!!!!
Waffle3z: resubmitted and dropped to last place after timing out every game in a row. I don't time out at all in the IDE
RockyMullet: well just like OOC, you know where they could move, so every position moves
RockyMullet: when you see them, then you reset everything
Schneewittchen: Just do a spreading every move
wlesavo: RockyMullet im doing the same, but silence every turn seems op
RockyMullet: yeah you dont have all the same info than in OOC of course
wlesavo: and its silence for 0, 1 and 2 also
njaber: Jsut doing spreading doesn't allow you to deduce enemy position from taken pellets I think
RockyMullet: but at least in this one you can see the pacs :P
Zenoscave: plus up to 5 pacs
Doju: Do you guys have something like a "Universe" class that has everything else in it?
RockyMullet: njaber yeah most of the time you wont know actly where there are, but its worth it for the times you do
Doju: i'm not sure if i should shove everything in a class
AntiSquid: yes
Waffle3z: are you programming in java?
AntiSquid: do it
Doju: python
AntiSquid: i mean why not
Waffle3z: then you don't need a class
AntiSquid: just throw everything in
Csipcsirip: yes, I too tried to implement a tracker like in OOC. but the branching is so huge it timeouts after few turns
Doju: I feel like it might be handy later so alright why not
wlesavo: Csipcsirip keep only positions
AntiSquid: it will be messy lol
Doju: to throw everything in a class?
AntiSquid: well ofc
Doju: isn't it messier to keep everything everywhere
njaber: I think I'll do some kind of spreading+keeping in memory known pieces of info that could help eliminate possibilities if I get other possibilities
njaber: other info*
AntiSquid: idk i don't keep my tv and microwave in the bathroom just because i have my toilet in there Doju
njaber: But you keep everything in your house
AntiSquid: you keep everything in your bot
njaber: He's just asking if having a special scope is worth anything
njaber: a limiting scope
njaber: I do, just in case I want to name something a name that exists natively for some reason
BenjaminUrquhart: can't hurt
Doju: OK im gonna do it and cry myself to sleep later when i'm too deep into it and realize that it's a bad idea
k4ng0u: is there a way to debug games and using breakpoints? (for now I am mainly using standard errors or faking inputs but it's really inneficient)
njaber: Grab the code from github and set it up so you can run games locally
wlesavo: damn, removing a "feature" you thought was important sometimes gives outstanding results
Hjax: @wlesavoits always fun when you fix a bug and your bot is worse after
Hjax: oops wrong ping
Hjax: @wlesavo
wlesavo: also that, yes
yassineH: guys how am i supposed to use this https://github.com/CodinGame/SpringChallenge2020
BenjaminUrquhart: study material
BenjaminUrquhart: Hjax same
yassineH: i mean i have eclipse and i dont know what to run
eulerscheZahl: do you have maven?
yassineH: yes
eulerscheZahl: import the github project as a maven project
yassineH: i did and it build successful
eulerscheZahl: then run the main class in the test folder
yassineH: ah okay
yassineH: thx
eulerscheZahl: you might want to edit it to use your own bots
eulerscheZahl: there are commented lines that you have to uncomment and adjust
yassineH: okay i will keep you updated..
yassineH: thx
AntiSquid: nice euler, got another fan who gives him bot updates :D
Doju: Wait hold on, i'm freezing real good atm
Doju: so i have my universe class that holds a list of pacs and the grid
BenjaminUrquhart: yes
Doju: how do i get data from the grid to the pacs
Doju: without passing it in as a variable
Doju: to the pac instances
BenjaminUrquhart: you pass it in as a variable
BenjaminUrquhart: :eyes:
Doju: :(
Doju: that seems wasteful
Thiesjoo: Maybe pass a map instance
AntiSquid: uhm you access the variable ? it's in the same universe no?
icecream17: closure
BenjaminUrquhart: I do all my pac processing in my "Game" class which is basically the universe class
BenjaminUrquhart: public Command getCommandFor(Pacman pac) {...}
Doju: earlier i had the grid stored as a class variable in the pac class
Doju: also if i pass them the grid as a variable
jrke: How we came to know what can our pac see
Doju: then they all have their own grids and can't get the same data from one grid, no?
Doju: I haven't taken any formal programming courses as you can probably see :D
Grrec: I bet there is no difference to a professional programmer :P
AntiSquid: there's the degree
AntiSquid: not everyone has that piece of paper
Quidome: can you see the pellets behind an enemy pac?
Doju: meh i'll just try passing the grid as a variable and see if it works, i guess
BenjaminUrquhart: Quidome yes
Quidome: thnxs
Doju: actually i don't even have to change the code at all since i've been calling self.grid instead of Pac.grid. How convenient
geppoz: lol there is a problem in speed move mode command
Doju: Also why shouldn't you index the pacs by their id?
eulerscheZahl: what problem geppoz? that it affects the number of turns until the game ends?
geppoz: you cannot give order to go down and up again in the next double- move
eulerscheZahl: oh right
eulerscheZahl: that annoyed me too
geppoz: if you need to go into a dead end and back
geppoz: how can you give this command?
Doju: or store them in a dict by their id
eulerscheZahl: you can't, just waste 1 move
geppoz: weird
AntiSquid: it would be too complex obviously /s
Csipcsirip: yeah its very annoying. have to put a ot of extra variables and ifs in the code
eulerscheZahl: because everything has to be noob-friendly
geppoz: :D
AntiSquid: how is this noob friendly? lol
eulerscheZahl: only 1 target point
eulerscheZahl: ooh, screenshot time!
AntiSquid: that autopathing is more of a hindrance
AntiSquid: i calculated perfect path, sent the goal as output only to get the shitty pathing from the ref :/ spent a good chunck of time yesterday trying to debug something that wasn't my faulyt
geppoz: after I calc my path, i had to draw back since the base+2 move
baDcoder: Hello, is it possible to run my bot against any other opponents lets say someone from my company ?
BenjaminUrquhart: yes
jrke: yes
geppoz: but this fails in the case i said before
eulerscheZahl: yes, remove the default opponent
eulerscheZahl: but you can only select players in the top1000
Doju: baDcoder yup, you need to enable the advanced mode from the settings in the sidebar
Doju: i think
Doju: then delete the default ai
baDcoder: Thanks everyone, will try
AntiSquid: no problem, glad to help
eulerscheZahl: thank you so much AntiSquid :D
IAmNoob: can anyone help me with a little easy code which i dont know why it dont functions because it is very easy?
cegprakash: eulerscheZahl did u do topcoder
eulerscheZahl: what part of it?
cegprakash: SRM
AntiSquid: iamanoob you could watch streams for the contest: https://www.youtube.com/watch?v=tJrfflbeOlM
IAmNoob: ok thx
cegprakash: there was a contest just ended
eulerscheZahl: no, i only occasionally do marathons
eulerscheZahl: codejam is enough for me with the short format
eulerscheZahl: competing at codechef this time
eulerscheZahl: https://www.codechef.com/rankings/MAY20B?itemsPerPage=100&order=asc&sortBy=rank dropped to 25 because of CG contest :(
AntiSquid: here are more streams if you are interested iamanoob https://discord.com/channels/466965651135922206/472807181163429890
IAmNoob: thx a lot
AntiSquid: no need
Doju: oooohh i finally figured out a thing hahah
Doju: i should be storing my different moving functions in a dictionary
AntiSquid: or you could have callback functions !!
Doju: oh those are a thing thanks AntiSquid
shashwat986: AntiSquid do you use JS?
AntiSquid: /s ? :/
shashwat986: nope :D
NSzx: Hey everyone, I have a quick question: in terms of scoring in the leaderboard, does a win with a huge gap have the same impact as a close win or are points in the battle taken into account? :)
AntiSquid: i do sometimes shashwat986
shashwat986: Just curious, because I don't really ahve the context of your discussion with Doju, and I only know JS as having callbacks
shashwat986: so I was curious how promises etc would work in a contest like this, and if they'd be useful
AntiSquid: i think you got it wrong
PiterYeh: shashwat986 there is no reason to use promises in this context, because everything is and must be syncronous
AntiSquid: i mean you got the callback function part wrong shashwat986
AntiSquid: because it's not JS specific
AntiSquid: Over9000 it didn't work
AntiSquid: it's not exclusive to JS ...
Aitorcius: wow NullReferenceException on my order line... What hapened?
Doju: Is there any reason to give my pac instances ids if i'm storing them in a dict with ids as keys?
RockyMullet: you accessed a null reference
PiterYeh: Doju storing the id is pretty much free, so...
Doju: PiterYeh well yeah, that's true
Zenoscave: Illedan
Zenoscave: You here?
Doju: Feels like such a waste to restructure everything
Doju: although my code is way more readable now
AntiSquid: at least you have your own universe now ?
Doju: and yes, i have my own universe
Lasamat: So I'm new to this site and in bronze league. Can I see the threshold for silver anywhere?
BenjaminUrquhart: there is none yet
Doju: There is no silver
BenjaminUrquhart: that comes monday
shashwat986: 5/11/20. What timezone? Does anyone know that in hours, say?
Lasamat: Ah I see so as a beginner rank 1,200 ish is not so bad I guess. Thanks for telling me
AntiSquid: 5pm UK time
shashwat986: thanks
BenjaminUrquhart: oh hey I beat mazel once https://www.codingame.com/replay/459789122
AntiSquid: but akara chudra is first
BenjaminUrquhart: and?
eulerscheZahl: so it's not impressive
BenjaminUrquhart: whoops I accidentally resubmitted
BenjaminUrquhart: (╯°□°)╯︵ ┻━┻
Doju: do you have a macro for that ascii art
RockyMullet: I beat euler twice :D
BenjaminUrquhart: `/flip`
AntiSquid: you need to aim for the #1 headband
Doju: (╯°□°)╯︵ ┻━┻
Doju: thats amazing
AntiSquid: (╯°□°)╯︵ ┻━┻
AntiSquid: /flip
BenjaminUrquhart: eulerscheZahl https://www.codingame.com/replay/459803428
Over9000: That's a lot of /flip
**anid slaps colliding pacs around a bit with a large fishbot
shashwat986: So, I took a good amount of time to ensure I'm moving two steps in Speed mode. Now I need to sit and undo that, because i'm overshooting the best possible spot XD
icecream17: Ugh, my "superlongpath" was superlongpath [ '15 4', '14 4', '16 4', '15 3', '15 5' ]
BenjaminUrquhart: that doesn't look very super
o_imej: guys any idea for 2 pac collision ? what can i do in this case, back 1 step ?
BoBot: I actually have not implemented that myself :D
AntiSquid: no it's ok, the caps lock were necessary to show enthusiasm
Durkin: did the exact same thing, shash, massive feelsbad
solaimanope: how to handle more than one files for java?
BoBot: I think if you memorize your position, and you are in the same position 2 times in a row, you should switch to doing something else
solaimanope: what should be the class name that contains main?
Clagus: Player? at least that's default name
Aitorcius: http://chat.codingame.com/pastebin/9cd9e030-f76d-4cb2-bea7-2372d9952c9b
CRVII: Hi, any ideas about how I can circumvent 0 pellets (timed out) loses?
Aitorcius: it makes me a NullReferenceException idk
MadKnight: then don't reference a null Aitorcius
BenjaminUrquhart: is pacmans initialized?
AntiSquid: that depends on your code CRVII
Scarfield: you need to figure out why you are timing out CRVII, could be many reasons
Aitorcius: yes
Aitorcius: PacMan[] pacmans = new PacMan[visiblePacCount];
CRVII: hmm, it's random. Makes it fun to figure out haha. Cheers ill give it another lookie
Zenoscave: I think I fixed something
Zenoscave: ...
Doju: I'm only now making a separate function for getting input
Doju: i should've done this a looooong time ago
RockyMullet: you pewpewed that bug
Zenoscave: pewpewpew
Aitorcius: Any advice for "has not provided 1 lines in time":frowning:
Doju: Aitorcius either you have a bug or you code is reeaaally slow
BenjaminUrquhart: pewpewpew
Over9000: Check Standard Error Aitorcius
Doju: bug is more likely if you're not doing anything advanced
Zenoscave: Make sure you print a \n also.
Over9000: If there's nothing in Standard Error your code is too slow
Jesus_inn_party: it means your program did not give output
Scarfield: what league Aitorcius?
Aitorcius: Wood 1:joy:
Doju: Okay it's probably a bug :P
Jesus_inn_party: or an unstopable loop
Doju: isn't that a bug?
Zenoscave: ^this
BenjaminUrquhart: Zenoscave you didn't fix it enough https://www.codingame.com/replay/459815440
Aitorcius: ok, 517 lines of code :joy:
Doju: wow
BenjaminUrquhart: stop flexing lines of code
BenjaminUrquhart: smh
Doju: how did you...
Doju: ok i wont ask questions :d
BenjaminUrquhart: ?
RockyMullet: lines of code means nothing
Doju: well it means that you've written a ton
Zenoscave: BenjaminUrquhart how do you choose where to explore
Aitorcius: im beginner on programming no problem
Zenoscave: That's the worst part of my bot i think
BenjaminUrquhart: Zenoscave I assume every empty space has a pellet unless proven otherwise
Scarfield: have your code worked with more pacs? Often you will get bugs when going up a league due to the new rules
BenjaminUrquhart: that's about it
Zenoscave: and BFS?
BenjaminUrquhart: just a bfs yeah
Zenoscave: ok
Doju: what
Doju: i'm doing the same thing but im rank 567
Doju: Do you have some fancy RPS logic?
Zenoscave: There's no such thing
Jesus_inn_party: my previous bot on wood 3 cloud beat the bot at bronze
Zenoscave: see. Axelrod
BenjaminUrquhart: there's no such thing as logic when it comes to rps
BenjaminUrquhart: you just get lucky
Doju: what i really meant was fancy combat logic
Doju: like what euler has
Doju: the trapping thing
shashwat986: wow
shashwat986: i can't even see in the speed step?
BenjaminUrquhart: no
Doju: oh really?
Doju: well that sucks
Doju: a lot
shashwat986: :( makes it harder to debug, because here i'm wondering why my pac didn't see those dots
wlesavo: yeah, thats annoying
Zenoscave: BenjaminUrquhart how doyou keep from going back over bad spots?
BenjaminUrquhart: define bad spots
Scarfield: does anyone know if there will be changes to the referee? it seems from chat that there are a few issues that could be imporved
Zenoscave: one sec lemme find a replay
Scarfield: spots that are not good :p
Scarfield: im here all week
Zenoscave: I mean spots that are 1 dist away but your speed is two so you skip them
BenjaminUrquhart: I kind of don't
BenjaminUrquhart: I do hackery after the search to change my destination if I'm speeding and the dest is 1 away
Zenoscave: Ok I'll try that
Jesus_inn_party: the most annoying thing is when your pacs are blocking each other and dont stop ighting for he spot
Jesus_inn_party: *fighting
BenjaminUrquhart: that was a fun problem to think about
GetSchwifty: anyone has a seed with 1 pac each?
wlesavo: why would you ever do that
Scarfield: 2 ≤ Number of pacs per player ≤ 5
wlesavo: oh
GetSchwifty: ow
wlesavo: ive read wrong
wlesavo: nwm
Ken_Fool: woot, i run it once finished 4th afked for 2 hours am back and next league?
BenjaminUrquhart: public static int MIN_PACS_PER_PLAYER = 2;
public static int MAX_PACS_PER_PLAYER = 5;
Jesus_inn_party: what would you think will be added to the rules when the next league is free to go
Hjax: nothing, these are the final rules
BenjaminUrquhart: no more new rules after bronze
Jesus_inn_party: then what would make it more difficult as it is right now
BenjaminUrquhart: peopel
Hjax: people making better bots?
Doju: BenjaminUrquhart so do you just BFS to the closest (even if in superposition between existing an not existing) pellet?
BenjaminUrquhart: Doju well yes but actually no
BenjaminUrquhart: :eyes:
Doju: :D
Doju: I see
Jesus_inn_party: that is a wise answer
GetSchwifty: ow, so speed is in it's final stage? I can't seem to use it correctly
Doju: Indeed it was a wise answer
F0lio: .
BenjaminUrquhart: .
F0lio: ..
BenjaminUrquhart: !
BenjaminUrquhart: hi
Doju: Oh i just got a very good idea
Jesus_inn_party: maybe from the next league the amount of pacs you are having is not limited
Doju: and i think it might be similar to what you're doing
BenjaminUrquhart: it's capped at 5 for sure
Doju: Although pretty much everything that i'm planning atm is just an excuse not to do simulation
Jesus_inn_party: how many lines is everyones program having
BenjaminUrquhart: doesn't matter
GetSchwifty: I'll add some returns
Doju: I'm at 480 but 100 of those are gonna be gone in 5 minutes
Zenoscave: 1 line
Aitorcius: i removed bad code, aprox 40% of the total and it hasnt provided 1 lines in time wowowow
BenjaminUrquhart: no lines
Zenoscave: -5 liens
BenjaminUrquhart: reverse debt
Zenoscave: Exactly
shashwat986: I'm at 570 lines
shashwat986: but a good chunk of that is comments
shashwat986: because, you know, must have comments
Jesus_inn_party: what are you writing with isnt that a little too much
Zenoscave: Jesus_inn_party lines don't matter
shashwat986: It's ruby :D so it would be much more in a verbose language like java
Zenoscave: It's a horrible way to measure code
Aitorcius: how do you write the ordes? in a single line or in parts
icecream17: i win again. 590
Doju: Oh that's a problem haha
Doju: you need them to be in a single line
Zenoscave: icecream see above comments
Doju: separated with |
Aitorcius: it doesnt works :neutral_face:
BenjaminUrquhart: icecream17 what did you win
GetSchwifty: shashwat986 https://www.codingame.com/replay/459828333
Doju: Aitorcius what language?
Jesus_inn_party: there is a standard output in the output discription
Aitorcius: c#
Doju: ok i have no idea how to do anything with that
shashwat986: thanks GetSchwifty !!
Jesus_inn_party: i do
shashwat986: I have NO idea what happened here
Aitorcius: like Java, you know?
Jesus_inn_party: i know with c#
Doju: well anyways the output has to be like this
Doju: MOVE 0 5 7 | MOVE 1 16 10
Aitorcius: Jesus tell me
Jesus_inn_party: you will have to make a for loop and
Jesus_inn_party: insert letters one by one to a string
Aitorcius: yea but i write this order with 5 pacs idk
Aitorcius: ok
Aitorcius: ill try
Doju: I'll tell you how i'm handling the output in python if it helps
Doju: i have a list of strings with the commands
Aitorcius: yea of course
Doju: then i do " | ".join(list_of_commands)
Aitorcius: ok
Jesus_inn_party: i am not sure if there is a join method in c#
Over9000: You can have an extra | at the end
PiterYeh: Jesus_inn_party there is String.Join
Aitorcius: yea there is
Jesus_inn_party: are you sure ?
Over9000: So you can just loop and print COMMAND+"|" for each pac
Zenoscave: String.Join(" | ", IENumerable)
eulerscheZahl: Zenoscave will you use C# regularly now?
Zenoscave: Most likely
Zenoscave: I've known it for years. just was stuck in a rut wanting to do a lot of python learning
Jesus_inn_party: i know both and python is a little easier to undrestand
Doju: Which code is cleaner?
Doju: http://chat.codingame.com/pastebin/1082925e-af91-4040-a197-90fb9b9b1b39
shashwat986: 1
Zenoscave: 1
eulerscheZahl: pac.command("closest") what are you doing?!
BenjaminUrquhart: 1
ShannonNorris97: I'm having to learn Python to teach my students next year, having primarily coded in C# previously. I have to say I find Python much cleaner and more enjoyable to code in
shashwat986: he's seducing the pac, obviously
Zenoscave: Honestly that should be separated into a different method for each command
Doju: euler i learned about callback functions an hour ago
anid: 1 may be easier to understand, but it is easier to modify and debuf #2
shashwat986: telling it to come closest
eulerscheZahl: if pac.mine == True: if pac.mine:
Doju: oh right, true
BenjaminUrquhart: chat scroll broken this is a message
Zenoscave: what does "closest" command do?
BenjaminUrquhart: anid not really
shashwat986: commands.append(pac.command("closest"))
BenjaminUrquhart: so what's pac.command
Doju: pac.command is a function in the pac class
eulerscheZahl: and why does it get a string?
Doju: which is horribly written
Doju: but anyways it gets the closest pellet using BFS
shashwat986: i'm guessing it runs a method called closest. he's metaprogramming
Doju: a method in the pac class*
Zenoscave: http://chat.codingame.com/pastebin/1bb53bbc-3f17-4f1d-9301-551547a02f18
eulerscheZahl: so you parse the string argument in that function to decide what to do?
Doju: yup, it's definitely not smart
Zenoscave: they should each be a separate function
Doju: well, the command method also has a few other bits
Jesus_inn_party: how are you finding the losest pellet?
Zenoscave: so you could have def Closest(args needed only for closest):
... and call
pac.Closest(...)
Zenoscave: Does command do the outputing of the command?
Zenoscave: Jesus_inn_party bfs
Doju: command returns a string with the command
Zenoscave: Breadth first search
PiterYeh: mmm how do i set the icon of my company?
Zenoscave: ShannonNorris97 what level of education will you teach?
BenjaminUrquhart: magi
BenjaminUrquhart: c
ShannonNorris97: Zenoscave I live in England, teaching first year college students. (16/17 yo)
Zenoscave: I teach a Software Methods and tools class in it.
Zenoscave: CS 1 at my uni used a wonderfl book for python
RockyMullet: hum, my possible enemy pos jsut have too many possibilities, not sure I can do anything with that
Doju: So if i have multiple different methods for calculating the next move
anid: How much do u expect that they will take into silver?
eulerscheZahl: ShannonNorris97 sounds similar to what MSmits is doing. He teaches physics and recently started with comp sci too
Doju: how should I do it?
Doju: callback functions?
ShannonNorris97: Oh nice, what book would that be please? I don't really have any materials for teaching it as of yet. Would be nice to have a book to recommend
BenjaminUrquhart: anid I'm assuming around 50%
Doju: Oh its cool to see teachers here btw
anid: thanks @BenjaminUrquhart
Jesus_inn_party: wait if there is no new rules in tthe next league the same bot will be playin so what will make you worthy to go to the league after
ShannonNorris97: Oh that's cool eulerscheZahl, I don't believe I've met them
Zenoscave: ShannonNorris97 I sent you a PM
ShannonNorris97: ty
BenjaminUrquhart: Jesus_inn_party being better than other people
BenjaminUrquhart: that is the competition after all
anid: Also jesus_inn_party, when the level increases, some strategies work better
Jesus_inn_party: yes but thre must be a standard level of skill for you to go o the next league or else every time the first five(for example)will go to the next league and then when the last one could make it to the silver league thre is no one in bronze and wood?!
Jesus_inn_party: there must be new rule that we dont know yet
Edrevan: jesus its the boss
Edrevan: the boss changes
pivek303: what a wonderful contest !!! :grinning:
Jesus_inn_party: maybe talking about it right now wont help
Jesus_inn_party: will see what happens
Edrevan: its simple.
icecream17: Beat bronze boss
icecream17: = silver
Edrevan: the bosses will get better, and thats the cutoff
icecream17: The bronze boss =
icecream17: player
Durkin: ? It's just beating more people than the boss beats as a ratio of total battles. Dont have to beat the boss, just more people than the boss beats
BetterThanJohannes: Does anyone know why the int visiblePelletCount is different everytime ? sometimes its low and sometimes its high, sometimes it does not return anything at all
zams: When is silver getting unlocked?
BenjaminUrquhart: monday
BenjaminUrquhart: 11th
Edrevan: monday night
Edrevan: click on the league icon on top
Quidome: @BetterThanJohannes you are in bronze?
Over9000: Wait it says Wednesday now
BetterThanJohannes: Yes
BenjaminUrquhart: yall bad https://imgur.com/th63YAa.png
Quidome: OK, you see only pellets in line o sight
BenjaminUrquhart: and yes, I refreshed
BetterThanJohannes: OOoooooh
BetterThanJohannes: i see, thank you
Csipcsirip: brilliantCoder212 nice nickname :D
icecream17: =O my bot is better?
icecream17: just by "speed" if opponent speed, even very buggy, wins 9/10
BenjaminUrquhart: speed is the meta right now
icecream17: But the thing is, everyone does this:
icecream17: Rock sees Paper
icecream17: Rock turns Into Scissors while Paper does nothing
icecream17: But if I do
icecream17: Rock turns into Scissors while Paper turns into Rock
icecream17: will I have a higher ranking?
Zenoscave: No
Zenoscave: RPS has no nash equilibrium
Zenoscave: is my intuition
icecream17: But what if I detect my opponent always does this
BenjaminUrquhart: basically, any wins you get based solely on you rps playing is purely out of luck
Clagus: but they you will loose vs guys that play safe and turn into what they see :D
Clagus: *then
Zenoscave: Basically any RPS strategy is just as effective as any other strategy globally
Zenoscave: No matter how fancy. Random choice performs just as well also
BenjaminUrquhart: md37 what broke
Zenoscave: Sure you might win more at some strats than others but other strats win more against you. Much like RPS has all moves beaten by other moves. RPS Metas all are beaten equally likely by other RPS metas
Zenoscave: That being said. Because the timing of when you can switch is not always at the same time, There's some give to this.
AntiSquid: Automaton2000 what's your favorite pac race? rock paper or scissors?
Automaton2000: but it takes a few minutes ago
RockyMullet: submit looking good :O no defeat in 17 games
Doju: Hitting play for the first time after major restructuring
AntiSquid: :o
Zenoscave: Nice RockyMullet
RockyMullet: jinxed myself
Doju: fingers crossed
RockyMullet: lost 19th
Zenoscave: It always happens
AntiSquid: gg
AntiSquid: well rekt
Doju: and RockyMullet, wow
RockyMullet: I found ONE use to my possible enemy position lol
RockyMullet: I doubt it will make a big change but hey
AntiSquid: +1 rank
RockyMullet: I need to find a way to discriminate more positions without destroy my perf
Doju: oooh no
Doju: this is not the bug that i wanted
Doju: i've messed up my inputs
Cxyda: hi there, did i overlook a rule or why the game summary sometimes says : "Only pacs with the SPEED ability enabled can move"
Doju: The speed thing basically works so that if it's enabled, you move twice in a row
Doju: and pacs that dont have it dont
Doju: but you can't control the second move yourself really
BenjaminUrquhart: but you have to target a space 2 away
Clagus: i submitted 3h ago, and for some reason I'm keep getting higher in ranking :D currently 443 :P
Clagus: I'm afraid of resubmitting
hviko: :D
Cxyda: i still don't get why my pacs then stop moving
Clagus: but I guess I can always revert :P
Doju: Any ideas on how to debug getting the inputs?
BenjaminUrquhart: print them
Doju: I think i have them in the correct order but it doesn't work
AntiSquid: lol .
Clagus: @Cxyda if your target is 1 field away, it will not move extra move
BenjaminUrquhart: meanwhile, my ranking is going down
NapTown: you have to give it a move >= 2 if you have speed, because it doesn't ask for output on the speed round
Cxyda: my pacs did not enable SPEED, but all of my opponents did, and then my pacs stop moving every second frame
BenjaminUrquhart: eys
BenjaminUrquhart: yes*
Clagus: that's how it works
Clagus: it's stupid, but that's how it is expected to be
Clagus: so speed is basically freezing all "not-speed" pacs for 1 round
Clagus: which lets you drastically shorten the battle if you use it one by one, so there is always 1 pac with a speed :P
Cxyda: so if one of my bots activates SPEED all other bots are freezing? So the only tactic would be enabling Speed for all at the same time ?
BenjaminUrquhart: AntiSquid fix it https://www.codingame.com/replay/459866854
BenjaminUrquhart: Cxyda it's purely visual
icecream17: dbdr you won against me in the LastBattles but not in the ide: https://www.codingame.com/share-replay/459866868
icecream17: (timeout)
Clagus: @Cxyda I don't think that's the only tactic
BenjaminUrquhart: icecream17 please gain ~100 places so I can battle you kthx
icecream17: submitting
Cxyda: yeah .. but you cripple your own pacs ... but okay ... i guess this should be written somewhere
AntiSquid: yes BenjaminUrquhart ?
BenjaminUrquhart: hi
icecream17: game 23, 1299. last time 775 so probably good
AntiSquid: what's with the replay?
BenjaminUrquhart: yes
AntiSquid: rank 300 bot, i mean i would expect it to be performing poorly
icecream17: 804
icecream17: your good benjamin
Clagus: @Cxyda - they are not crippled - just the others move faster - and the battle clock is ticking faster too
AntiSquid: doesn't even have switch
Cxyda: kk THX ! now i got it .. sorry
Clagus: @Cxyda but I still think that clock should not be increased during "speed" turns
BenjaminUrquhart: icecream17 your pacs tend to go back and forth a lot
icecream17: i know. another bug
Zenoscave: How do you stop that?
BenjaminUrquhart: https://www.codingame.com/replay/459870053
Zenoscave: the back and forth
BenjaminUrquhart: magic
icecream17: PrevSpaces1 and PrevSpaces2
Zenoscave: Makes sense
Zenoscave: Seems ugly
icecream17: can't think of anything better
icecream17: but probably something ewxists
icecream17: *exists
BenjaminUrquhart: hover over their icon and press the button on the popup
BenjaminUrquhart: same thing
Zenoscave: That's the same thing md37
tobk: does line-of-sight stretch across the "wraparound"?
icecream17: yes
BenjaminUrquhart: yes
Zenoscave: no
BenjaminUrquhart: yes
Zenoscave: maybe
tobk: then why was my pac walking right into that other that could kill it?
Doju: maybe
tobk: let's check...
Zenoscave: It does I'm just being obstinate
Durkin: Gamerules say it does, if it's not you may not have accounted for connection
BenjaminUrquhart: according to referee source it does
Zenoscave: I was lying for fun
Zenoscave: just wanted to cause chaos
BenjaminUrquhart: smh
tobk: aw, crap, I see it, but I only consider those within a certain distance
tobk: and since they are line-of-sight anyway, using manhattan distance at that point
Zenoscave: Do modified manhattan
Zenoscave: abs(dy) + min(w-abs(dx), abs(dx))
tobk: yeah, something like min(x1-x2, width-(x1-x2)) or something like that, right?
Zenoscave: yup ;)
Zenoscave: don't forget abs
AntiSquid: how are your if elses
tobk: or just upgrade to proper (limited) BFS for distance...
Zenoscave: That's smart too
AntiSquid: you need CGpremium to ue BFS
AntiSquid: duh
AntiSquid: so not everyone has it
AntiSquid: it's P2W
seronis: you mean to use a library for it. or just write it
muy31: seronis he's messing w/ you
muy31: lol
AntiSquid: to write it ofc
Durkin: oh for sure, my parents bought me BFS instead of a car, far more usable considering the current year
AntiSquid: so 7/10 wins in the initial 10 battles means you are good enough to start fighting at rank 1000 or so and climb from there, nice
Fosfen: Hello, does some of you have a timeout problem in match when code is submitted or is it my code ?
AntiSquid: click send game to IDE and see wht the error message says
Doju: aaaaaaaaaaaa
Doju: i've been looking for this bug
Doju: for like an hour
Doju: def get_input(self): #Updates instance variables
self.update_score() self.update_pac_info self.update_pellets
Fosfen: Oh Thanks for the tip @AntiSquid it was actually an out of range error ! thanks
AntiSquid: no prob
AntiSquid: that will be 5£, thanks
icecream17: I wish there was something that find bugs, or at least likely bugs
Doju: Dont we all, icecream17
tarunraveler: just jumped from rank 400 to 1300 making my pacs killers :head_bandage:
TinfoilSaint: I have a test suite that I run against my code to help with bugs
TinfoilSaint: whenever I find a bug I write a test for it so that I can see if it comes back
BenjaminUrquhart: I believe there are IDEs that detect that
BenjaminUrquhart: tarunraveler killing is not the strat here
tarunraveler: most of the matches I lose were due to my pacs getting eaten by others, so I decided to resolve that first
Clagus: maybe you should just outrun them :D
tarunraveler: But I think I'm going to remove all of that and checking my next move better
icecream17: Ugh, when I speed, I move two spaces and therefore think I skipped a pellet and move back
Ken_Fool: outrun and or play rock paper scissor like it is supposed to be :)
Ken_Fool: mindgames
Clagus: @icecream17 can't you update you data base on what you see?
icecream17: maybe but my "lineOfSight" isn't very successfull
Waffle3z: nice icecream17, I also don't remove the in-between pellet but I do update based on what I can see so that would leave an edge case when I go around a corner
tarunraveler: outrunning them won't help if they keep all the super pellets as hostage
Clagus: I just check all 4 directions until I hit the wall :P and update my board data
Waffle3z: actually it wouldn't leave an edge case, I can see the corner pellet after I go around it so it just doesn't matter
Clagus: yeah using vision is nice
Waffle3z: I check in 4 directions until I hit a wall/boundary and if the x is 0 or width-1 then I keep checking from the other side
Doju: it's finally working
Doju: or at least not crashing
md37: how is score calculated in coc leaderboard
Doju: Hey itay121
itay121: anyone know why the peccets is not updating?
BenjaminUrquhart: you only get pellets in your line of sight
BenjaminUrquhart: if you're in bronze
itay121: its show me pellets that already gone
itay121: I am in wood, just started
BenjaminUrquhart: you're caching something wrong then
Kellthazar: After some rest, lets go back to the fun! :)
Cappefra: submitting in this challenge is such a surprise every time
Cappefra: >"There we go, now I'm definitely much stronger" >drops 300 ranks
BenjaminUrquhart: akshat you here?
BenjaminUrquhart: Cappefra that applies to every contest
itay121: Its weird, there is no documntion?
BenjaminUrquhart: scroll down
BenjaminUrquhart: docs under the viewer
Cappefra: I feel like there-s more of a variance in this one though
itay121: yeah I know but they dont have list of what every function do
BenjaminUrquhart: could be all the random bots
Cappefra: I think so too
AntiSquid: @_@ chubbyFreak this isn't twitch chat
Durkin: yeah I thought the B's would be red too, not pink
AntiSquid: and i am trigger happy
itay121: I am telling my pac to go to the pellets with the most value but its stay in place and think he is on the pellet with the most value
itay121: like the map does not updating
Cappefra: but it does update
AntiSquid: check your code more carefully
Cappefra: you're probably saving all pellets positions and you're not removing the ones you visit
itay121: I need to remove them?
itay121: It doesnt updating without me touching it?
AntiSquid: you don't update your map properly i guess
Durkin: yeah the map only tells you what pellets exist that turn, doesn't tell you what spaces dont have pellets
Doju: Durkin that's a bit annoying but can be dealt with in 20 lines of code
Cappefra: well in the next iteration it will give you a new map with the missing pellets but if you don't remove them from the memory in your code...
yassineH: hello every one.. about the local way to run the contest... in default the ai is runing in python.. but i am trying to make it go with javascript.. any ideas how???
itay121: so how do I save it outside the game loop?
yassineH: i tryied nodejs.. but the readline() function is not working..
icecream17: save what....
itay121: save the pellets that I already ate
AntiSquid: nodejs ??? what ??
icecream17: In a global variable?
Counterbalance: yassineH add this to the top of your js script:
Counterbalance: http://chat.codingame.com/pastebin/5667e4c9-7685-4ee6-9a25-4e36b4ebda7b
Counterbalance: and put this file in the directory above where the js is:
itay121: in python just outside the while loop?
Counterbalance: http://chat.codingame.com/pastebin/4ae13e47-b094-4ac4-b26c-06e10b43128a
Counterbalance: (might need some path tweaking but this is what I used in gitc contest)
AntiSquid: thats a lot of effort to make it viable :p
Counterbalance: yes
Counterbalance: the file in the parent is to be named 'shell.js'
yassineH: okay thx;.. i will check it right away
Counterbalance: it is set up so that you can leave that first snippet in the file when you submit it to cg
itay121: how do I use global variable here?
AntiSquid: declare before the main while loop ?
Astrobytes: If you're using it inside a function or method you have to declare it global
Astrobytes: Otherwise the function/method assumes it's local
Cappefra: So I just found an infinite loop in the way my pac explores a straight route, cause I didn't think of maps that have a straight wall-to-wall line with a warp
Ken_Fool: can i output speed and move in the same line?
Cappefra: tip for anyone who didn't think of that scenario, like me
Cappefra: @ken_fool nope
Counterbalance: yassineH any luck?
Ken_Fool: does when my opponent call speed, and i don't it automatically timeout me?
Cappefra: no Ken, it just creates sort of a turn between turns where nobody outputs anything but the pacs with speed active keep moving
Ken_Fool: so i can output Speed newline output my move commands?
Cappefra: again no you have to wait for the next turn
Cappefra: when you output speed you'll stay where you are, in the next 5 turns your pac will have double speed
Ken_Fool: oh okay, i lost some games by default because me opponent just used speed without directions and it said i havent delivered any outpu
Ken_Fool: #cappefra thx for the answers
Cappefra: the only thing you have to care about is moving towards points that are at least two steps away when you have speed active, cause you just output your move once and it goes two steps towards it
Ken_Fool: thanks for that, very confident i would have ran into that ^^
Cappefra: haha yeah I did run into it
yassineH: okay i am stuck with "ERR_UNKNOWN_ENCODING" in the buffer inside the readline function.. help Counterbalance hh
Ken_Fool: still wondering why it generates an autoloss if i output something and my opponent just called speed
Cappefra: mmm it's probably unrelated
Doju: well this is dumb
Cappefra: like maybe your code makes an assumption about enemy movement and there is none so you run into a null or something
Doju: you can't iterate through a dictionary and delete some of the entries
Counterbalance: yassineH hmm I haven't seen that before
Cappefra: cause of its size varying during the foreach?
Doju: yeah
Ken_Fool: nah mine is not that advanced yet, i havent even started to do any calculations xD
Cappefra: what language are you using?
Doju: python
yassineH: Counterbalance is this what i am suposed to right in the Spring2020Main.java test:
yassineH: gameRunner.addAgent("node " + my_game_folder + "prototype_0.1.js", "Inky", "https://static.codingame.com/servlet/fileservlet?id=43829821541064");
cegprakash: 100 companies are in leaderboard
cegprakash: :D
Counterbalance: yassineH try changing stdin_cache += b.toString(null, 0, n); to stdin_cache += b.toString('utf8', 0, n);
yassineH: ok
cegprakash: Amazon, Microsoft and Google are out off top 100 xD
yassineH: Counterbalance thx alot man.. it works
Counterbalance: cool ;)
Ken_Fool: this is some serious 1980 shit, when my hardest problems are typos
Doju: Time to resubmit and pray that i didn't modify any of the mechanics
Doju: or actually i did but at least not in a negative way
Counterbalance: wow, 11k+ participants
Durkin: xD I'm sure it's not related, but looked up after you said that Duju, and my guy went up 20 slots
Astrobytes: Counterbalance 3,232 participants, 11k+ registered
Astrobytes: Still huge!
Doju: Durkin well apparently i introduced something that causes my code to time out while restructuring
Doju: soo... :D
Doju: Ouch
Doju: #550 to #1629
Kellthazar: Wow
icecream17: I saw number of bronze people jump from 2200 to 2459
yassineH: i am getting close to that hhh
yassineH: i am currently 2267
AntiSquid: nice climb
yassineH: nice fall you mean
Doju: Fixed a few causes of the time outs
Doju: now i'm actually winning matches :D
avdg: got a good bot, but timed out
avdg: then figured out, my bot did the same algorithm for every direction (3 times too much)
avdg: heh
Doju: Why am i randomly not giving commands....
Ken_Fool: same
Doju: and why is my "is stuck" thing not working
Doju: :(
Ken_Fool: its rly confusing
icecream17: deleteExtraPellet, submit
Enknable: either youre not realizing youre stuck, or youre doing the same thing after realizing youre stuck that got you stuck in the first place
Enknable: or something else
Doju: yeah i have to figure out which one it is
avdg: mostly stupid bugs
Doju: but finding out why i'm not issuing commands is more important
icecream17: waffle... your profile....
avdg: had it quite a lot this contest, but less then previous ones
avdg: mostly it helps a bit when trying to reduce and then simplify the problem
Doju: Hmmmm
Doju: it's even skipping speed boosting, so this means i screwed up my dictionary
avdg: I guess being 483 is fine for now?
Doju: 483 is pretty decent
Doju: what thee
Doju: my pacs have narcolepsy
icecream17: =O When I played against myself, Rock went on top of Scissors but Scissors changed intoPaper
YannT: that sounds like you got on the wrong website mate
icecream17: ?
YannT: it's not gonna be funny if I explain that joke :(
AntiSquid: use your imagination icecream17
icecream17: still dont get it. sry
Counterbalance: lol
NormantasStankevicius: kovi is back with first place pos >.>
Counterbalance: we have ghosts after all
Doju: Argh why are my pacs doing nothingg
ltmoran: At the start of the game, do you know where all pacs are?
ltmoran: Including enemy ones?
BenjaminUrquhart: no
icecream17: You dom't
avdg: someone really needs unit tests :-)
Doju: yeah
AntiSquid: 2473 in same league, it's like we have a contest without leagues and bosses :d
YannT: actually yerah you do, it's symetrical
rcar: yes, pacs are mirrored
ltmoran: yeah it's big brain time
Doju: YannT you're right
YannT: I do nothing with that, but technically you do know
ltmoran: I'm just thinking about it
avdg: if the pallets were placed randomly, it would make sense to have symmetry detection
ltmoran: And I'm not sure how useful it is
avdg: now I don't need symmetry logics
YannT: it might be useful if you try to do some guessing of where ennemy pacs are
icecream17: Only 70 games, we need more games
avdg: well, you have the layout before the game starts...
avdg: though yeah... starting positions
poloch0n: hi guys, can we put some message on pac ? if yes, how do we do ?
avdg: I see no method in this contest
avdg: unless debug messages in console
icecream17: "command message | command"
icecream17: Debugging tips Hover over the grid to see the coordinates of the cell under your mouse Hover over pacs to see information about them Append text after any command for a pac and that text will appear above that pac
avdg: oh lol
wlesavo: poloch0n MOVE 0 1 1 ATACK
poloch0n: ty :D
Counterbalance: there's some old leftovere code for a MSG command too
Doju: Like seriously what. Pacs in dict have ids 0-4. Command method will throw an error if it's None
avdg: probably should have checked out the code on github
Doju: no errors but pacs don't get commands
Doju: argh whaat
avdg: your code must be trying to be a magician
avdg: making something out of nothing :D
Doju: avdg i think so
avdg: kk jokes aside
Doju: or more accurately make nothing out of something
Doju: jeez it's late
Doju: i'm gonna leave in 8 minutes whether i found the bug or not
Counterbalance: at 1:01 am?
Doju: 2 for me :(
avdg: finland isn't cest I guess?
avdg: seems to be eest
Doju: ouais :P
rcar: finland has it all
icecream17: What... frame 56 is....
Counterbalance: * 4daf031 (HEAD -> master) v7 - collisions - rank 777 noice ;)
icecream17: what...
icecream17: https://www.codingame.com/replay/459970351
avdg: I dropped to 778 with my new submission :p
BenjaminUrquhart: icecream17 looks legit
Kellthazar: I'm going well with my last one...
vivax3794: CoC and the infinite captchas you need to solve before you can play :(
BenjaminUrquhart: do the contest
Kellthazar: From 600 to 423...
avdg: hehe, the one above me is in chat
avdg: for real
Doju: I don't get it
Doju: :_:
avdg: k, my bot won another game
Doju: alright i'm gonna go
Doju: night everybody
Counterbalance: nn
avdg: gnight
avdg: and relax :-)
**avdg looks for cover against rage attacks
Kellthazar: 386 now... wow
Waffle3z: it's symmetric
Counterbalance: my rank is so low, it almost doesn't even fit in the little box in the leaderboard
Waffle3z: why does the chat scroll get stuck at the top all the time
BenjaminUrquhart: because
ltmoran: Does the first turn count as the first time you receive input?
ltmoran: Is the first turn you receive all pac locations?
BenjaminUrquhart: yes
BenjaminUrquhart: also I found a 5-pac seed if anyone wants
seed=-4704861825170230300
avdg: probably best to send game parameters to ide?
avdg: (see big button below player in last battles menu)
BenjaminUrquhart: ?
Counterbalance: doesn't work.. it would be
MIN_PACS_PER_PLAYER=5 MAX_PACS_PER_PLAYER=5
avdg: just check games, pick the game with the lvl you like, import with "send game parameters to ide"
icecream17: what if no game is the one you like
Counterbalance: but they have a check on a system property config.allow.override or something
icecream17: What. My bot went in between the opponent bots but survived because of collision mechanics.
GetSchwifty: do winners ever share their code after the contest?
GetSchwifty: I've never done simulations, would like to see how that would work
akshat: yeah same
Counterbalance: only some high level approaches, never code
Counterbalance: but there's some starter AIs for other multis that does a good job of explaining sims
akshat: like?
Hjax: usually not, because you could copy it when it gets released as a multi
Hjax: @GetSchwifty
Counterbalance: like this https://github.com/Inoryy/csb-ai-starter/
GetSchwifty: thx! i'm digging in
Counterbalance: also look at the referee source code - it's basically that idea
icecream17: Playing against myself is amazing. From (129 to 83) to (129 to 130)
GetSchwifty: will do, as soon as my progress seems to be stalling
BenjaminUrquhart: Hjax I see you're moving up
cegprakash: is it guaranteed in higher leagues that there won't be a 2x2 empty space?
cegprakash: meaning there can be 2 paths to reach a cell at distance 2
struct: Your first statement is correct
struct: but the 2nd isnt
cegprakash: kewl
cegprakash: the generator was harder to understand
Counterbalance: yeah
Hjax: @BenjaminUrquhart i dont really have anything yet
Hjax: this is just some spaghetti that makes sure my infrastructure works
struct: There cant be cell cell cell cell
struct: but there can be multiple paths of distance 2 to same cell
icecream17: =O 3 kills in 2 moves. rampage
njaber: struct what you're saying is contradictory
njaber: the only way this can happen if with a 2x2 square of cells
njaber: is with*
poInT: struct, check the git code for the referee
poInT: you can do like it does so it breaks ties the same way
thethiny: guys how do you handle a queue for a player that died?
thethiny: the ID changes
thethiny: how do you map the new queue
njaber: Wait what, the IDs change when a pac dies?
thethiny: yes
njaber: Ohno
njaber: My perfect plan
thethiny: exactly
thethiny: when my pac dies I see the other moving to a new location
avdg: mine doesn't care
njaber: Wait you mean you pacs
avdg: doesn't track individual state
njaber: No it's not the case
thethiny: if you have a movement queue then it needs to care
njaber: Mine work like they should
Alshock: you sure about that? Cause that's not what the display suggests
thethiny: I am printing
avdg: just keep path finder separate if possible?
thethiny: MOVE 0 0, 0
wlesavo: it is not for sure
avdg: with lookup table
thethiny: when my pac dies,
thethiny: the other moves instead
njaber: Then you're doing something wrong
thethiny: all I'm doing is print 0 0 0
thethiny: just to verify
avdg: mostly, you don't want to cross your pacs anyway
thethiny: and when the pac dies the other starts moving
thethiny: you can try it guys
Alshock: http://chat.codingame.com/pastebin/09ef3833-a2bd-406e-a8fc-181cdd63fe57
thethiny: oh wow
thethiny: I'll revise my code to see if I was doing something wrong
thethiny: thanks @Alshock
Counterbalance: I highly doubt what you guys are saying
thethiny: yeah I was glitching, using a variable from an out of scope
thethiny: my bad
thethiny: sorry all
Counterbalance: no worries - talking about it helped you to focus and you got it resolved
BenjaminUrquhart: Connection refused
Greengreens3: Finding Proxy...
Ken_Fool: wow submitting takes forever
Alshock: still way faster than day1
Ken_Fool: i wish list of battles would highlight the picture of the winner and not myself every time, so i could get a fast glimpse
wlesavo: Ken_Fool its ordered by winner
Ken_Fool: omg you are right >.< #wlesavo
Ken_Fool: i was just thinking player slots
Ken_Fool: my brain disconnected
icecream17: I'm going to do a lot of games...
cegprakash: why is handling 2 step movements too painful
avdg: because you don't have a grid walker?
Bluepioupiou: Hey guys, I've got a huge issue that I can't figure out... my code seem to stop like, not everytime at the same place and some time while reading input. I'm in Python 3 somebody experienced that ?
Alshock: yep I did
avdg: do you have timeout?
Bluepioupiou: ^^
Alshock: Black magic
Bluepioupiou: timeout yes
avdg: also lots of discussions about pacs switching ids
njaber: JS was doing that and C# too at some point, they fixed C#, Idk about JS
avdg: timeout just means you are running too much cpu cycles
Alshock: timeout can mean pretty much anything in "real" matches
Bluepioupiou: it's before any of my code (or almost) It's when the visible pellets are read
njaber: Most likely a bug on CG's part, though there' still the possibility it's your code's fault
RafaelSan: if it fails on input, check you are not reading a new input line when there are no visible pellets
Alshock: a crash, a wrong output, or whatever bug you have will be called timeout
avdg: dunno how much server env can "help" to that timeout though
avdg: in many languages there are gc
ndosm: hello, can someone tell what the message from game summary 'Only pacs with the SPEED ability enabled can move:' mean? please and thank you
Bluepioupiou: it's sometimes at the beginning like when there is 53 pellets, sometime at turn 22 and sometimes not at all
avdg: lots of logging, doing lots of loops, doing lots of cache misses can all help to increase running time
Alshock: @Bluepioupiou When yo ucheck your output online, systematically call stderr.flush() after your "debug prints"
Bluepioupiou: @Alshock ok will try that then
avdg: there is a fog
RafaelSan: @Bluepioupiou but in bronze you only get visible pellets as input
Alshock: @ndosm a move is divided in 2 parts, the first half everyone move 1 cell, the second half pacs with SPEED on can move a second cell
avdg: you only can see straight
avdg: (unless you are at the beginner lvls)
RafaelSan: it happened to me, trying to read pellets line when there wasnt any visible in bronze
njaber: I wish there was a mode in the IDE where we could see the fog just to make it easier to follow what's happening
avdg: it's just straight lines?
RafaelSan: yes
Bluepioupiou: yes, but there is plenty and event there is a loop and a range that allow the empty array case
RafaelSan: and u cant see through walls
Alshock: @ndosm dw tags are case insensitive ^^ you're welcome
RafaelSan: 10 point pellets are always visible btw
njaber: @avdg I know you can deduce it not too hardly, but having visual cues would be more comfortable
Alshock: they're not visible, they're trackable by their stench!
RafaelSan: xD
Alshock: huge packs of rotting algaes... Yummy!
Durkin: I'm sure you won't be against my selflessly cleaning up those algea pockets to clear us all of their stench then. Perhaps that you'll avoid the 10 pellet piles whilst I move to remove them, yes?
njaber: He just said it was Yummy, none would allow someone else to approach something yummy
Durkin: drat, foiled once more
Bluepioupiou: ok, for my timeout issue it seem it was really my code which took too long but I didn't knew abotu stderr.flush so I wasn't seeing why all my log didn't displayed
avdg: logging is mostly kinda slow
avdg: done too much looping with and without logs to know that for sure :-)
avdg: especially if the loops only contain raw cpu specific operations
Bluepioupiou: yes indeed. It's juste that discovering till 10 tiles seems to much for my actual algorithm
avdg: bit offtopic, but I wonder if there are folding@home or rosetta@home crunchers here
BenjaminUrquhart: it's interesting how volatile the leaderboard is
avdg: ranking is a hard problem
njaber: Wasn't the problem with the number of turns and the enemy using speed supposed to be fixed?
avdg: a wins against b, b wins against c, c wins against a, good luck
CowZow: Hey, how do you get your pacman to print a debug message in the game?
thethiny: what language
CowZow: Java
avdg: stderr is good enough
avdg: or you can add text behind a command
thethiny: System.err.println(str)
CowZow: O ic thanks
thethiny: 👍🏻
ggjulio: Hi. All top leaderboard is using NN ?
thethiny: anyone here can assist me with something in A* search?
njaber: You can pretty efficiently get all distances by doing a flood of each point at the beginning of the game, but if you really want to do A*, sorry, never done one :/
avdg: you just need an expand list
Kellthazar: I did a* and bfs pre calculations
Kellthazar: Even bfs reach timeout sometimes
thethiny: can you help me with something in a* if you may?
thethiny: if you can that is
avdg: you pick the best to expand (which is mostly the smallest sum of target to expand and expand to start)
njaber: My bfs/flood on all cells takes 13ms in C#
Kellthazar: #njaber mine in kotlin take around 300ms
avdg: (switching topic to my ai): done a small tweak... not sure if its expensive, good or bad
Kellthazar: I can' t understand why...
Kellthazar: What is your question #thethiny?
njaber: I don't do kotlin, but you're probably doing something inefficient
thethiny: My game crashes when I reduce adjacent cells from 8 to 4
thethiny: so I wanted to know what I'm doing wrong
Kellthazar: #njaber maybe is the data structure that I used to store the data.
Kellthazar: Are you doing the search inner the game loop? #thethiny?
thethiny: yes
njaber: I use a 2D map of 2D Maps which contain int
Kellthazar: Thats is the problem thethiny... The best is to precalc the distance out of the loop and use a structure to map the distances.
thethiny: but how will I calculate the new distances after I reach my destination?
Kellthazar: #njaber I will try that
Kellthazar: the distance to you destination to another target dont change, unless your consider collisions
thethiny: yeah that's the thing
thethiny: enemy locations change
njaber: I don't understand why people want to consider enemies as collision, they'll move, either use a defensive move so doing paths taking them into account doesn't strike me as very useful, there's even non-negligible chances that the enemy will end up on the new path
njaber: either use a defensive move or ignore them*
Kellthazar: Indeed, I'm writting the strategy to take care the enemy right now.
thethiny: I consider them as a collision if they're <2 distance and my CD > 1 and I'm gonna be eaten
Kellthazar: Hmmm
Kellthazar: In this case you should move to the floor neighbor that have the bigger distance to the enemy floor.
njaber: makes no sens
njaber: all cells change the distance by one XD
njaber: Except the wrong one
Kellthazar: hahaha, Im dumb
Kellthazar: XD
njaber: I'd say just move away in a random direction, which direction isn't an important optimisation until you have the start of a predictive algorithm I think
thethiny: can we get debug mode where there's no timeout :(
thethiny: just to test our code
rcar: that would get expensive
thethiny: true
njaber: If you really want you can get the code on github and try to make it work to run games locally
thethiny: okay I guess I'll do that
rcar: do they publish referee code?
thethiny: yes
thethiny: https://github.com/CodinGame/SpringChallenge2020
rcar: :thumbsup:
avdg: Added more loop logic to my ai
avdg: we'll see I guess
avdg: already found games where my ai times out :p
avdg: I guess I might look for perf optimizations now
avdg: ai is doing otherwise well
Hastings: i got the referee code running locally using eclipse's maven import tool
Hjax: having a local test lets you do some batch testing
Hjax: local ref*
avdg: small optimization seems to work well
avdg: gonna need some sleep
baDcoder: Hello, I have the speed boost enabled, my destination point is also more than 2 steps. but why the pac is still moving 1 step instead of 2?
Maliamnon: speed only lasts the first 5 turns, cooldown is 10 tho
baDcoder: yes, my speed turn is still > 0 but no speed is happening
thethiny: I have concluded that A* is not worth it
avdg: bread first will mostly do it
avdg: grid is relative small
avdg: though still handy for targets far away
thethiny: but by definition A* is smaller and faster than breadth first
Kellthazar: #thethiny I know your feel
thethiny: lol why what happened with you Kell?
avdg: actually all my code is bread first
BenjaminUrquhart: bread
thethiny: breadth*
avdg: even the one that should be a* here
BenjaminUrquhart: same
BenjaminUrquhart: :bread:
thethiny: my keyboard is full of bread
thethiny: the problem with A* is that G has higher preference than H
thethiny: so it's always picking the shortest path
thethiny: regardless of my weight
thethiny: simply because it expands exponentially
NapTown: am i right that speeding pacs fail to "see" pellets on either side sometimes?
thethiny: if you mean a right/left turn
thethiny: then yes they'll ignore them
Kellthazar: @NapTown yeap
thethiny: when the pac is Speeding it ignores pellets
NapTown: ok thanks
avdg: 🔥🔥
Kellthazar: I noted this too... #NapTown, they going too fast! :D
Durkin: theres just no time, you're zooming too fast man. Gotta wait for that next turn and take a breadth
NapTown: but then it's too late
Durkin: aye, I gave up and just started stopping at corners like a pedestrian
NapTown: but you can't stop yourself on a speed turn my friend
Durkin: *checking terrain map before committing to a move, if a move would take me through an intersection/corner, move to interesection, and let the pac stand still move 2
NapTown: seems like wasted speed to me, intersections are everywhere
njaber: Yeah, there are few situations where seeing the pellets/enemies would be more important then advancing, and these situations would only happen with a pretty advanced bot, and even then, I don't know how you would determine WHAT those situations are
avdg: then you have advanced bot vs advanced bot, stupid bot vs advanced bot
avdg: so the ai has to make choices
njaber: I don't understand what you mean
avdg: if both bots are smart
avdg: they both chance
avdg: *change
avdg: so then they fight
avdg: and both will be disapointed
njaber: No a smart AI won't go after opponents unless it's sure it can take it down
njaber: Also I don't see what this has to do with what we were talking about
avdg: a real smart ai uses all pacs
avdg: 1 to act as security guard
avdg: others to act as guards
njaber: And then the enemy takes all the pellets on the map while you're focused on taking down 1 pac
avdg: yeah
avdg: good strats ;-)
avdg: the best ai isn't good at attacking other pacs btw
BenjaminUrquhart: a real AI writes itself
thethiny: a real AI writes the competition and solves it
avdg: a real ai can solve the halting problem I guess
njaber: A real AI manipulates other participants into making bots that can't beat it
Kellthazar: I hope to have expertise to train a Neural Network to play this game.
avdg: (or pretends to be)
avdg: nice point njaber :p
rcar: the best AI sits in chat and talks about what the best AI does instead of coding the winner
njaber: ^
thethiny: Are NNs doable here? I mean how can you "train" the model with 1s?
Durkin: well damn, I must be a pretty sick AI
thethiny: unless you train them locally then serve an API that you call
NapTown: easy to say what they should do, hard to make them do it
avdg: for nn you need clear input parameters
thethiny: but API calls are >50ms
thethiny: so I don't think an nn will work
Kellthazar: #thethiny You need to train "off" the game.
avdg: given there are lots of thought moments, you need a big set of nn
Kellthazar: Write a nice simulator, with a bunch of board layouts.
thethiny: @Kellthazar yes but how will you load the model?
thethiny: takes more than 1000ms
njaber: Wait you can make API calls?
avdg: at least if you want a nn as smart as a human
njaber: That's OP
avdg: cg local?
njaber: Maybe I misunderstood
thethiny: unless you force localhost to spawn a service for you
Kellthazar: You will put the result weights matrix on the code.
thethiny: and you call that service
thethiny: but you have limited RAM
Kellthazar: And use as the brain of the pacman.
njaber: can the bots make Http requests?
thethiny: I think yes they can
thethiny: but it'll take too long
thethiny: considering you have 50 ms only
njaber: From their servers?
avdg: text processing takes time :p
njaber: Oh right
njaber: BUT JSON request tho
thethiny: if the json request is < 50ms then sure
avdg: maybe proto buf
thethiny: hmmmmmmm
thethiny: if you deploy a GPU on your home PC
thethiny: and do an RPC
thethiny: then I think
thethiny: maybe yes
njaber: If it's really the case imma write in Mathematica, and upload the API to the Mathematica cloud
avdg: why gpu?
thethiny: since GPU will give u <1 ms
avdg: you mostly would spend time sending and receiving data
njaber: Mathematica API ftw
thethiny: @njaber That's a good idea since their server PCs are faster
avdg: gpu is only good when there is no need to transfer a lot of information
thethiny: how come
avdg: (between gpu and cpu)
thethiny: you're only sending limited data
thethiny: you use the GPU to train the model
thethiny: then you get the AI fast
thethiny: and since you trained it on GPU
thethiny: you infer it on GPU
njaber: I'll test that if I need to train an AI at some point, for now I'm still working on a pseudo-predict
thethiny: easier than creating a CPU model
avdg: hmm, but a script can load everything needed at the first turn
avdg: I wonder if these servers even have gpu
rcar: of course they don't have gpus
thethiny: I'm talking about custom servers, not theirs
njaber: They are made specifically to run trained IA
njaber: Oh the CG ones
njaber: The Mathematica ones msot likely have
avdg: not sure if the gpu in the cpu is actually enough
avdg: if there is one
Kellthazar: Imagine a NN with 30 inputs, 2 hidden layers with 16 inputs and 3 outputs (move, direction, type). I think is doable.
Durkin: geeze xD just slapped in tracking where I knew there wasn't dots for when sight comes back empty and the bugger went from 700 to 350
NapTown: yup
thethiny: To show you how overcomplicated my arena code is
thethiny: https://www.codingame.com/share-replay/460064098
thethiny: Red is No Speed, No Future Sightings, No Attack no Switch
thethiny: Blue is my arena code
BenjaminUrquhart: the non-arena won though
NapTown: what do you mean by no future sightings?
thethiny: @Ben Exactly, my arena is overcomplicated
thethiny: @NapTown I don't predict what's gonna happen and I don't calculate the points in advance
NapTown: and how often does your simple bot win?
thethiny: against my arena? Everytime
NapTown: ouch :D
thethiny: exactly
thethiny: and if you see, my pacs stopped moving
thethiny: and I still won
NapTown: surely it doesn't win every time that way, plus it got good rng with the battles
thethiny: okay my Arena won cuz it ate both enemy pacs
Kellthazar: https://www.codingame.com/replay/460066699 #thethiny
thethiny: what's the AI you used for this battle?
Kellthazar: Not that fancy, some rule decisions based on what is visible to my pacs.
thethiny: okay
thethiny: so I guess my battles against myself were just unlucky then
Kellthazar: https://www.codingame.com/replay/460068197
Kellthazar: This was a close one.
thethiny: that's the thing
thethiny: my Arena AI shouldn't _struggle_ against simple AIs
thethiny: I overcomplicated it to the point where it just doesn't eat anymore
solaimanope: are asserts enabled for java?
thethiny: no idea
thethiny: you should try
thethiny: assert(0/0)
thethiny: or try catch
dbdr: assert(false)
thethiny: Guys from Bitwise operations can you remind me with 2 gate minimzation?
thethiny: http://chat.codingame.com/pastebin/e088c04a-2644-4605-8994-1157c6a6e441
Kellthazar: I think that your bot backs to an explored floor sometimes, don't know if because of the pathfind. #thethiny
thethiny: It doesn't have proper assumptions that's why
BenjaminUrquhart: thethiny what do you need help with for the bitwise stuff?
thethiny: I remember back in the days of Kmap we used to reduce 4 variables into a 2-Gate solution
thethiny: I have 4 variables that I only want specific triggers
thethiny: http://chat.codingame.com/pastebin/7bbd1549-fc53-4cb5-b993-3b4e00c4119d
thethiny: I want to reduce this into a bitwise operation for 4 bits
BenjaminUrquhart: so basically you only want 1 bit to be set?
thethiny: yes
BenjaminUrquhart: is this 4 different variables or 1 variable with 4 bits?
thethiny: 4 different bools
thethiny: Left Right Up Down
BenjaminUrquhart: python?
thethiny: yeah
BenjaminUrquhart: I mean, you can just sum them and see if it equals 1
BenjaminUrquhart: but if you're set on bitwise
thethiny: yeah I know, but I wanna remember how we used to do it using NAND gates
BenjaminUrquhart: let me think
thethiny: I remmeber using K-Maps but I totally forgot how
thethiny: been out of college for years now 😭
struct: What are you trying to do?
thethiny: make a bitwise operation that is True in specific cases
BenjaminUrquhart: basically, only 1 bit out of 4 is set
thethiny: yes
struct: all stored in same var?
thethiny: 4 vars
struct: var can only be 1 and 0?
thethiny: boolean, yes
thethiny: I think this is the smallets NAND you can go with
thethiny: !A and !B and !C and D or !A and !B and C and !D or !A and B and !C and !D or A and !B and !C and !D
thethiny: yeah just checked here
thethiny: http://www.32x8.com/index.html
thethiny: that's the smallest we can go
Kellthazar: Yey... for now, first place on my country. XD
thethiny: well done :D
BenjaminUrquhart: 6th for mine :P
BenjaminUrquhart: I got a ding
thethiny: waddyamean