Chat:World/2020-04-21

From CG community
Jump to navigation Jump to search

eulerscheZahl: noooo!

eulerscheZahl: MineDrops = MineDrops.Union(path.MineDrops).ToList();

eulerscheZahl: i don't filter for distinct mines only. so when merging paths the mine list explodes

eulerscheZahl: consequences: worse mine avoidance and timeouts

metahom: hah. i got worse

eulerscheZahl: what did you break?

metahom: on sunday, I realized that I I do not update Torpedo Cooldown after launching it

eulerscheZahl: oh

metahom: so I launch torpedo and then change something else

metahom: I was wondering why I lose close fights for a long time )))

eulerscheZahl: i don't even track the cooldowns but manually replace the CHARGE action if i shoot a torpedo and move after

eulerscheZahl: so at least you found it before the contest ended

metahom: I'm pretty sure I have lot of stupid bugs left

eulerscheZahl: that's like a law

eulerscheZahl: having a buggy contest bot

metahom: yep

metahom: this time it was really hard to detect bugs. a few times I had feeling, that my self-tracking works bad. like enemy knows exactly where I am, while I think I have several possible positions. but didn't have time to check it

eulerscheZahl: the best idea is to test against bots printing their detection

eulerscheZahl: to see if you get the same numbers

metahom: yea, that's a good idea. and I should thought of it before )))

JFB: It looks that in the rank, they are included point for OoC contest but not points from OcC multi. It is no OoC position in Rank/Bot programming" list.

JFB: Is it bug or is it feature ;-) ?

metahom: points are included, but not shown on renking statistics popup

metahom: until submit

metahom: the same with UTG

JFB: So I have to resubmit my bot? OK. Thanks :-)

eulerscheZahl: or tell CG to fix it

JFB: eulerscheZahl - it can be "feature" that way. If sb do not resubmit his/her bot, but use automatically submited by CG, he/she will not have points. It looks fair

eulerscheZahl: no

JFB: why?

eulerscheZahl: because one has a bot for the game

dbdr: points appear to be there on https://chadok.info/codingame/leaderboard_xp.html

dbdr: where are they missing?

eulerscheZahl: and especially if you don't even know that you have to resubmit to get points

eulerscheZahl: on your profile summary dbdr

eulerscheZahl: royale getting closer

metahom: wait wait. points are included imo

eulerscheZahl: they are

dbdr: right, it's not in the list of multis

dbdr: but it's counted in the general leaderboard

eulerscheZahl: but it's in this list at least https://chadok.info/codingame/puzzles_list.html

eulerscheZahl: 25 user ratings, that was fast

eulerscheZahl: crystal rush has less

dbdr: my profile About Me picture applies :)

eulerscheZahl: so you got a lot of sleep?

eulerscheZahl: right, you were still there when i was already there yesterday morning

dbdr: yes, 6:30 is much later than during the contest :D

dbdr: I also went to sleep early

kovi: #2

eulerscheZahl: the next no-sleep-challenge is near

dbdr: yes, that's so close

dbdr: kovi what 2?

eulerscheZahl: pb4 posted his own ranking btw https://www.codingame.com/forum/t/ocean-of-code-alternate-ranking/176074/2

eulerscheZahl: 2nd in multiplayer

kovi: i c auto-submit on multi

dbdr: oh interesting

eulerscheZahl: "And finally comes YoBo, in a league of his own (sorry :sweat_smile:)"

dbdr: I guess it's pb4 who did his alternative ranking in a previous contest too

eulerscheZahl: he used a script he had from BR2K

eulerscheZahl: but modified as this time he has no stats for each vs each

dbdr: this is very interesting

dbdr: but not a ranking

dbdr: unless I'm missing something

eulerscheZahl: it is a ranking

eulerscheZahl: axis order has changed

eulerscheZahl: not the leaderboard order

dbdr: ah ok

eulerscheZahl: you can see "missing crosses" too

eulerscheZahl: e.g. dolmen

eulerscheZahl: he played against top but is bottom. so pb suggests that he's overrated

dbdr: opening the image separately helps :)

dbdr: too small otherwise

reCurse: Ranking for ants

dbdr: so MichaelPu was underrated

dbdr: by CG compared to pb4

kovi: i dont see why that ranking is better. im still not in top3

dbdr: why didn't he give the ranking system?

dbdr: competitive advantage in some way?

reCurse: He sort of made his own

dbdr: ok, but does not explain it

dbdr: I know he says I should PM him :)

eulerscheZahl: kovi you should make a ranking too then

reCurse: Maybe he couldn't be bothered with giving details if no one is interested

dbdr: right

reCurse: Anyway I know the details, it's legit

dbdr: overall it seems pretty consistent

eulerscheZahl: https://pastebin.com/BaxN9r7k that's the data to start with

dbdr: only a couple of clear differences among 60 people

reCurse: Just not sure how much better it can be with missing matches though

dbdr: and not even dramatic ones. top seems more or less identical

eulerscheZahl: i was surprised by how well these ranking match

reCurse: Well you do get pretty ideal conditions

dbdr: eulerscheZahl you made a lot of stats right? did you PM about it? I did not read the forum yet

reCurse: And trueskill isn't complete garbage either

reCurse: When everyone plays against everyone around their ranks it helps a lot

kovi: the interesting thing is what i conclude...that results (or multi state) with low number of games will never be good

dbdr: :O

reCurse: Rather than the submit orgy usually seen everywhere else

eulerscheZahl: i shared a huge table dbdr

dbdr: yes

dbdr: OK, ill ccheck

eulerscheZahl: https://forum.codingame.com/t/ocean-of-code-feedback-strategies/175885/8?u=eulerschezahl

dbdr: I made things like this:

dbdr: http://chat.codingame.com/pastebin/535dcce3-d86f-46d3-97ba-8d78f41700a3

reCurse: So

reCurse: It's a nice table

reCurse: But did anyone gather any useful information from it

reCurse: :popcorn:

dbdr: mine reCurse?

reCurse: Either

eulerscheZahl: i learned that i took too much damage from mines

eulerscheZahl: so i included a surface sometimes

dbdr: it was not very hard to do. python is indeed nice for quick prototype, even though I barely used it before

dbdr: and it was somewhat useful, yes

kovi: i did from eulers

kovi: silence patterns

eulerscheZahl: and interesting to see that not all top players use the same strategy. there are differences in behaviour (silence vs mines for instance)

dbdr: this is a summary, I have more detailed stats too

dbdr: http://chat.codingame.com/pastebin/f82fcea2-988c-4bcf-b9a4-d6200343081d

reCurse: I'm just too lazy to read more into it and I didn't actually participate in the meta

reCurse: So it's an opaque wall of pie charts to me

reCurse: Much like most accounting presentations

dbdr: and: http://chat.codingame.com/pastebin/cd9f8fe0-5c44-4711-8568-87df47b9e585

dbdr: this was useful for me to see combinations that I do less or more (or not at all) compared to others

reCurse: Interesting or useful?

dbdr: starting point to think if they are clever or bad

dbdr: both

reCurse: As in did you actually use that data to improve your ai significantly

dbdr: partly it was restful compared to the bot programming

dbdr: I did use it

reCurse: Ok

reCurse: Cool

eulerscheZahl: hard to tell if it was significant. but i improved too

kovi: i just wonder why im in the multi at all?

reCurse: New system

dbdr: could I have found out the same insights in a different way? probably

reCurse: They just copy/paste contest in multi now

reCurse: Enjoy

kovi: i c

eulerscheZahl: pie charts might have been overkill :P

dbdr: google sheets?

reCurse: It's not overkill if you're looking for a promotion to excel dictator

kovi: weird setup though. only 45 game and 80% vs. just 2 players

eulerscheZahl: i hate Excel

dbdr: eulerscheZahl wow, you generated HTML :)

reCurse: Like a true 90s boy

dbdr: did you share that during the contest?

dbdr: I saw a few individual pies only

eulerscheZahl: small teasers, no full stat

dbdr: right

dbdr: even with avatars. definitely went overoard, I like it :D

kovi: i like those kind of things, like mlombs stats for halite3

dbdr: almost every player has crashes :D

eulerscheZahl: all but 2

dbdr: except joelthelion

reCurse: That font though...

eulerscheZahl: default font, didn't change it

reCurse: Yeah

reCurse: -1

eulerscheZahl: it's on github, make a PR

dbdr: eulerscheZahl goes overboard with generating nice stats recurse: the font could be nicer though

D

reCurse: Well I'm a roi guy

reCurse: It takes 5 seconds to make it look 10x nicer

eulerscheZahl: 4

eulerscheZahl: 3

eulerscheZahl: 2

eulerscheZahl: Wow, you're sending too many messages. Please, don't spam the chat.

reCurse: Sheesh euler

reCurse: Didn't know you were the spammer type

