Chat:World/2020-11-17

From CG community
Revision as of 11:55, 15 June 2021 by Chat Log (talk | contribs) (Created page with "<img src=/a/4030238757816> geppoz: takes 58ms <img src=/a/4030238757816> geppoz: :D <img src=/a/4030238757816> geppoz: when it is before full of 70k game state <img src=/a/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

geppoz: takes 58ms

geppoz: :D

geppoz: when it is before full of 70k game state

geppoz: 58ms of garbage collector, nice

geppoz: definitely going to c++

Default avatar.png Borrow: Which crates are available to a Rust submission?

Default avatar.png LordSkaven: @Borrow from the FAQ, chrono 0.4.9, itertools 0.8.0, libc 0.2.62, rand 0.7.2, regex 1.3.0, time 0.1.42

KPlanas: Hi all Quick question as I'm new to this What happens in Silver? Do we just compare codes to see who wins the most?

Default avatar.png LordSkaven: sortof, there are no new rules in silver, the bots just become more closely matched

rockstar555: good night to everybody

KPlanas: Oh ok No boss or anything then? Even when the Gold League opens?

Default avatar.png LordSkaven: the boss is chosen from one of the players basically.

spaceorc: @pedrosorio also check is you have hardcoded spells (like I do) - they were changed a day before - and my bot started to throw IndexOutOfRange exceptions

eulerscheZahl: https://twitter.com/itigo_purokonn that's an active twitter user :o

Default avatar.png LordSkaven: lol

KPlanas: Ok, thanks for the info LordSkaven :grin:

qahmad: is AI lap allows in this challenge?

qahmad: hii

[CG]Maxime: Hello!

xineohp: not sure why my c++ code is running slower than the js code. smh

struct: Hi

MadKnight: hihi

MadKnight: xineohp gg

Default avatar.png Vischtor: Hi, question about running your code locally: I cloned the git repo and used maven to install it, and get a .jar-file. But when I try to run the jar-file I get the following error: no main manifest attribute, in target/fall-2020-1.0-SNAPSHOT.jar Any hints about what to do?

Default avatar.png pedrosorio: spaceorc interesting, I do not hardcode, was just trying to understand how my bot gained 100 ranks overnight - if there were a lot of bots with hardcoded spells that could be another explanation

MadKnight: just create a main manifest

AntiSquid: eulerscheZahl are all the japs doing atcoder? did you do any atcoder challenges?

MadKnight: ohhh so they added bonus rupees cost to the input cost now

Default avatar.png pedrosorio: MadKnight what does that mean?

AntiSquid: really? where is it MadKnight ?

MadKnight: https://github.com/CodinGame/FallChallenge2020/commit/4b0d2c21899817af91cce2817c9fe3facfb9c1cf

AntiSquid: the first two BREW recipes pedrosorio have bonus

AntiSquid: aha. cool @MadKnight

eulerscheZahl: i don't even have an account on atcoder

eulerscheZahl: their contests are in the middle of the night for me

Q12: Is C# is faster than Js?

eulerscheZahl: yes

Q12: ... I guess I need to change all my code to C# :sweat_smile:

AntiSquid: change to rust / c++

AntiSquid: rust doesn't crash in the IDE anymore it seems

Q12: don't know

AntiSquid: best time to learn :P

AntiSquid: tutorialspoint rust / c++

AntiSquid: easy translate

Q12: It would be hard and would take me a lot of time and until I will do it the contest will be over

Q12: so I will try to convert my code into C#

S-Maitland: general question - is c# or c++ better than Java?

Illedan: Both is better.

S-Maitland: in what ways, or is it a long list

Illedan: Faster at least

S-Maitland: i'm familiar with Java but haven't touched on c# or C++ and wondered what would make more sense to learn

Illedan: C# would be a fairly easy switch

struct: Throw a dice

S-Maitland: haha

S-Maitland: eenie meanie minie mo

S-Maitland: ok will look at C#, cheers :)

struct: rigged, roll again

S-Maitland: lol

eulerscheZahl: Illedan are you sure that C# is faster than Java?

Illedan: Nope :D

Illedan: Random internett post said so

eulerscheZahl: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/csharp.html it is. but not that remarkable

eulerscheZahl: unless you write your bot in regexes

Default avatar.png LordSkaven: is that your idea for the next contest euler? Regex only bot lol

Illedan: Code like that Calm winner :joy:

eulerscheZahl: strings everywhere. i was shocked

Illedan: Code to give nightmares

eulerscheZahl: i still have it somewhere

eulerscheZahl: found it

eulerscheZahl: did i break my bot or did lower ranks improve?

Default avatar.png owlly: Im blocked bronze legue in coder strike back, someone can help me ?

S-Maitland: http://chat.codingame.com/pastebin/a0dc41dd-4a21-4c05-ae30-8fe3fbda4ce2

S-Maitland: still got C# lol

S-Maitland: @struct

Cappefra: wait a second emil. is lvl 3? who is this guy?

Default avatar.png IronKnight_3f67: Hello, are the tests that recruiters take similar to training? in this case it is for c ++

struct: from the recruiters on that use CG platform ?

Default avatar.png IronKnight_3f67: yes

struct: I dont know if the tasks will be similar

struct: They use this platform

struct: https://www.codingame.com/work/

struct: The try for free is not working for some reason

Default avatar.png IronKnight_3f67: ok thanks, someone told me that it's easier and less entertaining

Default avatar.png IronKnight_3f67: and that there's an MCQ part

RockyMullet: oh chat is alive again ?

RockyMullet: good

Default avatar.png CodyPro: hello world :)

RockyMullet: eulerscheZahl little question, I do around 16k sims and generally only go depth from 3-5, seems like not enough I feel I need to reduce my branching. You feel 16k is too much for so little depth ?

RockyMullet: oh no euler is gone

struct: poor rocky

RockyMullet: :cry:

struct: how much time do you use rocky?

RockyMullet: I stop at 39 ms because of random timeouts

RockyMullet: but I feel it's false time out due to the servers not feeling right

RockyMullet: I feel like 16k sim is too much for such a small depth

struct: So you are pruning to only use 7 per state

RockyMullet: I think I dont eliminate enough branching

RockyMullet: so im not

RockyMullet: should I ?

struct: Im not sure, I dont have working bot yet

RockyMullet: I dont have much actions I do do every time. I dont rest twice, I dont sim exausted spells

RockyMullet: dont do *

RockyMullet: other than that it's every actions after every action each depth

RockyMullet: I feel I should ignore some actions

struct: My problem is how to choose which ones are bad

Default avatar.png LordSkaven: I think max nodes I reach is around 5k on depth of 8, but I almost never reach depth 8, usually stop at like depth 4/5. But I am using the LSFIIKS Algorithm.

RockyMullet: I though about only casting the learned spell after I learn a spell since there's no reason to elarn a spell in a sim if im not casting it, but then the tier0 exchange of taxes could matter

struct: Maybe learn it only on depth 1?

RockyMullet: yeah I do a kind of mutated bfs

struct: only allow spells to be learned on depth 1 of bfs

RockyMullet: struct yeah thats what I though, but it eliminate all the exchange of tier0 from taxes and it could matter

Q12: did you take into account that situations that you already encountered you don't need to explore them again?

RockyMullet: Q12 well I dont learn a spell twice

RockyMullet: or brew twice

struct: But if you cast spell 0 and spell 1

struct: you get the same state as if you cast spell 1 and then 0

RockyMullet: but a spell a learned spell can be casted

RockyMullet: the only "I never check you ever again" I have is for brews, since they never matter after

RockyMullet: struct true

RockyMullet: yeah maybe it's something I could look up

RockyMullet: thanks guys

RockyMullet: it matters if one of those are the first depth since it changes the actual output

RockyMullet: but beong that, there's no change

RockyMullet: unless it's learning spell or brewing

Q12: I am not speaking about it. if you got to a specific inventory and you explore all actions from there and you encounter the same specific inventory again you can skip exploring it. did you understand?

RockyMullet: but cast 0 then 1, or 1 then 0 doesnt change anything

RockyMullet: Q12 it doesnt mean I have all the same exausted spell

RockyMullet: BUT

RockyMullet: oh

RockyMullet: yeah I undersdtand now

Q12: :ok_hand:

RockyMullet: I can check if I could ever be able to cast it

isME: hi

isME: :corp:

isME: :eye:

isME: :wave:

WINWINWIN: Any idea when gold is opening? If so, how did you find out?

RockyMullet: tommorow

struct: arleady?

struct: I need to step up

RockyMullet: in the IDE, you can see your league, like "silver league"

RockyMullet: if you click on that

struct: its in 2 days rocky

struct: 19-11

RockyMullet: you see when the next league comes out

WINWINWIN: Awesome, thanks

WINWINWIN: struct it says 18/11

RockyMullet: struct time zones :D

struct: its 15:28 here

ZarthaxX: struct what happened to your bot

RockyMullet: weird

WINWINWIN: This time they take 10% of the silvers?

struct: Which bot ZarthaxX?

RockyMullet: anyway says 18 for me too

RockyMullet: carrrrrrrrrrrrrnnnnneeeeee

ZarthaxX: the non existent bot

ZarthaxX: MEEEEEAAAAAAAAAAAT!

ZarthaxX: howdy

struct: Mate, this bot was the first getting bronze

struct: Im never touching it again

Default avatar.png LordSkaven: also this https://airtable.com/shrLIOcKJPVoTRdeY/tblDCOBztDlD4XmCg/viw4vOCwSM79TJi7F?backgroundColor=yellow under the CodinGame category

RockyMullet: viande*

ZarthaxX: struct LOL

ZarthaxX: RockyMullet wot

RockyMullet: it's meat in french haha

struct: ok I refreshed and it says 18 now

ZarthaxX: ah ah

Default avatar.png Kupillos: yo

struct: https://i.imgur.com/mFhnPyj.png

Default avatar.png paulemploi: yo

RockyMullet: hows your bot doing ZarthaxX ?

struct: zarthax was just promoted

ZarthaxX: i just did a few hours of it to get to silver

struct: I know everything ZarthaxX

ZarthaxX: but well ,pretty bad, not much code

ZarthaxX: struct stalker

Default avatar.png paulemploi: thomas tu vois mon message?

RockyMullet: ZarthaxX sim yet ?

RockyMullet: paulemploi Il le verrait aussi dans #fr

Q12: do you guys have a quick way to discover what will be the inventory after casting some spell except of adding the inventory and the spell ingredients? will be very helpful :slight_smile:

ZarthaxX: just finding closest potion to make with bfs rockstar555

ZarthaxX: RockyMullet

RockyMullet: someone stoll "rock" autocomplete from me, this is war

ZarthaxX: yeah, annoys me

RockyMullet: Q12 so far I do that, just add all ingredients, but there's probably a better way

RockyMullet: the max ingredient is 10

RockyMullet: so 4 bits

RockyMullet: 4 ingredient 16 bits

RockyMullet: so you could probably do something with mashing everything in a single variable

BrunoFelthes: empty?

RockyMullet: and add them

Q12: nice!

RockyMullet: oh shit it can be negative too

Default avatar.png ITACIRE: hi

struct: I make all ingredients positive

struct: but I have cost and gain

RockyMullet: ooooh so you can have 16 bits for cost and 16 for gain and it still holds in a 32 bit

**RockyMullet scribbles furiously in his TODO list

struct: struct Ingredient { uint8_t values[4];

Counterbalance: union Delta { uint32_t value; char values[4]; }

AllYourMCTS: whats the benefit of putting it in a 32 bit value?

struct: Counterbalance way should be better

Counterbalance: you can then test for negative values very fast

RockyMullet: yeah unions seems like the way to go

RockyMullet: same data, 2 ways of using it

Counterbalance: the only downside is that checking for 10 ingredients requires another 4 adds, or a 5th byte

RockyMullet: AllYourMCTS 32 is the size of an unsigned int in C++

RockyMullet: Counterbalance I dont understand, 10 fits in 4 b

RockyMullet: 4 * 4 ingredient types = 16

RockyMullet: ooooooooh you mean like busting the 10 ingredients with a cast

RockyMullet: shit, you're right

RockyMullet: I wish you werent lol

struct: I got lost

struct: Im not understanding

Counterbalance: you can do 16bit, but then adding the ingredients to the inventory requires shifting and masking..

RockyMullet: struct mashing up the ingredient count in a single variable by doing some bit shift

RockyMullet: you'll be able to just substract or add those variable

RockyMullet: but like Counterbalance said, it means you cant just add everything when it's possible to go over 10 ingredient, therefore going over 4 bits

RockyMullet: well

RockyMullet: 4 bits max is 15

RockyMullet: is tehre any spells who gives more than 5 of a single ingredient ?

struct: But there are cost of 6

struct: or cost doesnt matter?

struct: for recipes

NitMpez: i was trying to store the 4*4 bit integers, but the problem that i ran into was handling the negative deltas...

NitMpez: worked great for all positive values... failed miserably for me when dealing with negatives

Counterbalance: the trouble with 4 bits is that it's signed range is -8 to 7, so you can't tell if 0x8 is +8 or -8

NitMpez: yeah, i tried even bumping it to 4*5bit integers just because of that

Counterbalance: lol

Counterbalance: the 8bit version is certainly fast enough though

NitMpez: haven't really worked with unions... so if you add those together... will it handle the sign correctly in the 8th bit.

MadKnight: yea those are still s8's

MadKnight: signed chars

NitMpez: cool... will look into it...

Default avatar.png ICanCode: i have a challenge for you

Default avatar.png ICanCode: using F# can you make a remake of the currently popular game, Among Us

struct: no

Default avatar.png ICanCode: :ok_hand:

Default avatar.png jakietunning: hello guys

Default avatar.png m-achine: i have a spacial gif for u

dreadylein: -34 of reagent 0 .. yep engine seems to be running at peak perfomancen :D

reCurse: You just invented imaginary brewing

dreadylein: best game, just like real life, taxes are messing everything up ;)

