From CG community
Jump to navigation Jump to search

eulerscheZahl: congrats Zenoscave

ZarthaxX: finally he did it

ZarthaxX: and u didnt belive shark

eulerscheZahl: i did

ZarthaxX: :P

eulerscheZahl: going to work now, bye

ZarthaxX: cya

MadKnight: how's your bot ZarthaxX ?

MadKnight: Automaton2000, is he not gone ?

Automaton2000: it was a fun one

Crypticsy: Oups An error occurred (#563): "Invalid stub generator". Please contact

Crypticsy: any reason this might occur?

MadKnight: which puzzle ?

Crypticsy: hey madknight

Crypticsy: how are you? XD

Crypticsy: i was making my own

MadKnight: then fix your stub generator ezpz

Crypticsy: this is my stub generator input

Crypticsy: Oups An error occurred (#563): "Invalid stub generator". Please contact


Crypticsy: my bad there XD wrong copy paste

MadKnight: something's wrong there for sure

Crypticsy: should i send you the link to the puzzle?

MadKnight: naa

ZarthaxX: ded MadKnight

ZarthaxX: :P

MadKnight: why ZarthaxX? fix it

MadKnight: what do u code ZarthaxX ?

Quidome: In rust I got an unresolved import text_io. Seems that you can only use a few crates.

Quidome: No rust players at the moment I suppose :)

ZarthaxX: coding sse stuff to test out in c++

Famout: C++, why do you hate parsing so much?

thibpat: We're live, trying to track our own submarine to avoid the opponent from finding us!

mlomb: oh god, the time has come

mlomb: Submitted code is too big

Famout: o_o I didn't know that was possible... how big was it?

mlomb: 103 kB / 100 kB (103.39%) :disappointed:

AntiSquid: for this contest they should allow more .

Famout: Wait, how can I check that?

Famout: Pretty positive my own stuff ain't reaching that, but got a few #includes

AntiSquid: count each individual character

Famout: That... isn't really an answer >_>;;

mlomb: yeah, thats literally the stat

Famout: I mean mlomb you counted yourself and gave the percentage manually?

AntiSquid: of course, how slow do you count?

Famout: I was just hoping for a way I could easily check. Guess not.

mlomb: no I have a tool that merge and clean my code

AWice: lmao i get captcha'ed every time i play clash because im too fast/good. admins please make it stop

Riyuk: I'm wondering why a lot of people are starting in a sea zone

wlesavo: Nice zeno

vbplaya: Quick question ... when you say move N|torpedo x y ... is the 4 block distance you can shoot your torpedo from your new spot or the spot you are sending the command from?

Illedan: Every action happens in sequence

Illedan: Shooting after move => shoot from new position

vbplaya: thanks !!

Bootjewolf: just starting with this challenge and i am quite new to programming so could someone give me a little hint how i would start with the ocean of code challenge

Illedan: There is a lot of streams you can look at

Bootjewolf: ok

Bootjewolf: thanks


noob_noob_noob: hi

Beerus: silver boss has bugs


Beerus: he lost with timeout

Bohdan23: Yeah, I also notice this. Seems this happens when there are too many possible opponents positions (like > 5000)

Bohdan23: (by position I mean not only final, but whole history of positions)

Default avatar.png DanTheMan832: I can't make it to gold :(

Riyuk: Try to improve your tracking, it's the key

Default avatar.png duckquackduck: +1 for Illedans stream!

Beerus: traacking cant be perfect

Beerus: if it does it gets timeout 100%

Febrin: Did somebody use API from github to do local testing? If yes I can only run demo with fixed seed and I am wondering how to generate random maps

Beerus: i saw the github code in java

Febrin: I see only .jar files, cannot change the code


AWice: @admin please remove captcha or atleast stop captcha-ing me every clash i do, really annoying to do like 50 captchas in one day

Beerus: see the initialize function

Febrin: Thanks bro

Default avatar.png LonelyMasterVanDerSwag_7511: Hello World

Riyuk: AWice you must be so fast :p

Febrin: If somebody interested there is `gameRunner.setSeed(1337L);` line in \src\test\java\

wlesavo: AWice CG cares about your mental health, try contest for a change

AWice: what is contest?


MSmits: but it's near to its end

AWice: oh its like very long challenge

AWice: i like fast haha

MSmits: try any multiplayer game:

AWice: thats ok ill just be quiet and play clash and do the damn captchas lol

MSmits: some of these are faster:

MSmits: allright. Just let me know when you want me to spam ideas.

wlesavo: MSmits hows your road to legend?

MSmits: havent coded yet today. Not sure if i'm going to make it. All the fun things are done, I do have a small list. Maybe you can help me pick what to go for

wlesavo: what you have on the list?

MSmits: 1) I am ignoring sonar, I could try do something with that. Not sure if it is worth it

MSmits: 2) Currently I am moving, then torpedo in a set order, i am not considering different orders to increase torpedo range

MSmits: 3) I dont have a fatality check

wlesavo: fatality is the one to go for sure

wlesavo: it is quite fun also

MSmits: 4) Currently i spread out mines very far, so their explosion ranges dont overlap. I charge silence when i cant place a mine

chucknorris: you should bruteforce all command combinations too

MSmits: you mean for fatality chucknorris ?

chucknorris: "Currently I am moving, then torpedo in a set order, "

MSmits: Yes

AntiSquid: free_health_care(terminally_ill(enemy));

chucknorris: you should even silence after torpedo

YannT: torpedo before moving is worth implementing

YannT: because torpedo+move as opposed to the other way around get you an extra charge

wlesavo: sonar is worth to keep track if opponent using it, because you can be misslead in self tracking, if you have that then it is ok

YannT: useful in close combat situations, one charge is often the difference between win or lose

MSmits: oh, right YannT

MSmits: I dont have self tracking yet either

MSmits: not sure what to do with the information when i have it

wlesavo: oh, self tracking is quite necessary

MSmits: yes, but what to do with the information?

chucknorris: uhh its a must. you should maximize your count of possible locations too

YannT: use silence when detection is high for starters :)

wlesavo: use silence, optimization of movements, and helpfull in mine avoidance

MSmits: mmh so much work, so little motivation :) I'll try. Thanks guys

MSmits: btw, for self tracking, i assume it's not enough to look 1 turn ahead

MSmits: for mine avoidance i do a beamsearch, but for selftracking that seems impossible. Too expensive

chucknorris: yes I too lost my motivation. had to skip two days which dropped me from top5 to top10. no motivation to climb back

MSmits: I skipped 2-3 week s:P

wlesavo: same here, switched to other multis for now

AntiSquid: i am here for the chat

MSmits: you're an expert at that AntiSquid

wlesavo: basically my bot didnt changed much from silver, only little things

YannT: I wish I had an idea for that one last extra little thing I could add

AntiSquid: personally i believe the only real solution is ML, since this just asks for too many things in too little time, so you need a trained model that just takes inputs and forward propagates to get the answers. Wasted a full week failing to do that though.

YannT: just to get a bit of extra push, because if I don't find something to improve some I don't think I'll be in the final top10 :(

AntiSquid: think about all the different aspects you need to take into consideration and then implement to do guess work and then take action based on that guess work

AntiSquid: it's ridiculous and requires more statistics than programming imo

YannT: that is in a nutshell what I try to do, except within an eval

YannT: but in the end iot's impossible to balance every factor perfectly I think

YannT: there'll always be a situation in which your eval takes the wrong decision for bad reasons

chucknorris: I've been trying AlphaZero on UTTT for like three weeks AntiSquid. It's not working yet, but once it'll do I'll just insert the actual contest referee, train for a week, and the submit and win. thats the plan :p

AntiSquid: will share what i tried to do regarding this after contest, hope someone can give me some hints

MSmits: chucknorris I don't think that's worth trying for uttt. The game is so imbalanced, it is nearly solvable for player 1

MSmits: if you do succeed it, I will find your primary line of play, counter it with an opening book and you'll lose every game as player 2

MSmits: I did this for Miarem, karliso and re curse. They all lose 100% as player 2 vs me

MSmits: when I say 100% I mean i tried a CG bench of 300 games and I won every one

AntiSquid: mchl has the strongest bot for the time spent imo

AntiSquid: too bad he got bored

chucknorris: maybe thats why it's not working then :p it loses 1-9 vs my mcts bot

AntiSquid: but it's basically the 1st week bot so who cares

MSmits: well my trick only works against people that have an opening book or an extremely deterministic bot chucknorris

MSmits: the top 4 all made pretty sophisticated opening books

AntiSquid: leeching points from smits :o

MSmits: so basically my trick is mostly a counter vs cheesy tactics

MSmits: if they didn't use them, I wouldn't need it :)

Riyuk: MSmits aka Robin hood of cg

MSmits: :P

Illedan: Making an openingbook like that doesn't seem funny :P

AntiSquid: rofl mandatory loss streak, that's just ridiculous

chucknorris: but the rankz Illedan

tomatoes: someone pushed me to legend :grinning:

MSmits: Illedan it was fun for me, but really only because making it gave me more insight into the game. I also coded some other stuff that came from knowledge gained from staring at meta mcts for hours :P

AntiSquid: hm wasn't me

tobk: :clap:

AntiSquid: but that's good, we finally have your ass out of the way

wlesavo: AntiSquid i think when he was #1 at bronze he already had most of basic features, only lacking mine avoidance. he for sure was the one prooving that fatality is worth implementing

tobk: with "fatality" you mean insta-kill move combinations? I just recently implemented them (and seem to work quite well), but did not give a huge boost

MSmits: it's funny how you slowly shift upwards after submission in ooc

MSmits: makes it kinda hard to tell if a new submission is better, because it takes time

tobk: but it still great fun to see my sub surface, silence, move and then blast the opponent :-D

chucknorris: my bot is oscillating between top12 and 24

AntiSquid: every contest is like that MSmits

AntiSquid: you need top 20 overall or so to see less of that effect

MSmits: yeah I guess so

MSmits: man, there are so many possible combinations of orders

MSmits: a lot to code to brute force the combinations

MSmits: move, silence, trigger, torpedo, surface, right?

MSmits: that's the 5 orders that can be used for a fatality

tomatoes: and in any order

MSmits: well surface should be first shouldnt it?

MSmits: if you're using it?

Illedan: Might not :think

Illedan: :thinking:

Illedan: But most likely

wlesavo: but you need to decide if you using it or not

MSmits: yes, so 2 combinations

MSmits: just a factor of 2 is not so bad

chucknorris: hm didn't think of that. I let my eval to decide that :p

tobk: for regular turns, I have fixed order surface?, move, torpedo?, mine?, trigger?, silence?; for "kill-shots" I do surface (if health permits), move (charge torpedo or silence), silence?, torpedo

MSmits: hmm but isnt it sometimes better to silence, then move?

MSmits: to reach a certain spot

MSmits: since silence is a straight line

MSmits: also you might need to trigger, then move, then torpedo, or trigger last to get out of the way of the blast

tobk: yes, you can reach some spaces you could not reach otherwise. also I'm not considering mines in that step yet, have to see how to integrate them in the reasoning

MSmits: i suppose you can code the blast separately and then pick the best position in the tree to use it

MSmits: this is pretty complicated =/

chucknorris: If you surface after a long silence you can save space. or if you move to other sector you can reduce the information given to the enemy by your sector id

MSmits: chucknorris true, but we're just talking about fatality check

chucknorris: umm okay