eulerscheZahl: :(

dbdr: eulerscheZahl how many matches did you analyze?

dbdr: 45322

dbdr: sorry

dbdr: I should read first

reCurse: Sheesh dbdr

reCurse: Didn't know you were the illiterate type

kovi: ok, i definitely blame illedan and swagboy

reCurse: I will always agree on that for illedan

reCurse: That damn floating island

kovi: illedan fell down too early and badly

dbdr: eulerscheZahl I have "other" charge, not invalid

dbdr: any idea what that is?

eulerscheZahl: that's google charts

eulerscheZahl: combining [invalid] to other as it's such a large group

eulerscheZahl: (many items, small in size)

dbdr: small you mean?

reCurse: How many items can there be

eulerscheZahl: i didn't read the docs

reCurse: And who does

eulerscheZahl: i also noticed that you should open the table in fullscreen to see the legend

eulerscheZahl: and then reload

reCurse: Mobile users screaming in the background

dbdr: interesting how different pb4 and jolindien look

eulerscheZahl: pb with more mines and less torpedoes

eulerscheZahl: and games last much longer

reCurse: I really think mines should explode with torpedoes

dbdr: yes

dbdr: especially as they played a lot of games together

reCurse: I only have a cursory understanding of physics but that seems legit

dbdr: so game length difference is even bigger in theory

eulerscheZahl: in RAIC you could explode mines by shooting them

reCurse: Wait RAIC

reCurse: That was a RAIC competition?

eulerscheZahl: so players got as close as possible to the opponent and made a kamikaze move

eulerscheZahl: the meta completely sucked

eulerscheZahl: i'm off now, time for work

reCurse: How would that even work

eulerscheZahl: home office

eulerscheZahl: oh, the RAIC

eulerscheZahl: you got points for dealing damage to the opponent

reCurse: Oh you mean the platformer game

eulerscheZahl: but no negative point sfor harming yourself

pb4: Hi

reCurse: I don't think it's quite comparable to this game

eulerscheZahl: it isn't

Default avatar.png EdReynolds: Gah. Boss 4 is killing me >.<

dbdr: hi pb4! how did you calculate your ranking?

reCurse: I think it would have been interesting to damage the enemy with his own mines

reCurse: Teach him to be so passive and boring

pb4: I have the conversation since 7h29, not before... seemed interesting

pb4: anybody could copy/paste ?

dbdr: pb4 I have the logs, will publish it

eulerscheZahl: http://chat.codingame.com/pastebin/0353dca4-070c-4cd8-8ecc-6b7293aa1d39

reCurse: It's 1:46 am here so you're from the future

pb4: as for timeouts, I should be counted in the "non-timeout bots"

reCurse: You tell me

dbdr: ok, eulerscheZahl did the job

eulerscheZahl: starting with ceg not tracking torpedo shootings as he didn't know that the location was given on the input

pb4: my timeouts are when I have nowhere to go, 1 left left, and no mine to trigger to make a "dummy" action

pb4: so... would lose anyway

pb4: didn't bother to ouptut something valid :)

dbdr: I thought it's better not to timeout then

dbdr: easier to spot real bugs

reCurse: SURFACE? :P

pb4: KILLSELF

pb4: :)

eulerscheZahl: try { action() } catch(..) SURFACE

dbdr: RESPAWN

dbdr: what was the BttC command?

pb4: dbdr : that feature was added maybe 24 hours before the end

eulerscheZahl: respawn, why didn't we think of that?

pb4: I had already debugged everything I would debug from the bot

dbdr: what feature?

pb4: the infinite trigger if I can't do anything else

dbdr: right. but you never know

dbdr: ah ok

pb4: so it wasn't really a matter if bugs were mixed up in those timeouts

pb4: I wasn't going to correct them anyway

kovi: i even added last shoot in the dark

pb4: thanks eulerscheZahl :)

dbdr: kovi lol

dbdr: I thought about it

eulerscheZahl: oh, some of the crashes i linked are already offline again :(

dbdr: did you ever see it working kovi?

kovi: and ofc at last turn 2nd player a provisional fatality attack

pb4: dbdr : give a score X_i to each player

kovi: last shoot....0 chance of succedd

pb4: assume the matchup between two players should end up in X_i / (X_i + X_j) winrate

dbdr: not 0

kovi: 298 turn 2nd player....rare

dbdr: ah, last turn of the game

pb4: optimize for all X_i so that the expected winrates matches the observed winrates as close as possible

dbdr: I thought before dying from surface

dbdr: right, that's the general principle

reCurse: Gradient descent?

dbdr: I think others use sth else than xi / xi + xj

pb4: reCurse : the tool for optimization ?

reCurse: Yeah

dbdr: something more gaussian

pb4: scipy.optimize with Newton-CG solver

kovi: dbdr - not when dieing from surface: because that means you cant move, so you cant use finisher combos

dbdr: 1 vs 99 does not have a 1% change of win, but rather 0.001%

dbdr: I think

reCurse: His X_i is not like elo or trueskill

reCurse: I made the same mistake

reCurse: You'd need to log them to get something equivalent

dbdr: ah, makes sense

dbdr: they will grow much more

dbdr: right, intuitively seems like you can model the same distribution of strengths

dbdr: this kind of system is robust to match order, it's irrelevant

dbdr: definitely superior for ranking

dbdr: given a set of matches

reCurse: It has the disadvantage of not really being online and super expensive

dbdr: right

reCurse: Also I don't know how much weight we can give to winrates

dbdr: different tradeoff

reCurse: With such low numbers

reCurse: But still

pb4: reCurse : that would be an interesting question

reCurse: You'd need to incorporate variance somehow

reCurse: Don't ask me how

dbdr: TS for online + this afterwards gives sth better than TS, I think

reCurse: You're just reinforcing bias

pb4: use the X_i to generate new data with the as many replays, re-apply the calculation and check whether the ranking has changed a lot

dbdr: how?

pb4: do that a lot, and evaluate variance

kovi: but will it be stable?

pb4: btw, I had do this exact analysis for TS + rerun procedure :o)

pb4: kovi : just don't update the underlying X_i from one run to the other

reCurse: I think the optimizer would need the variance from the number of matches

pb4: use the X_i calculated from the first run to generate many different random runs from the same underlying distribution

dbdr: yeah, don't learn from made up data :D

reCurse: And change the weight on that error accordingly

reCurse: Like it should care less about matching something expected if it has 10x less matches

pb4: dbdr : why can't you learn something on the method ?

reCurse: If you can put weight on each error that might be a better way to do it

dbdr: I mean if you generate fake results to measure variance

reCurse: Less expensive too

pb4: https://forum.codingame.com/t/propositions-to-replace-bo5-final-contest-rerun/2851/8?u=pb4

dbdr: ah, that's the one I remembered :)

reCurse: Hmm actually

reCurse: I wonder if the big upsets from your method

reCurse: Are coming directly from lower quality winrate due to lower sampling

reCurse: They're all assumed to be equal right now?

reCurse: Past a threshold?

pb4: nope

pb4: Is your question when looking for the biggest upsets or during optimization ?

reCurse: Optimization

pb4: In any case, the answer is no :o)

reCurse: How do you feed it the winrate quality

dbdr: well, during optimization each match can contribute as much to the MSE, right?

pb4: let N_1_2 be the number of wins of player 1 against player 2

pb4: I want to maximize the function :

dbdr: so if there are few matches between two players, the optimization will not try that hard to explain the results. seems to be low sampling will not create artifacts

pb4: (X1 / (X1 + X2))**N_1_2 * (X2 / (X1 + X2))**N_2_1

reCurse: Ah that's an interesting detail

pb4: this is if there are only 2 players, but you can just multiply for all pairs of players

dbdr: it tries to minimize error on all matches, not on all pairs of players

reCurse: Well it's minimizing on pairs there

pb4: Yes

dbdr: where?

reCurse: X1 and X2

reCurse: That's a pair not a match

pb4: reCurse it can be rewritten by match

dbdr: oh, that looks wrong to me

dbdr: by match would be better I think

pb4: ok

pb4: let's write it by match

reCurse: I don't see why

reCurse: It's better

pb4: there are two matches

pb4: a win from i on j

dbdr: for the reason you gave reCurse :D

pb4: and win from k on l

reCurse: That's why you apply a weighting to it

reCurse: Like he does

dbdr: if you have only one match against two players, doing by player will give it a lot of weight

reCurse: Don't quite grasp the effect yet though

dbdr: adding noise

pb4: (Xi / (Xi+Xj)) * (Xk / (Xk+Xl))

dbdr: minimizing by match sounds more stable to me

pb4: must be maximized over Xijkl

pb4: right ?

dbdr: but might have other artifacts, hm

pb4: The formula is extended if you have more matches, just multiply by the X / X+X value for each individual match

reCurse: Wouldn't that be much more computation heavy

dbdr: I think we need to write a simulation :D

pb4: If player i won N_ij games against player j

pb4: you'll have N_ij times the same term in the formula

dbdr: generate player strenghts, sample results, then check how well different methods find the real player strengths

pb4: so that's :

pb4: (Xi / (Xi +Xj) )**N_ij

dbdr: use TS to generate matches for added relevance

reCurse: Generating player strength is the perfect way to waste your time

dbdr: ?

dbdr: rand

reCurse: The real problem is dealing with noise and intransitivity

dbdr: this is just a way to validate your system

dbdr: you create noise by sampling

dbdr: and verify how your system is able to cancel it

reCurse: It's too artificial

reCurse: I like your explanation for the power term pb4

reCurse: Makes sense I think

dbdr: better than trying to argue which method is better in the abstract

reCurse: Is it though