Illedan: Yeah, where is the bank? Would like to borrow some ingredients.

reCurse: Can't, you ran out of space in your account

DomiKo: I wish I could negotiate with witches :/

DomiKo: Those deals are really bad sometimes

RockyMullet: DomiKo that's how you accidently sumon demons

DomiKo: Can demon give me 5 yellows?

reCurse: For the low price of your soul

DomiKo: Soul for T-Shirt is nice trade. Take my soul demon!

numb3r5: How do i move on to the next level in coders strike back? It's simulating hundreds of races and it's taking forever

reCurse: Your score needs to be above the boss when the submit is over.

Default avatar.png TheMassivePirateVanDerSwag_1634: Yo world!

Default avatar.png LordSkaven: best username I have seen in a while there

jacek: :blush:

Default avatar.png TheMassivePirateVanDerSwag_1634: :joy:

Default avatar.png TheMassivePirateVanDerSwag_1634: Who's here

DToTheE: Did you guys get an email when you were promoted to Silver League?

Counterbalance: no

struct: I got an email that silver opened

bhrr: https://www.codingame.com/clashofcode/clash/1466887951938d2e087df968b3261d9f0d9e1cd

jacek: oO

AntiSquid: bhrr https://www.codingame.com/contests/fall-challenge-2020

Cristinel: DToTheE I've got the email yestarday

AntiSquid: that username reminds me of : https://youtu.be/mO1QBTG6EXs?t=52

moon_invader: some tips for accessing gold league, this is my first contest

moon_invader: ??

kovi: wait a few days

moon_invader: it will be too late

AntiSquid: gold is tomorrow

moon_invader: i am at the bottom of ranking

llllllllll: calculate stuff, print something

AntiSquid: panic, wear a mask, lock indoors

Q12: I think every one in the world follow your way :joy::sob:

moon_invader: ??

DToTheE: @Cristinel, you probably got the email that silver opened, not that you were promoted, unless you're different than Counterbalance, struct, and me in that regard.

Q12: > moon_invader work hard and improve your bot :relaxed:

AntiSquid: work smart, not hard

Q12: yeah, u right

Clagus: what if working smart is hard?

Clagus: :D

moon_invader: is 5 days enough to study game theory??

AntiSquid: i see we're having a dissenter in here ... Automaton2000 take care of this individual

Automaton2000: i dont know much about it

jacek: 5 days is enough only for study quantum physics

AntiSquid: you can read the whole 400-500 pages in one day though !

moon_invader: so, back to work

TheOtherAKS: hello guys, is it possible when playing a [Community Puzzle] to see what the computer input is ?

arkwaw: you could use debug output to print input, like cerr>> in c++

TheOtherAKS: is that possible in Python ?

struct: print("Debug messages...", file=sys.stderr, flush=True)

TheOtherAKS: thank you sir .

WINWINWIN: Looking at emil. and some of the top new guys, are contests easy to pick up if you join as a skilled coder?

Default avatar.png LordSkaven: probably

Default avatar.png LordSkaven: I consider myself an average/below average programmer and I am constantly in the top 300/200

WINWINWIN: Its not the after you settle in part, its when you just start, can you pick up the contests easily?

LastRick: I'll offer the counter argument. I've coded forever but this is my first contest. There are a lot of things to consider (with regards to game theory) that you don't think about if you're just coding for work.

Default avatar.png LordSkaven: In short, yes I think that if you are a skilled programmer it is relatively easy to pick the contests.

LastRick: I would agree.

sadakatsu: I find that I excel in professional programming and struggle with these contests. It feels like there is some knack for seeing "simple" tricks to get better algorithms that I do not see. The brute force solutions are usually all that occur to me : /

sadakatsu: AFAIAA, my resulting code also tends to be roughly five times longer than the top entries, too.

sadakatsu: I do a lot less with so much more work.

LastRick: Totally understand. So, again, my first contest, brute force got me to Bronze. After that, I started watching Euler's game and trying to understand WHY is he choosing to do X (LEARN, CAST, BREW), or WHY NOT? I watched the default AI a lot. And you start to pick up clues about where to attack.

VizGhar: Ain't nobody got time for this :D

AntiSquid: for a moment i read "professional excel programming"

CommanderCero: good i wasnt the only one

LastRick: Big difference between this and writing VBA macros

AntiSquid: import pandasql , query the table in sql code within python code @_@

Cuken: Can I see what action my opponent took last turn given the input of this turn outside of "OPPONENT_CAST"

Cuken: Or do I need to evaluate game state to figure that out

Clagus: do you feel like buying recipes isn't really well designed? like buing top recipes is very expensive, so you probably just have to buy the cheapest anyway?

sadakatsu: Right now, I only buy a recipe if it reduces my distance to my current goal this turn.

Clagus: interesting, thanks :)

EladYaniv01: is a LEARN delta the same as any other delta, meaning the negative values are what it costs ?

GiraffeKing: Yea

Zilvester: EladYaniv01 - yes

Default avatar.png rwilson: EladYaniv01 - keep in mind that the COST to LEARN is related to the TAX and it's tome index ... but once you've learned it, that DELTA is how the spell will behave ( i.e. it turns into a 'CAST' available or you next turn )

VizGhar: No it is not... learn cost is equal to tomeIndex :)

VizGhar: and you will receive tax after learning the spell

Clagus: how can I track the +3/+1 bonuses? game does not provide such inputs, right? so how can I tell if my opponent is brewing something? it's easy when he is brewing different potion than myself, but what if we brew the same potion? how can I detect this?

ErikBrendel: yes, they are inputs

ErikBrendel: they are in the tomeIndex for orders

Default avatar.png rwilson: Clagus - it's jammed into the tome_index ... was added late, so it's weird. read description carefully.

Zenoscave: good to know!

Clagus: oh! :D

Zenoscave: didn't see that

Clagus: nice hack xD

Default avatar.png rwilson: Clagus - key point, it's INCLUDED already in the price... so in some sense you don't really care. you have to subtract the bonus from PRICE to get the base price.

Clagus: wait, really? it's already included in the price?

sadakatsu: Yes.

Clagus: oh I see, nice

Clagus: much less effort then :)

Zenoscave: https://www.youtube.com/watch?v=nbf0d2UHLrQ

ErikBrendel: thank you rwilson, didn't know that

Cuken: Except if you are past the first 4 recipes being purchased in slot 1 or 2, the price will now reflect it without the bonus

Clagus: wait what?

ErikBrendel: yeah sure, because there is no bonus anymore after 4 recipes

Clagus: what about +1 bonus?

Cuken: It would be nice to know what action your opponent took rather than analzying game state

EladYaniv01: so a spell is in the Tome first index, i literally see i can afford it, and the surplus wont go over 10 in my inventory , but the game sais i dont have enough ingredients, why is that ?

Default avatar.png rwilson: EladYaniv01 - 'not enough ingredients' implies you are trying to learn a spell where the tax is higher than the number of blue resourses you have .. OR trying to CAST something you can't cast yet.

VizGhar: not correct

VizGhar: tax is amount of tier0 you will receive after purchasing spell

VizGhar: spell cost is determined solely based on tomeIndex

VizGhar: Only confusing thing visually is, that spell with tomeIndex=0 is shown on bottom of the list :)

Default avatar.png rwilson: EladYaniv01 - if it's for your LEARN, you might double check which way youre reading the tome index ( i had it backwards my first go , when tryign to learn the FREE one )

EladYaniv01: omg yeah

EladYaniv01: thanks guys

VizGhar: Second last item in tome costs 1 (and has tomeIndex = 1) and if there is any tax, you will receive it AFTER you purchase spell

VizGhar: if you cant store tax it will be discarded (not 100% sure about this one)

EladYaniv01: thank you very much, i wish the instructions were more clear about it @VizGhar

Default avatar.png rwilson: VizGhar - yes - excesses are discarded

VizGhar: :thumbsup:

Barimehdi77: in the inventory there's a for loop loop twice which one is mine

struct: first

Default avatar.png rwilson: Barimehdi77 - YOUR inventory is always first , regardless of if you are the RED or BLUE witch.

hbouillo: Does anyone know when the gold league will be open? :)

GiraffeKing: Click on your league above the game screen

Xenoid: In 22 hours

hbouillo: Oh yeah, thank you!

Barimehdi77: i write this func to check if the potion is ready but I don't know why it doesn't work

Barimehdi77: http://chat.codingame.com/pastebin/0b40edb6-0d20-4a57-9235-ae266d198a78

Xenoid: The inequalities are wrong. Consider what happens if brows.delta_0 is -2 but inv.inv_0 is 1. Your inequality succeeds but you want it to fail

CommanderCero: yeah the mistake is that if you negate your inventory a larger value will become smaller. For example delta=-2 and inv=3 -3 is smaller than -2

AntiSquid: what search depth are people at ? :o

Clagus: just write it more human friendly... don't try to invent smart checks, if you can just write it as you think it: inventory should be more than the demand

CommanderCero: ive got 40 but im pruning like crazy, before that i was at 6

Xenoid: My search depth is 4, which is probably why I cannot seem to break into the top 50 anymore

struct: what rank are you Xenoid?

NinjaDoggy: my low search depth is like 10, goes up to 20ish

Xenoid: I was ~70 before I submitted recently

NinjaDoggy: but I don't have opponent sim yet...

NinjaDoggy: so deeper is worse lol

emh: hey guys

emh: just started contest

struct: top 70 with depth 4 seems very good

struct: hi emh, good luck

NinjaDoggy: "i have a master plan for then next 15 moves!" gets every potion stolen :(

AntiSquid: hi emh how's it going

Barimehdi77: but why The program get timeout

emh: struct thanks :)

Barimehdi77: http://chat.codingame.com/pastebin/754de9ae-81ec-4ab4-97ce-cd7f2f454a43

Xenoid: I'm happy with my sim and scoring, but I don't think it's enough

emh: AntiSquid entering Bronze soon so good I think :)

CommanderCero: depth is quite vague anyway, depending on how you prune you may prune away important branches and still reach high depth

NinjaDoggy: 0 pruning for brew/cast

eulerscheZahl: Barimehdi77 only print 1 command each turn

NinjaDoggy: :)

AntiSquid: you have time to auto-promote to gold too emh :)

Xenoid: Depth isn't vague when you are exhaustive :D

emh: hehehe

CommanderCero: yeah but that take so long :(

emh: started a new job

Barimehdi77: That's what I did

emh: it's only 2 days per week so far though

emh: so still have some time for contest

AntiSquid: what job ?

emh: IT consultant

Barimehdi77: browdone print only if the potion is ready

AntiSquid: cool

AntiSquid: :thumbsup:

eulerscheZahl: oh, the bottom block is in a comment

Barimehdi77: is this right

Barimehdi77: http://chat.codingame.com/pastebin/b332dbf8-2c66-4c42-8236-ff42571903ec

emh: it's only apprenticeship so far though. through the government and friends

AntiSquid: "brows"

Barimehdi77: this func check if I have the potion ready

AntiSquid: it's a good start lol emh

Xenoid: Barimehdi77, yes

emh: AntiSquid thx :)

Barimehdi77: but why I get timeout

CommanderCero: thats probably not the fault of the function

AntiSquid: do you have any error message Barimehdi77 ?

emh: Bronze strat just some ifs throwing random spells for all potential brews. double loop

AntiSquid: you probably need to take out code piece by piece to find out - annoying but only way

emh: are people bit-optimizing the hell out of this contest already?

Counterbalance: of course

emh: hehe

Barimehdi77: Barimehdi77 has not provided 1 lines in time. Barimehdi77 was disqualified.

Default avatar.png LordSkaven: hmm, I wonder if maintaining Top 300 would guarantee promotion to Gold tomorrow

CommanderCero: I did that, it made it a lot faster but I dont think its necesary

AntiSquid: do you have a choice? looks like an optimization multi .

AntiSquid: LordSkaven probably

Barimehdi77: i write this to see if the potion is ready

Barimehdi77: http://chat.codingame.com/pastebin/622eae25-c981-4e01-ac58-507a654fb4cf

eulerscheZahl: probably not AntiSquid

AntiSquid: it's just legend that's always hardcore

Barimehdi77: brewdone func

AntiSquid: why not euler ?

Barimehdi77: http://chat.codingame.com/pastebin/b356d5c2-698a-48fb-b314-0d6bcaaebb4e

AntiSquid: 300/1400 for gold, don't see the issue :P

eulerscheZahl: i predict a stronger silver boss, around 100-150

Counterbalance: your brewdone function returns void, how can you compare it to 0?

struct: I think 100 aswell

eulerscheZahl: then lots of later promotions

Barimehdi77: http://chat.codingame.com/pastebin/1e25048a-171f-47b7-896e-be741e8282c3

AntiSquid: max 200 for silver box . like really worst case scenario

Barimehdi77: this is my brewdone func