tobk: at the moment I check whether the "damage potenttial" (estimated damage a torpedo does when fired to one spot) is >= the opp health, then find a spot where to move to make that shot

MSmits: actually, for fatality, you should probably just always surface

MSmits: unless you're at 1 hp

tobk: adding mines to that equation wil be a bit tricky, but I still have a weekend to go :-)

MSmits: tobk yeah, i thought about doing torpedos that way, makes sense

chucknorris: I don't have a separate fatality bot, I have a "combat" bot, which gives big reward for winning :p

tobk: yeah, but you might also have to get so close to opp so you have to take damage yourself

tobk: e.g. if you and opp are in the same space and you can't silence

Illedan: I have a big spagetti mess for instakill :D

MSmits: yes, thats what worries me Illedan :P

Illedan: Working on some combat stuff for the last 2 weeks, but motivation and energy :P

wlesavo: i was wondering if there is better way to do it but yeah, also big plate of spagetti

MSmits: good to know

MSmits: there for sure is a way to reduce the spaghetti as much as possible. Always surfacing is one of those things

MSmits: (except when it kills you)

MSmits: but still a lot of spaghetti

Febrin: And what do you think about sonar? While doing fatality consider a situation when using sonar gives us 100% estimation about the enemy position. Also apart from the fatality sometimes it might quite reduce the number of enemy positions

MSmits: yes, but you cant immediately get sonar information, so you need to wait another turn

MSmits: but sure, in general it might help

tomatoes: i only start fatality checks if 100% known position

chucknorris: and you shouldn't surface if you are at 2 hp and the only way to kill the enemy is to damage yourself to MSmits

MSmits: that's not actually necessary though

MSmits: true chucknorris, i just thought of that earlier

MSmits: lag

MSmits: so still more spaghetti :)

MSmits: but tomatoes, you could for example have on one end of the map a mine where he could be, and near you is also a spot where he could be. Then you can trigger the mine and torpedo the other spot and get fatality

Febrin: Thats another interesting case

tomatoes: didn't add mines to fatality yet :sweat_smile:

Febrin: Now I am also trying to avoid spaghetti fatality. I consider brute force through (?) Let say we have 5 moves. So 5! * 2^5 = 3840. Move can give you 4 new positions, silence 16, so 3840 * 16 * 4 = 2.5 * 10^5, in practice it should be less

Febrin: If you fix some sequence of moves for eg. torpedo always after move it's even less

tomatoes: why 3840? only 4 moves

MSmits: silence has 13 combinations

MSmits: 4 + 4 + 4 + 1

MSmits: move has 3 at most

Febrin: Oh right you cant go back, I did a big upperbound

MSmits: also, first move, or first silence

Febrin: yup

MSmits: so 3 * 13 * 2 = 702

MSmits: err

MSmits: 78

MSmits: :P

MSmits: so 78 possible spots you can end up in

Febrin: Thats a little

MSmits: actually less

MSmits: because if you stay in place, the order of silence doesnt matter

Febrin: I regret my choice of Python instead of cpp but it might be doable

tomatoes: and a +8 torpedos if health=1

MSmits: why + 8?

tomatoes: around

MSmits: arent there way more than 8 spots you can shoot at?

tomatoes: around target

MSmits: that assumes you know it's position

MSmits: it might be 4 places it can be at

MSmits: clustered

MSmits: sill can hit them all with one torpedo

tomatoes: can hit myself

MSmits: that too

MSmits: it's good style to do as much damage as possible to yourself, as long as you win :)

MSmits: just explode a mine on yourself for giggles, even if it doesnt damage the opponent

Beerus: does anyone know if silver boss tracker is perfect?

MSmits: hard to say what is perfect

MSmits: there are some tiny improvements you can make that are almost certainly not worth it

Beerus: does it store every trajectory after silence?

MSmits: no idea, I'm guessing it might

MSmits: it's pretty essential

Beerus: i store everything and i get more points than him

MSmits: it's not the only thing that maters

MSmits: matters

wlesavo: it sometimes timeouts, so probably it does, i know gold one does not store it for a fact :slight_smile:

MSmits: wow

MSmits: why is gold one so good then?

Beerus: missing a point can be fatal though

tomatoes: cheats

wlesavo: most of other basic features and mineavoidance

MSmits: no selftracking either I guess then?

wlesavo: i consider self tracking as a basic feature

MSmits: but if you dont track all silence paths, how can you properly self track?

Famout: I just make the path then follow it myself, and silience at good points along it.

wlesavo: i mean i still track it, just keep only common parts of a paths that come to the same point

MSmits: ahh well thats still perfect tracking, only with pruning when necessary

MSmits: thats the way to do it

Illedan: I can crash myself by using too much silence for my own tracking :D

MSmits: lol

MSmits: I used your silence spam bot to get my pruning working Illedan

MSmits: like 2 weeks ago that was

wlesavo: i crushed some top bots by spaming mines lol

wlesavo: ii mean crashed

wlesavo: damn those words

Illedan: Legend is full spamfest :D

AntiSquid: 322245 possible mine positions counted from all paths, ya no wonder i time out :/

wlesavo: lol

MSmits: mmh are those positions from where mines could have been laid, or positions where mines could be ?

AntiSquid: everything

MSmits: it's pretty important not to track positions where mines could be, as separate states

MSmits: that will explode your state space

wlesavo: 3 orders larger then the whole ocean

MSmits: instead track places from which mines were laid

MSmits: reduces branching by a factor of 4

AntiSquid: the silences are enough

MSmits: they are bad yeah

wlesavo: ocean of silence

AntiSquid: wait i only track where mines could be placed

wlesavo: the submarines of mines and silence

AntiSquid: but some replays are full of silences and mines so ...

MSmits: from or to AntiSquid?

MSmits: placed from, or placed to

AntiSquid: i don't get your question

MSmits: the sub is on a position

MSmits: it can place on 4 locations

MSmits: do you record the 4, or the 1

AntiSquid: ya i use the sub position

MSmits: ah ok, thats best imho

MSmits: my 20 depth beamsearch mine avoidance has turned my bot into a color filler

MSmits: it looks like a tron bot :P


Illedan: 20?!

Illedan: I have a depth of 4 :P

MSmits: well it only considers moves, so it doesnt have much branching

Illedan: Yeah, mine is only moving too


MSmits: I have a beam width of 200

MSmits: the idea of beam search is that you sort by score and drop the bad states

Illedan: hmm

Illedan: nice

MSmits: that way you can get very deep

Illedan: I will look into that

Illedan: :)

MSmits: enjoy :)

Hellfire731: I have corona virus

Hellfire731: I might die soon

MSmits: sucks Hellfire731. Keep at least 1.5 m. away from us

Hellfire731: *cough*

Illedan: Yeah, stay in #world2

MSmits: or #FR

MSmits: :P

Illedan: xD


Swagboy: CSB pod trying to reach the checkpoint

MSmits: someone teach that dog -3vel

NormantasStankevicius: does silence dashing more than 1 help in siilver?

karliso: MSmits Do you think your both will remain at number 1 as other players keep submitting?

MSmits: good question

MSmits: it's very strong as player 1, but it may be weaker than yours as player 2

MSmits: after all, you have the opening book for player 2

MSmits: I dont have it at all

MSmits: only for player 1\

MSmits: my bot beats re curse without any book

MSmits: but against yours it does not, only 45% combined winrate as p1 + p2

MSmits: but thats without *any* book, so it's not fair, because you have one

karliso: I had some ideas about uttt that I wanted to try, you gave me a reason to try them out.

MSmits: good, try them, but be careful about getting too deterministic as player 2. It was real easy to make your current version lose 100% as p2

karliso: Yes, I saw games.

AntiSquid: are you playing ocean of code karliso?

karliso: No

Illedan: MSmits, saying I can download 1 replay vs karli and get 100% win as p2? :D

Illedan: *p1

MSmits: not exactly, he has some variation. Maybe 10-20 different plays

MSmits: also, there comes a point where my bot can take the win without needing any further book

MSmits: if your bot is not good enough, it wont know how to proceed from there

MSmits: my book ends somewhere between 20-30

MSmits: ply i mean

MSmits: the game goes to 40-60 plies

MSmits: but the advantage is great enough at ply 30 or so

MSmits: the same is true for re curse and miarem btw Illedan

MSmits: so if you have a good book, you can copy my bot vs them

MSmits: good bot I mean

MSmits: good bot, copy book :P

AntiSquid: to risk or not to risk submit?

kovi: im not too happy seeing that submit of 2 days ago is better than the latest

pb4: kovi : same here... except that is was 6 days old

kovi: maybe i should trie that as well. 6 days ago i had good winrate vs. you

kovi: actally the problem was jolindien all along

pb4: MSmits : does your beam search guarantee that you don't have only one starting move at the beginning ?

pb4: jolindien is solid

MSmits: not sure what you mean pb4

MSmits: do you mean does it take into account floodfill?

MSmits: I have a floodfill score and a damage probability score

MSmits: and it minimizes that over depth x

MSmits: and maximizes floodfill obv

MSmits: if you mean, does it give a score for movement flexibility to react to opponent, then no

MSmits: I can see the value in not being forced down a narrow corridor

RavenKZP: oh come on... Silver Boss shoot himself and make my bot timeout XD

MSmits: haha, you assume an opponent will never shoot himself?

MSmits: dangerous :)

RavenKZP: well ye but actualy no

RavenKZP: i've go this one... commented, because of it wasnt working perfectly

RavenKZP: and until now it was good :P

pb4: MSmit : beam search keeps only a limited number of possibilties

MSmits: yes

MSmits: but at this depth, there is very little pruning

pb4: if all those possibilities start with the same move, it doesn't matter how deep your search goes

MSmits: very true pb4

MSmits: oh I see what you mean now

pb4: My question basically is : do you have a way to maintain "first move diversity" or do you measure at which depth there's no diversity left ?

MSmits: you mean while filtering, keep some states for each starting move

pb4: Yes

pb4: See for example kimiyuki's Hypersonic code

MSmits: I would bother with that if it was pruning a lot, but it's not really

pb4: I think he has a way to do this

MSmits: yeah, I have a HS bot too, but it handles things differently

MSmits: it has a multi-positional movementstate

MSmits: so the player is at multiple first moves at once

MSmits: let's not get into that though :P

MSmits: my HS bot is a big mess I never want to touch again

MSmits: 2.2k lines i think

NormantasStankevicius: bro

NormantasStankevicius: My code is almost 1k lines

pb4: bro

NormantasStankevicius: and I am pretty much idk what to do besides making a simulation at this point

pb4: my code doesn't compile in time anymore -_-

MSmits: my ooc code is 1800 and still lacking a lot

MSmits: trying to work in a fatality function

MSmits: it's not easy :(

NormantasStankevicius: I would be extremely happy if I leave silver by the end of this competition

wlesavo: i had to rewrite it, that was a pain

MSmits: why rewrite?

MSmits: I would be extremely happy if i make legend, but I doubt it

wlesavo: first version didnt have mines, and was used only when i exactly know the possition of an opponent, i think it was the last improovement to gold boss, after that i broked some tuning and in that crippled condition its doomed to guard the gates of legend :slight_smile:

MSmits: my nemesis then

MSmits: I wonder if the fatality function is enough to get me from rank 20-30 to beating gold boss

MSmits: but I doubt it

wlesavo: with an ok mine avoidance and some luck i guess it could be enough