reCurse: Because almost all ranking systems I've seen fall apart when it comes to real world implementation

dbdr: "validation is useful"

reCurse: They all have nice proofs and perform well in artificial settings though

dbdr: they have proofs with clear objective and conditions

dbdr: if the conditions don't apply, indeed they will fail

dbdr: :)

dbdr: e.g. use TS for offline ranking

dbdr: obviosuly suboptimal

reCurse: It's not though

dbdr: TS is optimal now?

reCurse: If you give it enough data and uniform sampling yeah it's gonna be pretty close

dbdr: it will give more weight to the last match than the first

dbdr: for no good reason

reCurse: That's not entirely true

reCurse: Mostly wrong even

dbdr: explain

reCurse: The last match actually influences a lot less than the first

reCurse: The only way it eventually may matter more is because of the dynamics factor added

reCurse: But with tau = 0 it's actually stable

dbdr: sure, but do they use tau = 0?

reCurse: Who the hell knows

dbdr: :D

reCurse: I'm talking about real ts

reCurse: Don't care about CG since I don't know what they're doing

dbdr: real TS has parameters

reCurse: With tau = 0 it's actually very stable

dbdr: so yes, need to specify which ones you use

reCurse: That's what the parameter is for

dbdr: right. I still think other methods are better for offline ranking

reCurse: Except you're still going to be biased by matchmaking

reCurse: And you won't have the resources necessary to compute your offline ranking every time you matchmake

dbdr: right, that's the tradeoff

reCurse: So if you're biased by that

reCurse: It's debatable whether you correct that bias with offline method

dbdr: could be used for the recalc for instance

dbdr: baically, take the recalc that TS did and minimize the error on that

dbdr: should be better by construction

reCurse: But it's basing itself off the very same data

reCurse: That's what I'm trying to explain

dbdr: yes, making better use of the same data

dbdr: I know, generating the best data is another problem

reCurse: For all you know you're not correcting the error of TS

reCurse: But the error of CG

reCurse: I think it's much more likely actually

dbdr: CG = TS with some specific parameters and a certain matchmaking

dbdr: do we agreee on that?

reCurse: No

dbdr: how does it differ?

reCurse: Because you'll use that equivalent to argue about TS

reCurse: When you're actually arguing about CG's

reCurse: I'm arguing that a proper usage of TS would have corrected the same error

dbdr: that's not a valid argument

dbdr: it's not true because if it is A will happen :)

reCurse: A?

dbdr: whatever

dbdr: I mean the reasoning

dbdr: why is it not true? what else does CG do?

dbdr: apart apply TS with certain parameters and matchmake?

reCurse: It is impossible to evaluate without access to their implementation

dbdr: right

reCurse: So it's a waste of time trying to use CG as a fair representation of TS

dbdr: so I'm saying I suppose this is what CG does, and it's based on what we know

reCurse: And if it's configured incorrectly

dbdr: I don't plan to do that

reCurse: Then we're still wasting our time

reCurse: If they left tau > 0

reCurse: That's not a fair representation of TS

reCurse: You're blaming it for something its parameter is meant to do

reCurse: That's literally what it's there for, to give more weight to recent performance

reCurse: Assuming humans can change skill over time

dbdr: the thing is tau might be useful if the meta changes, no?

reCurse: Which doesn't apply for static bots

reCurse: We're talking about rerun

reCurse: Nothing changes anymore

dbdr: I think even with tau = 0, match order matters

reCurse: No it doesnt

dbdr: because TS is online

reCurse: The only exception is it matters for matchmaking

reCurse: But with same data it won't matter

dbdr: it looks at the first match without looking at any other

dbdr: then never looks at it again

reCurse: That's not how it works :/

dbdr: no? I might be wrong then :)

reCurse: It's cumulating data to zero in on a guess

dbdr: but then how is it online?

dbdr: accumulating is not the same as keeping the whole data

dbdr: it's keeping an abstraction of it

reCurse: With enough data

reCurse: And with uniform sampling

reCurse: Match order ceases to matter significantly

reCurse: And with tau = 0

dbdr: that's handwaving :)

reCurse: Alright I'm done

dbdr: yes, it can get close

reCurse: Off to bed, night :)

dbdr: possibly

dbdr: gn :)

thibpat: I'm live doing a debriefing on my Ocean of Code experience https://twitch.tv/thibpat

tekki: nice thib

tekki: i'm coming

Oioi: Hi all ! Did someone here finish "Cross the line" challenge ?

MadKnight: what is the problem Oioi ?

MadKnight: maybe u can't pass one of validators ?

Oioi: Well, I'm stuck on that challenge :-)

MadKnight: what exactly is the problem ?

Oioi: And either It is a really hard work, or I miss something simple

MadKnight: why are u stuck ?

Oioi: I've got the connected components

Oioi: Now I must do the job for each of them

MadKnight: is it under easy/medium ?

Oioi: Easy/medium ?

MadKnight: each puzzle got difficulty level

Oioi: where do I know the difficulty level ?

MadKnight: > Difficulty : Very Hard

Oioi: Challenge name is "Cross the lines"

MadKnight: for Cross the lines


Oioi: Ok :-)

MadKnight: https://www.codingame.com/training/expert/cross-the-lines

MadKnight: it's written in here

MadKnight: so it's not easy Oioi

MadKnight: u gotta be ready for it to get hard

Oioi: Yes, ok for that.

MadKnight: the author's solution is 400+ lines long

Oioi: Ok, thanks, that's a good hint

MadKnight: in python

MadKnight: he also got class Segment which takes 150 lines

Oioi: Yeah, he probably get the faces in each connected component, I wasn't sure I had to get them

Oioi: Thanks a lot for your help

wlesavo: wow contest almost doubled my cp

Default avatar.png Imsure1200q: How do you save code in challenges? I can't remember.

Uljahn: by clicking the play button

Uljahn: or submit to be sure, so your code appears on the history tab

Default avatar.png DiL: hi, does anyone knows if it's possible to keep chat minimized while writing code?

Re9iNee: it has a minimize button

Re9iNee: the buttom left button

Re9iNee: Hi, im still working on Ocean Of Code, will it be available again?

Re9iNee: or am i just wasting my time?

wlesavo: Re9iNee already is

wlesavo: https://www.codingame.com/ide/puzzle/ocean-of-code

Default avatar.png DiL: ok got it thanks but I have to minimize it every time, I guess it's not possible to automatically hide chat when starting a clash

Re9iNee: oh, thanks

Default avatar.png CacheCoherence: how do i not allow cursor to move in clash of code during compiling(when getting an error)?

Default avatar.png DiL: CacheCoherenct no idea, I also have an issue with this UI since somtimes focus moves to chat while I'm writing code :confused:

Re9iNee: i didnt encounter this problem

Re9iNee: but just crossed my mind that can you write an event for it?

Re9iNee: event.preventDefault()

RoboStac: you can bookmark https://www.codingame.com/home?disableChat=True to have a link that doesn't show chat

Default avatar.png DiL: RoboStac :thumbsup: thanks man

Default avatar.png CacheCoherence: I keep the chat closed. But when im running a test case, the cursor goes to the error point (if there is any)

Default avatar.png CacheCoherence: Thats annoying

tutubalin: Guys, probably i found a bug https://imgur.com/a/FjUrHMi

Nerchio: whats the bug :p

wlesavo: Nerchio no score

Default avatar.png WINWINWIN: Guys, if anyone has encountered this error in python3, please advise

Default avatar.png WINWINWIN: I am starting a GA in CSB and I am using a move object to hold move details

Default avatar.png WINWINWIN: When I try move.angle, I get the error "Nonetype does not have attribute angle"

Default avatar.png WINWINWIN: but on printing, the error happens and the angle gets printed

Default avatar.png WINWINWIN: I attempted a hasattr function which also yields true

Uljahn: i doubt anyone can debug your code besides you

Default avatar.png WINWINWIN: :(

Uljahn: do you try move.angle as a method?

Uljahn: it's hard to guess without a code snippet

RoboStac: the errors saying that move is None so it doesn't have any attributes - are you sure it exists when you try to use it?

Default avatar.png WINWINWIN: move.angle is simply an attribute

Default avatar.png WINWINWIN: can I share a code snippet?

Default avatar.png WINWINWIN: https://pastebin.com/YTtD68rD

Default avatar.png IAmNoob: hi!

Default avatar.png IAmNoob: hi!

Default avatar.png abhay_RAJ: print()

Default avatar.png shatts_: has anyone done the music scores one?

tutubalin: WINWINWIN movement parameter is None

tutubalin: o, wait

tutubalin: move is method

tutubalin: of course there's no angle attribute

tutubalin: i assume you've got into name conflict: you use 'move' both for method and variable

struct: Snef online?

Default avatar.png LordZedd: konichuva

AntiSquid: get an anime avatar!

Astrobytes: hahaha

AntiSquid: actually i am trying out some korean extra spicy noodle soup and it's a bit too much even for me ...

AntiSquid: Astrobytes

Astrobytes: ah nice, that sounds like my kinda noodle soup

AntiSquid: it makes me cough too :/

Astrobytes: Keep eating it, it'll build up your chilli tolerance

AntiSquid: i have high tollerance, but this is above the usual

AntiSquid: have you tried the iceland extra firey chilli pizza? i could only taste the chillies on it althout it has chicken pieces too

AntiSquid: altough *

Astrobytes: Which soup is it? Well, that counts me out of eating that pizza lol

AntiSquid: well it says ramen, i call it soup because i diluted it a lot : https://www.amazon.co.uk/gp/product/B06XDSHBJM/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

Astrobytes: Nice! It does say "Extremely hot and spicy" ;)