AntiSquid: boss *

eulerscheZahl: can Icebox beat the silver box?

AntiSquid: they are usually lenient with the silver boss

AntiSquid: idk, what is stronger? silver or ice ? Icebox

Barimehdi77: http://chat.codingame.com/pastebin/e5836880-2e12-48cb-9e3a-807276b8e80a

AntiSquid: euler why do you expect a really strong gold boss ?

AntiSquid: i mean silver boss *

eulerscheZahl: i wouldn't call that "really strong"

AntiSquid: it would be stronger than usual for silver

eulerscheZahl: that's just how it is from my limited memories (i never cared too much about it)

eulerscheZahl: we'll see tomorrow

AntiSquid: AutomatonNN what do you think?

AutomatonNN: what do you mean?

AllYourMCTS: are you guys doing depth test with all pairs of actions? :O

eulerscheZahl: we just broke the 6k mark

ZarthaxX: :clap:

eulerscheZahl: with pruning

BrunoFelthes: what kind of algo is good to check simultaneous turns?

BrunoFelthes: is minimax works?

eulerscheZahl: i'm frustrated, can't climb up anymore. but even sure if i broke my bot or not

eulerscheZahl: it's mostly a single player optim game

NinjaDoggy: C# hitting its limits?

NinjaDoggy: or just lack of ideas?

struct: Still enough time to change

eulerscheZahl: no, toad hitting the limits

BrunoFelthes: kkkk

NinjaDoggy: :(

struct: euler do you think it would perform better with c++?

eulerscheZahl: yes but not that much

eulerscheZahl: top players beat my by algo, not my language

eulerscheZahl: beat me, by language can't type

eulerscheZahl: bedtime

struct: gn

AntiSquid: 7 PM ?

NinjaDoggy: gn euler

AntiSquid: ah

AntiSquid: gn

BrunoFelthes: probably 50k simulations is enough to find a good path...

AntiSquid: euler is the early bird

eulerscheZahl: 8:40 pm

NinjaDoggy: lol time zones are so wack

NinjaDoggy: i just woke up 11:40 for me lol

AntiSquid: what counts as good BrunoFelthes ?

BrunoFelthes: legend league at the end

NinjaDoggy: yeh 50k is not bad

AntiSquid: this game might be UTTT 2

NinjaDoggy: i'm getting roughly 120k

BrunoFelthes: what 120k?

BrunoFelthes: and you are not top 50? something is wrong

BrunoFelthes: i'm doing 5k

NinjaDoggy: i'm not simming opponent yet

NinjaDoggy: top 20 today probably

BrunoFelthes: are you using some trick with bits to do it faster?

AllYourMCTS: 50k complete single player game simulations??

AntiSquid: reveal thy trick

NinjaDoggy: um... i guess i don't mind sharing...

NinjaDoggy: talked about this a few days ago too

NinjaDoggy: but basically you only have 1001 inventory states

NinjaDoggy: so you can precompute all possible transitions

BrunoFelthes: hummm

NinjaDoggy: I started with bit manipulation too

CommanderCero: i think he means forward model calls. Because i can also reach around 200k

NinjaDoggy: but it's more complex and faster

NinjaDoggy: slower*

CommanderCero: also thats an interesting approach

NinjaDoggy: yea forward model calls is a good way to describe it

NinjaDoggy: anyone know of a faster alternative to unordered_set<int>

AllYourMCTS: forward model calls as in applying 1 action to the sim?

NinjaDoggy: that's specific to integers?

CommanderCero: an array

NinjaDoggy: but like it's too big for array :(

CommanderCero: that is lare enough

CommanderCero: oh

NinjaDoggy: let's say 2^30

NinjaDoggy: and all i need is to know if the integer exists, and to add new integer

CommanderCero: transposition table, still an array but you compute an hash

CommanderCero: and hope that you never encounter the same index twice

NinjaDoggy: ok...

NinjaDoggy: so bloom filter with k=1

CommanderCero: mcts yes forward model call = advancing game by 1 round

AllYourMCTS: ahhhh

Zenoscave: for sim is anyone using learns in the sim path?

Zenoscave: I've got maby 20k in 50ms

Zenoscave: I think I need a refactor

NinjaDoggy: planning on simming learn on first turn only

AllYourMCTS: what is learns?

Zenoscave: LEARN from tome

AllYourMCTS: oh

Zenoscave: Probably GC is killing me

AllYourMCTS: i'm doing random game playouts with all possible actions

ParticleBeam: So am I. It's not working all that well anymore...

AllYourMCTS: :)

Zenoscave: I need to find a way to locally allow ony one thread on C# my timings are less than accurate to the servers

motty: So, I've been promoted to the Bronze League and I don't know why - my code was definitely not cutting it for Wood League 2. This is weird.

Default avatar.png pedrosorio: (...) not cutting it for Wood League (...)

I see what you did there

GiraffeKing: ha

motty: :sunglasses:

wlesavo: Zenoscave i do, but with raw MC

Zenoscave: huh wlesavo

wlesavo: Zenoscave did you fix recepie update?

Zenoscave: raw mc?

Zenoscave: why?

wlesavo: you had a broken bot today

Zenoscave: and no. there's an update?

Zenoscave: replay?

wlesavo: yes, check the new recepies, one was changed

Zenoscave: I don't hardcode transitions

wlesavo: oh

wlesavo: i thought thats why you always timed out

Zenoscave: No just no timeout checks. Just eval max count.

Zenoscave: Might add timeout checks back

wlesavo: Zenoscave i won almost all of games in arena against you like this https://www.codingame.com/share-replay/504551047

wlesavo: i see, but there are some problems with timeouts for everyone, you should probably fix your checking

Zenoscave: fair

Zenoscave: thanks

wlesavo: raw MC was first thing i tried, and then i got lazy

wlesavo: but it is easy to add heuristics there, my is code somewhat pythonic

wlesavo: my code is*

S-Maitland: quick question, do you only move on from challenges if you defeat the boss in the arena, rather than just beating them in the "play my code" part

Zenoscave: yes S-Maitland

Default avatar.png ForgottenSausage_431f: what

S-Maitland: ok thanks Zenoscave :)

Zenoscave: np

Ekaon: Is there someone able to run the FallChallenge project outside CodingGame website ?

motty: Boss must have had... unfortunate rng luck in the run that promoted me to Bronze sometime overnight then.

Zenoscave: Brutal tester Ekaon

Zenoscave: you need to patch the source a bit though

Traquila: How do you send messages in GUI?

Default avatar.png StrykerS: hi

Default avatar.png ForgottenSausage_431f: hello

Ekaon: Yeah, this is where i'm stuck

GiraffeKing: motty, you gotta do better than the bot would in 100 games; doubt it's 100 games of bad luck.

Zenoscave: Traquila add a " " and then your message at the end of your turn move

Traquila: thank you

Zenoscave: Ekaon What's the error you're getting and what version of java do you run?

motty: @GiraffeKing sure, but my code was happily accumulating tier3 ingredients like that was the goal and not even trying to make potions.

Samer: motty i have the same problem lol

Samer: actually my code is so broken it's amazing i made it to silver, or even bronze!

S-Maitland: is it 100 GiraffeKing, i'm 50 games in and only at 20% battle progress

GiraffeKing: S-Maitland, maybe not? Mine usually seems to have the % be the same as the games played, but I was only guessing based on that.

Default avatar.png ikadimi: can you add minmax to a js code without timing out ?

Default avatar.png ForgottenSausage_431f: w

Default avatar.png ForgottenSausage_431f: w

Default avatar.png ForgottenSausage_431f: w

Zenoscave: ikadimi yes but probably not very deep

Zenoscave: plus minmax does not work well with simultaneous games like this

Default avatar.png ikadimi: what kind of algorithm is best then ?

Zenoscave: MC or beam search/bfs seems to be common

Zenoscave: MC or MCTS

Zenoscave: but again MCTS needs modifications for simultaneous turns

Default avatar.png ikadimi: alright thank you ima check them out

Default avatar.png StrykerS: poo

struct: all depends on the depth

struct: oh chat didnt scroll

Zenoscave: beat you to it struct ;:P

struct: You are beating me everywhere :'(

Zenoscave: what!? My bot currently times out too often

struct: Doesnt matter even if you have 0% wins you are still ahed

struct: Im still in bronze

Zenoscave: ooof

struct: But to be fair my bot is just MC

struct: just to see if I had bugs

S-Maitland: what does Mc mean?

Zenoscave: monte carlo

struct: Monte Carlo

struct: Random search

Zenoscave: probabilistic random choice

S-Maitland: ah ok

Zenoscave: just a sim debug then struct?

struct: yes

Zenoscave: wlesavo fixed my timeout. let's see how it does

jamessizeland: timeouts are kicking my code too, can't figure out what's causing it

Default avatar.png KevinisMAD: You probably aren't finishing your computations fast enough

AllYourMCTS: did they change it so when spells get added to your inventory they have a new id instead of the actual id?

AllYourMCTS: i swear the spell ids were the same once added to inventory but now they are different

Xenoid: It has always been that way, AllYourMCTS

struct: they have never been the same

Zenoscave: nope

Default avatar.png KevinisMAD: Response time per turn ≤ 50ms Response time for the first turn ≤ 1000ms

AllYourMCTS: oh wow

jamessizeland: yeah I just dropped my search timeout 10ms and its working now

struct: jamessizeland when do you start your timer?

llllllllll: is there a way to see a stacktrace or sg when my code crashes? I get random "timeouts" when I clearly have time remaining, but no error message, nothing

llllllllll: (C++)

Default avatar.png KevinisMAD: Honestly I am trying to build a dp table during the first turn and adding when I learn but it is still timing out

Default avatar.png KevinisMAD: Could be you aren't returning an action by the end of a turn

jamessizeland: I'm just limiting my search algorithm to 30ms

llllllllll: I don't get to the end, it fails somewhere, but I cannot find where

Default avatar.png rohit523: Which league are you guys on??

Default avatar.png KevinisMAD: Silver

jamessizeland: silver