MSmits: hmm, we'll see

MSmits: today and tomorrow is basically the time i have. I think sunday I will be doing social distanced DnD

MSmits: wonder what that'll be like

Astrobytes: Remote-link DnD?

MSmits: yeah

Astrobytes: Should be a laugh!

tomatoes: fatality pushed me from 50-70 to top10

MSmits: I think maybe I'll roll a bit more critical hits than I usually so :grin:

Astrobytes: lol

MichaelPu: MSmith, I don't have a fatality function, and got past the boss

NormantasStankevicius: Hmmm HMmm Fetality :>

MSmits: MichaelPu any tips you want to share?

MichaelPu: don't let anyone use fatality on you :)

MSmits: great advice :P

MSmits: do you mean you have an anti-fatality check as well?

MSmits: to make sure the opponent can't fatality you the next turn?

AntiSquid: fecality?

MSmits: :poop:

MichaelPu: no, just trying to do well trough the whole game, and not just the last move

MSmits: ah ok

NormantasStankevicius: By fatality, you mean check if you can kill the enemy before he kills, eg. person has 2hp and you know his position so you silence dash to him and kill ?

MSmits: just any way to kill him on your turn

MSmits: there's lots of possible ways to dit

MSmits: do it

NormantasStankevicius: yeah, but I go silence spam

NormantasStankevicius: so it's torpedoes I guess

MSmits: yeah

MSmits: silence spam is of limited use

MSmits: doesn't work beyond a certain poit

MichaelPu: this situation just gets more rare in top gold and legend

AntiSquid: +1 promotion

MichaelPu: when you know the opp position 100%

NormantasStankevicius: yeah, I will need to track my postion aswell, and do it

MichaelPu: when they are on low health

NormantasStankevicius: but what is a good indicator when to silence?

MSmits: no idea, i do it when i have it ready :P

NormantasStankevicius: But let me guess

NormantasStankevicius: You prioritize torpedoes > mines > silence?

NormantasStankevicius: and you try to fill the map?

MSmits: thats about it, i also try to avoid mines

NormantasStankevicius: Okay, I'll need mines

RoboStac: if you self track what the opponent knows you can use that to choose good silences (add lots of options / silence when the opponent has a good idea where you are)

NormantasStankevicius: and if I have no point of placing a mine (aka there is one in range, I'll just silence spam)

GHV: Please share ur suggestions about my contribution...


MSmits: yeah, good point RoboStac, takes some effort to code that though

NormantasStankevicius: RoboStac yeah, but what am I curious how to predict, cause to me, it's likje couple hundred lines of codes to predict the enemy how to outrun

NormantasStankevicius: would become, what are some good things to do when I know the enemy position?

MSmits: if you have mines, blow them up, if you are near, shoot torpedo, if you know where they are, you also know where they put the mines and you can avoid them

ZarthaxX: getting that legend MSmits?

MSmits: dont know ZarthaxX, it's up in the air

ZarthaxX: lol

MSmits: let's see how sonar works instead of silence

MSmits: I figured that since my silence sucks, i might as well use sonar

wlesavo: MSmits i basically feed my output command to the same tracker with different flag

MSmits: yeah, that's smart coding. Not sure if I can do that with my current code. It's pretty complicated

AntiSquid: oh come on :/

MSmits: what is it squiddy?

AntiSquid: my bot isn't strong enough

MSmits: not yet

AntiSquid: and i am tired of this game

MSmits: I have faith in you squiddy

MSmits: me too

AntiSquid: from day 1, but still tired of it nonetheless

MSmits: I liked it when i was coding tracking and such

AntiSquid: it's not even strong enough to stabilize high and get pushed :/

blasterpoard: I just found a very interesting piece of data about mines that deserves a post mortem on its own xD suddelny a lot of things make sense

MSmits: I'm glad someone can draw life lessons from this game :P

eulerscheZahl: are you out of the contest, MSmits?

MSmits: no, i want to code a fatality function, maybe some self tracking to more smartly use silence and then tweak a bit with ability use and such

MSmits: there's still some room for improvement thats not *too* annoying to code.

blasterpoard: MSmits it's just that a thing I didn't think was important turned out to be the main reason my bot could ever reach top10

MSmits: oh ok

MSmits: do write it up later, you always make these claims that make us curious and then dont explain them during contests :P it's mean!

blasterpoard: and I thought that changing this number the other way would improve the bot

muy31: GH

AntiSquid: about tracking or placement?

muy31: GHV isnt t too eay?

muy31: I like it though GHV

AntiSquid: wish top 20 would play nice and just timeout

eulerscheZahl: as #21 i agree

AntiSquid: i meant gold

ZarthaxX: LOL

NormantasStankevicius: AntiSquid I feel the same, but in silver :(

AntiSquid: what does your bot have so far NormantasStankevicius ?

AntiSquid: maybe there's a quick improvement you could do

NormantasStankevicius: Silence detection (with a glitch), Silence spam, quite a bit of detecting, and torpedo fire

NormantasStankevicius: right now, making mines

NormantasStankevicius: prioriotazing mines > silence spam*

NormantasStankevicius: Next I'll go Silence up to enemy and finish

AntiSquid: and you silence right away? maybe that's something to tweak

NormantasStankevicius: yeah, I am thinking of improving how I silence

AntiSquid: i know exactly what i need to do for a guaranteed improvement

NormantasStankevicius: and move away from enemy if he is not in range and torpedo cooldown > 0, dash away if he in range and torpedo cooldown > 0; shoot and dash away if he is in range, if he is out of range and cooldown = 0, check if I can dash up to him and fire

NormantasStankevicius: else, just spam

idkhow2codee: also check if there are islands on the path

idkhow2codee: aren't*

NormantasStankevicius: well yeah

NormantasStankevicius: right now I have a quick check

NormantasStankevicius: for all locations I can dash to

NormantasStankevicius: but for safety

NormantasStankevicius: I just SILENCE 0

NormantasStankevicius: until I implement it and turn it on

idkhow2codee: I do silence 0 cuz im lazy :p

NormantasStankevicius: I also have a DistanceFill(Floodfill, but to see if my torpedoes can get to it and similar stuff)

NormantasStankevicius: right now I'll do mines

NormantasStankevicius: try to deploy as many mines as I can, then silence spam

idkhow2codee: do you use any path finding algorithm?

NormantasStankevicius: Floodfill

idkhow2codee: oh k

NormantasStankevicius: I have a bit of a randomization kinda

NormantasStankevicius: tries to move in circle

NormantasStankevicius: but if it touches the wall


NormantasStankevicius: starts to move in semicircles


Nerchio: COME ON

NormantasStankevicius: GO GO GO!

idkhow2codee: gl


eulerscheZahl: your capslock seems stuck

Nerchio: IT IS

Nerchio: 10 SECONDS

Nerchio: TO LEGEND

NormantasStankevicius: He is captivated

NormantasStankevicius: he has been trying legend for days

AntiSquid: Nerchio the guy below you is pushing boss back up it seems :p

NormantasStankevicius: perhaps months or years

Nerchio: yesssssss

Nerchio: legend

Nerchio: welcome

NormantasStankevicius: Nice

NormantasStankevicius: !

Swagboy: Wp nerchio!

AntiSquid: :o

Nerchio: such a good submit

eulerscheZahl: congrats

Nerchio: i destroyed the boss

darkhorse64: Nerchio: I can understand how you feel

AntiSquid: great

eulerscheZahl: i still saw you 0.04 below the boss :P

gaha: was it the same code or you're modyfing something

idkhow2codee: GZ

Nerchio: hmm i was working on something else and did 10 submits today ending in top5 usually

AntiSquid: sash too ?

Nerchio: just needed some luck xD

AntiSquid: ya luck is most important

eulerscheZahl: AntiSquid getting lonely :(

tobk: still the same bot as yesterday Nerchio?

AntiSquid: wdym euler?

tobk: congrats, that was hair's breadth

eulerscheZahl: other active chat users going to legend, leaving you behind

AntiSquid: lol

AntiSquid: ya

eulerscheZahl: even zeno turned against you

wlesavo: Nerchio grac

AntiSquid: better legend

Uljahn: some are in silver though :relieved:

Nerchio: i fixed some stuff

Nerchio: small stuff

Nerchio: to be more consistent yesterday

Nerchio: but most was the same

Nerchio: for a good entrance into the league 2-0 vs eulerscheZahl

Illedan: AntiSquid

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

AntiSquid: lol

AntiSquid: beat all pokemans

cegprakash: Do I need enemy prediction in wood1 of OOC?

Nerchio: no

eulerscheZahl: i don't even have prediction in legend

cegprakash: it' s not worth it? :O

eulerscheZahl: no idea

cegprakash: that was the next thing I thought of adding

NormantasStankevicius: by prediction, you mean

Nerchio: maybe he means enemy tracking

NormantasStankevicius: guessing where enemy is?

eulerscheZahl: i have tracking of previous turns to estimate the location

cegprakash: yes

eulerscheZahl: but no prediction of future actions

NormantasStankevicius: It's very worth it

eulerscheZahl: tracking is a must-have

NormantasStankevicius: basically you won't get out of silver if you do not counter silence

cegprakash: yeah that's what I mean eulerscheZahl use the history to eliminate non possible positions

NormantasStankevicius: and out of bronze without basic tracking

cegprakash: I currently throw bomb at last known enemy grid

cegprakash: and it's performing worser than randomly throwing bombs

eulerscheZahl: are you playing codejam this year cegprakash?

cegprakash: 1A disqualified yes

cegprakash: when is 1B

eulerscheZahl: sunday

eulerscheZahl: during the night in your timezone

eulerscheZahl: which is why i skipped 1A

cegprakash: night is good time for me

cegprakash: I am a night coder

NormantasStankevicius: >.> can relate

wlesavo: nice blasterpoard, i guess your mine thingy worked

cegprakash: why is Silence called a silence I don't understand

cegprakash: it's just jumping

Swagboy: Silence move

eulerscheZahl: because the opponent doesn't know in which direction you move

cegprakash: direction is known

wlesavo: no

eulerscheZahl: not for silence

cegprakash: oh

blasterpoard: wlesavo it could still be just a lucky submit

cegprakash: okay so that multiplies possibilities by 4

wlesavo: sure, but still

cegprakash: that s***s with each silence used

blasterpoard: it looks like I found a magic number though

idkhow2codee: it multiplies possibilities * 17 I guess

eulerscheZahl: Nerchio at 15 already :o

idkhow2codee: but still if they don't intersect

NormantasStankevicius: silence basically is 13* (except when we get surface, that becomes 17 places he can be after that)

tobk: Next time I write a bot that just moves randomly, then submit a bazillion times until I go to Legend :-P

NormantasStankevicius: ^

NormantasStankevicius: My bot fluctuates between silver 140 and 20

wlesavo: blasterpoard looking forward for your pm :slight_smile:

idkhow2codee: well it is 4 directions * 4 possible new positions thats 16

eulerscheZahl: you can also wait at the current cell

NormantasStankevicius: + 0 idkhow2codee

eulerscheZahl: wait in 4 directions :D

NormantasStankevicius: you can just not move

blasterpoard: wlesavo the funny thing is that there's still a couple of things I need to implement, and they are quite important

MSmits: idkhow2codee it's 3 directions * 4 + 1 for stationary

MSmits: you can't silence in the direction you came from

cegprakash: when u use sonar for 4 steps will all the cells between the current position and the new position will be marked visited?

idkhow2codee: oh k I didnt know

cegprakash: sorry silence

Swagboy: Yes

cegprakash: when u use silence for 4 steps will all the cells between the current position and the new position will be marked visited?

MSmits: idkhow2codee, the reason you cant is because you cant silence over tiles you visited

eulerscheZahl: yes

MSmits: yes cegprakash its in the statement

Scarfield: that is an argument that wont work xD

eulerscheZahl: reading the statement is so overrated watch some replays and then make wild guesses

idkhow2codee: "(not visiting already visited cells or islands)" right

MSmits: right

Nerchio: btw what is default ai in legend

Nerchio: not worth playing against?

MSmits: also, surface doesn't teleport you to a different cell, just letting you know

eulerscheZahl: defaultAI = the default from the beginning of the contest

wlesavo: blasterpoard i have nothing on my mind, maybe after the contest i will stole a thing or two from pms

blasterpoard: wlesavo I mostly use the speed of C++ to do a lot of time-consuming things... not that interesting

wlesavo: oh well, still interesting to read

kovi: it is so hard to tell what is important and what is not

wlesavo: luck is very important

blasterpoard: it's important to have a good winrate vs kovi

eulerscheZahl: :D

Default avatar.png duckquackduck: wish there was a better way to debug rather than printing to console. Even that is limited since you can only print so much data. :( Very hard to determine if tracking opponent pathing is accurate. I am losing my opponent at some point, no idea where

wlesavo: blasterpoard that was my tactic since silver

kovi: i definitely do better if i dont submit spam. just let other submit (except joli)

eulerscheZahl: offline debugging is the way to go duckquackduck

Default avatar.png duckquackduck: is there any guide with tips on how to set it up?

eulerscheZahl: step 1: write all you input directly to stderr so it appears under the viewer

eulerscheZahl: step2 (the hardest one): write something to download the json data for a given replay id

eulerscheZahl: and extract the error stream (you need user authentication to get your stderr)

eulerscheZahl: step 3: write all the error stream into a file on your local disk

Default avatar.png rwilson: ;) or go nuts and build your own visualization plugin ;)

eulerscheZahl: step 4: configure your IDE to read the file as input

eulerscheZahl: step 5: breakpoint for your given turn you want to debug

eulerscheZahl: i might write something about it instead of a post mortem. my bot really sucks, not worth writing about it

Default avatar.png duckquackduck: oh :)

eulerscheZahl: it takes some time to set it up. especially if you have no experience with web requests

Default avatar.png duckquackduck: maybe something to try after this contest :)