Astrobytes: Suitable for vegetarians too, might have to try these at some point

AntiSquid: will use just half the sachet next time

Astrobytes: You never can tell until you've tried 'em, half the time "extremely hot" means it tingles your tongue, it's a pleasant surprise when you get the real deal

AntiSquid: that's why i cook my own food

AntiSquid: usually

Astrobytes: Same. But I like to keep snacks handy since I don't do takeaway stuff

AntiSquid: i used to order from cheap asian shops

AntiSquid: but quality went down after a while

Default avatar.png arnau: Jack Silver - The Casino I PAY WELL FOR THE SOLUTION Xd


AntiSquid: is that a movie reference?

Uljahn: just buy 29+ lvl account xD

Default avatar.png arnau: no no it os a program

Default avatar.png arnau: *is

AntiSquid: arnau i can sell you level 30+ account, so don't buy from Uljahn

Uljahn: :rage:

AntiSquid: i also ask half of whatever Uljahn is asking

eulerscheZahl: i can sell links to build your own lvl29+ account

Nerchio: floyd warshal broke my mind :(

Default avatar.png arnau: i only want the slution xD

Astrobytes: Just go to codingamesolutions.com and fill out the 12 surveys plus your credit card details and I'll send the solution

Default avatar.png WINWINWIN: Or u could sell you lvl 50+ acc euler xD

eulerscheZahl: did you read some post mortems for GitC?

Nerchio: no

Nerchio: i will do it later

eulerscheZahl: because we discuss flody warshall there too

Nerchio: but i just realised that path through some nodes is faster than direct so to speak

AntiSquid: WTB cheap level 51+ account, PM me, no trolls please, thanks

AntiSquid: (WTB = want to buy, rpg lingo)

Nerchio: i just copied java floyd warshal and will try to understand it after i make it work

Nerchio: im close ;p

Nerchio: but took a long time

eulerscheZahl: 4 lines, not much to understand

Uljahn: from scipy.sparse.csgraph import floyd_warshall :relieved:

eulerscheZahl: if path from a via b to c is shorter than a to c directly, update it

Nerchio: yeah sounds easy but i will have to look at it step by step :p

Nerchio: and i needed to do some data transformations

Nerchio: because it works on arrays and i had a list

eulerscheZahl: and no operator overloading

eulerscheZahl: have fun with list.get(index)

Nerchio: hehe yea :)

AntiSquid: why java

Nerchio: i have 3 hashmaps already

Nerchio: for nodes lol

AntiSquid: you said they teach you c and ocaml

Nerchio: direct connections

AntiSquid: you can have nodes in any language

Nerchio: shortest path to each node from this one

eulerscheZahl: even in node.js?

AntiSquid: even in js

Nerchio: im not touching C in anything outside of school

AntiSquid: why

Astrobytes: Why?

AntiSquid: wow

Nerchio: i dont like pointers

Neon_Tuts: Hello World

AntiSquid: how is java not worse than C ?

Nerchio: i like understandable more than magic

eulerscheZahl: C is the opposite from magic

Astrobytes: If you take the time to understand C it's more understandable than Java

eulerscheZahl: when you want to make a fire in java, you can take the lighter or the flame thrower

eulerscheZahl: in C you have to take flintstones

Astrobytes: Well, you need to create your own flintstone structures first ;)

eulerscheZahl: i always hated strings in C

Nerchio: yeah thats annoying

Nerchio: strings in C xD

Astrobytes: Not great fun, admittedly

AntiSquid: wow i actually managed to eat all that

Astrobytes: Well done!

AntiSquid: runy nose

AntiSquid: anyone knows the top algorithms for bandas?

Astrobytes: Last I knew it was MCTS or alphabeta

RoboStac: alphazero works well too

Astrobytes: Oh you have that on bandas too? Didn't know that

AntiSquid: hah thanks was wonder about that

AntiSquid: what do you use? 64 inputs each round?

RoboStac: 192 inputs (64 for me /them / board)

RoboStac: with the board always being shifted so the gaps are on the right / bottom

AntiSquid: why is it necessary to split it up this way? why 64 for the board?

RoboStac: it needs to know which squares are empty vs which squares are removed

cegprakash: my torpedo is giving away my position to enemy quickly

cegprakash: how do I avoid that in SIlver league

ZarthaxX: what i told you :)

cegprakash: yes

AntiSquid: fire less torpedoes, use more mines?

cegprakash: I just added that myself

cegprakash: AntiSquid oh

cegprakash: when should I decide not to fire torpedo? my eval automatically shoots blind spots

ZarthaxX: shoot when it's really worth

cegprakash: because I decrease enemy life for random shooting in his possibility

AntiSquid: hey read my PM ! ceg :p

ZarthaxX: like hitting the 70% of possible spots

cegprakash: oh

AntiSquid: it's free of charge on first 10 views

cegprakash: I can try this 70% thingy

cegprakash: what is free of charge

cegprakash: oh

cegprakash: I'll read urs

ZarthaxX: also u should check if after you shoot you reveal yourself too much and chain that action with a silence

ZarthaxX: just to dont give opp advantage to shoot you for 2 hp

cegprakash: Yeah I plan to track myself for that

cegprakash: but not very soon

cegprakash: I self tracking needed in Silver?

cegprakash: I thought I can reach Gold without self tracking

wlesavo: the earlier you implement it less pain you will have later i guess

cegprakash: I have this bug where enemy does self damage to himself

cegprakash: and I shoot on the same turn

cegprakash: I think he is near me

cegprakash: and he got damaged because of me

MSmits: create a damage map

MSmits: record all damage and the cells it was dealt to

MSmits: all the cells that have the same damage as the opponent life lost, are places he can be at

MSmits: do all forms of damage though

cegprakash: oh no I can't even think of mine damage tracking with my current code

Swagboy: He don't forget that he may surface ;)

cegprakash: I'm only focusing short term goals of reaching gold

cegprakash: without mines

MSmits: you dont need to track mines for this though

MSmits: you know where a mine blew up just from reading opponent orders

MSmits: thats without tracking any mines

cegprakash: Swagboy I track surface already

cegprakash: tracking surface is ez

eulerscheZahl: surface makes it impossible to remove some paths resulting on the same cell to reduce possible mine locations

Swagboy: I mean in the damage map

Default avatar.png LUKAKU27: someone have Don't Panic -1 in c#?

Swagboy: Don't mix his surface and your torpedo touching

AntiSquid: -1 ?

eulerscheZahl: episode 1

eulerscheZahl: AntiSquid has it

AntiSquid: he clearly said negative 1

Default avatar.png LUKAKU27: eoisode 1*

Default avatar.png LUKAKU27: episode*

MSmits: eulerscheZahl

eulerscheZahl: MSmits

MSmits: with onitama, is the input for the middle card given for player 0 or 1

MSmits: the orientation

eulerscheZahl: for the player playing it next

eulerscheZahl: that means for you

MSmits: but i cant play it nexrt

MSmits: its in the middle

eulerscheZahl: you are the next player to hold it

MSmits: oh ok

MSmits: k got it thanks

MSmits: this orientation stuff is really the hardest bit to simulate

eulerscheZahl: and every card is given the way as the next player will use it

eulerscheZahl: it was a pain to design

MSmits: yeah it's no criticism btw, you did it fine, it's just not easy to simulate

eulerscheZahl: i confused myself multiple times and even swapped x and y at some point

eulerscheZahl: i didn't understand it as critisism

eulerscheZahl: just casual chatting

MSmits: kk

MSmits: doesnt help that I am trying to cram the whole gamestate in 1 64 bit int :P

MSmits: believe it or not, you can do that

MSmits: this game actually has very few gamestates, worst case it's 1000 billion or so

MSmits: makes every game solvable, just not in 1000 ms

eulerscheZahl: you have to distinguish between 8 players+2masters of different teams and 5 cards

MSmits: yeah

MSmits: and yet it is possible

MSmits: 25 bit for each series of positions

MSmits: total 50 bit

MSmits: 3 bit to identify which of the 5 bits on your side is a master

MSmits: total 56 bit

MSmits: 1 bit for whose turn it is

MSmits: 57 bit

MSmits: then 5 bit for the cardstates

MSmits: there are 30 cardstates, so fits in 5 bit

MSmits: 2 left

eulerscheZahl: but does it allow fast access to what you need?

eulerscheZahl: what's the point in tiny board state but slow access?

MSmits: pretty fast, but I am not sure if the penalty is worth it. I need to pext/pdep for masters is all

MSmits: the thing is

MSmits: because this game has so few gamestates, transpositions may be worth it

MSmits: transpositions require hashing

MSmits: 64 bit hash key is a miracle for that

eulerscheZahl: and you already have that with such small states

MSmits: yeah

eulerscheZahl: no need for collision checks

eulerscheZahl: but still sounds crazy to me