Default avatar.png rohit523: im on wood 1 ;(

Default avatar.png KevinisMAD: Just try to test out ideas you think work youll move up pretty fast

Default avatar.png rohit523: just finished coding wood 1 testing in battle

Default avatar.png KevinisMAD: Although some of these later rules require a bit more computation and data structures knowledge

Default avatar.png rohit523: ohh okay

arkwaw: I still don't get how there can be only ~1000 inventory combination, someone mentioned that. If we have a,b,c,d each <=10 and a+b+c+d<=10

arkwaw: that is ~81754 valid combinations

Zenoscave: some aren't represented by the inputs

Zenoscave: *many

Icebox: wait what

Icebox: who's silver box

Default avatar.png rohit523: My logic for wood 1 was that i sorted vector according to price/moves and casted acc to that ... but is this the most optimal ?

Default avatar.png rwilson: arkwaw - interesting problem in itself ;) we start with 3 blue, but only have the 42 spells to do transformations with... so some combinations might not be reachable ( but then you've gotta expand due to extra tax income ;) )

arkwaw: i should assume that at some point i'll be able buy every single spell. Lets say pure green one Recipe(0, 0, 1, 0)

wlesavo: Zenoscave well now you rec me

arkwaw: with it and rest I can have all 0..10 greens

arkwaw: we also have pure blue spell, pure red

arkwaw: so still all combinations should be possible

emh: hmm.. I was printing too much. got timeouts because of it. I was limiting to 40 ms. so hot tip: don't print too much

Default avatar.png xSkyline: @rohit523 in the early levels you can (and should) beat the boss with whatever code is implemented the easiest.

wlesavo: Zenoscave oh, but still some timeouts in ide, or didnt you updated arena version yet? https://www.codingame.com/share-replay/504618067

Zenoscave: I did update

Zenoscave: still have a bunch of timeouts

Zenoscave: Might rework to table

wlesavo: dam

Default avatar.png rohit523: Ohh i see :sweat_smile:

arkwaw: i'll have to think about it

wlesavo: you didnt have this issue before right?

Zenoscave: Yeah. but sims were much lower

Default avatar.png rohit523: i actually complicated my code too much to beat players in arena

AntiSquid: my ifs dropped 200 spots tonight, people are aggresisvely improving

Default avatar.png rohit523: with trying to get an optimal approach

emh: I have a basic C++ sim just over 200 lines. getting 300k-1mill simulations of combinations of spells to reach a brew. hope it will get me to Silver

AntiSquid: lol

jamessizeland: flip!

AntiSquid: 300k-1mil ? sounds like gold tier at least

AntiSquid: /flip jamessizeland

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

emh: I don't think it's comparable to other people's numbers as it's not full sims

emh: just some hackish thingy

emh: so far

jamessizeland: I wonder how many permutations I'm searching... I'll check

AntiSquid: forums down?

PatrickMcGinnisII: emh, paths to all 5 brews are findable in < 400 nodes if you ignore rests... 300k sims? i don't see how or why

Default avatar.png Gedzius: guys do you know if there's a given element which tells how many potions has your opponent brewed overall ?

emh: PatrickMcGinnisII it was easy to think about and code that's why hehe

struct: 300k sims is possible

LastRick: Antisquid: Agreed, impressive amount of improvement. My code is leaps and bounds better than what got me through Bronze (head to head testing). I've hardly moved in the rankings.

emh: PatrickMcGinnisII interesting to hear that it can be done in so few "nodes"

emh: though

motty: A game that required deep lookahead would have implications for which languages were feasible.

PatrickMcGinnisII: 1 brew alone is findable in <80...do all5 at once...<400

PatrickMcGinnisII: top bots total game lengths are <40

SirLoxley: Is anyone else experiencing timeouts in battles ... and then when loading the params there's no timeout anymore? (Java)

llllllllll: yep

PatrickMcGinnisII: 40 turns

emh: damnit. fell below Bronze boss in my current submit. had a long loss streak

emh: hope it will pass

llllllllll: but for me its not timeouts, it crashes somewhere, since I don't get any error messages its hard to find

jamessizeland: I was until I put time timing limits in

LastRick: I've seen it in dart too. Timeout in the Arena, take it to IDE and its not there. A little annoying.

SirLoxley: A bit hard to fix to be honest.

raymoo: in haskell the timeouts I experienced were generally reproduceable

Default avatar.png rwilson: Gedzius - no. you'll have to figure out they brewed by noticing their score went up from last turn.

llllllllll: is there any way to get an error message at runtime? (C++)

Default avatar.png Gedzius: rwilson - ok thanks

raymoo: run yourself as a child process and read output(?)

PatrickMcGinnisII: top bots seem to be doing best first searches...at maybe 20k nodes ... someone tell me if I'm wrong?

llllllllll: I do not have a local env set up

Counterbalance: try / catch will catch some of them

Default avatar.png Gedzius: rwilson - wait there's isnt something that tells me about opponents score or am i missing something

llllllllll: ah, good idea... im so dumb not to consider that, lol

AntiSquid: LastRick what is your stable rank ?

Default avatar.png rwilson: Gedzius - input gives you both players INVENTORY & SCORE on same lines --- yours is always 1st, enemy second

SirLoxley: what annoys me even more with these timeouts ... each and every IDE replay ... I won :/

LastRick: Squid: Around 75% silver, so currently ~1000

Default avatar.png Gedzius: rwilson - yea could you tell me the elements name. Is it actionCount ?

llllllllll: its the second iteration of the loop

llllllllll: after the "items"

llllllllll: (you are first, enemy second)

Default avatar.png Gedzius: ah shit what language are you coding by

Default avatar.png Gedzius: in python its action_id, action_type, delta_0, delta_1, delta_2, delta_3, price, tome_index, tax_count, castable, repeatable

llllllllll: C++ and python

llllllllll: the enemy score, etc comes after those

Counterbalance: llllllllll segfaults aren't shown in the ide; you can trap SIGSEGV but that won't help much so you're better off running the bot locally in that case

Default avatar.png Gedzius: oh so do i need to ask for another input (this is my first real challenge)

llllllllll: ah, right... I tried the trap, but it didn't really work, so I'm switching to local testing, thanks!

GiraffeKing: Do we get some input that tells us the other witch's last action?

motty: Serious kudos to anyone doing this in not-a-scripting-language. Debugging must be srsly hard.

Counterbalance: F5

GiraffeKing: Doing it in C# and debugging has not been so hard.

GiraffeKing: Just a ton of Console.Error.WriteLine() when things don't do what I want, and then examining the output.

llllllllll: but its sometimes hard to debug that one function that runs 23k times a round :P

emh: 1st yay. in Bronze. hehe :p

GiraffeKing: Welcome to Silver, then!

emh: thank you :D

GiraffeKing: The top bots in here are pretty smart. I'm not sure I can even come close to the top 500.

llllllllll: my bot is very dumb & I was around 600 before I messed up my code... so it should be possible :P

AntiSquid: it's Tuesday and there are 6.1k nearly ... geez this contest is big

arkwaw: oh shit i got it

arkwaw: why we have so little combinations ;)

arkwaw: thanks

GiraffeKing: I thought my bot was kinda smart, but it's not thinking very many steps ahead. It doesn't know how many steps away any brew is, it just knows which one has the best gain/cost ratio.

GiraffeKing: So, I think it might actually be pretty dumb.

Default avatar.png rohit523: giraffe which league?

GiraffeKing: Silve

GiraffeKing: Silver

Default avatar.png rohit523: hmmm

Blend-77: lol I just got into wood 1 I just started today tryna maker an algorithm to do spells :D

Default avatar.png rohit523: same lol

Blend-77: make a*

AntiSquid: you can do top 500, even top 300 for sure, the hard part comes this weekend :P

AntiSquid: GiraffeKing

Blend-77: I mean I made one to take all possible actions and depict the best one

Zaphus: Giraffe - mine is similar, only looking 3 moves ahead, still good enough to keep me in the top 250 for now

Blend-77: shouldnt be too hard

GiraffeKing: I donno, this is the first bot I have ever written, so I am not sure I'll get too much better than 1,000. I'm gonna start thinking about trying to make it figure out how many steps away the brews are and use that number to determine which brew is best to go after.

SirLoxley: how long does it usually take before any new submission can be considered somewhat stable concerning rank?

LastRick: Same here. First contest ever, just happy to have made it to Silver.

LastRick: I can put that on the resume now, correct?

GiraffeKing: SirLoxley ; it feels like half an hour

Default avatar.png rohit523: lol is there certificate for this xd?

LastRick: HAH

GiraffeKing: My last arena test was 34m ago, and I am 63% done battling.

LastRick: I was under the impression you can leave the arena before it is done and effectively it keeps testing it. Is that so?

GiraffeKing: Yes.

LastRick: Good. Who has the time to sit through that?! :)

GiraffeKing: Nobody. Seriously, at this rate my current run will take an hour.

jamessizeland: yup just took an hour

PatrickMcGinnisII: better than yesterday... was twice as long

LastRick: which stinks. but i guess also a good thing, if i understand the veterans correctly, this contest has been much busier than the average contest

GiraffeKing: Well, it has the Koume and Kotake twins, so who can resist?

Blend-77: I think I know how to do it

PatrickMcGinnisII: K&K meth chemists

Blend-77: simulate the results of the spell and then check if it's the most optimal

Blend-77: perhaps.

LastRick: That's terrible, way off, dont do that

LastRick: :P

Blend-77: lol

Default avatar.png rohit523: 90% done and im rank 1 in wood 1.. what does it mean? i still came 2nd to some playerss lol

LastRick: it means welcome to bronze

Blend-77: lol

Default avatar.png rohit523: :joy:

GiraffeKing: It means the magic behind score likes you better.

GiraffeKing: I have seriously no idea how the score works.

motty: I have no idea how my wood 1 code got promoted to Bronze. It shouldn't have done.

AntiSquid: i'd pick dexter as my chemist, opponent can have both witches :P

Default avatar.png rohit523: Yeeahh lel

AntiSquid: (breaking bad reference btw)

GiraffeKing: Was it? I feel like if you were gonna reference breaking bad, you're want Walter, right?

AntiSquid: oh got shit mixed up hahah

PatrickMcGinnisII: these walter white mofos kicking my butt in 30 turns ... yea, wtf

Astrobytes: Gale was pretty shit hot too

AntiSquid: seen the boys btw ?

AntiSquid: the superhero one

Astrobytes: Not yet, still on the list

AbundantPuddle: Were you referencing Dexter from "Dexter?"

Astrobytes: Quite looking forward to it

AntiSquid: no . mixed up names from 2 different shows AbundantPuddle

AbundantPuddle: The first season was really good Astro

Astrobytes: Either that or Dexter's Laboratory

Default avatar.png JamesOConnor: Battle progress takes sooo long

Default avatar.png JamesOConnor: I just wanna rank up


AntiSquid: long day . had stuff to do

Astrobytes: Yeah I've heard AbundantPuddle

Default avatar.png JamesOConnor: You guys got any tips for the this contest? I think I might try it soon once I have finished the game I am no

Default avatar.png JamesOConnor: on*

Blend-77: shit gota do skewl -_-

Default avatar.png Redlander: i'm at wood 1; slightly better than the bot, but that seems to be enough :D

Majeck: How many people will get into Gold?

Majeck: I think 600 and up will

LastRick: It was 1000 for silver, right?

Majeck: I'm still not sure if my bot will be able to do it, sitting between 700-800

Majeck: Yeah about 1000 for silver but I think that was mostly a numbers coincidence

LastRick: You're really improving

Majeck: Not really lol

Majeck: Just sheer luck

LastRick: hah

Majeck: This same bot was in 900 yesterday

Majeck: So I don't know whether it faired better in the long run or everyone else got worse lol

LastRick: i'm basically staying the same, as more people come in, i slide back. ALways around 75%

Majeck: 75% what?

LastRick: 75% of the number of people in silver

LastRick: I said to Squid earlier I think peoples code is really improving

hbouillo: Yes, and that's the reason why we slide back a little all the time :D

LastRick: tell me about it!

mlemm: because you spend time chatting :D

LastRick: true

mlemm: jk, have a great day

hbouillo: I'm just here until my bot is properly ranked hehe

mlemm: what rank we talking about hbou

hbouillo: My best bot today got 115th, I'm trying to imrpove but it doesnt go past 300 right now

NinjaDoggy: submits can be pretty random :/

MattSOrme: Being impossible to debug constant random timeouts makes me just want to stop. So demotivated righ now

Majeck: MattSOrme

Majeck: I was having the same problem

Zenoscave: Same here

Default avatar.png rwilson: MattSOrme - have you added a 'bail out now i'm almost out of time' check yet?

RockyMullet: reaching depth 8, progress ! :D

PatrickMcGinnisII: try PHP, Whiners!

hbouillo: Timeouts are hard to deal with yep... I don't suppose there is any profiler tools on codingame?

Majeck: At the end of whatever loop/recursion whatever you're doing just check the time and return if it's over 45 ms or something like that

Zenoscave: don't check every time though check every 100th time or so

Majeck: I just get the best answer I can in that time and If I don't find anything I go to a "Plan B"

Zenoscave: time checks are slow

MattSOrme: yep. And ive set it agressively low. Like 25ms. And it still just freezes somewhere. My turns finish anywhere from 25.1ms to 60+ms

Counterbalance: garbage!

Majeck: Zenoscave just a few ns in C#

Majeck: You can doo +10000 in a ms

Zenoscave: Really? with Diagnostics Stopwatch? or are you using a diff method

Counterbalance: print the mem usage each turn and see if it's climbing and falling

Majeck: DateTime.UtcNow

Majeck: lol

dreadylein: Oo

MattSOrme: System.nanoTime and checking it at the start of every loop in my sim

GiraffeKing: My thing finishes at 15ms most of the time; 25ms at the most.

Majeck: I also heard they were slow but I looked it up and StackOverflow said they weren't thaaaat slow

MattSOrme: Also checked Runtime.getRuntime().totalMemory() and says i only have 60mb, instead of the 700+ im meant to

Default avatar.png rwilson: MattSOrme - start of loop, as in before or AFTER you read first line of turn input?

Zenoscave: Majeck good to know

MattSOrme: my startTime is set after first input is read

struct: Is DataTime reliable?

struct: I never usd it

Majeck: Zenoscave: https://stackoverflow.com/questions/4075525/why-are-datetime-now-datetime-utcnow-so-slow-expensive

Default avatar.png rwilson: MattSOrme - :( ugh, sounds like you're possibly hitting a garbage collection pause then ... since it sounds like you're on .. Java?

Majeck: "You can call DateTime.UtcNow ~ 14,000 times for a cost of only 1 millisecond!"

MattSOrme: any tips on how i ... don't hit GC?

Zenoscave: static global array and use ValueTuples

Majeck: Well DateTime hasn't failed me yet

Default avatar.png rwilson: MattSOrme - typically, you avoid NEW things ;) make a pool of stuff you want to use, or an array and use stuff from there..

Majeck: Plus after putting it in my main recursive loop it cut timeouts from like 20% of matches to 0

mlemm: anybody here using Bfs ?

jamessizeland: yup

mlemm: worth it ?

MattSOrme: hmm. thats gonna take a lot of re-write im guessing haha. Gonna have to restructure everything if i need to avoid every possible new

jamessizeland: working well enough

mlemm: i regret writing in C lol, but i did it to prove a point to somone

Astrobytes: Which point?

SirLoxley: give us a pointer

mlemm: if i can get some decent rank in few days

garrisonhh: int* p here you go

Remus_: *segfaults*

Default avatar.png HackingHues: lol.... submitted my bot. completely falls on its face from 700 to the bottom... lol. guess thats a good place to stop.

Astrobytes: that's a good place to improve

Default avatar.png Redlander: bronze league, here i come :)

LastRick: Luckily we cant go backwards

Astrobytes: congrats RedLander

Remus_: We can't? nice

MasterDuck: I have tried to improve my code, but it's too messy. Have anyone just given up and started from scrach, or do you just keep trying?

Remus_: I restarted 4 times now

LastRick: sometimes I try something, like Hacking, and splat it just fails miserably.

Default avatar.png RicksMLC: 3.5 times here

LastRick: master, I restarted completely for silver

Majeck: Me too

Majeck: But in Bronze

jamessizeland: always refactor as you go :p

Majeck: Deleted all my logic code and started again

Default avatar.png JamieSims: what language are you all using

LastRick: i think you have to. You couldn't predict what bronze or silver was going to be like, what would be important, so you have to start over every now and then

Majeck: Then realized I could use that code as a plan B in case of timeouts lol

Majeck: C#

LastRick: Dart

MasterDuck: ok, you are giving me some more motivation. I really want to come to gold this time. Thanks!