eulerscheZahl: this contest was quite long, so i invested some time in tool setup at first

Default avatar.png duckquackduck: :thumbsup: yes, I have spend far too long trying to debug by printing stuff to console. wastes too much time

Scarfield: 34 submitting :'(

eulerscheZahl: but only 4 at csb

Scarfield: i will make an alt, prepare a bot designed to win against the wood boss in CSB, but not rank up. Submit some times and lower the boss score, like an hour before this contest ends :p

idkhow2codee: That's a shame that I have just started participating. only 2 days left :(

idkhow2codee: but there will be next contest in may right?

eulerscheZahl: may 7th - 17th

eulerscheZahl: even with a video

Swagboy: duckquackduck You can also manage to do this with simple copy pastes, a bit longer but easier to begin with

eulerscheZahl: annoying if you want to debug turn 100

eulerscheZahl: you need all the history for your tracker

Swagboy: I'm just printing the cin as cerr and use them to emulate the game in local

Swagboy: Maybe different from what you're doing

Swagboy: Because once you have the cin in local, it's easy debugging any turn

eulerscheZahl: no, i do the same. just the way how i extract the cerr to use it locally is different i guess

eulerscheZahl: for me it's ./cg_replay_download <replay_id> and i have it in a local textfile

Swagboy: And then you plug your bot on this textfile and launch it, isn't it?

eulerscheZahl: yes

Swagboy: Ok ok same indeed

eulerscheZahl: but i said that above :P configured my IDE to use the textfile instead of stdin

Swagboy: Aha yes yes, went quickly over those explanation, bit tired hehe

Swagboy: And the tricky thing for me is that I need to set up a iteration count instead of a timer, otherwise it doesn't act the same local

eulerscheZahl: no problem i'll go outside now. working from home causes some lack of physical movement for me

ZarthaxX: i need some of that