MSmits: exactly, but again, this might be premature again. Not the first time I made that mistake

MSmits: maybe transpositions are worthless

MSmits: do you see many repeated states?

eulerscheZahl: and you'll never learn from it

MSmits: :)

eulerscheZahl: bitboards are part of the fun for you

MSmits: yeah

eulerscheZahl: i don't even know how many repetitions i see

eulerscheZahl: then again my depth isn't that high

eulerscheZahl: check karlis o, he prints the depth

MSmits: it just seems like with such a small board and identical pieces, you would see some

ZarthaxX: no need for collision check?

ZarthaxX: hash can still collide :thinking:

MSmits: no, because the 64 bit key is unique

MSmits: unless it collides with itself?

MSmits: not sure what happens under the hood

ZarthaxX: are u using a fixed array hash tabkle

ZarthaxX: or like std

MSmits: no the game state is just a 64 bit int, the full state

eulerscheZahl: you missed half of the chat and jumped in right now, didn't you?

ZarthaxX: im reading

ZarthaxX: lol

MSmits: in oware i also have the full state in 1 64 bit int

ZarthaxX: half right toad

MSmits: but i dont use transpositions there

ZarthaxX: thought u meant collision check in a hash table

MSmits: nah, the idea is to use unordered map

ZarthaxX: ah...

ZarthaxX: do u always use that?

MSmits: sometimes i use set

MSmits: depends

MSmits: unordered set

MSmits: that is

ZarthaxX: u never use your own hash table?

MSmits: well you can do custom hashers and equal functions

MSmits: so thats sort of my own then isnt it?

ZarthaxX: i meant the datastructure

ZarthaxX: not that

MSmits: nope, never done that

ZarthaxX: aight

MSmits: do you have examples/resources?

MSmits: might be interesting to me

ZarthaxX: i mean.. i can tell u stuff

MSmits: sure

ZarthaxX: u might find interesting how they manage it on chess bot

MSmits: i probably do

MSmits: thats almos tthe same thing i have to manage in most bots if i want to do transpositions

ZarthaxX: but basically an array where u might or not have a list in each

ZarthaxX: to manage collisions

MSmits: an array per cell?

MSmits: or something?

ZarthaxX: there is a way to design a hash table that wont work here which is if u collide in a spot, check next spot that is given by a function

ZarthaxX: lemme just find these concepts

MSmits: cool

ZarthaxX: wikipedia condenses all these concepts anyway

ZarthaxX: https://en.wikipedia.org/wiki/Quadratic_probing

ZarthaxX: https://en.wikipedia.org/wiki/Double_hashing

ZarthaxX: https://en.wikipedia.org/wiki/Linear_probing

ZarthaxX: different wayts to leads with collision when u have a table that stores 1 element per cell

ZarthaxX: and a collision is produced

ZarthaxX: i dont think that's worth here

cegprakash: just found a cool bug where my tracking will say opponent is nowhere in the map when I'm 2nd player

Default avatar.png arnau: i need help with JACK SILVER: THE CASINO in c#

MSmits: ah... well it should not be worth it at all in onitama, because when two keys are equal the state is equal, guaranteed. I was more thinking about bigger games, like yvalath, bandas etc.

ZarthaxX: and this was the other option u have, you store elements in a linked list in each cell

ZarthaxX: https://en.wikipedia.org/wiki/Hash_table#Separate_chaining

ZarthaxX: u might as well replace the list with a fixed array so u keep best 3 maybe

ZarthaxX: in each cell

MSmits: did you use this stuff before ZarthaxX?

ZarthaxX: i didnt use the linear qudratic stuff, just showed it so you saw it,

ZarthaxX: not worth

ZarthaxX: but the other thing of array with a list i did

MSmits: ah double hashing, sounds smart

ZarthaxX: chess bot does the same too

ZarthaxX: it's really interesting to read the different tables it has

ZarthaxX: also how you discard an element when your cell bucket is full

MSmits: yeah. Thankfully most cg games aren't as complicated as chess

MSmits: so many different move types

ZarthaxX: right, but u can get ideas of how they model stuff

MSmits: yeah

MSmits: I always get referred to chess sites when i look up stuff, especially minimax style things

MSmits: if you get to transpositions, you always find chess sites

ZarthaxX: look at the TT of stockfish

ZarthaxX: https://github.com/official-stockfish/Stockfish/blob/master/src/tt.h

ZarthaxX: lol right :P

ZarthaxX: he has a TT with clusters of TTEntry

ZarthaxX: the same thing i said ebfore basically

MSmits: yeah

MSmits: ok thanks, I will remember next time I need a more complicated transposition table

ZarthaxX: :rofl:

ZarthaxX: anyway i tried this for breakthrough, tho i suspect as stockfish has more time to think

ZarthaxX: maybe it's more worth it

ZarthaxX: it's difficult here where u dont have many ms

MSmits: isnt a breakthrough has just two 64 bit boards xored together?

MSmits: xorshifted i mean

MSmits: doesnt seem much else to it

ZarthaxX: yeah but

ZarthaxX: it's not about the keys

MSmits: thats what i do for Yavalath

MSmits: oh?

ZarthaxX: it's about making a table that is faster than a map or set

ZarthaxX: to access

MSmits: ah ok, got it

ZarthaxX: or insert

ZarthaxX: as sets and maps are implemented with RB trees

MSmits: RB?

ZarthaxX: the fact that they are freeing and requesting memory

ZarthaxX: might affect your perf

ZarthaxX: but the array doesnt do that so its worth trying

cegprakash: ZarthaxX I added the 70% thingy

ZarthaxX: tho the set map might not lose info as this does

MSmits: hmm there is a different between unordered and ordered map though

ZarthaxX: red black tree

MSmits: orderedmap preserves some kind of ordering, it is slower in many cases

ZarthaxX: ah unordered srry, hash table there as i read

ZarthaxX: preserving order requires a tree

MSmits: ah ok

ZarthaxX: so that needs new and delete

MSmits: but you're saying I could also improve on an unordered map with my own hash table?

ZarthaxX: maybe, maybe not

ZarthaxX: u can try

MSmits: worth investigating

ZarthaxX: it's not much code to try

MSmits: well code isnt the problem

ZarthaxX: i never used set and map

ZarthaxX: unordered i mean

ZarthaxX: okey :P

MSmits: it's mostly reading the resources and understanding how it all works :)

MSmits: knowing what you're doing

ZarthaxX: there's not much around that

ZarthaxX: hash tables arepretty easy to get

ZarthaxX: trees variations not so much

MSmits: ah ok

ZarthaxX: trees require u to understand what to do after inserting / deleting elements

ZarthaxX: like how to maintain that data structure

MSmits: I see

ZarthaxX: so it preserves the properties that are worth

MSmits: and set and map use a tree?

ZarthaxX: that's a headache

MSmits: and unordered doesnt ?

ZarthaxX: yeah red black tree

ZarthaxX: it says it uses a hash table apparently

MSmits: k

MSmits: I've always used unordered, because every time I google it says its faster for what i want

MSmits: I guess thats because of what you say

MSmits: the tree maintaining

ZarthaxX: yes, anyway

cegprakash: wow it looks like a great submit

ZarthaxX: libraries are open osource

MSmits: yea

ZarthaxX: u can dive into the classes and check what's going on

ZarthaxX: cegprakash did the 70 worked?

MSmits: I can, but I am like my students.

MSmits: When I tell them to read, they will ask me to just tell them what it says :P

cegprakash: yes and I reduced the enemy silence jump distance from 4 to 1

ZarthaxX: https://www.geeksforgeeks.org/set-vs-unordered_set-c-stl/ MSmits

ZarthaxX: yeah i know lazy lol

ZarthaxX: cegprakash gud

MSmits: We need to keep a set of distinct elements and no ordering is required. We need single element access i.e. no traversal.

cegprakash: I only lose against mines now

cegprakash: I need to start tracking mines

MSmits: thats always what i need

ZarthaxX: yeah but look at the search time

ZarthaxX: and insertion

ZarthaxX: and deletion

ZarthaxX: :P

ZarthaxX: i mean, if you could do a variation of that , doing it O(1) and sacrificing the accuracy, like more miss than hit

MSmits: search time is a bit hard to guess from that

MSmits: worst case is n

ZarthaxX: yeah i know

ZarthaxX: but if the table starts to populate

ZarthaxX: it may be a problem

ZarthaxX: also resizing

Default avatar.png WINWINWIN: Lol I thought that people would have had enough of OoC by now :)

ZarthaxX: when table doesnt have any more space needs to resize

MSmits: can you initialize it with a huge space?

MSmits: or will that make it slow from the start?

MSmits: like you can give arrays a huge capacity just in case

MSmits: object pools etc.

Default avatar.png K4Mx: i dont understand simple synhtax issue on clojure and also how to compare == simple java.lang.long, it gives null pointer exc

ZarthaxX: http://www.cplusplus.com/reference/unordered_set/unordered_set/reserve/

ZarthaxX: like vector reserve i guess

MSmits: I might need that

MSmits: but i wonder

MSmits: if i make 100 mb of room for this unordered map

MSmits: wont I get problems with memory caching?

MSmits: because its gonna have buckets all over the place