Default avatar.png JamieSims: Dart is the way for me

mlemm: ehm C

ParticleBeam: Dictionary of a Tuple of a Tuple of ints pointing to a List of Lists...I think I need to simplify this..

LastRick: really? You're using it too?

Astrobytes: don't give up MasterDuck, keep going ;)

Default avatar.png JamieSims: yeah im using dart

LastRick: wow, there's so few of us. Can I ask why? (Flutter developer here)

MasterDuck: Thanks, Astrobytes!

jomarko: Hi, please, does someone know what is the rule to proceed to the next league?

LastRick: no one knows, just try to get as high in silver as possible before tomorrow

Default avatar.png JamieSims: yeah haha thats why, ive tried messing round on flutter and thats the one i know the most about

numb3r5: You have to rank above the boss after all the battles are simulated, i think

jomarko: ok, fair enough, will do my best

PatrickMcGinnisII: jomarko full rules at bronze

Astrobytes: jomarko, you're in Bronze right? Be better than the boss as numb3r5 said. If you get in silver and want gold, you need to be near the top of the league

jomarko: yes, I am in the bronze one

Remus_: below like 30% again maybe

mlemm: anybody got an idea what is the highest rank can "if else algorithm" achieve ? just approximation

Astrobytes: jomarko: Cool. You need more points than the boss, that doesn't mean you beat the boss 100%, you have to be better than the other players for the most part

PatrickMcGinnisII: mlemm i got to bronze before i put in a tree

Astrobytes: Depends on your logic mlemm, there have been many people in Legend league in many games with "just" if-else

jomarko: Astrobytes: ok, lets see, simulation is at 50% and it is promising , I am the fifth in rank, but the end is far away still

Astrobytes: well, good luck jomarko!

Default avatar.png rohit523: rohit523 has not provided 1 lines in time. Is this message for timeout?

SirLoxley: yes

hbouillo: to our crash

SirLoxley: or crash

Default avatar.png rohit523: ohhkay

hbouillo: or*

Astrobytes: your submit looks fine, I think you're going to silver jomarko

Default avatar.png rohit523: ooo okay

mlemm: Astro, im thinking about re-coding with c++ because i failed to write a working bfs algorithm with c.

jomarko: Astrobytes: thank you, I found this challenge totaly randomly, but Like it totally

mlemm: the thing is i didn't use c++ for few months and im affraid im gonna take a long time to recode

hbouillo: mlemm Without any kind of simulation I don't think you can get into silver

mlemm: im currently at silver @hbouillo

Astrobytes: Just write C code with C++ advantages where necessary mlemm ;)

hbouillo: Oh that's actually impressive then mlemm !

mlemm: thanks guys, imma go for it good luck !

SelectNull: hbouillo - I'm in the silver withou sim. Just if-else

[CG]Thibaud: no need of sim for silver, even perhaps for gold

Astrobytes: jomarko: awesome! Hope you'll stay and play some multiplayer games after the contest (there are user-created games and most previous contests become multiplayers after the contest ends)

SelectNull: :)

hbouillo: That's good to know!

Remus_: can't find you mlemm :( wanted to see it

hbouillo: I didn't really do the if/else one, so couldn't really tell!

hbouillo: mlemm Nice school :grin:

Astrobytes: [CG]Thibaud that's nice to know, I think I plan to be lazy in this contest :P

SirLoxley: what's sim?

hbouillo: simulation

Astrobytes: A sim is just a simulated tick of the game

Astrobytes: So, apply a move, simulate the result

Astrobytes: tick == turn

Astrobytes: You implement the mechanics of the game and apply them when you try a move

garrisonhh: does anyone know how to turn off the code suggestion

garrisonhh: or can u not

Astrobytes: Don't think so I'm afraid, I know it's a bugbear for a lot of people

SirLoxley: just did. It's in the settings

SirLoxley: (Beneath leaderboard)

Astrobytes: "Accept suggestion on Enter key" ?

SirLoxley: having said that I don't use the editor. I am copy&past guy

SirLoxley: paste, too

Astrobytes: Pasta type myself :P

Zenoscave: I eat more paste than paste

Zenoscave: pasta*

Astrobytes: Yeah, that doesn't switch it off unfortunately

Zenoscave: I'll let you decide which i meant

Astrobytes: When I visit Sweden I eat more paste than pasta :thinking:

Zenoscave: Same in the us

Zenoscave: But I like cow hoofs

mlemm: i like water

Astrobytes: Hey, cow feet are cool. Well they were when I ate meat lol. Good ones are excellent incgredients. Just not in processed meat products.

Astrobytes: *ingredients

Zenoscave: I eat glue

Astrobytes: Fishbones!

mlemm: what's the most random thing you can eat

Astrobytes: Something you don't know about that someone you don't know just told you to eat.

mlemm: i eat lamp shades

Zenoscave: Given most edible things are uninteresting the chances are uninteresting

phord: I keep pressing ^S to save before I run and my browsers asks me where to save. :-( How do I untrain me or train the editor to stop this?

Zenoscave: If the random is uniformly distributed

mlemm: im no more hungry now thank you zeno

Astrobytes: lol Zeno. Not a food person then :D

Zenoscave: I love food

Zenoscave: But a hamburger is meant for eating.

mlemm: you said "Given most edible things are uninteresting"

Zenoscave: A lamp shade is more interesting though

Zenoscave: perhaps uninteresting is the wrong word

Astrobytes: Heh

mlemm: i recently pickedup a habit on eating 2 apples a day

Astrobytes: "statistically unusual in the group of eaten substances"

mlemm: and man it really changes a lot

Zenoscave: A thesis

Default avatar.png SpaceMoehre: does this website have a dark theme?

Zenoscave: It has a light?

mlemm: i think yes since im using one

Zenoscave: I forgot

Astrobytes: ^

Default avatar.png RicksMLC: "Settings"

mlemm: define us "dark theme"

Default avatar.png RicksMLC: over there <----

Zenoscave: play my code? RicksMLC

Default avatar.png RicksMLC: Zeno: I would if mine was working right now

Default avatar.png RicksMLC: I am 0.5 of the way into refactoring for the 3rd time

Default avatar.png RicksMLC: *sigh*

mlemm: take a deep breath it helps

mlemm: im going to recode mine too the next morning

Zenoscave: but not too many too fast

Zenoscave: that's hyperventilating

Astrobytes: Well, good luck to you all, I bid you goodnight.

Zenoscave: Gn astro

Default avatar.png RicksMLC: g'night

mlemm: goodnight Astro!

mlemm: im leaving aswell best of luck guys.

Default avatar.png RicksMLC: Zeno: but but but, ... the sun just came up... again.

Zenoscave: It's 16:16 here

Default avatar.png RicksMLC: Actually Zeno, I don't know how to play your code

Zenoscave: wdym?

Default avatar.png RicksMLC: I am very new here (joined three days ago)


Zenoscave: Oh do you mean against my code?


Default avatar.png RicksMLC: Zeno: play my code? RicksMLC

Default avatar.png RicksMLC: I think so... I have almost some idea of what I am doing here

Zenoscave: use export mode under settings. it allows you to change your opponent

mlemm: click delete button bellow the bot avatar

Default avatar.png RicksMLC: ok...

mlemm: nvm he knows better

Default avatar.png RicksMLC: Ok I can select a new agent, but your name is not in the list?

Default avatar.png RicksMLC: I am in Bronze... so is that a limiting factor?

Default avatar.png RicksMLC: The list of agents only goes up to 999, and my current rank is 1,028

Default avatar.png RicksMLC: so... I dunno

Default avatar.png RicksMLC: Ugh I have so much dead/commented out code in here...

Default avatar.png RicksMLC: hard to move around

Default avatar.png JamieSims: very hard

Default avatar.png JamieSims: what code language are you using

Default avatar.png RicksMLC: c#

TimurSeitosmanov: is there a way to measure time in js in submitted solution?

SirLoxley: Rank 243/Bronze and I am out of ideas. Guess it's time to stop here

Braykin08: Look at your losses, see why you lost, improve. Are you getting too few spells, crafting the wrong potions, getting beat to a potion

LastRick: Seeing that -- getting beat to a potion -- a LOT more in silver

Braykin08: Guess I'll need to improve my REST efficency once I reach that I guess

ElderKamikaze: hey

ToshiTuringMachine: hey

ToshiTuringMachine: is really Response time for the first turn ≤ 1000ms ? i get timeouts at 500

ClockSort: I haven't pushed the limits of the first turn

LastRick: yeah, I was going to say the same thing. I pretty much always LEARN on the first turn (so hard to find a brew with the starting spells) that I never run out of time

ToshiTuringMachine: I guess it's dart language that has issues with datetime.now() . I am trying stopwatch now

MarekM: ToshiTuringMachine i am safe at 800ms in python in first round

ToshiTuringMachine: ty marekM

Majeck: What do you use the first turn for?

MarekM: and three seconds before first input :)

ToshiTuringMachine: not very much, get together potions and learnable spells to guess the fastest brew-in

MarekM: its not useful yet, but i try to precompute sth

LastRick: I am using Dart. I use DateTime to track my BFS. But like I said, the BFS is nearly pointless on the first turn, I checked every possible combination in 3 ms.

Recovery_disaster: Memo to me: pythons deepcopy is very slow ... wasted the last two days wonderung why I only get 500 BFS nodes in time -.-

ToshiTuringMachine: nice lastrick! and how many sims can you do in one turn?

ToshiTuringMachine: I am hitting 22k

Majeck: Do repeatable spells become exhausted after the turn?

LastRick: I cap my search on time but yes over 10k

Majeck: I know I can use them several times in the same turn, but after that do they become exhausted

ToshiTuringMachine: yes they do majeck

Majeck: Thanks

Majeck: Redesigning my main recursive method to account for repeatable and castable lol

Samer: Majeck I think you can use them once in a turn, but with a multiplier parameter (if your inventory can afford it)

LastRick: That must be why you're beating me, majeck, using that repeatable

Majeck: Not yet

LastRick: me neither

Majeck: If I had to guess I'd say I'm beating you because I explore more possibilities

Majeck: around 60-70k with 45 ms

Majeck: But the arena doesn't like me at the moment and got me from 730 -> 890 with no changes to my bot lol

LastRick: That's impressive! Wow.

Majeck: In any case I'd like to be sub-600 so that I can safely get into gold

Majeck: LastRick Yeahhh although it's a really simple recursive method

LastRick: I know Dart's not the best for this but it's my language and I want to see how far I can push it

Majeck: Don't even know what DFS/BFS is lol

ToshiTuringMachine: google it, its interesting

LastRick: Before codingame, I hadn't seen a BFS in I can't guess how long. But if you do a lot of the IN/OUT puzzles here, it becomes your best friend

ToshiTuringMachine: lastrick me too! are you flutter dev?

LastRick: Toshi: Yes

MarekM: Anybody Monte Carlo algo? :)

LastRick: HAH

ToshiTuringMachine: well don't fear me because i never win. and i already have the badge for language winner with dart

LastRick: Wtg

ToshiTuringMachine: if you don't c++ here it's very hard to get in legend

LastRick: ugh. thanks for the warning.

struct: There are more languages that will get legend im sure

Blend-77: I'm tryna do it all in python for an extra challenge

Recovery_disaster: C# and Rust is also strong

Majeck: What's flutter dev?

DreadY2K: Does the game show the number of potions a player has brewed so far?

struct: C#, Rust, java, maybe python

DreadY2K: I'd like to use that info, but I can't find it listed in the input

Default avatar.png Topjimmies: pretty easy to keep track

DreadY2K: I could track it myself, but I want to be lazy

Majeck: DreadY2K no, but you can use score

LastRick: my favorite is clash of code shortest. OMG try to play that in Dart. You cant even read the input before Ruby has you beat.

struct: Do if(currentScore != previousScore) brewed++

DreadY2K: Hmph, I guess I can track changes to score

DreadY2K: I wanted to be lazy and read it in, but I guess this works

ToshiTuringMachine: yeah lastrick, dart is not fit for golf

LastRick: Majeck: FLutter is googles multi-platform app/web development (Dart is the language it uses)

ToshiTuringMachine: but js is pretty good and very similar to Dart

Default avatar.png Topjimmies: the final rule changes the time allowance to 5ms instead :joy:

ToshiTuringMachine: final rule change? don't scare me

Default avatar.png Topjimmies: better get to work on that Neural network solution

Majeck: No oh god

LastRick: hah

Majeck: I already feel so constricted with it being 50ms instead of 100

LastRick: you have to pick one brew and hope you can snake a path there

ToshiTuringMachine: we should be able to steal opponent's spells....

Majeck: Or make spells have actions

Default avatar.png Topjimmies: you can only steal uncastable spells

LastRick: that OR I thought when we were still in wood and you could see the opponents cast, I thought we were going to be able to do things to their inventory

Majeck: Imagine how cool a "Swap inventories with opponent" spell be

LastRick: yeah, like tha

ToshiTuringMachine: yeah cool

Majeck: Or Freeze Opponent for 3 turns

Default avatar.png Topjimmies: destroy target brew

Arzugar: Or steal ingredients of something like that

Majeck: Yeah

Majeck: Would make it much more heuristic based

Majeck: And a lot less sim based as is know

LastRick: Not that I don't like this game (I certainly do) but yeah, some of these ideas would have added a different aspect. DO I just make brews (play offense) or do I attack my opponent?