ZarthaxX: :(

Swagboy: Are you in germany eulerscheZahl ?

eulerscheZahl: you aren't even allowed to go outside alone?

eulerscheZahl: yes, germany

ZarthaxX: just for buying foo

ZarthaxX: food

ZarthaxX: well and ppl take out the dog

ZarthaxX: thats it

eulerscheZahl: a biking trip alone or with those living in your house is perfectly fine here. and taking out your dog :D

Swagboy: I'm there too and I'm glad that the ausgangssperre is way nicer than in France

ZarthaxX: here you are not allowed to go outside with someone to buy food

ZarthaxX: sooo :P

ZarthaxX: it hasbeen like 26 days like this

Nerchio: in Poland you can't go outside anymore if you don't wear a mask

Swagboy: Wow crazy, what if you don't have one?

Nerchio: idk

eulerscheZahl: get creative in making one

Nerchio: well they say anything can be used as a mask even like a scarf ;D

ZarthaxX: ah well here is the same

eulerscheZahl: might come here too, at least for public transportation

Swagboy: Where are you from ZarthaxX?

eulerscheZahl: and shopping maybe

ZarthaxX: argentina

ZarthaxX: is germany stopping the virus already ?

eulerscheZahl: i don't even follow these stats we had really high numbers compared to other countries. but that might be because of higher testing capabilities


reCurse: The most tested country in europe yeah

ZarthaxX: i see

eulerscheZahl: so it makes no sense to just talk about confirmed cases

eulerscheZahl: but now i go for real. want to be back before it's getting dark outside

ZarthaxX: cya sharktoad

AntiSquid: is US gonna nuke china after this is over?

AntiSquid: they love their bombs

ZarthaxX: thought kind of the same lol

reCurse: Fox news is this way -> :door:

AntiSquid: i don't watch any news

Zenoscave: thank you reCurse

Default avatar.png anid: Why does this guy have multiplayer CP without any ranks?

Default avatar.png anid:

cegprakash: hey anid finally I found u

cegprakash: when did you overtake me in India rankings

cegprakash: how did u beat me so quick out off nowhere

Default avatar.png anid: Some time back, Im not exactly 1 guy

Default avatar.png anid: a few people use this acc

cegprakash: oh

cegprakash: that relieves me a bit

cegprakash: the best in India still

Default avatar.png anid: we each do 1-2 multiplayers

Default avatar.png anid: so not really best in India

Default avatar.png anid: I only do C4L

cegprakash: I mean I am still

Default avatar.png anid: Oh xD that for sure

cegprakash: but I'm always up for a challenge from next gen coders

cegprakash: that's why I keep in touch

Default avatar.png anid: Not really a challenge, one guy in our group is pretty good but rest of us are just learning from magus`s document

Beerus: why i am getting timeout when i shouldnt

RavenKZP: ¯\_(ツ)_/¯

darkhorse64: cegprakash: the answer is quite simple. Copy/paste bots

Uljahn: is anid == anirudhp?

Zenoscave: probably

darkhorse64: Guys, look at his profile. Guru in one month !

Zenoscave: definitely then

Astrobytes: anirudhp was the cheater guy that euler talks about?

Zenoscave: yes

Zenoscave: Anid we know who you are

ZarthaxX: anid anirudhp, almost same

ZarthaxX: :P

darkhorse64: delete account

Default avatar.png 123Jango:

Default avatar.png ips07: tati khalo

eulerscheZahl: i'm back and the original anirudhp had the legendary badge in all languages, so not confirmed

idkhow2codee: but he cheated somehow?

eulerscheZahl: very likely

eulerscheZahl: or

eulerscheZahl: i guess i could find some more if i would try

Astrobytes: lol, that last one

cegprakash: it's okay to use multis or share accounts but not at the cost of abusing the top 1% leaderboard

eulerscheZahl: and he managed to beat me in CGFunge Prime :cry: and i think that's a legit score, noone else has that amount of points

eulerscheZahl: the tagline :rofl: m=m0/?(1-c2/v2) ==> Running makes you fatter

eulerscheZahl: it's funny because it's v^2/c^2 and not c^2/v^2

cegprakash: what is that formula

eulerscheZahl: the ? is a sqrt

eulerscheZahl: that's how the mass changes with increasing speed

eulerscheZahl: it's from Einstein

Nerchio: i feel like i am not as smart as einstein was

Nerchio: but not sure if thats a problem

eulerscheZahl: if you are bored:

NormantasStankevicius: better to read this then panic while watching matches

eulerscheZahl: he wrote "then", not "than" :P

NormantasStankevicius: yeah, I am sweating while watching my bot being murdured :<

AntiSquid: 7k registered, imagine the leaderboard if all participated

NormantasStankevicius: also panicking and seeing more colours than I should

eulerscheZahl: i know that feeling. i even know how to play better as a human in some cases. but no idea how to express it in code yet

AntiSquid: CG would need to hire a lumberjack

eulerscheZahl: the last contest with more players was mean max but to be fair, it's by far the longest contest except for locam

eulerscheZahl: longer duration = more players joining

Default avatar.png WINWINWIN: But most of the new players are at the bottom like me :)

eulerscheZahl: the most important thing is that you have fun

eulerscheZahl: and maybe learn a new thing or two

idkhow2codee: ultimately bot is still better than human(at least bots above wood) though

Default avatar.png WINWINWIN: Yes, ty eaulerscheZahl for the awesome contest

eulerscheZahl: my part was the smallest of the 3 creators mentioned

Default avatar.png WINWINWIN: K then ty G-Rom and illedan xD

eulerscheZahl: :)

cegprakash: I call all the bots below silver as bots

cegprakash: not humans

Default avatar.png WINWINWIN: why?

cegprakash: humans think better

cegprakash: like an AI

cegprakash: than a stupid robot

Default avatar.png WINWINWIN: I am a stupid robot! :)

cegprakash: I'm too in OOC

cegprakash: still in wood2

tobk: I don't get it. in the second replay he somehow mirrors the opponent in the very same move, while streaming excerpts from H2G2. But what's with the first replay?

cegprakash: sorry wood1

eulerscheZahl: a German politician called all those bots who used their gmail address to write complains about his internet politics

idkhow2codee: robots are better because of predictions and no possibility to blunder

eulerscheZahl: tobk what are you talking about?

Default avatar.png WINWINWIN: Cegprakash, if you got to W1, can you tell me how to improve?

eulerscheZahl: chess?

tobk: the replays you shared half an hour ago

eulerscheZahl: ah

struct: its copy pasted bots

cegprakash: WINWINWIN just move and shoot randomly

eulerscheZahl: it's a beam search with variable depth

tobk: ah, that explains the mirroring

eulerscheZahl: so when time close to 100ms, end search

Default avatar.png WINWINWIN: shoot randomly is enough?

cegprakash: yes

eulerscheZahl: for wood it is

Default avatar.png WINWINWIN: thanks!

eulerscheZahl: don't shoot yourself

cegprakash: actually I got to wood2 without shooting

cegprakash: I was definitely #6 without shooting

eulerscheZahl: as everyone starts in wood2

eulerscheZahl: congrats ceg

Default avatar.png WINWINWIN: xD

cegprakash: sorry wood1*

idkhow2codee: I got wood with pacifist bot

idkhow2codee: wood1*

cegprakash: pacifist?

idkhow2codee: yes just don't attack

cegprakash: like mother therasa?

Default avatar.png WINWINWIN: Just noticed ur 1st EulerscheZahl awesome!!!

idkhow2codee: yes exactly

idkhow2codee: but there is no way to get out of the w without predictions and attacking

cegprakash: acctually I think there is

cegprakash: I am going to add safer turns to my bot

idkhow2codee: well but that's just luck then

cegprakash: when I haave multiple directions to turn, turn in a direction with more space

cegprakash: so that we don't suffocate in choke points

cegprakash: this will avoid SURFACE completely

cegprakash: so we remain full health

cegprakash: it's same as Tron

idkhow2codee: u can always get stuck somewhere though

cegprakash: very rare

cegprakash: if u add this

cegprakash: just random shoot + this can take to bronze I'm sure

cegprakash: but I'm cleaning some mess up

cegprakash: so I can reach higher leagues

idkhow2codee: currently im w1 too and I'm trycking to implement predictions

cegprakash: yeah just ignore enemy's silence commands

cegprakash: just track enemy movements and that's a very good way to start

cegprakash: I also noticed wood1 boss always uses SURFACE command on 2nd turn just so he is beatable

idkhow2codee: how I move: well I just move with priority N E S W

Default avatar.png WINWINWIN: Cegprakash, how will u use that, u have to beat all of the other bots in the league as well?

idkhow2codee: but sometimes got stuck forever so added to avoid positions where surfaced

cegprakash: that's good idkhow2codee but before doing NESW give priority to the directions with more space

cegprakash: that's what I'm going to add

idkhow2codee: yes that might work

idkhow2codee: god our bots are so pathetic xd

idkhow2codee: where did u started me 2 days ago

cegprakash: started yesterday night

cegprakash: like 3 hours of work so far

Default avatar.png WINWINWIN: Wow!

idkhow2codee: nc

cegprakash: my random shooting bot was #64 in wood1

cegprakash: but I added enemy grid tracking

cegprakash: used a lot of Radars

cegprakash: sorry sonars

cegprakash: which is pretty useless..

idkhow2codee: so u just shoot somewhere inside that region?

cegprakash: yes even if he moves away from that grid

cegprakash: I keep shooting there

idkhow2codee: xd

cegprakash: until my sonar tracks him again

idkhow2codee: well that's weird

cegprakash: yes

cegprakash: that's why my rank got low

idkhow2codee: u can see when he got hit though

cegprakash: I didn't add enemy life tracking.. I tracked my life tracking though

idkhow2codee: why

cegprakash: if he hits me I assume he is in my grid and keep shooting my grid

cegprakash: which is pretty bad if he keeps shooting from neighboring grid

idkhow2codee: well that's not bad

cegprakash: :D

idkhow2codee: yes but still

cegprakash: yeah he'll be scared to come into my grid

cegprakash: this grid is mine

cegprakash: until I choke myself

Default avatar.png WINWINWIN: after the contest, is there any place to study this multi?

cegprakash: yes

cegprakash: forum


Default avatar.png WINWINWIN: do the top players still write post mortems?

cegprakash: yes

cegprakash: my wood1 post mortem is funny

cegprakash: isn't it

Default avatar.png WINWINWIN: :)

Default avatar.png lxnn: I'm a bit late to the game. Question: if you move and surface in the same turn, do you move and then surface or surface and then move?

blasterpoard: lxnn depends on which you write first

Default avatar.png lxnn: Ah

cegprakash: if u move why do u want to surface?

cegprakash: don't surface and lose ur life

idkhow2codee: orders works consecutively

idkhow2codee: they activate after each other

idkhow2codee: work*

cegprakash: it makes sense in the case of SURFACE followed by a MOVE.

cegprakash: but MOVE followed by a SURFACE is never good

idkhow2codee: yes

Default avatar.png lxnn: Right, thanks for that

Default avatar.png anid: But if you inevitably have to surface?

Default avatar.png lxnn: why I ask is that it makes a difference to tracking the opponent which comes first, I think

cegprakash: u have no other option in that case anid

cegprakash: just make sure u don't get into that situation

cegprakash: at least after reaching wood1

cegprakash: yes ofc lxnn

idkhow2codee: so it would be wise to keep dir of enemy in case enemy used surface

idkhow2codee: silence*

idkhow2codee: Do u guys write code that would be considered clean?

Swagboy: Rather, for a month of contest, you need clean code

Nerchio: i started less than 10 days ago

Nerchio: not a real programmer

Nerchio: i started messy i continued messy and i ended in a mess

idkhow2codee: :joy:

idkhow2codee: bot logic is hard to maintain

Default avatar.png duckquackduck: You can only place a mine or move, right? Can't do both?

idkhow2codee: in fact I write such bot for the first time and everything from scratch

idkhow2codee: @Nerchio what do you mean by not real programmer?

Nerchio: it means this is the first app i wrote that is longer than idk 50 lines

Nerchio: that might be why my bot is 2600 lines of if statements

idkhow2codee: :joy:

idkhow2codee: is there a limit?

idkhow2codee: to size

Astrobytes: 100k chars iirc

Nerchio: i have 87k

idkhow2codee: but if you use setup properly external editor then you can include other files so does it count?

Nerchio: idk can you?

Nerchio: i have everything in 1 file

idkhow2codee: me2 :p

idkhow2codee: yes it is I saw guy doing it on stream

Astrobytes: If you have a script to combine all source files then that's cool, but the single file you submit on CG cannot exceed that limit

idkhow2codee: hmm so he combined them using script

Astrobytes: Yeah, there's one or two python scripts out there for C++ (or write your own), some for Java, C#

idkhow2codee: one more question: Who handles execution of code? and what's the maximum usage of ram?

idkhow2codee: just curious


Astrobytes: And some more info about execution environment here:

eulerscheZahl: easy to write such a bundler on your own if you don't do fancy stuff in your code

Swagboy: If you use C++, just compile with -E -P

Swagboy: it gives you preprocessing output

eulerscheZahl: my c# bundler, which i run as a post-build event in my IDE:


Swagboy: I should use a real IDE on day

eulerscheZahl: far away from brilliant but does the job for me

Swagboy: What's yours eulerscheZahl?

eulerscheZahl: MonoDevelop

eulerscheZahl: i'm on linux, otherwise it would be visual studio for C#

Zenoscave: I use vscode

Astrobytes: Never consider running a cheapo win box just for VS euler?

eulerscheZahl: no, i'm fine with monodevelop

eulerscheZahl: i installed VS code as illedan wanted to try liveshare for hashcode

eulerscheZahl: didn't work that well. whenever i scrolled, his code duplicated

Astrobytes: VS Code has a liveshare? Didn't know that

Astrobytes: Oh lol, works well then

eulerscheZahl: so he had the same block of lines about 10 times :D

Astrobytes: hahaha

eulerscheZahl: and then my VS code crashed

Astrobytes: Seems legit :D

eulerscheZahl: and illedan was like "wtf is that?" (we spoke on discord the same time)

eulerscheZahl: for those not on discord: "by the way, there will be prizes for this challenge. Same as for previous challenges"

Astrobytes: ffs you literally beat me to it

eulerscheZahl: haha

Astrobytes: jeez

eulerscheZahl: but you saw it on discord before me

Astrobytes: 1 keystroke away!! Yeah, and STILL you beat me

kovi: top10 was sorted by country

eulerscheZahl: how do you sort countries? by population? alphabet? average life expectancy?

kovi: well french and japan grouped together

eulerscheZahl: but your hungarian friends aren't in top10 anymore

kovi: true :(

eulerscheZahl: and now i have to gain 6 spots to monday

Nerchio: so i can win a tshirt in this contest if i do well?

Nerchio: :D

eulerscheZahl: top20

AntiSquid: kovi -> the last hungarian

AntiSquid: coming to the cinemas this winter

Zenoscave: I'd watch the kovi movie



Zenoscave: I want that shurt

Zenoscave: shirt

eulerscheZahl: and there's a 3rd design to choose from

AntiSquid: i have it

eulerscheZahl: quite new, a rubiks cube

Zenoscave: Is the rubiks cube melting?

Nerchio: damn need to improve my bot then

Nerchio: i want a tshirt too :D

AntiSquid: are there prizes for this contest?

Nerchio: i think so

Zenoscave: Yes anti

eulerscheZahl: not melting, bottom part is twisted

Zenoscave: look on discord

AntiSquid: oh

Astrobytes: Yes squid, Thibaud casually mentioned it on discord

Nerchio: "by the way, there will be prizes for this challenge. Same as for previous challenges"

AntiSquid: lol but no mention on the site?

eulerscheZahl: a bit like this one but different (old design)

AntiSquid: Today at 19:40 - by the way, there will be prizes for this challenge. Same as for previous challenges

AntiSquid: good he mentioned it early during contest

eulerscheZahl: 20:40 in his timezone

Nerchio: yea but maybe they didn't know if they can offer any prizes so they didnt say it

Nerchio: consider it a nice gesture

AntiSquid: maybe

eulerscheZahl: to be fair: last Sunday he didn't know himself if there will be prizes

Astrobytes: Yeah they said at the start they weren't sure

Zenoscave: Thanks thibaud

Zenoscave: sincerely

eulerscheZahl: and they still weren't till recently so a nice surprise, no reason to be mad for the late announcement

AntiSquid: well nobody played for prizes anyway

AntiSquid: i am not mad though

eulerscheZahl: true, CG is always a big fun

Zenoscave: I did. Been aiming for the shot at a shirt from the get go. Top 20 has been m goal this whole time

eulerscheZahl: you are trying this for > 2 years

Astrobytes: ZenosCrave

eulerscheZahl: that's dedicatoin

ZarthaxX: and me? lmao

Zenoscave: I started in 2013

Astrobytes: Shhh ZarthaxX

ZarthaxX: :(

Zenoscave: late 20113

Zenoscave: tr -s 1

Astrobytes: He's from the future :o

ZarthaxX: lol

Nerchio: last hour of the contest everyone will be submitting

Nerchio: the servers will crash

NormantasStankevicius: ahhh worked many hours, reworked a good portion of my strategy, cannot get out of silver

eulerscheZahl: he's trying longer than CG even exists :o

NormantasStankevicius: How do you counter the insane amount of silence predictions?

Zenoscave: I'm not sure of the year then

Astrobytes: I started 2015 sometimes

Astrobytes: *sometime

Zenoscave: ekul was my first account. now it smurfs

ZarthaxX: and your deleted zeno

eulerscheZahl: what was your first contest? mine was hypersonic

Nerchio: ocean of code

Nerchio: back in 2020

Zenoscave: I don't remember

ZarthaxX: lmao

eulerscheZahl: those were times

Astrobytes: lol

ZarthaxX: crazy times

ZarthaxX: *oh wait*

eulerscheZahl: i still remember as if it was just yesterday

Astrobytes: :D

Nerchio: i destroyed my finisher move code it will be a pain to fix

eulerscheZahl: when i joined, there were 2 contests running at the same time. Hypersonic and The Accountant

Nerchio: meanwhile kovi has such clean finisher from every position

ZarthaxX: the only contest i missed :c

Nerchio: or seems like it

lhm: Does the contest end today?

eulerscheZahl: i skipped TAC as well. exam time

eulerscheZahl: monday

Astrobytes: I didn't notice contests when I first joined up, then was away for ages until I remembered to come back

lhm: I feel like I should spend more time on it

eulerscheZahl: but you can keep playing it in the multiplayer section

lhm: Thanks eulerscheZahl

eulerscheZahl: just without prizes

ZarthaxX: and with copypasters

lhm: Im not playing for prizes and will not get any anyways :)

ZarthaxX: u are lvl 32

ZarthaxX: wtf

eulerscheZahl: i'm copy-pasting the whole time. IDE -> Website Website -> diff tool ("what did i just break")

ZarthaxX: lol

lhm: I do not understand your point ZarthaxX

eulerscheZahl: he says you are good and know how to code

ZarthaxX: thanks for the translation

eulerscheZahl: or that he hasn't seen you before and now he's wondering how he could miss a lvl32 player

Zenoscave: I think the second

ZarthaxX: and also that

lhm: Well, good enough for gold but so far away from legend

ZarthaxX: u can still try

lhm: I did, went gold

ZarthaxX: mor

ZarthaxX: e

Zenoscave: MORE

Nerchio: in this game if you are top10 gold i suggest just spam submitting until you get it xD

lhm: You did not miss me, im not talking much and im here for less than a year :)

lhm: If im top 300 gold, spam might not be enough haha

ZarthaxX: ah ok

ZarthaxX: lol

Zenoscave: 08/13/2015 @ 7:08pm (UTC) Is my best guess one when I joined

Zenoscave: 04/10/2018 @ 10:37pm (UTC)

Zenoscave: New estimate

AntiSquid: when were you born?

Zenoscave: one of those seems wrong

Zenoscave: i estimate 1995

AntiSquid: time of the day

AntiSquid: in seconds

Zenoscave: No idea

AntiSquid: what's your linux clock

Zenoscave: wasn't there

ZarthaxX: you rejoined Zenoscave when you deleted your acc :)

Zenoscave: ohhhhhh

Astrobytes: You weren't present at your own birth Zeno? :P

Zenoscave: not mentally

Zenoscave: I do hear stories though

Astrobytes: lol

Zenoscave: Countries rejoiced and leaders wept

Astrobytes: :D

AntiSquid: he was in his mother's womb for 20 years and after that a portal opened and he walked out into this world

Nerchio: do you think if i submit enough times i can get top5 in legend

Zenoscave: no

Zenoscave: not possible Nerchio

mlomb: how much is *enough* for you

Nerchio: i believe statistics are in my favour

Zenoscave: Have you played against top 5?

Zenoscave: I'd say otherwise if you haen't

NormantasStankevicius: why does my broken code work better than better one?:cry:

Zenoscave: 2nd in C#

Zenoscave: !!!!

NormantasStankevicius: nice!

Astrobytes: Who's 1st? Illedan?

Nerchio: legend people are boring

Zenoscave: mhm

Nerchio: almost everyone in C++

ZarthaxX: euler

Zenoscave: nope

Zenoscave: euler is 3rd ;)

ZarthaxX: ah u are 28

ZarthaxX: what did u do

ZarthaxX: lol

ZarthaxX: illo

Zenoscave: i had a break instead of a continue

ZarthaxX: lmao what

Zenoscave: it was a major issue

Zenoscave: probably have a few more

Zenoscave: Nerchio top 20! GZ

Nerchio: i was actually top13 i think after first auto-commit in legend

Nerchio: after getting

Nerchio: to legend

Astrobytes: He got to 14th or 15th on his gold-beating submit Zeno

Nerchio: i can end anywhere between top10 and top 50

Nerchio: i dont consider my bot to be very good

Astrobytes: gz for that Nerchio btw :)

Nerchio: ty

Zenoscave: find the bugs. I have more faith in your top 5 with this knowledge

Nerchio: i think everyone including myself underestimate this if-monster

eulerscheZahl: above Zenoscave again \o/

blasterpoard: imho everyone underestimates what will happen during the last few days

Zenoscave: BAD EULER

eulerscheZahl: i don't, saw it often enough

blasterpoard: we'll have at least 5 new contenders for top10

eulerscheZahl: dropped from top10 below 50 at hypersonic

eulerscheZahl: (to be fair, that was an 8 day contest)

eulerscheZahl: i expect blasterpoard to improve a lot on the weekend or even monday morning

eulerscheZahl: i don't think that karlis o is hiding and will join last minute. he became first in onitama yesterday

eulerscheZahl: and i expect myself to qualify for codejam round 2

Astrobytes: Since he gave a flat "no" as to whether he'd participate you're most likely right

Zenoscave: reCurse joining when? ;)

Zenoscave: sorry for ping

eulerscheZahl: wasn't online when that happened

Zenoscave: must ask

eulerscheZahl: recurs e refused to give a statement

Astrobytes: Was talking with Smits iirc euler

Nerchio: hehe

Nerchio: its funny to play vs GiB

AntiSquid: karl said he doesn't play

Nerchio: my number of agents and possible locations are exact match with this just 1 turn difference ofc

Nerchio: with his*

Nerchio: i guess its the same with everyone nvm

Nerchio: xD

Nerchio: but its the first time i noticed this after i fixed too many objects i was creating with silence

Zenoscave: Is anyone else getting timeouts in first turn?

gaha: happens once in a while

Zenoscave: 50% of my losses ...

gaha: sometimes my timer says I finished in 0.03s but I get a timeout anyway

AntiSquid: check discord regarding this Zenoscave

Zenoscave: just did Anti

gaha: what is there on discord on it?

AntiSquid: the Loch Ness monster unrefutable evidence

AntiSquid: it eats your sub

Zenoscave: Server timeouts from compilation

AntiSquid: irrefutable *

gaha: huh, compilation

gaha: my python code doesn't know what it is

Default avatar.png duckymirror: I got an email yesterday about a new school leaderboard and the "CodinGame Spring Challenge". What confuses me is that it doesn't have the usual CodinGame design. Is it official or just spam?

eulerscheZahl: official

Default avatar.png duckymirror: Okay, thanks


Default avatar.png duckymirror: I don't like clicking links in these cases :grin:

Default avatar.png duckymirror: I mean links in emails

eulerscheZahl: not even linked, you have to copy-paste it from the email

eulerscheZahl: once i got a spam email from someone imposing as CG

Default avatar.png duckymirror: Yeah

eulerscheZahl: i guess they got my email address from github. at least it's not the one i use on CG

Default avatar.png duckymirror: Then it's probably better to ask

eulerscheZahl: there was a forum post about it

AntiSquid: do you need to participate in a CG contest to get your degree at Wroclaw ?

Astrobytes: euler *posing as/impersonating

eulerscheZahl: sorry, me no English

Astrobytes: lol, if I was talking German I'd expect people to correct me ;)

Zenoscave: genau

AntiSquid: idk, depends on the chat

AntiSquid: you might get hdf and deine mudda is something instead


Nerchio: i've heard they have this contest as an additional thing for an AI class or something in Wroclaw :p

Astrobytes: lol euler

Zenoscave: Apple pen

Zenoscave: haven't heard that in a while

MSmits: never had this before:

MSmits: munmap_chunk(): invalid pointer

AntiSquid: new achievement unlocked then

MSmits: yeah!

AntiSquid: time to go out and party MSmits

MSmits: no party before i get my fatality check working

Astrobytes: deleted an invalid pointer?

MSmits: coded all of it, now debugging it

MSmits: maybe

Astrobytes: Or changed it's address and deleted

MSmits: can this happen when you popback an empty vector?

Nerchio: how lovely i dont have to deal with this

Astrobytes: Yeah I think so

eulerscheZahl: it's c++, everything can happen

Astrobytes: Ask re Curse

MSmits: thats probably it then

eulerscheZahl: i wouldn't be surprised if you manage to physically delete your computer

MSmits: i recently started using vectors for things

MSmits: I'll try eulerscheZahl

MSmits: no promises

blasterpoard: anything can happen with vectors... I once saw a vector destructor cause a double free

MSmits: whats a double free?

blasterpoard: you free the same memory twice

Astrobytes: Trying to free the same chunk of memory twice

MSmits: oh

MSmits: it's extra free then

Astrobytes: That would be nice, but no

MSmits: what happens when you do this?

ZarthaxX: die

blasterpoard: if you're lucky

Astrobytes: Bad Things™

blasterpoard: you might as well corrupt the heap and randomly crash 200 lines later

MSmits: hm ok

ZarthaxX: the pointer could point to some new memory you allocated too MSmits

ZarthaxX: imagine the posibilities

ZarthaxX: :D

blasterpoard: it was especially fun when it happened in the destructor and I spent several hours looking for it

ZarthaxX: imean the same address reused

MSmits: horror stories

MSmits: this is why we should all be using Rust

MSmits: rust means peace in Dutch

MSmits: it would give us peace

Astrobytes: These are the fairy tales that seasoned devs tell their kids at night

MSmits: nightmares

Default avatar.png SapphireLight: yeeeah

blasterpoard: but C++ gives us speed

blasterpoard: and bots that we can test against in IDE

MSmits: ah yeah, it was the vector. I forgot to add something to it earlier and i did remember to remove it after (recursive function)

Zenoscave: my german teacher insisted i know the word frommfor some reason

Zenoscave: fromm*

MSmits: whats that

MSmits: why does it have an extra m ?

Nerchio: feelsbad to code when my ide has slower typing with this many lines idk

MSmits: bug in the language?

Astrobytes: It's like devout or pious

Zenoscave: yes

MSmits: ah

MSmits: vroom

MSmits: in Dutch

MSmits: with a proper amount of m's

MSmits: that is

MSmits: 1

Astrobytes: But that extra o

Astrobytes: :P

MSmits: the extra o makes you pronounce it as froam, one o would make it soudn like from

Astrobytes: I know. It just makes me laugh

MSmits: lol ok

Astrobytes: stroopwafel

MSmits: right that :)

MSmits: how much Dutch do you know

Counterbalance: it's better than english where any vowel can be pronounced as any random vowel depending on the word

Astrobytes: That's about it

MSmits: ah ok

Zenoscave: jag

MSmits: Counterbalance agreed

MSmits: also dependent on the dialect

Astrobytes: Yes Counterbalance, agreed

Zenoscave: Agreed

MSmits: Australian, Scottish, Irish, British etc.

Astrobytes: English is fking mental

Astrobytes: It makes a modicum of sense up to a point then just goes a bit haywire

MSmits: most languages probably have features like that


Astrobytes: Of course all languages have exceptions, English just does it... differently :D

MSmits: i think the fact that CG thinks you're spamming says enough Zenoscave

Counterbalance: heh yeah Zenoscave

Astrobytes: spot on Zeno

Zenoscave: That is one of my favorite quotes about the language

Counterbalance: Dutch-english vowels: i is pronounced a, a is pronounced as e, e is pronounced as i

MSmits: very confusing and funny to hear when Dutch people barely speak English

Counterbalance: the ebc

Astrobytes: This also changes when you're Scottish and trying to learn languages

Astrobytes: Because we say our vowels very differently from the traditional English

Counterbalance: I'm wondering whether I should resubmit..

Counterbalance: boss has 3pt lead

Zenoscave: feking right you do

Astrobytes: fecking is Irish tho

Astrobytes: :D

Zenoscave: I feel ashamed

Zenoscave: i'll leave now

Astrobytes: I have Irish relatives, it's ok

RavenKZP: Some bot is Gold is not random?!

Zenoscave: same legend

Default avatar.png LouysPatriceBessette: Hello all I have an issue with no save/submit changes about the nickname, bio and city location in the settings. Is it me? (lol)

ZarthaxX: Counterbalance i was 3 points behind boss and magically promoted 12 hs later

ZarthaxX: but i wouldnt try that

ZarthaxX: you dont have zeno anymore there spamming for you :)

Counterbalance: I already waited 12h.. was at rank 21, now at 4

ZarthaxX: oh amazing lol

ZarthaxX: just improve then mmh

Counterbalance: yeah I have a 10-15% winrate improvement ready.. I think I'll go for it

ZarthaxX: gogogogo

Counterbalance: not sure I like being bottom legend though ;)

MSmits: I just passed 2k lines =/

ZarthaxX: are you insulting me?

ZarthaxX: :thinking:

MSmits: it's odd how these seemingly simple games make you code so much

Nerchio: i have 2700

Counterbalance: im at 3300.. had to remove code twice already to remain under 100k

Nerchio: lets measure our length guys

Nerchio: counterbalance the longest so far

Zenoscave: 1060

Counterbalance: lol

Nerchio: so short?

Nerchio: zenos :x

Zenoscave: can we measure by submits instead?

gaha: what, is there 100k characters limit, not lines?

MSmits: yes gaha

ZarthaxX: lol

ZarthaxX: dont even try Zenoscave

MSmits: you know you can make 3k lines fit on 1 line right

Nanosplitter: ^

gaha: will have to remove comments soon xd

Counterbalance: yeah, i have some comments too - bad practice

Nerchio: using comments in your code?

Nerchio: wtf!

Nerchio: what is this magic

MSmits: only contest where i had to do that was code a la mode

ZarthaxX: eulerscheZahl ded?

MSmits: sleeping probably

Counterbalance: only 24k gzipped.. if they counted gzipped size, it'd be much better

MSmits: yeah

Nerchio: 89200 chars ;/ getting close

MSmits: you can do a minification

Counterbalance: gunzip - - | <<EOM; g++ - > /tmp/Answer.exe && /tmp/Answer.exe

MSmits: just dont make it unreadable

MSmits: thats not allowed

MSmits: fatalityMap -> fatMap etc.

Astrobytes: *fatalityMap -> f

Nerchio: lol

YannT: 26k chars

YannT: maybe that's what's wrong, need more code

Nerchio: my stuff is actually very verbose but i am bad at this

AntiSquid: don't think my code is readable

Nerchio: i have countAllPossibleEnemyLocations()

Nerchio: xD

Nerchio: method

YannT: I'm up to 650 lines now , obviously it's not enough

AntiSquid: i can barely read my code

YannT: // TODO: Add more line returns for better ranking

MSmits: thats pretty amazing YannT

MSmits: to do that well with so little code

YannT: well it's not all me, kotlin is also a very dense language

MSmits: oh yeah

Counterbalance: grep TODO main.cpp | wc -l 37

MSmits: as in, I feel dense when trying to use ity

AntiSquid: no i think it proves most bots might be doing useless sorting and searches

YannT: val positionsCount = possibilities.distinctBy { it.last() }.size

YannT: in C++ that's like 100 lines right there

YannT: :p

YannT: my sonar handling (when getting sonared, or sonaring) is also a one liner

YannT: possibilities.removeIf { (it.last().sector() != sector) == sonarResult }

MSmits: probably

Zenoscave: shouldn't that be != sonarResult?

Zenoscave: ah != sector nvmd

MSmits: what really bloats my code is all those times I do the same thing for 4 directions

Swagboy: Hard to cut on those tho

MSmits: yeah I know it's possible

MSmits: but havent done it, too much work also

MSmits: and causes bugs, i already know that

YannT: I actually wrote a kind of bool table to make sure I got that one right Zenoscave, I wasn't confident at all with doing the logic in my head, that's like a double to triple negation with the removeIf Oo

Zenoscave: right!

Default avatar.png TheHotTopHat_917b: how to print something?


Astrobytes: print("something")

Default avatar.png TheHotTopHat_917b: ty

KobeL: Streaming over at: Doing some code clashes, feel free to hop in and say hi!

Nerchio: btw the numbers of moves you can do is kinda crazy

Nerchio: silence w 1 move nws

Nerchio: silence w2 move nws

Nerchio: etc

Nerchio: for finishers i mean

MSmits: I just finished my fatality function and it was not easy indeed

wlesavo: grac

MSmits: well it might still have bugs. Havent been able to test silence yet, but move/trigger/torpedo seems to work

Default avatar.png Tetano: hi guys, how can i use the debugg comand?

MSmits: the trick is to filter for torpedo and mine locations, dont just allow triggering every mine and firing torpedos everywhere

MSmits: I seem to be losing a lot of games on my first submit test, so I am still bugged

MSmits: nah it was unlucky, so far I see no bugs. Fatality is working. I just use abilities badly , so i never seem to have a silence ready to dash with

MSmits: definitely seems to have helped, but it's not a miracle cure. I need more to get legend

AntiSquid: ladder is random MSmits

AntiSquid: your current submit might as well rank 10-20 lower, that's how random it is

Nerchio: i have a question

Nerchio: you can do a bfs for torpedos for the whole map in the first turn

Nerchio: but how would you store it?

MSmits: i know AntiSquid, but before i improved this I was 30-50

MSmits: so pretty sure it helped

AntiSquid: i tell you after contest nerchio if someone else doesn't do it first

MSmits: damn I should do that

AntiSquid: MSmits same bot ranked #12 and #45 for me just saying

MSmits: sure

Nerchio: i mean its not that important is it? :p

AntiSquid: it saves time Nerchio

Nerchio: kk np

MSmits: yes

Nerchio: i dont really need it but its annoying to write bfs(all the variables for it) everywhere xD

darkhorse64: nerchio, store it at each cell of your grid

MSmits: I don't have a grid, but I could just make an array of target maps

MSmits: targetMaps[225]

darkhorse64: I have 10 flavors of bfs in my code

Nerchio: array of arrays

Nerchio: so lame :(

MSmits: I don't bfs

MSmits: I floodfill to get the torpedo map

MSmits: 4 floodfill iterations

MSmits: on a uint16_t[15] array

darkhorse64: floodfill = bfs for me. Is there really a difference ?

MSmits: bfs stores parents to track back a path

MSmits: you're just coloring a map with a floodfill

MSmits: not looking for any specific destination or path

MSmits: it's not a big difference

darkhorse64: OK. I have also a dijkstra

MSmits: but in my case it is, because my floodfill is on a bitboard, I wouldnt be able to bfs like this

Astrobytes: floodfill can be bfs or dfs or whatever, I use bfs. bfs with no target destination


MSmits: floodfill a map in all directions once

MSmits: do this 4 times and you have your torpedo map

darkhorse64: Apart from the point of view of compactness, is there a real advantage to bitboarding ? More speed to resist silence spammers ?

Default avatar.png payroll-beats: Did anybody solve the order of succession puzzle

MSmits: not sure darkhorse64, I've used bitboards so often now with those boardgames, it feels more natural to use them

Default avatar.png payroll-beats: Im a noob just want to know if I need to understand the Tree data structure

MSmits: sorry, dont remember that puzzle

darkhorse64: my bot is based on STL sets and can handle several thousands paths

Default avatar.png payroll-beats: Thank you

MSmits: what are STL sets?

MSmits: I can handle 40k or so I think? Not sure, i dont time out anyway

darkhorse64: Standard Template Library

MSmits: oh

Zenoscave: #include <set>

MSmits: I think right now I need to use some strategy on using abilities

pb4: darkhorse64 : there's a convenience factor with bitboards

MSmits: yeah

darkhorse64: Why don't you timeout ? You reset paths ?

MSmits: what kind of situation should make me timeout?

darkhorse64: Too mzny paths

darkhorse64: *many*

darkhorse64: 40k is huge. That's why you don't timeout

MSmits: I do have a pruning function that worked superbly well when I was ignoring mines, i still have it, not sure if it ever kicks in now

darkhorse64: "convenience factor"

darkhorse64: ?

MSmits: or if it is bugged

pb4: calculate hit probability

MSmits: I do that

pb4: (presenceMap & boomMap).popCount() / presenceMap.popCount()

MSmits: yeah I am doing this wrong I think

MSmits: I am counting every possible location as 1

MSmits: not counting how many times it occurs

MSmits: btw, i do this right in mine avoidances

MSmits: just not in torpedoing and triggering

MSmits: so there could be 2 locations that each occur once and 1 location that occurs 100 times

MSmits: and I would not shoot at it

MSmits: because 1/3 chance

darkhorse64: Funny that when I code a board game, bitboarding is turned on in my mind but not for other games

pb4: I just use those masks everywhere

MSmits: 1/4 of my code is helper functions for clearing maps, doing & operation on two maps, or |= operation etc.

Beerus: does anyone used minimax?

MSmits: not here

MSmits: I use beamsearch for mine avoidance. A recursive brute force search for fatality checks

MSmits: and tracking is a big thing also, processing opponent orders and eliminating impossible states

MSmits: I still dont use minimax in any real sense on CG... I always gravitate to mcts or similar

Beerus: can you go legend with good tracking?

MSmits: not with just good tracking no

MSmits: you need more

MSmits: mine avoidance, some strategy on ability use

Beerus: can you go legend without mine avoidance

MSmits: doubt it

darkhorse64: no

Beerus: you cant check for every possible mine position

Beerus: its dangerous to surface if you do

MSmits: btw darkhorse64, you can favor sonar use if you see your pathcount rise too much

MSmits: i dont do that, but it makes sense

MSmits: Beerus you record positions from which mines were laid for each possible state you are keeping

darkhorse64: I have tuned my bot to use less silence in order not to timeout myself !

MSmits: oh, selftracking

MSmits: i dont have that yet

MSmits: its high on my list

darkhorse64: You need it. Do it now

MSmits: first I will fix my hit probability function. I think gold boss beats me every time by shooting better

MSmits: I would not know how to use the information currently

Zenoscave: I broke something

MSmits: need to think about that also

darkhorse64: This is where I am weak

Beerus: why use hit probability?

Beerus: hit if your are sure or not

Nerchio: zenos all good

Nerchio: free points

Zenoscave: You hit too infreqently if you don't

Beerus: if you hit and miss opponent detects you

MSmits: if you have a 80% chance to hit and you miss, you pretty much know exactly where he is next turn

MSmits: unless silence

MSmits: there is some luck involved. 80% is good odds

AntiSquid: CG poker multi :thinking:

Zenoscave: I accidentally turned of silence

AntiSquid: and your sub was playing guitar

Nerchio: lol

MSmits: man i am getting tired, i's are starting to look like j's

AntiSquid: i have i2, j2 and k and k2 in there

AntiSquid: and idx es

AntiSquid: and i have p for player

Nerchio: i had 4 nested loops

Nerchio: i , j and then w , z

Nerchio: the master of loops

MSmits: heh, I remember my first real program. I was coding vba in excel to automatically create excel files, I had, i,j,k,l,m,n,io,p,q,r I think

AntiSquid: i have 5 for my silence function

Nerchio: :D

MSmits: I returned to this program 2 years later to rewrite it and I had no idea what it did

Nerchio: hey i found your loop do you want it xD

AntiSquid: lots of 4 for nested loops

AntiSquid: it's mainly the structure that i use i guess

icecream17: I lost against this person when submitting. So I sent it to the IDE.....

MSmits: it might go different in the ide when you hit play again

MSmits: if people use random

MSmits: or if people use full calculation time and it hits the timeout limit

MSmits: they cut short their search and there is a different result

Default avatar.png rwilson: icecream17 ;) unlucky random initial placement ... fun

MSmits: oh didnt look at the game, yeah thats something to fix :0

MSmits: I just floodfill all my starts

MSmits: if any have less than max, I dont consider them

Default avatar.png rwilson: nice ;) better than NOTHING ;) which i think a lot of folks still get by with purely ... random(x,y)!=isLand

MSmits: i tried other ways

MSmits: didn't help

MSmits: I'll try again I guess, might depend on meta

icecream17: If less than 2 water next to it, not available water space

icecream17: Might eliminate a bit more than neccesary but good enough....

MSmits: I did a short of weighted floodfill with nearby cells weighing more than far away cells

MSmits: that way it prefers movement space

MSmits: I am top 10 gold :)

MSmits: fixing hit probability helped

AntiSquid: gn8 folks, i'll try to dream my bot into legend

MSmits: gn AntiSquid

MSmits: thanks pb4

Nerchio: bye

MSmits: that little hint about hit probability saved my ass. Very close to legend

Default avatar.png rwilson: anyone had luck adding some voronoi like features yet?

MSmits: not me

Nerchio: MSmits my floodfill prefers squares closer to otehr squares

Nerchio: :p

MSmits: kinda depends on how you define voronoi

Nerchio: works similar probably

MSmits: 5 wins in a row vs gold boss on legend. Rank 2 now

MSmits: on gold i mean

MSmits: come on!

MSmits: so close

Default avatar.png rwilson: nice ;)

MSmits: 2 more wins vs gold boss and I'm out

MSmits: need some luck

Default avatar.png rwilson: or a submit bump from someone ;)

MSmits: yes or that

MSmits: crap, not gonna make it

YannT: yo weighted floodfill!

YannT: I don't have that, now that's an idea :)

MSmits: didnt work for me the first time i tried

MSmits: but my bot had other problems then

Astrobytes: Like a Dijkstra?

Nerchio: i tried weights also

Nerchio: but i didnt implement that properly

Nerchio: so i gave up

Nerchio: xD

YannT: I'm thinking just manhattan distance is enough

YannT: close squares more valuable

YannT: it should work

MSmits: YannT a question for you then

MSmits: Is it better to start in open spaces?

pb4: YannT : don't even try it

pb4: -_-

YannT: doesn't work pb4?

MSmits: maybe that means it does :P

YannT: MSmits: I think as long as you don't screw yourself, placement doesn't matter terribly much

MSmits: I only need a small boost, I am just below gold boss

YannT: I benched around that, don't think it has any impact as long as you don't pick the obviously bad placements

MSmits: what are obviously bad places?

YannT: lakes

YannT: and tunnels

Nerchio: MSmits i was below gold boss 20 times before i advanced :D

MSmits: ah ok

MSmits: Nerchio I am 0.42 below gold boss

MSmits: thats not much

YannT: middle of the biggest sea tends to work best because it makes initial detection slower

MSmits: I'll try it then

YannT: but the impact as opposed to starting in the corner of the biggest sea or something is really minimal

icecream17: That should be another type: Detection Avoider

YannT: another thing is since everyone has a "start in the middeish of the biggest sea" type algo, you will start close to opponents more often than not (if not on the same square)

YannT: so your bot has to be good at fighting otherwise all your games will be short :)

MSmits: ah i see

YannT: it can be a good thing or a bad thing depending on if you're best at torpedoing or building mine castles in your corner

MSmits: I have no idea what I am best at

Zenoscave: YannT what's the secret to fights?

Zenoscave: simu?

icecream17: I start in the 7th available space (excluding 1-width oceans)

MSmits: oddly specific

icecream17: Fights... torpedo & charge, charge, charge & torpedo

YannT: Zenoscave: I have an eval + some rules, but I'm sure most of the top bots wrote some kind of fighting minmax

Zenoscave: fighting minimax :/ no time for that unless I do it tomorrow

icecream17: It usually starts around the top-middle

YannT: if both positions are known, you can "solve" the fight

icecream17: No... theres ilence

YannT: I didn't do it though, but I'm sure others have

YannT: not usually

Zenoscave: no silence once a fight starts up here. too many charges needed

YannT: once silence has been burned, you have 10ish turns of just charging torpedo, moving and shooting torpedo

YannT: and usually the positions are known at that point

icecream17: Nah, half the time opponent escapes

YannT: so you can "solve" the fight

YannT: yeah I'm not saying it for handling a driveby

Nerchio: it's definitely solvable

Nerchio: but too complex

Nerchio: :D

YannT: but you'll notice most games end with an exchange of torpedoes over 10ish turns, and usually the winner is decided by like one turn (i.e the loser needed just one turn to charge and win)

YannT: so it's often kinda close

YannT: and you can optimize this and turn a loss into a win

YannT: maybe with a smart move, or siomething

MSmits: sounds like a multi-turn fatality check

YannT: that's what it is

MSmits: I already had some problems just getting the 1 turn working :P

YannT: you just have toi minmax moves and torpedoes with both positions being known

MSmits: what about silence and mines?

YannT: silence is burned at the beginning of the "fight" usually

MSmits: hm ok

YannT: then it's just moves and torpedoes until someone dies (or escapes)

icecream17: there should be a statistics thing, like a "death by mine, torpedo, error, and surface" chart

YannT: I don't know of bots that don't charge torpedo as a first priority

icecream17: I think I charge mine too early

icecream17: Like, after 7 no-shots or so I charge mine....

Zenoscave: lucky submit

MSmits: whose?

Zenoscave: mine

blasterpoard: YannT about the combat sim - this is what it looks like when my bot in development fights my leaderboard bot:


vbplaya: I'm confused on how to properly use mines

blasterpoard: the mine was lucky, but it's still quite good

Zenoscave: what turn look ahead do you need to see before you get improvement blasterpoard?

YannT: blasterpoard: basically mines killed you so this is not really a good demo ;)

blasterpoard: YannT I meant the first 2 torpedos + silence

YannT: I see :)

YannT: I know siman and kovi have a thing like that because they use SURFACE when it makes no sense sometimes in combat

YannT: it must be because they combat minmax establish that with access to that tile they'll win for sure or something

MSmits: why do they use ot?

MSmits: ah

Astrobytes: Freedom of movement

YannT: like surface to sidestep and maybe then fire a torpedo before moving so you get that extra charge that lets you win

YannT: things like that

Zenoscave: does all of legend recalc? or just top 20

icecream17: How to use mines? Place randomly is pretty good - I haven't seen anyone use actual pattern and strategy with it

MSmits: top 100 I thought?

YannT: here's a trick with mine

blasterpoard: here's another then YannT

blasterpoard: moving to the same square as opponent so he can't hit me

blasterpoard: that's advanced enough I think

YannT: if you place them in such a way that one one laying position can pontentially have laid 2 mines

YannT: it can't be removed on trigger :)

YannT: I didn't implement this but I always thought that could be a good idea to screw with the opponent :p

MSmits: it can be removed on 2 triggers

YannT: yes

YannT: but on one trigger, you have to keep both, or guesstimate something, either way it's not ideal

MSmits: well.. I ended below boss again

MSmits: with my start in the middle policy

MSmits: with a worse rating, slightly less success, but not significant

Febrin: Nice MSmits I see u are second

MSmits: yeah

Febrin: What have u implemented today

Febrin: I am still fighting with smart finisher

MSmits: fatality and better hit probability

MSmits: smart finisher is a lot of work

YannT: I'm just about to test your weighted floodfill idea :)

MSmits: doesnt do anything for me, hope it helps you

Febrin: How do you hi smart?

Febrin: Kind of probability heat map?

MSmits: when i said smart finisher i just meant the kill shot

vbplaya: I guess what confuses me about the mines is that they don't trigger when the sub goes across it.

MSmits: hitting smart would mean counting all possible states and getting a probability for each tile

MSmits: then hit the tile with the highest expected damage

MSmits: before I had each possible tile counting as equal (as long as the opponent could be there)

MSmits: now I also take into account the number of states I have on that tile

MSmits: so positions that occur more often have a higher probability.

icecream17: I take each possShoot and have an array h for each. Each opponent position life lost = h++

icecream17: Special things like "original" array and "corners / middle" bonus, and decrease greatly if shoot myself....

ZarthaxX: MSmits that doesnt seem like it could be right

ZarthaxX: mhm

MSmits: what do you mean

ZarthaxX: well depends on tracker i guess

ZarthaxX: nvm

MSmits: yeah

YannT: MSmits: it's interesting I'd say

YannT: it gives me a more zigzagish type of movement

MSmits: huh... the weighted floodfill was only supposed to be used for selecting the start location

MSmits: what did you use it for

YannT: calculating space after move :)

MSmits: oh ok

MSmits: well that works too

YannT: that way it likes to zigzag more

YannT: which is usually good

MSmits: zigzag is good?

MSmits: you dodge torpedoes that way?

YannT: you more around in a more "compact" manner which tends to be good

YannT: for minimizing ennemy detection, and staying more in your "territory"

MSmits: ahh ok

YannT: I'll bench it :)

MSmits: yeah

YannT: 1.0 - (distanceTo(start) / 50.0).coerceAtMost(.5)

YannT: I but kinda random numbers that look pretty :p

MSmits: thats important

YannT: before the value of a given square was just 1.0

MSmits: if the numbers look crap, then the bot is crap

MSmits: I like 8 especially. It has good symmetry

YannT: multiples of 5 and even numbers are the best obviously

MSmits: mmh I agree

YannT: anything else just looks wrong

MSmits: I never did well in a contest where I had constants ending with 3

MSmits: just fyi

YannT: it's exactly like how you'll never put your TV's volume to like "17", that would be insane

MSmits: in my case my wife would kill me so yeah

YannT: you'll make it work on 15 or worse case scenario 18

YannT: it's not good :(

MSmits: ah well, another thing to take off the list

YannT: I'll let it run more in case it's bad luck but not looking good :/

MSmits: who are you running it against?

YannT: top5

MSmits: ah ok

YannT: I usually bench around 40-50% against that test set

MSmits: I see

icecream17: 3978 minutes left for the contest! Less than 4000 minutes

MSmits: less than 3979 even

MSmits: taking a break while waiting for submit. I think I'll be trying some constants tomorrow in different submits. There must be one lucky combination in there somewhere

YannT: constant tuning doesn't seem to have a lot of impact on this game

MSmits: i ended at rank 2 below boss 3 times now

MSmits: it doesnt need to have a lot of impact

YannT: just wait to be pushed it shouldn't take long then ;)

MSmits: that works too

MSmits: I'll be quite happy if I reach legend

YannT: I'm not very worried for you ;)

MSmits: I am :P

MSmits: just one more day basically

MSmits: sunday wont have much time

Nerchio: idk i submit and win some matches but i am at 47 all the time :(

icecream17: 75th in silver =)

Nerchio: nice

Nerchio: gogo gold

icecream17: The 'Ɑ' character messes the website up a little (copy paste it)

struct: What do you mean mess?

Zenoscave: 20% winrate on my last 20 matches

Zenoscave: RIP

Default avatar.png rwilson: :(