MSmits: bucket mania

ZarthaxX: i mean yeah if you try storing in 2 opposite sides

ZarthaxX: it might..

MSmits: I am not *trying*, the hash function will do that, wont it?

MSmits: if it is given the room

MSmits: or will it keep the data close together?

ZarthaxX: what

ZarthaxX: i know you are not trying

ZarthaxX: i meant the code lol

MSmits: yeah

MSmits: i mean the implementation

ZarthaxX: it wont keep data together

ZarthaxX: the hash function does the job

ZarthaxX: but look for example at what happens

MSmits: yeah so i get memory caching issues

ZarthaxX: when u insert an element and the table is getting kind of "full"

ZarthaxX: A rehash is the reconstruction of the hash table: All the elements in the container are rearranged according to their hash value into the new set of buckets. This may alter the order of iteration of elements within the container.

ZarthaxX: a rehash happens

Astrobytes: I think you'd need to write a custom allocator for that

ZarthaxX: that might be a problem too

ZarthaxX: it wont happen often anyway

ZarthaxX: but still

MSmits: yeah, so basically what you do is you estimate how big your unordered map is going to be and give it that size from the start ?

Astrobytes: (re. keeping the memory contiguous)

MSmits: ah ok

ZarthaxX: MSmits yeah but..... if u exceed that..

ZarthaxX: Astrobytes its a hash table, its always continous

MSmits: then it rehashes

ZarthaxX: unless u implement it weirdly

ZarthaxX: chunks of data

ZarthaxX: of memory i mean

MSmits: I'm gonna have to read more on this and experiment

Astrobytes: ZarthaxX I misread :P

ZarthaxX: ah

ZarthaxX: hi astrobyto

ZarthaxX: MSmits gl :P

ZarthaxX: it's not too complex

MSmits: thanks

ZarthaxX: you can explore the unordered set anyway http://www.cplusplus.com/reference/unordered_set/unordered_set/

ZarthaxX: it tells what happens on each operation

MSmits: not down to what happens with memory does it?

MSmits: i just wonder what happens if say, I insert an integer in an integer set. What happens if i inset 4 and then 34560. Are they going to be close togehter in memory? Or far apart? Is this related to the capacity that is set?

Default avatar.png darkstar: hi everyone :) how are you all today?

MSmits: i know there's a hash function that is applied to it

MSmits: but that doesnt tell me where the allocator is going to put it in memory

MSmits: hi darkstar

Astrobytes: In that case, maybe you do need a custom allocator

MSmits: well not sure, I don't even know how it normally works

Astrobytes: https://en.cppreference.com/w/cpp/memory/allocator

MSmits: memory caching effects are a very real thing

Astrobytes: https://en.cppreference.com/w/cpp/container/unordered_map

MSmits: in bots

MSmits: yeah i saw that, but i dont see much at first glance. Doesnt tell me how it works. Might be me though

Astrobytes: https://www.geeksforgeeks.org/stdallocator-in-cpp-with-examples/

Astrobytes: "All the STL containers in C++ have a type parameter Allocator that is by default std::allocator. The default allocator simply uses the operators new and delete to obtain and release memory."

MSmits: ok, but the location of the memory is still not visible

MSmits: it's going "somewhere"

Astrobytes: Yes, hence writing your own allocator

eulerscheZahl: is it me or is there something wrong with github right now?

eulerscheZahl: e.g. no access to repos

Astrobytes: I can't even access it rn

eulerscheZahl: great, then it's fine on my side :)

eulerscheZahl: 504 gateway timeout

MSmits: Whoops, something went wrong! We track these errors automatically, but if the problem persists feel free to contact us.

In the meantime, try refreshing.

Default avatar.png darkstar: github seems ok for me

Astrobytes: getting github error 500

eulerscheZahl: some of my requests seem to pass, others timeout

Default avatar.png darkstar: yeah ok, my bad, same here

Default avatar.png darkstar: luck of the draw

Astrobytes: Yeah, I'm alternating between 504 and 500

Default avatar.png darkstar: at least you get a nice unicorn

eulerscheZahl: the first time i want to try tech.io and then this happens (to create a playground, you have to push you stuff on github and they pull it)

MSmits: you never made a playground before?

MSmits: that surprises me

eulerscheZahl: what about?

ZarthaxX: MSmits u cant really know where the element is landing

eulerscheZahl: i guess some microsoft devs are sweating right now

Astrobytes: MSmits, so if you want to control where your memory is being allocated/whether constructors are called etc then you can do that in the allocator

ZarthaxX: lol

Astrobytes: But it seems a bit of a faff

MSmits: tabbing doesnt work suddenly

ZarthaxX: i think he doesnt care about that

ZarthaxX: he meant about the elements

ZarthaxX: if u can keep them close together

MSmits: if you keep them close doesnt that mean they could be in the same bucket?

ZarthaxX: if they fall in the same place u mean

MSmits: I imagine a bucket as having an amount of room in memory that can hold multiple values

ZarthaxX: aha

MSmits: that means that if you want more buckets, you need more memory

MSmits: and if you want less collisions, you need a larger capacity

Astrobytes: You could have written your own hashtable by now MSmits

MSmits: lol

MSmits: i am not in a hurry, for now it is fine to use unordered map for Onitama

ZarthaxX: http://www.cplusplus.com/reference/unordered_set/unordered_set/bucket_size/

MSmits: if I am even going to do transpositions

ZarthaxX: the rehashign happens when there are many elements in buckets

MSmits: yeah so it's like this. The more memory you assign, the smaller the chance of elements being in the same bucket

ZarthaxX: yes

MSmits: but the farther the buckets are apart

MSmits: so the more cache misses you get

ZarthaxX: aha

ZarthaxX: but if u desgin a hash functin

ZarthaxX: that tries to keep close states that are similar

ZarthaxX: maybe u win

MSmits: yeah but thats not easy to do in most games I think

ZarthaxX: close = not in same bucket

ZarthaxX: i know

ZarthaxX: just saying

ZarthaxX: anyway, worth researching

MSmits: its a good point

ZarthaxX: making your own type

MSmits: right, well I am going to try to make my onitama bot work with random moves today

ZarthaxX: gl with that

MSmits: I want it to correctly record the states, create the moves and pick one at random

ZarthaxX: i dont know about that game tho

MSmits: that'll be half the bot probably

MSmits: it's cool

ZarthaxX: i see

ZarthaxX: i will go do uni stuff

ZarthaxX: gl smito :)

MSmits: hf :)

AntiSquid: some avatars are too ugly to test against in the IDE

eulerscheZahl: :D

eulerscheZahl: the main page has a section IMPROVE YOUR CODING SKILLS WITH THE FOLLOWING PUZZLE

eulerscheZahl: once it suggested a completely boring puzzle

eulerscheZahl: but i didn't wanted to see the creator's face anymore, so i solved it

Astrobytes: lol

blasterpoard: I just filter ##.ng-scope.next-game.item with my adblock

blasterpoard: together with everything clash-related

eulerscheZahl: good decision

blasterpoard: it's slightly annoying when CG tries to convince me I can improve by solving easy puzzles

blasterpoard: and gain a new skill called "Conditions"

JimmySmith: How does one progress without first learning the basics though? lol We all learn different sir

AntiSquid: ya blaster go learn the basics

eulerscheZahl: when i was new on CG, you even had to unlock the hard puzzles by solving the easy ones first

eulerscheZahl: i think they removed that feature now

blasterpoard: I haven't noticed anything like that

reCurse: Oh yeah I remember that

eulerscheZahl: great, i'm not crazy then

eulerscheZahl: annoyed me

eulerscheZahl: kovi "that it maybe increased the looserate by 5%" so you lost more?

Illedan: Hi

ZarthaxX: hey illo

kovi: lol euler. no

CyrusTheCurator: I wish things like Codingame were around back in my 2012 AP computer science classes

CyrusTheCurator: I took a massively long hiatus from C sci and now I'm paying for it D:, 7 years to catch up on

AntiSquid: 2012 they only had a simple puzzle contest

CyrusTheCurator: Well, no time like the present. Gotta do everything I can to make this tech career work

wlesavo: kovi thx for PM

stacked: halo

cegprakash: what is the BGM used in Join the PAC Spring challenge video?

cegprakash: I want the song plz I'm so addicted to it

AntiSquid: google youtube to mp3

Zenoscave: about 5K CP from first in US. I'm close

Kissmyoss: Hi, it's possible to reset rank of challenge ? i would like play with friend in wood league

cegprakash: enemy is able to shoot me when I'm at 7 distance :O. I had this bug in my tracking when I assumed I've to be within distance of 6

ZarthaxX: no Kissmyoss

ZarthaxX: only way is to delete acc

ZarthaxX: :)

wlesavo: is there a known issue with fonts changing to 13px in ide?


YannT: reset browser zoom? :p

WaRiOrOfCoDe: can anyone tell me what is re library in python?

tomatoes: regular expressions

WaRiOrOfCoDe: thanks i'll read about it.

wlesavo: YannT somehow it concerns only the code window, not whole page

YannT: might be a shortcut oof the IIDE, I think its got those

YannT: https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts

pb4: PM available

wlesavo: 8 versions :neutral_face:

swamianilsaraswati: http://chat.codingame.com/pastebin/d2405946-6153-4bb9-b3f4-ed5dd71e375d

swamianilsaraswati: Hi ALl I am new to codingame and new to bot programming also.

swamianilsaraswati: I started Coders Strike Back to program but I am unable to understand the next phase. How to win from Boss 4?

swamianilsaraswati: Any help? How to think of the algorithm in terms of maths?

kovi: nice pb4

Scarfield: -3vel :p

Scarfield: what league are boss 4 swamianilsaraswati

stacked: how do i close the discord

stacked: its so annoying

stacked: and close all the open room tabs

Uljahn: with adblock or userscript addon such as stylus

MadKnight: yea i closed it with adblock

swamianilsaraswati: might be silver @Scarfield

cegprakash: does trigger mine has infinite cast range?

tomatoes: yes

cegprakash: oh makes sense

Scarfield: if you are targeting your next checkpoint, subtracting 3vel from your pods target will help it adjust for its current velocity

ZarthaxX: pb4 typo here? For a torpedo, it is simply the damage probability given the opponent presence map damageProbability*0.95^0


pb4: nope

pb4: 0.95^turn

pb4: when turn = 0

ZarthaxX: ah as i didnt see a ^turn

ZarthaxX: aight

Stunji_Ray: ji

Stunji_Ray: hi

cegprakash: ZarthaxX I added crappy mine and triggers..

cegprakash: will I get promoted to Gold?

cegprakash: I have added every possible thing there is

cegprakash: why am I still in silver

cegprakash: Crog stop wrecking me

eulerscheZahl: then you added it wrong?

eulerscheZahl: and i don't think it's possible to add everything and stay below the 100kB upload limit

cegprakash: lol

cegprakash: I changed the constants in my eval

cegprakash: and my rank is jumping again

cegprakash: so there was this case where my bot went inside a choke point (forcing a SURFACE in the next turn) just so I can deal him a damage

cegprakash: so I changed my scoring to never enter into choke points

cegprakash: but looks like taking life away is more important

cegprakash: risking our own life

eulerscheZahl: it's a dangerous game

eulerscheZahl: so don't hide under the table and start fighting

cegprakash: u sure?

cegprakash: http://chat.codingame.com/pastebin/3a39bb83-5113-4660-bc35-dc8b7ca3d8e2

eulerscheZahl: all a matter of timing

cegprakash: that's my eval now

cegprakash: should I change something

eulerscheZahl: don't start a fight when it's not an advantage for you

cegprakash: how do I know if I am at advantage

cegprakash: :'(

eulerscheZahl: that's the hard part of the game

cegprakash: how does my eval look

eulerscheZahl: not gonna read that

tobk: maybe that's a dumb question, but how do I set the game seed in the OoC offline runner?

tobk: always uses 1337 and I can't find it in the readme

wlesavo: in the Main.java gameRunner.setSeed();

tomatoes: src/test/java/Main.java

tobk: so you have to recompile it each time?

tobk: hm, maybe I'll tweak that myself a bit...

Default avatar.png YamilBrayan: can someone help me with the exercise blowing fuse , i need the solution

cegprakash: my bot gets into some weird timeouts :(

Stunji_Ray: in what

cegprakash: it was a bug.. it wasn't timeout.. my -INF was -10^7 but all my solutions returned lesser score than -10^7

cegprakash: so my final soluton had some empty state

cegprakash: 34% rank 48

cegprakash: go go go

cegprakash: Crog u resubmitted?

Crog: yes

cegprakash: we are wrecking each other

cegprakash: instead of climbing

Crog: with a slight improvement on mines

cegprakash: did you start tracking yourself?

Crog: tell me how to reach gold and I'll stop wrecking you

cegprakash: haha

Crog: no I'm not tracking myself

cegprakash: so that's the way to reach gold I think :P

cegprakash: I have lot of room to improve my mines

Crog: might be

cegprakash: I always blast the top leftmost mine now

cegprakash: trigger*

cegprakash: and I am not learning from trigger result

Crog: I'm choosing the best mine to trigger with my current knowledge of where the opponent is, + I'm learning from the trigger result (except when the opponent does something that makes the analysis unsure)

cegprakash: do u trigger and torpedo on the same turn

Crog: yes

cegprakash: I am unable to calculate the positions properly when I do so

Crog: I don't get it , what's the difficulty ?

cegprakash: if he gets damage only from one of them

cegprakash: say 1 damage

cegprakash: do u decide he took damage from torpedo or from trigger?

Default avatar.png TheFlashKnight_c529: http://chat.codingame.com/pastebin/80d94786-eb52-4b2f-84ef-8c42c206f449

Crog: ah you mean, do I analyze the result of the hit when I hit after firing a mine and a torpedo at the same turn ?

Crog: so the answer is yes : when that happens I can make the assumption that at the previous turn the opponent was in either of the two blast areas - or in both of them

Crog: i.e. I'm sure the opponent was NOT in the remainder of the world

tomatoes: im applying all explosions to "virtual games" and in the next turn prune by health mismatch

cegprakash: my bot always starts from 13,1 even though I am doing random spawn point

Crog: what language are you using ?

cegprakash: C++

cegprakash: Crog I get what u mean.. I need to construct a damage map

Crog: do you use default_random_engine ?

cegprakash: I just use rand() in c++ from cmath

Crog: ok

Crog: if you want to be "really" random

Crog: you need to set a varying seed

Crog: srand()

cegprakash: I'll try uniform distribution for spawn alone

Crog: or alternatively you could switch to modern C++ - and use random_device

cegprakash: shouldn't be slow

Crog: random_device is non deterministic

cegprakash: https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution

Crog: unless you need millions of random values per turn, you don't care how complex the random generation is

Crog: in my (c++) code I use default_random_engine coupled with uniform_int_distribution

Crog: I prefer to use a deterministic random source - so as to be able to reproduce games and debug

Swagboy: Hmm no Crog, it can get heavy before millions of call

cegprakash: my spawn locations are now random

cegprakash: thanks to uniform int distribution

Astrobytes: what were you seeding srad() with before cegprakash?

Astrobytes: *srand()

cegprakash: no seed

Astrobytes: ...

cegprakash: only rand

Astrobytes: call srand(seed) at start of main()

cegprakash: http://chat.codingame.com/pastebin/c75956eb-f95f-4b22-97bc-2c4ba8b42390

Astrobytes: I meant before when you were using rand()

cegprakash: no seed

Astrobytes: from cmath

Astrobytes: you have to seed it first

Astrobytes: or you will get the same values

cegprakash: https://www.codingame.com/share-replay/453843307 lovely replay of wrecking the silver boss

cegprakash: but it only happens in IDE not in arena

cegprakash: story of my life

Astrobytes: Anyone got a brick wall I can talk to?

cegprakash: srand is slow right?

cegprakash: I like fast

Astrobytes: Is your random the bottleneck in your code right now?

cegprakash: yes I use simu

cegprakash: so

Astrobytes: Is your random the bottleneck in your code right now?

Astrobytes: Have you profiled it and discovered that your rand( )was slowing you down?

cegprakash: Don't think so

cegprakash: only for spawn I was worriedd

Astrobytes: Well then.

Astrobytes: Use a xorshift or something if you're really bothered

cegprakash: because I always used to spawn at 13m1

cegprakash: 13,1*

cegprakash: and enemy predict that easily

Astrobytes: BECAUSE YOU DID NOT SEED srand()

Astrobytes: I give up

cegprakash: I am not using srand -_-

cegprakash: only rand

Crog: lol

Astrobytes: if you use rand(), use srand(SEED) or YOU WILL GET THE SAME VALUES

cegprakash: okay I try that

Astrobytes: FML

cegprakash: lets see if it improves my bot

tomatoes: use srand before rand, not instead

Crog: to be clear : use srand() once, then use rand ()

Astrobytes: That's what I'm telling him tomatoes

Astrobytes: Astrobytes 10:48PM call srand(seed) at start of main()

tomatoes: :upside_down:

Astrobytes: Trying to tell ceg things is often like banging your head against a wall, it's just how he is

cegprakash: first run with srand won the game

cegprakash: so I'm submitting

Astrobytes: :no_mouth:

cegprakash: not bad.. 11 wins in 14

cegprakash: srand works

cegprakash: I'm using srand(time(0));

cegprakash: as I read in some blog

Astrobytes: Yep. But if you want it to be reproducible in the IDE you need a fixed seed

Astrobytes: Like based on the map, or your id or smth

cegprakash: but fixed seed is not random

Astrobytes: I literally give up

MSmits: don't think thats fair Astrobytes

MSmits: (to the wall)

Default avatar.png TheFlashKnight_c529: hello, how can i play 1v1 with my friend?

MSmits: clash of code I guess?

cegprakash: just choose the player u want to play against instead of the boss

cegprakash: you can remove the boss TheFlashKnight_c529

Default avatar.png TheFlashKnight_c529: yah, i found it, thx <3

Astrobytes: MSmits lol, right?

MSmits: yep

cegprakash: wow srand took my bot from #50 to top 10 already

VincentBab: Hey MSmits I need your help for UTTT :D

MSmits: what do you want to know VincentBab?

Astrobytes: Moral of the story kids, always seed your rng... :expressionless:

VincentBab: I just remembered that i try this game a while ago and didnt success to pass legend :(

MSmits: to get into legend, the easiest way is to do the following 3 things:

MSmits: 1) Fast language

VincentBab: I tried AlphaBeta & MCTS

MSmits: 2) bitboard