Majeck: I've gotta admit this contest is heavily penalized to if/elsers

LastRick: Majeck: IF/ELSE Fan CLub President, apparently

Default avatar.png EnzoAbalos: hello

Majeck: Like I don't even think you can get to silver without doing some sort of sim

struct: well as a pro, the game is very simple to simulate

Default avatar.png Topjimmies: I got to silver with 2 turn sim

Majeck: LastRick in all other contests I've been able to squeeze into Silver with just simple if/elses

Majeck: Not this time though lol

LastRick: i agree. I think to escape bronze I needed at least a few steps of search

Majeck: Got a headache even thinking about how to choose a spell without simulating all possibilities

Majeck: struct yeah, I'm jealous of you all using bitmaps and stuff

ToshiTuringMachine: fitness function

LastRick: learn about a bfs queue, it'll do that heavy lifting for you.

struct: im not using bitmaps

struct: and I get quite a good ammount of sims

Default avatar.png Topjimmies: I just see if you can brew after a cast and otherwise choose a random cast/learn

Majeck: Do you use int arrays?

struct: 1 int to store 4 igredients

LastRick: Majeck: That is what your question back in bronze was about.

LastRick: how to store all the ingredients as one

struct: but before i was using 4 int8_t

Majeck: I've been puzzling on how to use a single int instead of an array for days

Majeck: Doing so would speed things up immensely if I could use binary operators

Arzugar: And here I am, using python when you are trying to store 4 int in one to optimise your code

Default avatar.png Topjimmies: same

Majeck: lol yep

LastRick: I think i understand how to hold all four inventory spots in one number. What I can't picture yet is how to know if that one-number inventory is good enough to cast or brew

struct: to subtract ingredients from another

struct: i can just do int a - int b

Majeck: I mean I figured out you could use 4 * 5 bits

struct: instead of a[0] - b[0], a[1] - b[1] ...

Majeck: struct YOU'RE A GENIUS

struct: lol

struct: im not

struct: This was someone else idea in chat

Majeck: Oh ok

struct: And I think more people are using them

Majeck: Wait

Majeck: omg

Majeck: I could totally do that

Majeck: Just use 4 * 5 bits

Majeck: And use the 5th bit to test for negatives

Majeck: Will try to do some simpler stuff before though

struct: well I use 7th bit

Icebox: just hardcode every state Omegalul

Majeck: Like acknowledging my opponent's existence lol

struct: which is simpler

LastRick: Are you going to try to sim them too?

struct: and to check for negatives I just do an &&

struct: &

Icebox: wait my mod icon is gone again

Icebox: reee

struct: again?

LastRick: is that bad? or good?

Icebox: yes

LastRick: hah

Arzugar: :joy:

Icebox: yesterday they did some form of restart

Icebox: which made it dissapear

Majeck: so 7*4 and you store them in a simple int32 struct

struct: actually 8x4

struct: Because the 7th is the "8"

Majeck: Ohhhh

struct: I started counting from 0

Majeck: lol

Majeck: Oh and if it's invalid it'll just under/over flow to the next and you'll know something is wrong

LastRick: did they decide they no longer needed you on the mod team?

Majeck: That's genius!

Icebox: LastRick no, it's a visual error

LastRick: oh. I was hoping it involved something nefarious you had done

mojojojo: does the price include the urgency bonus?

Icebox: well yes, that too of course. I've been secretly hacking into their servers and stealing code from top players

Default avatar.png rwilson: mojojojo - yes

mojojojo: okay

Icebox: funny story regarding doing "something nefarious"

Icebox: my first contact with the CG team

Arzugar: Yes, story time !!!

Icebox: was an email from them asking me whether I've been botting on clash

LastRick: :astonished:

Arzugar: and, you were ?

ScriptKiddie0101: i will hack you all :rage:

Icebox: there was a huge problem with CoC

LastRick: hahahah

Icebox: where there were 3 or 5 guys

Icebox: who made perfect CoC solvers

ScriptKiddie0101: hack me if you can :rage:

Icebox: and could submit in 1 sec every single clash

ToshiTuringMachine: thats nefarius

Icebox: at the same time I've been trying to reach rank 1 on CoC leaderboard

LastRick: and pointless

ToshiTuringMachine: put a random wait on it lol

Icebox: and while i didn't "bot" I had my own clash database with solutions for every single clash in case of shortest

LastRick: oh yeah, you're pretty high i see

Icebox: and they noticed that very quickly :D

Icebox: that was like 3 years ago

LastRick: interesting

LastRick: so they had picked up on the fact you were using repeat code or using code quickly, i guess?

Icebox: no idea how they noticed it

Arzugar: And, so, that database, how can I get my hands on it ? Asking for a friend.

Icebox: Arzugar the amount of clashse since then have probably quadrupled

Icebox: clashes*

Icebox: so it's useless now :D

Arzugar: hoooo, so sad

Icebox: but I have to say

Icebox: I've been speaking at that time with some other bot devs

struct: I remember seeing a website with all the solutions

struct: for shortest

struct: Was it yours?

ToshiTuringMachine: disgusting

Icebox: no, I never shared it struct

Icebox: I actually apologized directly after the email for pasting solutions for some clashes and took a couple month break from CoC after that

Icebox: then still got top 10 legitimately in 2019 :p

Icebox: but man, decay sucked back then

Icebox: now it's bearable

LastRick: its different now?

Icebox: yeah they changed it

LastRick: slower i take it?

struct: Back when I played CoC, I knew most of them by hearth

Icebox: yeah struct, that's legit the trick :D

struct: It was disgusting

Icebox: basically at some point they start repeating

struct: I only saw first line of inputs and output and knew the answer

Icebox: there were some clashes

Icebox: that you could solve in 5 seconds legit

struct: true

Icebox: especially in shortest

LastRick: Stop by the contribution page and check them out, they never stop coming.

struct: while(N--)

Icebox: or struct

Icebox: 1 million question

Icebox: DNA replace code

Icebox: do you know the shortest code for that?

Icebox: :D

struct: What was it like the question?

Scorpio69t: hello,world

struct: hi

Icebox: atp to adp or something like that

Icebox: there was an 8 char solution in bash

struct: There were some crazy bash solutions

struct: that I memorized at the time

struct: Just to solve the problems

Icebox: there was also a famous one

Icebox: print<*64>

struct: `seq 1 2` or whatever it was

struct: Something like that

struct: `dd` ...

NoobCod3: guys I'm coding with my mechanical keyboard and my hacker mask LOL in the Clash Of Code

struct: something

struct: But I learned a few dirty tricks from CoC

NoobCod3: and i have 2 computers

Icebox: oh sorry I meant

NoobCod3: but the other one isn't charged

Icebox: DNA to RNA

Icebox: that was the task

Arzugar: I mean, now, if you really wanted to, you can maybe do a bot who would play and lose his firsts games and steal others players solution, and by playing multiple games at the same time, maybe it would be possible to know them all.

Icebox: the code was `tr a u` or something like that

Icebox: :D

AbundantPuddle: Yeah, CoC is good for picking up dirty tricks that would generally be frowned upon.

Icebox: AbundantPuddle tbh I found a very good use for CoC

NoobCod3: could anybody teach me how to code in Python 3?

Icebox: and it's to get comfy with a new language

Icebox: if you can win all fastest clashes with a language you're pretty much good to go

Icebox: without switching

Icebox: it made me learn like half of C++ standard library

Icebox: once I tried playing CoC with C++ only

struct: you learned c++ on CoC?

NoobCod3: I NEED SOMEBODY TO HELP ME CODE

NoobCod3: IN PYTHON 3

NoobCod3: PLZ

Icebox: I wouldn't call it learning

NoobCod3: srry caps

LastRick: I completed the entire Clash tree on the home page with Dart. I consider that my crowning achievement on this site.

AbundantPuddle: Oh yeah, I mean I actually really like CoC. But there have been quite a few times where I won and genuinely felt bad because others were following good practice. That being said, I also have viewed others' code and discovered some nifty little tricks myself.

ToshiTuringMachine: wow gg LastRick

Icebox: I trained my skills that I learned using CoC struct

ToshiTuringMachine: I never completed that

AbundantPuddle: I wish everyone just shared their code by default however, because there have been some matches where I was dumbfounded by the #1 spot, and couldn't view their code.

LastRick: The toughest part is definitely winning 3 in a row.

LastRick: yeah, people dont want to share because they're probably trying to get to the top. I often dont share because i know no one wants it :)

Icebox: struct, especially if you're not learning your first language and you restrict yourself to it, you might have a feeling how you'd do it in a language that you're familiar with... then you think is there a similar function in that language as well? Makes you learn the in-built functions

ToshiTuringMachine: you cannot force people to share

Icebox: tbh CoC is the sole reason I could probably list all in-built functions of Python in a beat :D

Icebox: also you learn to read code from other languages

Icebox: maybe with exception of bash and perl :D

AbundantPuddle: Yeah, if I don't complete the challenge in time, I won't share. Otherwise I'll share. At the very least, people could use it to see how not to code. xp

LastRick: hah

Majeck: I always share except for shortest

Majeck: I used to play CoC for years only in C#

Icebox: shortest is the only type where it matters :D

LastRick: makes sense in a way

struct: I share it even if I use ruby and bash in the same language

Majeck: The amount of tricks for golfing in C# that I learned are insane

Icebox: true

struct: `tail -1`

Icebox: you get to learn the language in a completely different way

struct: p`dd`[2..].stuff

ClockSort: what's the best language for CoC golfing?

struct: bash perl ruby python javascript

struct: on that order maybe

struct: javascript is not great though

Majeck: Once I discovered the golfing competitive puzzles a few weeks ago I'm like top 20% in all of them thanks to C# lol

LastRick: of the top 3 you listed, ruby is probably the one i see the most in coc

Icebox: +1 struct

Majeck: Love ya C#

Icebox: LastRick you would never with with ruby against someone who is skilled with bash or perl

Icebox: it's just not that many people

Icebox: who can do that

LastRick: exactly

Majeck: I think bash doesn't even let you multiply

Majeck: it's crazy

LastRick: WHAT!?

Icebox: and even then

Icebox: as much as I learned

Icebox: about golfing

Icebox: and python

Icebox: there are people who are on a completely different level

struct: ^

Icebox: for example

Icebox: Thor

Icebox: right now (after the update)

Icebox: I have a 74 char submission

Majeck: No wait, I think I was thinking of another language not sure

Icebox: which puts me at top #5 in python

Icebox: first place has 51 chars

Icebox: which is

Icebox: like

struct: Nice I have one char less than you on temps with perl IceBox

phord: echo $(( 6 * 7)) 42

Icebox: struct I never worked on temps

Icebox: never worked implies never tried reverse engineering test cases that is :^)

struct: Never did that too

struct: to much work

Icebox: yeah but that's the only way

struct: 47-perl, 48-ruby

struct: with legit solutions

struct: legit if you count running bash on ruby

Icebox: huh

Icebox: holdup

struct: :D

Icebox: lol

Icebox: I looked up my pash solution

Icebox: bash

Icebox: perl -e'...

Icebox: oops

Icebox: :D

ToshiTuringMachine: guys why you like golf? it makes you learn how to reduce chars... totally useless in real jobs

DreadY2K: It's a fun challenge, even if it isn't directly useful

struct: its for fun

ToshiTuringMachine: and golfed solutions are usually awful

Icebox: ToshiTuringMachine why do you learn chess? it's uselss in real jobs as well

struct: I dont do everything to get jobs

ZarthaxX: you do it to get chicks

Default avatar.png rwilson: Though, golfing also makes you understand your languages better - usually to understand WEIRD issues and spot things to avoid

ToshiTuringMachine: hi ZarthaxX

Icebox: brings your pickup lines to a whole different level

ToshiTuringMachine: find me a girl who understand code golf i will marry her

Icebox: when you put everything on the same line to save chars

Icebox: kappa

ZarthaxX: HI ToshiTuringMachine

Icebox: another fun story

Icebox: there are other websites

ToshiTuringMachine: yeah... story time

Icebox: that have golf

Icebox: the difference in some however

Icebox: is they don't count whitespaces and newlines

Icebox: so that you don't have to completely fuck your code up

Icebox: so big brain me, just made a string full of whitespates representing 0 and newlines representing 1 and encoded full solution in binary

struct: also some count bytes

struct: lol Icebox

Icebox: ¯\_(ツ)_/¯

ToshiTuringMachine: wooow icebox. pretty cheater

Icebox: another fun solution for some tasks is resubmitting code

Icebox: that outputs valid but random solutions

Icebox: err actions

Icebox: that could be potentially shorter than solving the task

struct: so you submit until you get lucky?

Icebox: and one in maybe a couple of hundred will pass all test cases

Icebox: yes

Icebox: I know there are people who have done it on thor

Icebox: there are only 4 validators

LastRick: about to say that, i think thats how to pass thor here

Icebox: so it takes like 300 submits

Icebox: which isn't that much

Icebox: LastRick the thing is, remember me saying the 51char solution is insane?

Icebox: python doesn't support randomness without importing it

LastRick: yep

Icebox: so importing alone is pretty much as long as the solution :D

Icebox: http://chat.codingame.com/pastebin/b7e50407-f144-4ae2-9607-a761609d7a98

Icebox: that alone is like 40 chars

Icebox: and that's without print()

Icebox: dude I'd sell my newborn to find out how he did it :/