MSmits: 3) mcts

VincentBab: I optimized all my best even replacing log and sqrt function with fast ones

MSmits: it's easy to make a mistake with mcts though

MSmits: how many rollouts in the 2nd turn?

VincentBab: humm I dont remember, let my start it again xD

MSmits: it's a good benchmark

MSmits: you need about 25k to reach legend I think, not entirely sure

Astrobytes: cegprakash do you use C++ or C in your job?

MSmits: I have between 90k-130k depending on which cpu is used

cegprakash: neither

Astrobytes: Good

Astrobytes: :D

cegprakash: I use the shittiest language I ever known

Astrobytes: PHP or JS?

cegprakash: JS

cegprakash: :D

Astrobytes: :D

Astrobytes: Has it's place I suppose

cegprakash: they both do

cegprakash: but PHP has improved

cegprakash: I like Laravel

Astrobytes: I didn't use PHP since about 2009-ish

VincentBab: hum my IA is in AlphaBeta mode, i need to remember how to switch it to MCTS xD

VincentBab: AI*

MSmits: hehe ok, it's not that easy to get legend with a minimax bot though

MSmits: the thing is, minimax requires creativity, namely you need to create an evaluation function

VincentBab: i'm 15 gold with minmax

MSmits: mcts in uttt doesnt, random simulation is enough

VincentBab: yeah thats the hard part

MSmits: thats why its easier

VincentBab: but also a fun part

MSmits: you mean eval? Meh I never like having to write eval

VincentBab: i like watching replays and think how i can improve my eval xD

MSmits: yeah good luck with that on uttt, it's really hard to tell what is going on

MSmits: what language btw?

Astrobytes: Nice submit cegprakash, definite improvement

cegprakash: yes

cegprakash: I literally have no bugs in my tracking except there are rooms to improve

Astrobytes: "I literally have no bugs" said everyone ever :P

cegprakash: but I am thinking of playing around with my magic numbers

Astrobytes: Are you using a GA as usual?

cegprakash: random search + mutation

Astrobytes: For the whole thing or for separate parts?

cegprakash: whole thing

cegprakash: at each turn I fist decide I need to use SURFACE this turn or not

cegprakash: then based on the result I've some set of combos

cegprakash: that I try at random

VincentBab: humm my optimisation must not be so good... 20k rollout at second turn xD

wlesavo: "I literally have no bugs" famous last words

Astrobytes: VincentBab C++?

wlesavo: reading pb's post mortem i wondered how i won a single game with him

VincentBab: yes

Astrobytes: You have the pragmas?

VincentBab: yes

Astrobytes: Then it's time to mine MSmits for information :P

MSmits: ah, 20k is not enough no

MSmits: do you use an object pool?

MSmits: what does your tree node look like?

MSmits: do you save the gamestate on the node or separately?

Astrobytes: Btw, MSmits, you *were* referring to potential cache misses etc using unordered_map earlier right? By not knowing where the memory is being allocated?

VincentBab: yes I have object pool Node *node = &Node::nodes[Node::nbNodes++];

MSmits: ah ok, if you want to paste your node class here (just the properties on it) I can tell you what is wrong, if anything

MSmits: or PM me, that works too

MSmits: Astrobytes I was just wondering what would happen to locality if I gave my unordered map a capacity of 100 mb

MSmits: to avoid resizing

VincentBab: ok :)

tomatoes: i tuned "c" and it gives me a good boost

MSmits: my theory is that it would spread out the buckets in memory and destroy locality and cause misses

Astrobytes: It will

Astrobytes: Your only way around that is with a custom allocator

Astrobytes: Or write your own

Astrobytes: The unordered_map doesn't care where it's putting the data, it only cares whether the addresses are valid

Astrobytes: I feel you should consult re Curse on this, I'm by no means an expert. But there's a reason why people create custom STL-like containers

reCurse: Locality in hash map...

MSmits: what if the hash map is really large reCurse?

MSmits: if you make it too large, you get locality problems dont you?

reCurse: I'd say it probably stopped mattering way before that

Astrobytes: You get locality problems regardless

MSmits: what I mean is, to avoid resizing you can set the capacity to be large

MSmits: but too large gives locality issues

MSmits: maybe i am worrying about non-issues here

reCurse: Likely so

reCurse: You're going to have locality issues wayyyyy before 100mb

MSmits: it was just a number i mentioned

MSmits: could be anything really

reCurse: And worrying about locality with hashing is like worrying about not having hair anywhere when having a dog

MSmits: I was comparing it to using a List in C#... it's often best to give it a large capacity so it doesnt resize as your list grows

MSmits: might not be a good parallel

reCurse: Yeah but then it doesnt matter

reCurse: Because most of your data will always be concentrated at the beginning

reCurse: A hash table will spread it out by definition

reCurse: A hash lookup is also known as a cache miss

MSmits: hmm ok, but wont it spread out more if you give it a large size?

cegprakash: if (players[1 - myId].life <= 0) { score += fatalityScore; } Is it possible to write this statement without if condition

reCurse: Sure but it already stopped mattering a long time ago

MSmits: hmm ok

reCurse: Unless your hash table was really small

reCurse: But if that was the case

reCurse: Then you'd have been better off with a vector anyway

cegprakash: oh wait I can precompute score based on lifes

cegprakash: f**k me

MSmits: think about expansion of 10,000 nodes in a mcts run and me adding them all to transposition tables

reCurse: As far as cache is concerned you already betrayed it

MSmits: hm ok

MSmits: i dunno why we spent so much time talking about this today, it's not even a very pressing issue to me atm. But good you put it to rest :)

reCurse: You'd prefer explaining RNG?

Astrobytes: don't get me started

MSmits: err

Astrobytes: See MSmits, when in doubt, call reCurse

MSmits: no need to discuss rng as far as I'm concerned :P

reCurse: I was poking fun at someone else

Astrobytes: :smirk:

MSmits: yeah i read something about using a fixed seed

MSmits: in the last contest I made a seed out of islands

Astrobytes: no, rng with *no seed at all*

MSmits: oh, you want to hook quantummechanical experiments up to your PC?

Astrobytes: Goddammit man scroll up

MSmits: allright

MSmits: ahhh the wall thing

MSmits: got it

Astrobytes: I was seconds away from pinging reCurse and leaving

reCurse: Oh I'm not bothering anymore

Astrobytes: :D

Astrobytes: I might just go back to posting lmgtfy links

MSmits: any good ones?

Astrobytes: https://lmgtfy.com/?q=any+good+ones%3F

MSmits: ohh that

Astrobytes: Preferable to explaining things to brick walls ;)

MSmits: hey but the brick wall finally understood didn't it

MSmits: you succeeded

Astrobytes: Don't know why I bothered. Not like it would be reciprocated

MSmits: ahh well maybe someone else read it too

MSmits: maybe you helped droves of people without realizing it

Astrobytes: You're such an optimist!

MSmits: people log in briefly and they go... ohh Astrobytes put another gem of wisdom up, quick, copy it down for the future

Astrobytes: "another gem of wisdom" my ass :D

MSmits: :)

Astrobytes: Maybe I'll switch careers and do tech support...

MSmits: if you feel your life has too few brick walls in it

Astrobytes: lol, ever dealt with pharmaceutical company bosses?

MSmits: not recently

Astrobytes: But yeah, "have you tried unplugging it" would wear thin I guess

MSmits: yeah

**wlesavo logs in briefly for collecting Astrobytes's Gems of Wisdom

Kathrin: MSmits, how do you know what I'm doing?

MSmits: omniscience?

Astrobytes: lol wlesavo

**wlesavo already gone with all the gems

wlesavo: gn btw :slight_smile:

Kathrin: But to be honest, I copy and think: cache miss optimisation, thats magic.

Astrobytes: lol, gn wlesavo

MSmits: gn wlesavo

Kathrin: c++ and java stars are in different universes

MSmits: Kathrin wrong gems, you need Astrobytes gems

MSmits: yeah c++ != java

Astrobytes: Why me? reCurse did the heavy lifting in that explanation!

Astrobytes: I am but a humble biologist (with hair)

MSmits: that you are

MSmits: gonna go sleep

MSmits: gn !

Kathrin: gn

Astrobytes: not far off myself, gn man, take care

Default avatar.png JaapJVI: gn

cegprakash: last battles started to crash :(

Uljahn: did i miss reCurs e explaining cache miss optimisations? chat log is too short :(

icecream17: =O How have I never heard of "Array.prototype.foreach"!???

icecream17: So useful!

MadKnight: lol

MadKnight: how exactly do u use it icecream17 ?

MadKnight: show me an example

icecream17: available.forEach(element => console.error(element))

MadKnight: right

MadKnight: but why so long name ?

MadKnight: i do x =>

MadKnight: best name

icecream17: (example from MDN)

icecream17: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

icecream17: There's a for...of statement!?? I can't believe it...

Default avatar.png AliElgamel9: kotlin is the future

Uljahn: D >>> kotlin