Icebox: ok maybe not that

Icebox: but still

Icebox: ANOTHER FUN STORY

Icebox: I remember talking with a buddy like a month ago

Icebox: how thor could be solved

Icebox: with like this insane amout of chras

Icebox: chars*

struct: I never figured how to reduce thor code

Icebox: and we legit considered using LRZ which is munichs largest computer center with supercomputers etc. to bruteforce every legal code that compiles under 52 chars

Icebox: maybe write a scientific paper about so that my uni lets me do that

Icebox: but hey

ToshiTuringMachine: i think they should erase all solutions and add some validators so the random-cheaters would not win

Icebox: ToshiTuringMachine ok you're about to be really dissapointed by this

Icebox: but that would legit

Icebox: break everyone's code

Icebox: not only random guys

Icebox: since top guys have reverse engineered all validators we legit don't read input fully

ToshiTuringMachine: they just resubmit

Icebox: nonono

Icebox: you don't get it

Icebox: the top solutions are specifically for the 4 validators

Icebox: one example for thor is

struct: My code doesnt even go north

Icebox: yeah

Icebox: for example that

Icebox: except it's west

Icebox: err east I mean

Icebox: no, west

struct: isnt it north?

Arzugar: South ?

Icebox: nope

Icebox: 2nd validator is north

Westicles: Golf could be easily fixed by adding a bunch of validators and making the paths to all the system calls 100 characters

ToshiTuringMachine: who cares? if the problem is hardcodable, it is not a problem and there's an issue with it

Icebox: how is that an issue?

Icebox: I don't understand what's the problem with creative solutions

struct: Golfing is not to be taken seriously

ToshiTuringMachine: the programmer must solve problems for all inputs (in real life) not for 4 validators

struct: Its for fun

Icebox: ToshiTuringMachine this isn't real life

Icebox: why do you keep comparing a game with real life

struct: Soon we need to check if the input is valid

struct: and does not break our code

Icebox: struct wdym?

struct: In real life we need to be carefull about what the user will do

Icebox: oh yeah

Icebox: I mean I don't get the whole idea of comparing a for fun activity with job environment :D

Icebox: but sure

struct: golf was never meant for it

Icebox: yup

struct: Doesnt matter if its 4 or 1000 validators

struct: Top code will always be a mess

Icebox: I'm not sure if I remember correctly

Icebox: but either on CG or some other website

Icebox: the top code was a call to a server

Icebox: which would return solution

Icebox: until the website dissalowed calls

Icebox: to external websites

Westicles: That was CG

ToshiTuringMachine: so since its a game its correct to hardcode solutions? CG rules state clearly that you can be banned

struct: I think it worked on cG

Icebox: yeah

Icebox: ToshiTuringMachine what?

Icebox: banned for what?

Icebox: I would love to see that rule

Icebox: can you link me the source from where you got this?

Westicles: The official position is anything goes. It is in a forum post

Icebox: yeah I'm quite concerned with the pure missinformation coming from you ToshiTuringMachine

Icebox: you can NOT get banned for hardcoding anything

Icebox: in no way or form does that hurt anyone

struct: Everyone can do it

struct: is fair game

ToshiTuringMachine: By participating in a CodinGame Contest, all Participants shall refrain from cheating, faking, thieving identity or any other technique to change the result of the Contest. 

Icebox: a) those are not contests

ToshiTuringMachine: "misinformation"

Icebox: b) hardcoding isn't listed

struct: lol

Icebox: yes, you're spreading missinformation, the fact that you can get banned is a blatant lie

Majeck: Yeah hardcoding is allowed for code golf

sadakatsu: Hardcoding is not the same thing as using a solution you found somewhere else.

ToshiTuringMachine: for me it still is cheating. if you get fun cheating you are not a programmer, just a hacker who destroy other people self esteem with your tricks.

ToshiTuringMachine: but hey, your style of fun. do whatever

sadakatsu: Funny, the lead programmer at Big Huge Games once said that actual programmers cheat all the time, including on academic tests and projects. I strongly disagreed, but the severe difference in those opinions amuses me.

Skynse: Imagine cheating

Icebox: "Cheating generally describes various actions designed to subvert rules in order to obtain _unfair advantages_." Since we already made clear that it's perfectly fine to hardcode, how is that an "unfair" advantage?

Icebox: definition taken from wiki

Icebox: there is no rule against hardcoding

Default avatar.png JamesOConnor: You are right

Majeck: I mean I don't like hardcoding nor am I in favour of it

Majeck: But if it works it works

ScriptKiddie0101: what is hardcoding?

struct: I dont get why people are taking code golf seriously

struct: I even hardcoded CvZ

sadakatsu: `int random_integer() { return 4; }`

Majeck: if(input == "a") print("b") else if (input == "b") print("c")

struct: Its stuff that no one cares about

Icebox: ScriptKiddie0101 instead of writing the code that solves the problem you wrote code that solves the specific cases that test your program

Majeck: Yes

Default avatar.png Rodrigo_the_coder: print("Help me")

sadakatsu: Technically, hardcoding is an important part of TDD. You WANT to hardcode until you can actually produce a test that breaks any possible hardcoded solutions.

struct: http://chat.codingame.com/pastebin/8db050e3-68b9-4a9d-b427-425d8a00a4f6

Icebox: imagine if I were to test you if you know what is 9x9 and 2x5. You could learn how to multiply or you could learn the answers to those two questions

struct: That is from CvZ

Default avatar.png rwilson: can we let world chat go back to contest talk & shenanigans? CG says 'MEH' about hardcoding : https://www.codingame.com/forum/t/rules-of-the-code-golf-and-optimization-challenges/187258/5

struct: Its 500 lines of that

struct: I have 454 prints

struct: for 21 validatosr

Default avatar.png Rodrigo_the_coder: any idea for cvz in python

Icebox: struct, correct me if I'm wrong but 2048 can be _fully_ hardcoded, right?

struct: too many validators

Icebox: is it tho?

struct: yes

DomiKo: yes

DomiKo: I guess you can't reach 4Mln

DomiKo: with full hardcode

Icebox: hmm

struct: I think somone said 7

struct: on discord

DomiKo: sorry

DomiKo: 14 mln

DomiKo: not 4

Icebox: interesting

Icebox: haven't tried 2048 yet

Icebox: but I thought about whether it would be possible (file size wise)

NoobCod3: guys

NoobCod3: I'm on my second computer

NoobCod3: I'm on both of them

NoobCod3: LOL

struct: oh well, it was fun

struct: Im going to sleep now

struct: gn

Icebox: :wave:

Icebox: gn

DomiKo: gn

Majeck: I hate how "Fixing" my code just plunges me further down the leaderboard lol

NoobCod3: OOF

NoobCod3: guys join CLASH OF CODE

NoobCod3: plz

Default avatar.png RicksMLC: "Software development is an evolutionary process - sometimes a meteor is involved."

NoobCod3: l need someone to help me learn Python

LastRick: Majeck I try something that I think will surely make it better ---> drop to bottom

Majeck: I know right!

Icebox: NoobCod3 that's quite the bad timing since everyone is working on the contest

Icebox: you do have enough materials online to learn everything by yourself

NoobCod3: BAD TIMING?

NoobCod3: AND WHAT CONTESt?

Icebox: correct

LastRick: I'll admit it, I just can't incorporate REST into the middle of a search. It looks like others are doing it, but every time I try to implement it, SPLAT

NoobCod3: the fall?

Icebox: Fall Challenge

Icebox: yes

NoobCod3: @Icebox can you help me learn Python 3?

NoobCod3: I am noob

Icebox: yes I can

NoobCod3: like right now

Icebox: step 1: https://docs.python.org/3/

Icebox: read this through

NoobCod3: hold on

Majeck: Hahahhahaahahha

Majeck: =D

Icebox: then you can ask me if you have any questions

NoobCod3: ok im gonna read it rn

NoobCod3: tutorial?

Icebox: yeah you can start from there

NoobCod3: ok

Default avatar.png Mr_Robooot: are there any high ranked people in the silver league with only 'if else' statements?

Majeck: No

Icebox: depends what you mean with high ranked

Majeck: Everyone's doing sims as far as I know

MadAsAJazzer: ah yes, those things I definitely know how to use *furious googling ensues*

Majeck: simulations

Default avatar.png Mr_Robooot: :( well i guess i should rewrite my code all over again now

MadAsAJazzer: oof :/

LastRick: i would think it would be nearly impossible to pass silver without a BFS or similarly search. You have to figure out how to get to the big prizes even when they are many steps away

Majeck: Exactly!

Icebox: disagree

LastRick: i'm listening

Icebox: functional programming can get you to legend here

Icebox: if you see all spells as mathematical operations you can "solve for" the spells that you need to cast

LastRick: oh i thought you were disagreeing about needing to when the big prizes

jrke: in this contest you can many things simulation,GA,BFS,etc

LastRick: i agree, just pick the tool you feel comfortable with

Icebox: I disagree about search

Icebox: I think math gets here far

LastRick: sorry for the confusion then

phord: 4-dimensional math with small domains.

LastRick: i just mean you can't win by trying to be the first to six

Default avatar.png ndosm: sorry what does GA stand for?

Icebox: Genetic Algorithm

Default avatar.png ndosm: thank you

jrke: Genetic algorithm

Icebox: precisely phord

Icebox: imo if you implement that cleanly that could potentially be stronger than simulating the game

jrke: Boxy you were first at one moment right?

MoMaT: NoobCod3, f you know some other programming language and trying to pickup Python, see this: http://hetland.org/writing/instant-python.html

Icebox: yes jrke

Icebox: I'm not submitting my code rn tho

Icebox: I'll wait until legend opens

jrke: cool

jrke: i am also thinking to don't make submit until my bot in ide is 100% better than bot in arena

Icebox: as long as you're high enough to get promoted when new league comes out there is no reason whatsoever to submit

Icebox: top players tend to hide their codes till the last minute

Icebox: and just play millions of games offline with brutaltester

Icebox: to see if they are improving

LastRick: How silly

Icebox: quite smart tbh, if you're winning against everyone it's hard to improve your code

Icebox: if someone who has a better bot doesn't submit you can not find out WHY that bot is better

LastRick: its a game. Miss out on all the fun of this because you want to win? That's outrageous.

hbouillo: But on the same logic, you can't find out if others' bots are better than yours, can you?

Icebox: hbouillo that's what brutaltester is for

Icebox: also you can still play against others in the website without submitting

hbouillo: Does it allow you to play other people's bots?

Icebox: yes

hbouillo: LastRick it's a game, yes, but a competitive one :)

NoobCod3: =

LastRick: apparently

hbouillo: Also, Icebox, I don't know the details of GA, but from what I know it can't be better than a simulation, if the simulation is properly accurate, can it?

Icebox: oh you use both

Icebox: GA is just an algorithm to process the data from your simulation

hbouillo: What can GA add that simulation doesn't?

Icebox: simulation alone can nothing

Icebox: simulation just gives you data to work with

Icebox: simulation is not an algorithm

sadakatsu: Evaluating a GA solution requires simulation, anyway ^_^;

hbouillo: ^^^

Icebox: precisely

Poli2312: Hi

Poli2312: Im new i started coding today

Icebox: whether you process the information that you get from simulating the game using GA or something else is up to you

dreadylein: good luck and have fun

Poli2312: It look easy

hbouillo: Isn't GA basically simulating in a controlled-random way?

Poli2312: wait someone won

dreadylein: huh ?

dreadylein: well simulation is a part of ga if thats the question :)

Icebox: I think you're missunderstanding what simulation and what GA do

dreadylein: simulation or otherwise evaluting the fitness

hbouillo: I'm confused about GA, I'll need to do more research on it haha

Icebox: simulating does nothing else besides showing you what action leads to what state

Icebox: now how do you decide which actions do you wanna simulate?

Icebox: that's where GA comes into play

dreadylein: ga basicly mimics evolution, you create a opulation of solution , then add random changes, and cross them, check which has the highest fitness, rinse repeate

dreadylein: *population

hbouillo: Oh, I see the technical difference you put between GA and simulation

Icebox: you could use GA to generate populations of actions that will progressively get better, you could use monte carlo tree search to find a very good path that leads you to victory, you could use BFS to test ALL actions or you could use something completely different

hbouillo: And now I do agree that a GA algorithm could own the contest :thumbsup:

dreadylein: i doubt it :P

Icebox: in the end all of those algorithms just tell the sim what to check

Icebox: what to simulate

dreadylein: ga is a neat class, but nearly always there is something thats better suited

hbouillo: I doubht it'd be fast enough though

jrke: hbouillo you need good eval for that

jrke: and optimized code

Icebox: ^

Icebox: how many states can you simulate in 50 ms?

dreadylein: optimized code doesent help if you have a bad evalution ... i heard from soneone :P :D

hbouillo: Yeah the eval function is a critical point :D

dreadylein: iam terrible when it comes to crafting heuristics

jrke: i am getting avg 15k iterations for simulation per turn in 50ms depth5

dreadylein: and choose a algo that needs a REALY good one :D like a boss ^^

Default avatar.png kreska: i have a question are you guys frustrated when you debug soething for 5 hours because i have problem coping emotionally:D Right now im happy because i finally found the bugs but i was raging inside and outside

Icebox: welcome to the club kreska

dreadylein: no worries it gets better .. after a decade or two, then you realize you can anoy other people with it also ! :)

hbouillo: kreska usually "raging" out loud is what leads me to find the bug haha

Xenoid: I think GA is better for continuous games, not discrete ones

dreadylein: true

sadakatsu: It's a lousy club, since WE'RE members, but welcome anyways.

Xenoid: being off by one ingredient from the potion you need is not particularly close to being as good as being on target

Default avatar.png kreska: but i swear a lot this is my problem

sadakatsu: Same here. Any solutions?

Xenoid: so mutations are just going to destroy anything good about an existing solution

dreadylein: cant remember if there was a contest were ga was optimal

Icebox: CSB

Icebox: :)

dreadylein: no

dreadylein: people won with it

Xenoid: GA is good for physics-based games, I think

dreadylein: its far from optimal

jrke: CSB is evergreen

hbouillo: Well GA is probably the slowest way to solve any of the contests

Xenoid: vector math is probably better

jrke: you can use anything in CSB

Icebox: you can use NN in CSB

dreadylein: true and then get butchered by nns :P

dreadylein: csb was cool

dreadylein: afaik the top went

dreadylein: ga after contest

dreadylein: later minmax

dreadylein: then nns

hbouillo: nns?

Icebox: Neural Network

motty: kreska: this is the shape of things. been debugging my own crappy code for... more decades than I want to admit to... it never ends, it's just how it is. first you write the code, then you debug it.

hbouillo: Why the S

Icebox: Neural NetworkS

dreadylein: neural networks that were trained with reeinforment

hbouillo: haha

Batpapa: 15k simulations in 50ms? I can barely make 3k.. :'(

dreadylein: huh ..

Batpapa: I can even remember fighting someone doing up to 30k

Default avatar.png LLG: what's the tomeIndex of learned spells?

jrke: none it comes in you cast spell then LLG

Icebox: -1

Default avatar.png LLG: thanks for the help!!

Batpapa: 0 = bottom spell, ..., 5 = top

Icebox: for learned spells Batpapa

Icebox: for learned ones it's -1

Batpapa: sorry

Batpapa: surer

Batpapa: sure

Batpapa: Are you all here going for MCTS?

dreadylein: iam not

NoobCod3: hey guys wanna be friends or no?

NoobCod3: cause l want friends

motty: we're all friends here, NoobCod3 :)

Batpapa: dreadylein ok, what then? Just to have a clue on what people try :)

dreadylein: beamsearch

Batpapa: ok thx, finally it's all about heuristics, so always :p

Batpapa: *as

hbouillo: What's MCTS?

Default avatar.png LLG: when you learn a spell, do you pay the tax first or get the taxed ingredients on that spell first?

Default avatar.png LLG: I'm assuming paying first, right?

Xenoid: pay first

MoMaT: MCTS is another semi-random search algorithm, like GA.

Default avatar.png nemo_001: LCA

MoMaT: but it has some memory, and is particularly good in min-max style games.

Default avatar.png LLG: sounds interesting

dreadylein: mcts will converege to minmax given infinte time

hbouillo: Oh, I see

hbouillo: What does MCTS stand for?

Icebox: Monte Carlo Tree Search

Default avatar.png LLG: Monte Carlo Tree Search, I assume

hbouillo: Ah, yes, heard about that one!

Default avatar.png LLG: glanced over it yesterday while doing research, but didn't read into it much

MoMaT: in general, what you hear people calling "sim" here in chat, is really search + evaluation.

Icebox: ^

MoMaT: search generates the moves, and evaluation function helps you pick the best one.

hbouillo: Yes, that is why I was confused earlier when Icebox was explaining :)

MoMaT: often you would do both at the same time, incrementally adding next move and evaluating the result.

Default avatar.png LLG: what are some easier-to-get-into search algorithms I could try? atm I'm just writing the base game logic (generating a new state after executing an action)

MoMaT: so it feels like you play the game forward into the future,

Default avatar.png LLG: haven't gotten into the heuristics side of things

MoMaT: like you are simulating it.

MoMaT: the easiest is random search :)

MoMaT: you generate moves at random, and pick the best one based on some score.

MoMaT: it's obviously not the best, although people in the optimisation field argue till this day if you can really do better (No Free Lunch theorem) :)

Default avatar.png LLG: I'm thinking about generating all the states up to a certain depth

Default avatar.png LLG: then apply some sort of pruning somehow

MoMaT: if you want something smarter, I guess next is hill climbing, where you only generate improving moves.

Default avatar.png LLG: idk how time efficient that would be though

MoMaT: if you generate all the states that's exhaustive search, also know as brute force.

Default avatar.png LLG: also, since this is a simultaneous move game, I should generate my opponent's move at the same time, no?

hbouillo: That likely won't get you far in 50ms

hbouillo: (Talking about the bruteforce way)

Default avatar.png LLG: like, the process of generating a new state involves executing my move, and my opponent's

MoMaT: no, you can ignore the opponent until you start loosing games because of that.

Default avatar.png kreska: omg fun thing happen i just test my newest version of my bot and i found a guy that has identically thae same strategy lern the same spells cast exactly the same thing with exception of not using repeatability of the spell:D

MoMaT: in silver I doubt you need to worry about it as long as your won play is good.

MoMaT: in this game opponents play does not interfere with the state so much.

MoMaT: you both can take the same spell or deliver the same potion.

MoMaT: it's more a matter of targeting. you don't want to chase things you know your opponent will get first.

MoMaT: but I might be wrong, we see later in the contest if there is some nuance there.

Default avatar.png kreska: or maybe he sohow mimicks the oponent strategy? but he didnt use repeats. i need to think about it:D

pde-bakk: yeah the Sims 4 is a great game

MoMaT: I predict all the best bots will play in a very similar way. almost mirroring each other like kreska was describing.

sadakatsu: I think there will be more variety than that. The evaluation functions will make themselves known.

Icebox: MoMaT it's more about when the first different action happens

Icebox: if it happens early the rest of the game will be completely different

MoMaT: yes, that's true. order of delivery still matters.

MoMaT: but I expect that by the end of contest this would be figured out. best bots will go for the same trade-offs. we'll see :)

NinjaDoggy: how much memory does codingame give you again?

Xenoid: 768MB

NinjaDoggy: so you can have up to 2 X 10^8 ints?

NinjaDoggy: 768 * 1024 * 1024 / 4 ?

Icebox: bonk

Icebox: no hardcoding

Icebox: no precomputing

Icebox: bad NinjaDoggy

NinjaDoggy: lol

NinjaDoggy: nah was just wondering if I can create a decently large number of nodes

NinjaDoggy: or if I had to memory optimize my node attributes

Icebox: don't you need just 1001 :^)

NinjaDoggy: ahh of course ;)

Xenoid: A decently large number of precomputed nodes, you mean?

NinjaDoggy: nah not precomputed

NinjaDoggy: just pre memory allocated

Icebox: that's literally what precomputing means :D

NinjaDoggy: I guess...

NinjaDoggy: but I usually think of precomputing as doing something more intelligent

NinjaDoggy: than just being dummies there :P

MoMaT: preallocating != precomputing

Icebox: you need to precompute everything that you're preallocating

NinjaDoggy: ^

Default avatar.png LLG: what are some ideas to implement state evaluation? I'm thinking about factoring in current score and some sort of distance from recipes

NinjaDoggy: yea i'm precomputing them to zero though lol

Icebox: :D

NinjaDoggy: @LLG honestly I would give some ideas if I had any

NinjaDoggy: but I literally just use score + inventory * constant

NinjaDoggy: tier-0 = 1, tier 1=2, tier2=3,tier3=4

Default avatar.png LLG: I'm thinking

Default avatar.png LLG: since different recipes have different payout

NinjaDoggy: and then let the search handle everything else :)

NinjaDoggy: yea there's a formula to that

Default avatar.png LLG: maybe the recipe price can act as a coefficient

NinjaDoggy: recipe price = cost of parts

NinjaDoggy: +1 if there's 3 different elements

NinjaDoggy: and +2 if there's 4 different elemtns

Default avatar.png LLG: there is? I wasn't aware of that

NinjaDoggy: it's not explicitly told

NinjaDoggy: but people figured it out

Default avatar.png LLG: so there isn't really much merit to taking the recipe price into account, right?

Default avatar.png LLG: since factoring in your inventory state does basically the same thing

MoMaT: it's the same pretty much in every game LLG. state after move should be close to target (point giving) state.

MoMaT: for example, so you can measure the distance between your inventory and the orders.

NinjaDoggy: well... recipe price matters too

NinjaDoggy: for a few reasons:

MoMaT: it could be just difference and items, but that's approximation. the best would be a number of moves to reach it.

NinjaDoggy: 1:recipes with variety do give a slight +1 or +2 bonux

NinjaDoggy: 2:there's a +3,+1 bonus for recipes at the start

NinjaDoggy: and then the main reason is to cash out and make space to generate more stuff

Xenoid: ouch

Xenoid: I won 26 of the first 28 this submission

Xenoid: and then lost 10 in a row

NinjaDoggy: :(

NinjaDoggy: resubmit time?

hbouillo: Xenoid Rude haha

MoMaT: then you need to consider the radeoff between the distance and the reward, and decide to make more moves to get higher price.

jrke: Xenoid happens a lot

NinjaDoggy: idk if 10 in a row happens a lot lol...

MoMaT: ...or take the first "quick" order, e.g. because you're already ahead.

phord: The bonus is added in to the recipe price, too, so you can ignore the bonus unless you're counting the chance of getting it first.

Default avatar.png LLG: > the bonus is added in to the recipe price

Default avatar.png LLG: does it mean if a recipe is 17 + 3

Default avatar.png LLG: recipe.price is 20?

Default avatar.png LLG: and recipe.tomeIndex is 3

Zenoscave: yes

Default avatar.png LLG: I see

NinjaDoggy: ok if i'm ranked 56 rn is there a point to submitting?

NinjaDoggy: like do I just wait for gold tomorrow then submit?

Icebox: not really

Icebox: wait till gold

Zenoscave: gold is tomorrow!?

NinjaDoggy: yea

Icebox: yea

hbouillo: Yes

Zenoscave: I'm losing track

jrke: gold is today i think

NinjaDoggy: yea depends on time zone i guess

NinjaDoggy: it's in 12 hours?

Xenoid: Gold is in 13.5 hrs, yeah

Icebox: yeah

jrke: oh lol

jrke: i think top 280-290 will be promoted to gold automatically

Default avatar.png kreska: man time flies

phord: Is there a disadvantage to submitting again? Can you lose position you would otherwise keep?

Whiskee: can you be demoted after that? asking for a friend, of course

NinjaDoggy: @phord yes

phord: :-O

NinjaDoggy: your bot usually will sit higher

NinjaDoggy: than initial submit

NinjaDoggy: due to the types of opponents you play

ZarthaxX: Whiskee nope

NinjaDoggy: since bots are rock, paper, scissors(in most games) to some degree

NinjaDoggy: you can lose against bots with lower rating

Icebox: ZarthaxX with how you code we might add demotion just for you

Icebox: :^)

NinjaDoggy: lol

NinjaDoggy: also hai ZarthaxX :D

ZarthaxX: Icebox sure bro, same goes for you and your c++ performance

ZarthaxX: hai NinjaDogo

NinjaDoggy: on the topic of C++ performance...

NinjaDoggy: icebox C++ rewrite when?

ZarthaxX: he is on it

Icebox: it's actually long done

ZarthaxX: failing hard tho

Icebox: :D

NinjaDoggy: :joy:

ZarthaxX: might have to ask CG stuff to give him extra initial time

ZarthaxX: or maybe a bit more ms each turn, tocompensate

NinjaDoggy: :rofl:

Icebox: those are some harsh statements

Icebox: coming from someone so deep down in silver

Icebox: :^)

ZarthaxX: i dont have time to play this thing lmao

ZarthaxX: you are the one that doesnt sleep

Icebox: I'm sure you don't :^)

Icebox: that's something I would say as well if I couldn't get out of silver :wink:

ZarthaxX: i cant get out of silver, as there is no other league

ZarthaxX: you should go to sleep ice, already allucinating

jrke: ZarthaxX gold will open in 13 hours from now

Icebox: :D

Icebox: the more you know ZarthaxX

NinjaDoggy: are there any top bots remaining that still hardcode X turns of learn and then never learn again?

hbouillo: I believe emil does it

hbouillo: 6 turns if I remember well

ZarthaxX: my point is, there no other league rn

ZarthaxX: i can't get out of silver coz of that

NinjaDoggy: Psyho still does 8 huh

ZarthaxX: lol wat

NinjaDoggy: learn 8 turns at the beginning, and then cast/brew only

Default avatar.png kreska: My new bot is 338 is it enough for gold? At this point i just want to be gold :D

NinjaDoggy: only tomorrow will tell

NinjaDoggy: in general, it's much easier to promote when a new league just openms

Default avatar.png kreska: can you get depromoted back?

NinjaDoggy: no

Default avatar.png kreska: thats good to hear :D

jrke: kreska i think gold will open nearby 290 somewhere so you can make gold

DreadY2K: My bot just learns a new spell whenever the opponent knows more spells than I do It does poorly, but that's for other reasons

DreadY2K: It balances learning new things pretty well

Default avatar.png kreska: jrke i hope so im so addicted to this game :D

Xenoid: Wow, let's find the median by doing A[A.size()] / 2. That will work

NinjaDoggy: :(

NinjaDoggy: happens