Chat:World/2021-05-08

From CG community
Jump to navigation Jump to search

Smelty: i cant view those for some reason :((

Smelty: can u try pastebin.co

Smelty: *com

Wontonimo: > Sorry, pastebin.com has been blocked by your network administrator.

(

hexa8: LOL

Wontonimo: work computer ... so sad

Smelty: RIP

Smelty: codingame.pastebin is blocked by mine

phord: Ooh... I didn't even notice seeds could be cast outside of shadows.

Smelty: sooo

Smelty: we r stuck

Smelty: in dms

Default avatar.png Kolo9: if I'm understanding the definition of "knight moves" correctly, you can use the provided neighbors list

Default avatar.png Kolo9: and do neighbor[0][1]

Default avatar.png Kolo9: or neighbor[1][2]

Default avatar.png Kolo9: etc

Default avatar.png actualCoderTrevor: Smelty he said: https://pastebin.com/8FwEfYKQ

Smelty: ah he already showed me in dms

Smelty: thanks tho!

Default avatar.png actualCoderTrevor: lol oops yw

Enknable: https://www.w3schools.com/python/python_compiler.asp

icecream17: oh i know how to do calculate distance!

Enknable: should be able to drop code in there

icecream17: or rahter, getCoordsInRange

icecream17: getCoordsAtRange(3) = cell neighbor neighbor neighbor but not cell or cell neighbor or cell nieghbor neighbor

icecream17: getCoordsInRange = cell neighbor neighbor neighbor, remove duplicates

phord: If seeds are dropped on same cell at the same time, it's a no-op. I should make my bot retry if that happens. What if the opp also retries. I wonder if we can get a game with 100,000 moves. Surely it must kill us both at some point.

icecream17: no the tree disables after an action

phord: Ah, I see that now.

phord: I noticed some leaders were delaying completing trees until the end. Effective strategy because of shadows.

phord: But then I noticed other leaders had better planning and well-distributed scoring.

Default avatar.png ChrisJM: I imagine search AIs will be blocking sunlight naturally if they have enough depth

Enknable: trees inside trees

phord: Too many trees cuts down your own sun points, though.

Wontonimo: phord, once your tree throws a seed it becomes dormant and can no longer act in that day

jsmurl: i just loaded the spring challenge on chrome on a windows PC and just see a grey box, anyone have tips how to fix?

Default avatar.png actualCoderTrevor: I remember hearing it's a known issue for some people. Can you try Firefox?

jsmurl: yea it works on firefox, just wondering if there is a fix

jsmurl: seeing this in the inspector: TypeError: Cannot read property 'resize' of undefined

Default avatar.png actualCoderTrevor: Didn't hear about a fix just the issue. Maybe someone else will correct me though.

Jeanpier: I dont know why my ranking is 9300th and there is another ranking whichs says that I'm 2277 th

Default avatar.png Kolo9: jsmurl mine resolved after I updated Chrome. Do you have an update pending? (top right)

Enknable: Jeanpier you're 9300 overall

Enknable: and 2277th in this competition?

Enknable: or some other sub category

phord: I use Brave (Chromium) and haven't had any problems.

jsmurl: Kolo9, looks like I'm up to date :thinking:

Default avatar.png Kolo9: damn :( yeah I heard other people having the same issue. not sure why it worked for me

itzluku: hahahahh i submitted my latest version and lost the first game in the arena

itzluku: XDDD

itzluku: good start

itzluku: whata re the odds to fight other new submissions

Default avatar.png Kolo9: haha from what I've seen it *seems* like when you submit a new version, it'll pit you against some people around the rank you were before

Default avatar.png Kolo9: in the first few battles

Enknable: jsmuri https://www.codingame.com/forum/t/codingame-sync-beta/614

Enknable: or try firefox :nerd:

jsmurl: ah I had to enable hardware acceleration

jsmurl: I had it disabled because I was running into some weird issues on youtube a while back

Default avatar.png actualCoderTrevor: Awesome my bot now keeps track of his energy level throughout the match perfectly without having to read it from the input \o/

phord: noice

itzluku: usefull for sim?

Default avatar.png actualCoderTrevor: That's the idea :)

itzluku: else only error-prone imo

Default avatar.png actualCoderTrevor: Up next will come predicting which moves increase the net energy

Smelty: hmm

itzluku: btw guys

itzluku: what is the max score ur bot can get?

itzluku: 100? :O

phord: I've seen 133.

itzluku: ?_?

itzluku: #1 has 58.71

phord: Do you mean the game score? (points)

itzluku: leaderboard bot score

itzluku: sry my bad

itzluku: i achieved a game score > 165 once iirc

itzluku: uh new #2

phord: Leaderboard score seems to be a composite tournament ranking thing, maybe?

itzluku: hm i would argue (since they programmed the game and it doesnt have too much complexity (?)) that there is a way to calculate every possible choice in polynomial time

itzluku: meaning they can rate your choice

itzluku: but i am not sure

phord: Then they wouldn't need head-2-head, would they?

itzluku: head-2-head?

phord: You're ranked based on wins vs. opponents. The top leaders will be the ones who adjust their choices based on their opponenet's moves.

phord: Complexity is not trivial in these games.

itzluku: wait

itzluku: but there is a problem

itzluku: how do u know what options ur opponent will have ?

itzluku: since seeds are random for example

itzluku: and u cant simulate in depth to see when your opp might sell a tree

icecream17: you dont know the order, but you know what they are

icecream17: if you write your own game simulator

phord: You are told where the opp's trees are after each turn. So you can see what they're doing.

itzluku: but u dont know they seed indices he can place seeds on

itzluku: and u dont know if he will complete a tree

itzluku: 2nd u could iterate

itzluku: 1st not

phord: You can know which indices he can play on.

Enknable: you know everything he can do

Enknable: and everything you can do

icecream17: you can generate legal moves, you dont know which move opp will pick

phord: Consider: you do not need the possibleActions list.

itzluku: hm so sim has to take into account what seed indices might be possible

itzluku: but then your sim would play against a migthy more powerfull opponent that inst real

itzluku: meaning sim would choose worse

itzluku: ^^

Enknable: it has to take into account the shadow on the 10000th iteration

itzluku: no?

Enknable: your sim only create the game tree

Enknable: the way that you prioritize moves

Enknable: is the strategy

phord: Sim could choose the best move for the oppo, and the oppo may make a dumber move. But then you can adjust your planning accordingly.

itzluku: yeh but the depth of your sim is finite

phord: The games are also finite.

itzluku: and u have to take moves into consideration that wount be possible for your opponent

itzluku: since seed is random

itzluku: ?

phord: Seed is random?

itzluku: yes?

Wontonimo: random_seed

phord: oh -- lol. not SEED

Enknable: rand(seed)

Wontonimo: not to be confused with the thing in the game called a seed

itzluku: game seeds

itzluku: are given

itzluku: but generated by sth unknown

itzluku: true?

phord: You don't need anything to do with the rand(seed) when simulating moves.

Default avatar.png actualCoderTrevor: You mean the random game board? That's established right from the get-go

Wontonimo: yeah

Enknable: you also dont calculate the whole tree on the first turn

itzluku: u get a set of seed options per turn

itzluku: those seed options are soem what random

Enknable: you calculate as much as you can, make the best decision you can, then prune and continue

phord: You may not be able to plan all the way to game-end within the timeout. But you can do very well by only looking a few moves ahead.

Default avatar.png actualCoderTrevor: Those aren't random, they are predetermined based on the rules, and they're just provided for convenience

itzluku: let me break it down more simpler

itzluku: i think u guys dont get my point

phord: Aw, crap. My improved bot fell in ranking. :-(

Wontonimo: well look at that, when you fix a bug your bot does better. yeah me.

phord: "improved"

Default avatar.png actualCoderTrevor: phord that's been a constant with me

phord: actualCoderTrevor but I was beating my Arena code in testing pretty well. :-\

itzluku: if u sim for the best move, lets say minmax then u have to go throug heach possible seed index your opp might plant a seed. but ur opp only has a fraction of those seed indices to plant a seed... meaning u simulate against a better opp than u actually have

Default avatar.png actualCoderTrevor: I think other bots are improving faster than I can improve mine. I dropped from 110 to 430

Enknable: silver doesnt open for 3 days

Enknable: dont worry :)

phord: My strategy spends all the sun points I can every day. I'm growing multiple trees right up to the last day. What a waste.

itzluku: @actualCoderTrevor if u dont handle shadows for example, then its kinda luck every time u test your bot :p

itzluku: mix of opp getting better and luck might be a factor

Default avatar.png actualCoderTrevor: itzluku how'd you know I don't handle shadows? :P

phord: itzluku You can predict how many seeds your opp can actually plant each day and limit your sim to only planting that many in each scenario.

itzluku: just said if :P

Default avatar.png actualCoderTrevor: lol well you were right

itzluku: i'm also not handling shadows yet

itzluku: #181

itzluku: xd

Default avatar.png actualCoderTrevor: show-off :P

Wontonimo: okay, i'm not handling shadows either. just resubmitted and I'm placing around 28th

Default avatar.png actualCoderTrevor: :O

itzluku: @phord but those limited scenarios migth still be more difficult, meaning the sim plays against a better opp

Default avatar.png actualCoderTrevor: It's an arms-race no matter which strategy you use.

phord: Your search tree can include _all_ the opps possible moves. You don't have to play against one of them; you play against all of them.

itzluku: in your sim your opp would for example have seed index options of richness 3 but in reality he only has richness1 seed index options

itzluku: that is my point

Default avatar.png actualCoderTrevor: Then your sim is bad

phord: Then ask yourself, of all the branches where I win, what move do they have most in common from this point of the game?

phord: Play that move. Then prune your tree of others. Watch what your opp does; prune your tree of all his other moves. Go back to step 1.

itzluku: if u play against an opp that is better in your sim, then u might det a different move than u would if u knew what he is limited to

Enknable: one move does not lead to one result

phord: Why do you think opp would have different options in reality vs. the ones in your sim?

Enknable: each move leaves you with thousands of game states

phord: You are playing on the same grid.

Enknable: you dont move based off one state

Enknable: you move based off of the group of states

itzluku: bro u dont get my point

Default avatar.png actualCoderTrevor: At a high-level of play, how well you can predict and outmaneuver your opponent will affect how well you do against them. That's true of a sim or a heuristic.

Enknable: if you use MCTS anyways

Enknable: itzluku do you know MCTS?

Enknable: multiarmed bandit?

itzluku: reality is a subquantity of your sim, ofc ur sim has all the options but those distinct options in your sim not actually appearing influence your choice

JohnCM: wonder if python is enough for this challenge

JohnCM: i try first and see if i timeout

Xenoid: #2, #3, #4 all are using Python

phord: Your sim doesn't make a choice and then pretend there were no other options.

phord: Your sim makes *all* the choices and then uses some aggregate view to decide how to improve your score while reducing your opp score.

Wontonimo: for those who are new-ish to this site, there is a "trueskill" score beside the names in the leaderboard. iirc, every 4 points in score (not position) is about 80/20 win ratio difference.

phord: I fixed my code again. My rank went wayyy up again. Woohoo! Oh, down is good, right? :-(

itzluku: but you make a choice based on what your opp can respond with, you have a bias. thats simple bayes.. and the bias in your sim is different to reality since i nreality your opponent only has a subset of the quantity holding all possible moves in theory

VizGhar: I'll probably have to write some unit tests :P not sure if my results are 100%

phord: Fact: Your opp has a limited set of possible next moves. Fact: Your sim can know exactly what the opp's choices are for the next move.

VizGhar: yeey dbd r is first :) huge fan

phord: Right?

itzluku: yes

VizGhar: yes

JohnCM: lol i only wrote 6 lines of code, and i think i can go bronze already

phord: So, the best your sim can probably do is predict which next moves will maximize the opp's score.

JohnCM: XD

kovi: nice dbdr!

dbdr: thanks VizGhar!

dbdr: and kovi :)

ZarthaxX: GZ dbdr

phord: Then you play to minimize the effect f those predicted moves. Or you play to minimize the opp's gain on average across all his possible moves.

dbdr: small idea I had yesterday in the bath :D

ZarthaxX: lmao

ZarthaxX: if else stil?

VizGhar: oh... bath

JohnCM: hi there kovi, dbdr

itzluku: thats why your sim might choose a path that is outside of the subset

dbdr: no, BS

phord: Which subset do you mean?

phord: And which "chosen path" are you talking about?

itzluku: i agree with u on how simulations work

itzluku: that isn't my point

phord: Well, good, because I didn't make this up. It's not really my opinion. lol

itzluku: i know

ZarthaxX: dbdr ah okey, didnt know bullsh*t worked so well

itzluku: u are kinda talking away from my points

ZarthaxX: anyway, gz :D

phord: What "subset" do you mean?

PaarthThePro: Has anyone started the Spring Challenge?

itzluku: sim has more variations right?

icecream17: yes paarth

icecream17: ok submitting

PaarthThePro: I'm already on bronze

DetoBot: is the response time per turn is 100ms or has some offset

itzluku: more options for your opp to plant seeds than in reality, more options for u to plant seeds in more depth

phord: More variations than what? Reality?

phord: No.

itzluku: ?

icecream17: well i think some people proved that anything within reality is less complicated then reality

icecream17: dont remember the wikipedia article

phord: You have the same number of options. In reality, you will only choose one of those options on each turn. But you had all of them available to you.

itzluku: lets say my oponen has teh option to plant 2 seeds 31 7 and 31 33 , then he has 2 options ? but your sim doesnt know that.. your sim would check for every index that doesnt hold a tree

phord: No. Your sim DOES know that.

Default avatar.png actualCoderTrevor: Again, it's a bad sim if it's doing that

phord: Why wouldn't you know that?

itzluku: ?

icecream17: your sim is as accurate as the game itself

itzluku: wait

Default avatar.png actualCoderTrevor: itzluku, as I've said before, the options available for planting a seed are spelled out in the rules. There's no randomness to it.

phord: Look at the opps trees. Calculate his sun points. Now you know exactly which seed options he has available.

itzluku: but u cant plant a sed anywhere u want???

itzluku: seed*

itzluku: wtf they are?

icecream17: the rules say seeds must be within (size) distance from (non disabled tree)

Enknable: This game is: Perfect information

icecream17: size=tree size

phord: No, you can only plan seeds where you are allowed: Within "size" distance, on non-zero richness ground, and within your sun points budget.

itzluku: wtf i did'nt knew that

itzluku: well that explains alot

icecream17: ...rules were right there =/

icecream17: wait

icecream17: meant to do something else

icecream17: i guess the emoticon could be parsed that way...

icecream17: "=/"

itzluku: @phord yeh then my point is not longer valid. i thought u get a random set of possible seed spots and have to choose from that...

itzluku: but thanks for the discussion :D was still fun

Enknable: even if they were random...

Enknable: they're finite

itzluku: xD

Enknable: ;)

itzluku: not again

itzluku: :D:D

phord: itzluku I'm glad we sorted that out. lol

phord: Have fun!

itzluku: finite but your sim would take into account moves that wouldnt appear... meaning u would make choices based on wrong assumptions (bayes theory)

phord: =/

phord: =\

Default avatar.png actualCoderTrevor: Stahp

itzluku: xd

phord: :/ =/ =\ :\ :-\ :-/ =-[

itzluku: haha

Default avatar.png actualCoderTrevor: lol

phord: Wow -- so many that converge to the same dude.

itzluku: if ur simulation calculates options that are not a valid option, then ur simulation might not give u the best option

itzluku: processes*

useAllTheThings: o __ /

o     /

itzluku: whatever lets end it here :D

JohnCM: yay with my wood 1 code I got rank 2.4k in bronze. time to improve on it

Enknable: as long as the set of all random choices contain all valid moves, there's no difference between a random move and a chosen move.

itzluku: i also yoinked an opening strat xd

Enknable: if its invalid..then its just broken game

JohnCM: when i count distances between cells, i can walk over cells with 0 richness right

ZarthaxX: ye

JohnCM: thanks

itzluku: lets say u get 2 random seed spots that are valid as an input, each round, and your sim iterates over all 37-nr_cells_with_trees possible seed options, then u will calculate board structures that are not possible, meaning your sim choice is biased on assumign those were valid options, but they are not, in this construction

itzluku: @Enknable

VizGhar: hmm winning way too much with pretty dumb heuristic

VizGhar: maybe time to switch to search

phord: Goodnight folks

itzluku: is there a default index value for neighbors outside of the board?

itzluku: gn

VizGhar: mornin'

VizGhar: yes -1

itzluku: ty

Enknable: itzluku haha sorry man I can't get what you're putting down. I don't see a difference between guessing what an opponent will choose, and guess what an opponent will be forced to do. Either way, that list of moves is finite and will never lead to invalid game states

Enknable: :thinking:

itzluku: okey different approach

itzluku: this one u will get

itzluku: your sim caluclates all seed options that are valid: 37-nr_cells_with_trees

itzluku: right?

Enknable: yes

itzluku: lets say in this construct the opp will only have 2 given indices, meaning only 2 valid options ( 2 out of those 37-nr_cells_with_trees)

itzluku: ok?

Chainman: Can we play this game manually?

Zaphus: what do you mean by 2 given indices?

itzluku: options=["SEED 31 18","SEED 17 12"]

itzluku: for example

Zaphus: ok, so you are not saying there are 37-trees valid options, there are only 2

Default avatar.png actualCoderTrevor: Chainman look up photosynthesis board game; it's based on that

itzluku: yeh

itzluku: that is the construct

Enknable: yes, so if they are given 2 valid options, then we calculate 1332 different states

Zaphus: why would you do that?

itzluku: that is not how this game here works, but that is the construct i am making my argument with now

itzluku: now my point is

Zaphus: just doesnt seem logical. If they only have two choices, then there must only be 2 valid options, so you have 2 states

Zaphus: well, three if you include waiting

Enknable: they are "Dealt" their seeds positions

Enknable: which are 2 random hex in a 37 board

Enknable: ?

Zaphus: is this in a different theoretical game, not this one ?

DetoBot: My chat bot is ready

Enknable: yeah lol

DetoBot: match against me

DetoBot: to have a look

Zaphus: so confusing :-) in that case you have (37-trees) * (37-1-trees) states

Zaphus: prob divide by two because order doesnt matter

itzluku: if the sim would know that the opp only has those 2 options, meaning the sim would know what those 2 options are (B) then: P(A|B) =/ P(A) with A being the thext move

Enknable: ^

itzluku: next*

Enknable: how would your sim

Enknable: know what the opp moves would be...5000 states into the future

itzluku: ?

itzluku: its a finite game

itzluku: 24days

itzluku: why 5000 states

Enknable: there aren't 2 options..

itzluku: 2 start trees each

Enknable: oh man

Enknable: im totally lost lol

itzluku: so max 33 indices to plant a tree for each turn

Wontonimo: Enknable , there are lots of search possibilities for sim

Enknable: oh yeah I agree Wontonimo

Wontonimo: what i mean is, you could do a simple DFS and ignore the opponent.

Wontonimo: for example

Wontonimo: and it would do really well

itzluku: DFS for what

Enknable: yeah, I was actually thinking it would be better

Wontonimo: DFS for maxing points before the game ends

Enknable: if you constantly just play optimally solo

ZarthaxX: Wontonimo holy you are if else master

itzluku: best board weight?

Enknable: you might lose to weird strategies

Enknable: but overall i think you win more

Wontonimo: thanks ZarthaxX ! :D

ZarthaxX: :D

Wontonimo: how you know that latest bot is if/else ?

itzluku: can u check code of others? :D

Wontonimo: nope. maybe admin.

itzluku: admin abuse :x

ZarthaxX: no haha

ZarthaxX: i just thought so because python and 2 days of contest

ZarthaxX: :D

ZarthaxX: many ppl just like doing heuristics as they give fast results and have fun while doing so

ZarthaxX: it's pretty common

ZarthaxX: to encounter if else spaghetti i mean

itzluku: https://www.codingame.com/replay/548741611

itzluku: @Wontonimo

JohnCM: yuusanlondon's bot is very funny to watch. lots of random japanese words

Wontonimo: so close!

DetoBot: https://www.codingame.com/replay/548739497

DetoBot: @Wontonimo :joy:

itzluku: when do u check for shadows?

UndercoverToad: yuusanlondon is playing? i've seen that name on topcoder before

UndercoverToad: oh at 2nd place even

itzluku: @DetoBot u need check nutrients value, if ur opp completes trees it will drop and u will get less if u sell after him

itzluku: complete*

Wontonimo: hey DetoBot , add something to prefer seed placement where the neighbours are not your own trees. it'll help you not shadow yourself so much

DetoBot: thanks working on a new bot for past few hours

DetoBot: will include your advice too

itzluku: next step for me is checking how many enemy and team trees a tree would shadow for the next x moves , to decide if i want to sell it or not

itzluku: what else would be important to check (related to shadows)

itzluku: ?

Default avatar.png NotSureWhyThisWorks: size of the shadow

Default avatar.png NotSureWhyThisWorks: I forgot to add to mine

itzluku: https://www.codingame.com/replay/548751832

itzluku: xd

itzluku: how do i win against u like that but im still onyl #182

itzluku: wtf xd

DetoBot: submit again

Default avatar.png NotSureWhyThisWorks: nice itzluku

Default avatar.png NotSureWhyThisWorks: I sometimes win against higher players in the IDE but not consistently

Default avatar.png NotSureWhyThisWorks: if your bot can beat mine like 5 times out of 10 it should probably be around 50-60 as well

itzluku: same

itzluku: its the shadows

itzluku: need to figure out a way to simulate some stuff and handle shadows

itzluku: else it wil lalways be a coinflip

Default avatar.png NotSureWhyThisWorks: your bot spreads the trees out more over the grid. Mine currently doesn't do that well

itzluku: i check the neighbors for seed spots

VizGhar: LOL bfs timing out for depth 2 in dart... well maybe it is bad language :D

VizGhar: or maybe im the one who is wroong

jrke: yeah can timeout in depth 2 cause many possible moves

WolfDarrigan: My Java times out at a depth of 3

WolfDarrigan: I need to figure out how to compute transpositions

Default avatar.png NotSureWhyThisWorks: are we talking days or turns?

WolfDarrigan: days for me

Default avatar.png NotSureWhyThisWorks: 3 days could be a lot of turns

Default avatar.png NotSureWhyThisWorks: or maybe not

itzluku: wait, if ur opp waits, then u dont get an input of possible moves

itzluku: meaning if i grow a t2 tree to t3 and he waits, then i dont know i have a t3 tree to complete

itzluku: xd

WolfDarrigan: Yeah, I'm computing possible moves and shadow movement. If I had enough time, I could simulate the whole game

StyllyMyle: I have a little question

Default avatar.png NotSureWhyThisWorks: simulation seems difficult for a game like this

itzluku: just ask :D

StyllyMyle: so i see that we get sun from trees the same time sun direction changes

StyllyMyle: but i wana ask, do we get sun before or direction changes?

Default avatar.png NotSureWhyThisWorks: I think after

WolfDarrigan: Sun moves, then generates sun points

StyllyMyle: So first sun get harvested, then direction changes

StyllyMyle: wait what?

WolfDarrigan: the sun moves first

StyllyMyle: Sun moves first

StyllyMyle: then check all tiles which are spooky

Enknable: :ghost:

Default avatar.png lge.innocent: can you make 2 or more actions a day?

WolfDarrigan: correct StyllyMyle

itzluku: yes in bronze

itzluku: i think i wood u cant

itzluku: in*

WolfDarrigan: you can make as many actions as you like

WolfDarrigan: you just need the sun points for it

StyllyMyle: I see

Default avatar.png lge.innocent: ok thanks

StyllyMyle: so 2 action limit is non existent

WolfDarrigan: and you can't act on a tree that is dormant

StyllyMyle: make sense

StyllyMyle: Can only work on tree once

StyllyMyle: before day over

itzluku: btw u can die if u make a move that costs more sun points than u have

itzluku: xd

StyllyMyle: WAIIIT

itzluku: haha

StyllyMyle: Really :D

itzluku: if it goes negative after your action

Enknable: never go into debt to the sun god

itzluku: :D

StyllyMyle: Any algo that makes sun go negative?

StyllyMyle: I never thought to utilize the negative bounds of sun

The_ZimaBlue: idts

itzluku: seed and grow

itzluku: have a cost

StyllyMyle: complete also have a cost r8

The_ZimaBlue: but u wont do the action if u dont have enough sun points

itzluku: complete has no cost?

The_ZimaBlue: 4

The_ZimaBlue: 4 sun points

StyllyMyle: I gttg

itzluku: lol

itzluku: xD

itzluku: guess i am just lucky

Enknable: later all

Enknable: happy coding :)

itzluku: cya

itzluku: ah nvm, since i just take possible actions from the input that action just wount show

itzluku: thats why i dont die

itzluku: :D

JohnCM: when is silver coming out?

dbdr: JohnCM click on "Bronze league" at the top

JohnCM: ah ok thanks

Tiramon: ok seems my state restructuring is working and should give me some more sims ...

UndercoverToad: i got my sim more than 6 times as fast with bitboards :tada: but something is wrong, I only find WAIT as legal action

Tiramon: atleast that is always a valid action ;)

dbdr: fast, correct, simple: pick any 2 ;)

Tiramon: is that your non automaton pingable account?

dbdr: oh, it's a toad!

Tiramon: but he is undercover

dbdr: true, who could that be? that german toad?

Marchete: happy caturday

DaNinja: morning

Marchete: nice work as always, dbdr

UndercoverToad: chat got too laggy so I made a new account

Tiramon: if this works out i should atleast get 10-20 times more sims ... and yes before it was far to slow :)

dbdr: thanks Marchete! actuallz I'm not used to such rank in a contest

khalkhoul: hello

khalkhoul: helllo

Tiramon: wow 1st nice

Tiramon: gratz dbdr =)

UndercoverToad: now defend that rank with teeth and claws

jacek: happy Caturday

dbdr: should I become a wolf then? or bear?

itzluku: will they add more functionality for silver? like.. more features

jacek: a small horse

dbdr: a prince has no claws

UndercoverToad: a manbearpig

dbdr: I'll pass

UndercoverToad: southpark? :(

dbdr: my princess might not like it

JohnCM: yes i realize euler is missing

UndercoverToad: where might he be?

UndercoverToad: :spy:

dbdr: UndercoverToad sub your bitboarded wait bot

dbdr: someone was asking for one yesterday

UndercoverToad: you can't even play against it as it will be below top1000

dbdr: search

UndercoverToad: i find the possible actions now

UndercoverToad: but still waiting first and applying actions on the next day

Marchete: I'm puzzled, 3 pythons and 1 JS at top10

UndercoverToad: the contest is less than 2 days old

dbdr: I say two days is long enough, let's stop

Marchete: let me rephrase

geio: can we change colorscheme in editor in codingame

Marchete: some of the top10 already has a sim bot, depth N

DaNinja: yes, in Setting on the left

Marchete: yet python/Js can compete

geio: :o

dbdr: oh, that would be a anti-hiding feature: end of contest is kept secret (random)

dbdr: i'm sure nobody would mind

UndercoverToad: also anti-testing feature

UndercoverToad: don't submit when you aren't sure it's better

dbdr: yes :D

dbdr: UndercoverToad do you bitboard in C# or C++?

UndercoverToad: C#

UndercoverToad: they really stepped up, there is even https://docs.microsoft.com/en-us/dotnet/api/system.numerics.bitoperations.popcount?view=net-5.0

itzluku: hm i found a bug

UndercoverToad: i found a bit of code between the bugs

dbdr: remove it!

itzluku: i have a t3 tree and 4suns, but it doesnt show complete as an option

Tiramon: is it dormant?

CBORJDNHR: is everyone in the top 100 using a minimax ?

dbdr: no

Marchete: the fixed pointer thingy in C# is annoying

UndercoverToad: i don't think that minimax is the right algo for this game

Tiramon: i'm 101 right now with my plain sort +5 ifelse so guess not

itzluku: no, but u can complete dormant t3 trees so whatever

Marchete: I was thinking that minimax or even MCTS

jrke: i think only top30-40 currently only having algo based bot

Marchete: can work

Default avatar.png NotSureWhyThisWorks: I'm 50 ish without simulation

Marchete: you just do the sim each 2 turns

Tiramon: itzluku not afaik

Marchete: and depth is always +=2

UndercoverToad: are there any messages below your output itzluku?

Tiramon: would be an action and dormant trees can't take actions

UndercoverToad: in the game summary

itzluku: what kind of msges

Marchete: dormant completes?

UndercoverToad: a text telling you why you screwed up

Marchete: that's true?

UndercoverToad: i'm pretty sure you can't complete dormant

Tiramon: Tiramon is planting a seed on cell 23 from cell 24 this also tells if action is not possible for some reason

itzluku: https://www.codingame.com/replay/548787830

itzluku: at the end blue sells a t3 tree taht is dormant

itzluku: that*

itzluku: ah nvm

Tiramon: no it's not ..

itzluku: tree is bigger

itzluku: xd

itzluku: well but still, my t43 on index 8 is not dormant

itzluku: and i have 4 suns

itzluku: last tick

Tiramon: it is dormant ...

itzluku: index 8 ?

Tiramon: yes you have grown it .. so it is dormand

Tiramon: *dormant

itzluku: ah wtf

Tiramon: make a mouseover

itzluku: yeh im stupid

itzluku: i thought dormant means its overshadowed

itzluku: yikes :/

Tiramon: dormant means it has taken an action on that day

itzluku: ty

Tiramon: spooky btw means it is in the shadow of a tree of his size or bigger

itzluku: u can sell "spooky trees" ?

Tiramon: sure

itzluku: complete*

itzluku: kk

Amanojaku: country

Tiramon: you just won't get suns for spooky trees

itzluku: aight thanks

DaNinja: can this be optimized faster?

DaNinja: http://chat.codingame.com/pastebin/aff61519-8d4c-4db9-a1c7-18c313838884

Marchete: inline

DaNinja: I have #pragma GCC optimize "O3,omit-frame-pointer,inline,unroll-loops"

Marchete: I'm 100% the bottleneck will be at move generation or sun calculation

Marchete: don't microoptimize these

Marchete: 100% sure

Vaibhav0705: hi

pmor: Only way to optimize that function is to somehow get rid of the if branches

resty-daze: good compiler could use cmov instrs and avoid branches automatically i guess

RoboStac: might not be able to optimise it, but you probaly want to make it work properly by changing the 1<<idx to 1ULL<<idx (by default 1 is an int so is only 32 bit)

pmor: maybe. will have to look at the disassembly

DaNinja: thanks Robo good point

martinpapa69: __builtin_clz (trees & 0b111)

pmor: ^ that might do it

kovi: +1 Marchete...seeding is costly...anything else is probably premature opt

martinpapa69: oh nvm, i understood your code incorreclty, thats something else

kovi: (collecting seed actions)

UndercoverToad: this sounds completely weird but i find legal actions offline and not online

itzluku: damn dbdr is smart :D he punished my not having enough suns and completed alot of t3's because i couldn't react and complete myself

itzluku: my=me*

itzluku: @UndercoverToads prob a bug on your end/model

UndercoverToad: whoops, found it (or at least where to look at)

UndercoverToad: i don't properly reset between each turn

dbdr: itzluku my bot is not that smart, it

dbdr: 's a conincidence

itzluku: ok xd but it looked rly sick

dbdr: can you link the replay?

itzluku: overriden that condition state

itzluku: or can i access it somewhere?

itzluku: wasnt in teh arena

Marchete: you consider your bot legend level, dbdr?

Marchete: do*

itzluku: how does the leaderboard scoe gets calculated again?

itzluku: score*

UndercoverToad: there is no legend level before tuesday

dbdr: Marchete no. 100 gold maybe :)

UndercoverToad: you are better than that already but most likely not legend

itzluku: top100 gold?

Tiramon: ok from 3k-7k turns simulated yesterday to 21k-47k is an improvement and i also get other options than WAIT ;)

UndercoverToad: i fixed that too

UndercoverToad: and 100k tested plans in 1.4s now (was 3.4s)

Tiramon: changing to bits from my previous list and streams was a real good idea ;)

Tiramon: what is a plan for you? complete playthrough from day 0 - 23?

Marchete: blursed bitboards

UndercoverToad: 2 days with actions. then WAIT till the end of game to count suns

Tiramon: ok so on something up to 30 turns or so

UndercoverToad: was testing a state from mid-game

UndercoverToad: some actions to generate but no 23 days to fast-forward

Tiramon: still a value that is not comparable =) only comparable sim value is amount of turns

UndercoverToad: http://chat.codingame.com/pastebin/47cbdaf1-3b0d-4cfa-a8e8-6235e1969d03

UndercoverToad: i don't want to compare with you

UndercoverToad: i want to compare bitboard vs non-bitboard

Tiramon: primarly seed actions

Tiramon: sure but i want to compare to know how slow i am ;)

UndercoverToad: also don't listen to UndercoverToad, you won't even find me on the leaderboard

Tiramon: right he is only rank3 ... what does he know ...

UndercoverToad: i was around 150

UndercoverToad: submitting that bitboard now

Tiramon: is only simulating 2 days enough to complete all trees in the end?

resty-daze: complete some trees may not worth it when there are no nutrients

UndercoverToad: of course not

UndercoverToad: i'm still building my sim, the use of it comes later

Tiramon: complete trees are still more score than non completed trees ...

itzluku: @dbdr i think u sell alot of t3's when u have too much suns :D

itzluku: many*

UndercoverToad: > complete some trees may not worth it when there are no nutrients

can't you say that a bit earlier? did some debugging why I don't complete it

UndercoverToad: scoring function was smarter than me

Default avatar.png actualCoderTrevor: my bot with bugs does better than when I fix the bugs :(

Tiramon: but yes completing richness 0 trees is a waste of suns in the end ... hm ...

UndercoverToad: also my richness is always 0 in the current bitboard version :(

UndercoverToad: still have to include that again

Tiramon: richness 1 i mean

UndercoverToad: me too

UndercoverToad: 0 point richness but seedable

Tiramon: but you can doe the board/richness stuff static per game

UndercoverToad: i still need a fast lookup

Tiramon: int[] richness ?!

UndercoverToad: yes

UndercoverToad: and converting the tree bitmask to an array index

UndercoverToad: I have return IdReverse[BitOperations.TrailingZeroCount((ulong)mask)];

UndercoverToad: not completely happy with it

UndercoverToad: and i should prune my move generator

UndercoverToad: no seeding on day 20

Gagat: IdReverse ?

UndercoverToad: static array

Tiramon: ok now i have to fix the algo how i sim and eval that ... current one is crap

UndercoverToad: my bitboard uses other IDs than the CG IDs so I have to convert

UndercoverToad: https://imgur.com/a/FgBBsgb

Gagat: right, same here then

Gagat: Not exactly the same ids

Gagat: Oh I like your ids

Gagat: Shift is going to be more simple than mine

UndercoverToad: what did you do differently? no padding at the edge?

Gagat: Except for boundaries

UndercoverToad: oh :D

Gagat: Guess i'll stick with mine, don't want to bother with boundaries

UndercoverToad: it's just an AND-operation to remove those bits outside of the board

Gagat: I have ids from 0 to 37

Gagat: just from the top left to the bottom right, line by line

UndercoverToad: i see, that's a big difference

Gagat: I'm thinking about the shifts for the shadows

Gagat: oh right, no you have no problems

Gagat: Don't need boundaries on both sides

Default avatar.png actualCoderTrevor: UndercoverToad is that a visualization you normally see or did you make that fpr illustrative purposes? I'm just curious.

UndercoverToad: there is a debug view in the game itself

Default avatar.png actualCoderTrevor: I mean the ids

UndercoverToad: and the red numbers are my kolourpaint skills

Default avatar.png actualCoderTrevor: Oh okay thanks :)

Marchete: BitOperations.TrailingZeroCount or System.Runtime.Intrinsics.X86.Bmi1.TrailingZeroCount

Marchete: ?

Marchete: I'm using directly intrinsics

Marchete: Bmi1.X64.TrailingZeroCount(counter);

Marchete: sorry

UndercoverToad: is there any difference?

Marchete: yes

UndercoverToad: oh, thanks :D

Marchete: I'm explicitly saying Bmi1.X64

Marchete: BitOperations.TrailingZeroCount can be more general

Marchete: mine crashes is you don't have Bmi1 capable

UndercoverToad: i guess same goes for popcount

Marchete: yeah

Marchete: Popcnt.X64.PopCount

Marchete: .net 3.1 has a lot of new stuff

Marchete: http://chat.codingame.com/pastebin/793856ea-3778-4b04-844f-59baeb1f807f

Default avatar.png NotSureWhyThisWorks: 3 people in top 5 with python bots. What type of algos can make it top 10 with python?

jacek: ifletons

Marchete: there is also a MethodImplOptions.AggressiveOptimization decorator

Marchete: I need to check it

Marchete: typescript on top10 too, nice

resty-daze: NotSureWhyThisWorks my bot just greedy, not even consider next turn in the same day

UndercoverToad: hm, so far I only knew about AggressiveInlining

Default avatar.png NotSureWhyThisWorks: resty-daze that's awesome for rank 9

Default avatar.png NotSureWhyThisWorks: also how do you tag people

Marchete: so no simulation resty-daze?

jacek: NotSureWhyThisWorks what do you mean

resty-daze: Marchete ye no simulation

Marchete: wow, nice eval :D

UndercoverToad: jacek trolling again :D

Marchete: eulerscheZahl what do you mean

jacek: Automaton2000 how do you write in red

Automaton2000: that last bit triggers me, oh well.

Marchete: any good idea to apply seed masks to each cell?

Marchete: having a mask per cell and size seems too big

Illedan: Morning

Marchete: I have freespaces, cell ID, tree size

Marchete: i need some seedmask[size][ID]

Marchete: but 37*3 ...

Nerchio: why is it too big?

Nerchio: you don't really keep it in the state right

KaizenGTD: hi

UndercoverToad: to fit in the processor cache

KaizenGTD: what is the criteria to promote to next league?

UndercoverToad: rank above the boss at 100% submit progress

Tiramon: get a stable rank better than the boss

UndercoverToad: at the moment bronze is the highest, silver on Monday

KaizenGTD: how can I see where is the boss? I don't see anything in the ranking

UndercoverToad: which league?

Nerchio: ok i thought about the cache but i dont see the need for such optimization atm

UndercoverToad: in wood the boss is at the top of the league

KaizenGTD: I'm in Bronze League

UndercoverToad: then there is no boss

Tiramon: as he said a few lines before ;)

UndercoverToad: UndercoverToad 11:04AM at the moment bronze is the highest, silver on Monday


resty-daze: boss will be selected from a player's bot when silver open

jacek: UndercoverToad 11:05AM UndercoverToad 11:04AM at the moment bronze is the highest, silver on Monday

KaizenGTD: ok, understood, thank you!!

UndercoverToad: An unhandled exception of type 'System.PlatformNotSupportedException' occurred in System.Private.CoreLib.dll: 'Operation is not supported on this platform.'

  at System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(UInt64 value)

UndercoverToad: my PC is old Marchete

KaizenGTD: That sounds too bad

Marchete: :rolf:

Marchete: :rofl:

Marchete: then it's working as intended

Marchete: that's good

dbdr: so old as not to have ctlz??

AntiSquid: what is your real max turn time in ms ?

UndercoverToad: from 2011 or 2012, not sure anymore

AntiSquid: seems to work for 95ms

UndercoverToad: i'm stopping at 20ms. no need to go further that early in the contest

AntiSquid: i am stress testing so i don't get surprises later on

UndercoverToad: stress testing the servers?

AntiSquid: both code and server i guess lol

AntiSquid: NotSureWhyThisWorks numpy magic

cegprakash: dbdr https://www.codingame.com/replay/548862230 may be once in a bluemoon but I still beat you

dbdr: :+1:

jacek: once in a bluesun

cegprakash: why should moon have all the fun?

351062: Am I the only one experiencing random timeouts in the arena ? Should I blame my code ?

Neumann: (cpp)

AntiSquid: never in IDE ? that's why i asked @_@

Neumann: I meant IDE :D

AntiSquid: what time limit did you set?

Neumann: 85ms

Neumann: We used to have timeout issues on optim games a while back, wondering if that's the same kind of issue

AntiSquid: might be your code

Neumann: Probably yeah

AntiSquid: i can go to 95

pmor: a few contests ago I ahd that problem...ended up being due to taking too much memory

pmor: looked like a timeout

Nagatwin: I can go up to 99ms

Nagatwin: with a straight goto print at time limit

Tiramon: damn simulating in the early game is really hard ...

cegprakash: Bronze too crowded

jrke: yup 4000+ in bronze

cegprakash: 200 in wood2, 400 in wood1 and 4000 in Bronze

peerdb: what time does silver open on monday?

StyllyMyle: Gys

Default avatar.png Jo4: what are you guys thought on having the premade stubs for a CoC not be the correct datatype?

DetoBot: why not open the Silver tomorrow

StyllyMyle: I am worried about the time taking for my program

Default avatar.png Jo4: just did one where the input is read as int, but must be read as a long. No test case checks for this, only a validator

StyllyMyle: like i am trying to make bot but it requires me around 3-4 times looping possible actions

Michael_Howard: OK, so this is super-weird. I agree with this bug report: https://www.codingame.com/forum/t/spring-challenge-2021-bugs-questions/190526/28 and can see it myself, but my shadow code agrees with the ref.

UndercoverToad: do you have a replay on that Michael_Howard?

Tiramon: isn't that just a after grow shadows are not recalculated?

Michael_Howard: How do I do that?

UndercoverToad: click the 3 dots below the viewer

UndercoverToad: and then share the link

Michael_Howard: https://www.codingame.com/replay/548887851

Michael_Howard: Turn 80

Michael_Howard: Top

UndercoverToad: only the beginning of the day matters

Michael_Howard: There's one place where shadows count down 3-2-1

UndercoverToad: you grew the tree after

Michael_Howard: Ah

Michael_Howard: Thanks

Marchete: beggining of the day?

Tiramon: as i said shaodws are not recalculated after you grow a tree

Marchete: so shadows are calc'ed at start of the day only?

UndercoverToad: so who replies on the forum post?

Tiramon: yes ... only moment they are important

Michael_Howard: I can do it.

Marchete: day and not turn, right?

UndercoverToad: day

Tiramon: i wrote a compact answer toady

Michael_Howard: Actually I wanna investigate first & check I understand it. If someone wants to post earlier they're welcome to use my replay.

UndercoverToad: thanks, then i don't have to use my other account or write with this alias on the forum

Michael_Howard: Why don't you want to do that?

UndercoverToad: laggy chat

UndercoverToad: moderators see all chat users. that's close to making my browser crash

UndercoverToad: from Friday: https://imgur.com/a/BmQQwpa

UndercoverToad: spot the scrollbar

UndercoverToad: *Thursday

Michael_Howard: No I mean why not write on forum as UndercoverToad?

UndercoverToad: because it's not my main account

GuillaumeBardy: how can we know sun direction ?

UndercoverToad: day%6

GuillaumeBardy: d

GuillaumeBardy: thanks !

GuillaumeBardy: i was not sure that sun comes every time from same diretion at start of game

Donald_D._Doge: entire site works faster without mod status

jacek: yeah, get rid of mods. who needs them

peerdb: modCheck

Illedan: I'll kick myself then?

Passifi: If you kick yourself in the butt I give you 5 €

AntiSquid: you can use your heel if you are flexible enough

peerdb: yeah heel is ez money

Default avatar.png NotSureWhyThisWorks: rank keeps going up, are people submitting worse bots?

Tiramon: hm i don't generate complete actions .. maybe thats the reason why i loose all games with that bot =)

Marchete: on purpose?

Passifi: btw nerds does anyone know how linkedin knows the people I have met in real life ? It always scares me, those aren't my facebook friends and I am not connected to anyone on linkedin so how do they know that I worked with this random dude at a bar 4 years back...

struct: yeah i submited my worse version

Default avatar.png NotSureWhyThisWorks: I can't tell if you are joking struct

Default avatar.png JoKing: i hate this chat

jacek: Oo

Default avatar.png NotSureWhyThisWorks: lmao

struct: Well you dont have to be on it

Default avatar.png JoKing: i'm *not*, it just tells me i have a message while i'm doing other stuff

Default avatar.png NotSureWhyThisWorks: does it ping automatically?

Default avatar.png JoKing: yup, dumb system

Default avatar.png NotSureWhyThisWorks: interesting

AntiSquid: is joKing a JoJo reference?

AntiSquid: are were you just joking ?

Default avatar.png JoKing: my name is Jo.* King

AntiSquid: hey JoKing you can edit your username in your profile btw

Default avatar.png JoKing: i like my name though

AntiSquid: hope you're joking

Default avatar.png NotSureWhyThisWorks: we know he is joking

Passifi: chat soon to be caught in an infinite pun loop

itzluku: https://www.codingame.com/replay/548941791

itzluku: @delineate

Passifi: is your childs name kid by any chance ?

itzluku: error

itzluku: xd

Default avatar.png JoKing: .. kid king?

AntiSquid: you need another jo syllabe in there

AntiSquid: how about JosephJoking ?

Passifi: kidding obviously it has its mothers last name

StyllyMyle: So would you program bot to make different actions per like range of rounds

StyllyMyle: or do it in one

AntiSquid: http://chat.codingame.com/pastebin/468fdc80-b522-45af-96ca-c03e6979fb43

StyllyMyle: bcz rn im not checking day time, just doing general actions that i believe will make bot win

AntiSquid: https://www.babynamewizard.com/baby-name/boy/jo

Tiramon: oh great using 2 bits for size but only using one in the bitmask ... no wonder i don't generate complete actions

Default avatar.png GeorgiD: 02354310 -> 1 12386456792 -> 2 122352261232 -> 2

dreadylein: ;D

Default avatar.png GeorgiD: Any idea what the logic is?

Default avatar.png GeorgiD: Also 1235682312368 -> 1

Default avatar.png GeorgiD: And 0 -> 0

Passifi: what could make the python debugger think that print("answer") is invalid syntax ?

Default avatar.png NotSureWhyThisWorks: show the code

Default avatar.png GeorgiD: Yeah copy paste it

Default avatar.png GeorgiD: Can anyone check the previous examples I sent? It was in my reverse mode lobby and no one got it right

AntiSquid: not the time to share contest code .

AntiSquid: unless it's bits

Passifi: ah I got it didn't properly close some brackets somewhere else, still not sure why it didn't just complain about that and instead jumped to the end of the code and then started to complain

Default avatar.png NotSureWhyThisWorks: sometimes I forget the f on f strings

RoboStac: GeorgiD - https://www.codingame.com/contribute/view/6545a362057d0d03114289e2e83b8f558c28 . Looks horrendous for a reverse clash

Default avatar.png GeorgiD: Damn couldn't have thought of that like ever

DevLorenzo: http://chat.codingame.com/pastebin/4f2ffce1-4f7a-4bde-a889-6b067e852f74

RoboStac: sounds like others are struggling too so it may get downvoted enough to be removed

DevLorenzo: http://chat.codingame.com/pastebin/3a9b9b06-ce7b-45fd-bf0a-59dcf0573936

struct: ouch my bot finally dropped hard

Sakisan: oh wow I didn't realize but I have reached struct's bot rank too hehe

dreadylein: are you allowed to tell us howmuch you decreased your bots performance vs the full thing ? :)

Sakisan: ^

struct: hard to say

struct: I have no idea

struct: I know that my bot doesnt use full time but thats about it

dreadylein: ah

dreadylein: mh intressting :D

dreadylein: how good would you say was your eval ?

struct: probably bad

struct: i only bmade this eval the day before the contest

struct: my other bots were worse

dreadylein: yeah building a good eval seems hard

struct: This one had like 95% win rate vs my other bots

dreadylein: hehe

struct: It might be good if I take into account enemy actions

dreadylein: that was a beamsearch you said right ?

struct: yes

dreadylein: wonder howmuch of an actual hit your bot took by decreasing the time :D depth helps but with a beamsearch and ignoring the opponent the benefit of deeper nodes should decrease fast i guess

struct: well beam width might help

struct: Im gonan try chokudai now

dreadylein: true

HIRO15254: Hello

HIRO15254: I'm playing Spring Challenge 2021 and using python

HIRO15254: when I get inputs, I want to use list.append()

HIRO15254: but if I use it, printed this massage and I can't get input: Warning: your code did not read all available input before printing an instruction, your outputs will not be synchronized with the game's turns and unexpected behaviour may occur.

HIRO15254: Is there anyone same as me? (Sorry I'm Japanese so the English may not good)

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

itzluku: u need to set that param

itzluku: for ur debug prints

itzluku: also documented as a comment in your default codefile

HIRO15254: Ok, I'll try it

StyllyMyle: btw anyone that understood how to traverse and get distance between two cells?

dreadylein: for the contest ?

Uemu-yazid: Bruh I really can't grasp how to use shadows in this contest

dreadylein: what you mean ? hehe

Uemu-yazid: I didn't use that yet haha

MattLGX: For the distance, you can say 1 for the neighbours ans 2 for the neighbours of the neighbours that are not in the distance = 1 list

dreadylein: you an also look in the refree

dreadylein: in the game description is a link to the github repo

Uemu-yazid: Oh

dreadylein: CubeCoord has the implementation that calculates distance neighbours etc

Marchete: yeah, you need CubeCoord to go beyond neighbour distance 1

itzluku: what do u mean with neighbor distance?

StyllyMyle: I still cant get how to figure out cells

Marchete: I mean shadow related

StyllyMyle: guess i will just be using surrounding cells? but that makes things very complicated

Marchete: you maybe want to calc if you have a tree at distance 2 that can block you

Chainman: what is the CubeCoord?

StyllyMyle: what is x y z in CubeCoord?

StyllyMyle: https://github.com/CodinGame/SpringChallenge2021/blob/2785b58e5eb136fdc5349825c33454fa7838270b/src/main/java/com/codingame/game/CubeCoord.java

Chainman: You can compute distance by creating a graph with the neighbor nodes for each node.

Chainman: IDK that's what I did

dreadylein: You can describe any cell in a hexfield with 3 cordinates

Marchete: https://github.com/CodinGame/SpringChallenge2021/blob/1dac6d0019d55890326edb25b2540df4b6a41179/src/main/java/com/codingame/game/BoardGenerator.java#L20-L43

itzluku: ah

Marchete: center is 0,0,0

Marchete: other than that you can "propagate" using

DetoBot: can be considered as a cone

itzluku: yeh u can travel through sun_directions to neighbors and return that info

Marchete: coord = coord.neighbor(direction);

itzluku: since each cell hold the next index for a given sun dir

itzluku: sun dir and neighbor index are the same

StyllyMyle: so you mean enforcing custom coords system r8?

StyllyMyle: by taking three axes and propagating

itzluku: no need imo

StyllyMyle: then mapping the coords?

itzluku: but u need your own model if u want to simulate boards

StyllyMyle: I cant get how x y z can be mapped to a 2d matrix

Marchete: http://chat.codingame.com/pastebin/01f606c2-9a0f-4907-b6f9-e5a46969a888

Astrobytes: https://www.redblobgames.com/grids/hexagons/

Marchete: from a modified starter C# bot

Chainman: I'm not sure how this CubeCord helps for the code in ide.

dreadylein: cords allow for easier time to get distances between 2 cells etc

alchemsti: @stylleyMyle -- the reason is that for the hexes, xyz aren't independent -- taking one step in both x and z is the same as a single in y

alchemsti: But for distances xyz is convenient

Chainman: You can use the hashcode to convert cellIndex -> CubeCoords (x,y,z)

Default avatar.png franciszer: mcst

Default avatar.png franciszer: monte

itzluku: xD i have a probellm were a var randomly transforms from an int to a bool value

itzluku: wtf

alchemsti: The CubeCoord is giving a nice way to do the various geometric calculations

Wontonimo: wow, sleep for a few hours and my rank doubles, in a bad way

itzluku: problem*

Marchete: CELL 8 Tree Size:1: [20,21,9,2,1,7, CELL 8 Tree Size:2: [20,21,9,2,1,7,23,3,6,36, CELL 8 Size:3: [20,21,9,2,1,7,23,3,6,36,12,16,

alchemsti: "One weird trick to drop your rank by 200 places"

Wontonimo: lol

alchemsti: Do nothing for a few hours

itzluku: my rank increases with time

itzluku: LOL

dreadylein: @franciszer possible but most likely not the best call

Chainman: hmmmm

Marchete: right now top100 is doable without game simulation

itzluku: prob top40

Marchete: just the starter AI and checking neighbours and stuff

Marchete: I mean

Marchete: for what my bot did

StyllyMyle: btw

Wontonimo: i didn't use the starter AI

StyllyMyle: at higher leagues should we still have possible actions?

Marchete: yes

itzluku: starter AI ?

dreadylein: game wont change after bronze

alchemsti: Looking at the CubeCoord and board generation code was helpful, e.g. I was always a bit worried the cell ID layout might change.

StyllyMyle: that kinda feel cheat to me as it simplifies a lot of things

alchemsti: But it seems fixed.

Marchete: cell id doesn't change

Wontonimo: itzluku there is a link at the very beginning of the description

Default avatar.png NotSureWhyThisWorks: Marchete top 20 is doable without simulation right now

Wontonimo: called "starter kit"

dreadylein: the possible actions are a convinience thing to help out people

Marchete: thanks NotSureWhyThisWorks :D

dreadylein: otherwise you exclude anyone thats not able to fully implement the engine

Donald_D._Doge: hi, new here, what are the new silver rules?

Tiramon: bronze is final ruleset

Default avatar.png NotSureWhyThisWorks: hopefully it stays like that lol

alchemsti: re simulation or not -- that seems a fake choice, in that if you can evaluate a board 'perfectly' you don't need any simulation

dreadylein: define evalute ;)

alchemsti: So it's kind of a trade-off -- do you invest in simulating quickly and going deep, or evaluating well

alchemsti: I find the simulation in this one is pretty tricky (with sun, shading, and opponent action) that I'm not so motivated.

dreadylein: the engine is easier then it looks at first :)

Default avatar.png NotSureWhyThisWorks: there aren't many short term tactics in this game unlike chess or something so I think long term strategy is most important. And that can be done lots of ways

alchemsti: By evaluating I mean judging the result of a move -

Wontonimo: dreadylein are you simulating days or moves?

alchemsti: so you pick the 'best' one

Wontonimo: alchemsti and dreadylein : I would say evaluation would be "will this lead to a win"

alchemsti: right!

alchemsti: This game has really interesting time aspects, IMO

dreadylein: if you have a perfect evaluation, yeah you wouldnt need a search, but only if the evaluation allready considers any possible enemey move

alchemsti: There is the balance between expansion and harvest

Wontonimo: if it was chess, advancing all pawns 1 square then repeating that 4 more times will not lead to a win ... for exampl

Wontonimo: what alchemsti said

Marchete: imo all the game is resumed as

Marchete: mysun-enemysun

alchemsti: Depending on what your opponent does, of course :D

alchemsti: (advancing your pawn could win, but is unlikely to)

Marchete: mysun as collected sun

alchemsti: resumed?

Wontonimo: i don't take into account what my opponent does, so therefore you can get into the top 50 without paying attention to the opponent

dreadylein: oh i can see this

alchemsti: Do you care where your opponent is?

dreadylein: also the main algos choosen are kind hard to implement with enemy moves

Zaphus: @Wontonimo same here (but not qutie in the top 50)

alchemsti: I'm currently ignoring the opponent as well (but also not top 50 :D )

StyllyMyle: Hey im so much thankful to the post

Wontonimo: alchemsti you can't place where a tree already exists, but otehr than that i don't

StyllyMyle: it finally made me understand that hex grids can be rep as xyz cube

dreadylein: :)

StyllyMyle: but is there any formula to convert the single index to xyz pos and vice versa?

Wontonimo: cool Zaphus, we will battle to the death

StyllyMyle: or should i statically map each and every pos with respective xyz

alchemsti: Huh, interesting. My planned next step is going to take opponent position into account

alchemsti: @StyllyMyle the code on GitHub does a nice trick so you don't need to convert

Zaphus: Wontonimo - or go down in flames together!

StyllyMyle: alchemsti CubeCoords? but it doesnt have conversion function right

Wontonimo: in other hex games i cast it to squares with a 1/2 shift per line and then one diagonal is not allowed. same effect and way easier to calculate

Marchete: map from center

alchemsti: Instead of using the obvious directions of [1, 0, 0] [0, 1, 0] [0, 0, 1] [-1 , 0 0]

Marchete: center in 0,0,0

Marchete: then according what they gave you

itzluku: sdjfahgsdif

Marchete: center.neighbour[i]

alchemsti: it uses [1, -1, 0]

itzluku: just searching bugs

StyllyMyle: Hm wait that might be it

alchemsti: This lets you do nice distance and direction calculations

itzluku: how can an int randoms become a bool

StyllyMyle: I know my 6 neigbours

StyllyMyle: and the xyz coord of center one

alchemsti: @itzluku: the joys of untyped languages?

StyllyMyle: plus those six must be arranged in array or something

alchemsti: Or it's treated as a bool (!! or != 0 or...)

itzluku: @alchemsti yeh.. using python to learn it

alchemsti: Those six are the six directions

itzluku: but i just dont find the type switch

StyllyMyle: so if i could calculate relative pos of these neighbours, i can +-1 in respetive direction to get a cube grid r8?

itzluku: qq

alchemsti: If you draw it on paper, you'll see

StyllyMyle: wtf im so noob :(

alchemsti: Ha, I hadn't seen it before iether. But it's the six directions expressed so that the math to do distance is easier

Wontonimo: you are given a neighbours list in the init, and the neigh_1, neigh_2, etc are always the same directions. The first is always to the right, second is northeast. So if you want to calculate a straight line of 3 squares, just iteratively look up the same ordinal neighbour

Wontonimo: great for if/else bot, horrible efficiency for simulation

alchemsti: @itzluku My understanding is the Python figures out type from how its used. (type inference) If you want to narrow it down, you can try doing things like adding zero to it -- this should be okay for numbers and not okay for booleans.

alchemsti: But don't quote me, I don't use Python that much

Marchete: just be cautious

Marchete: neighbour list has -1 if it's not a legal neighbour

Marchete: so just skip there -1

Marchete: these*

alchemsti: yeah, hit that, using c++, which will happily look up a value at -1 of an array :/

alchemsti: All right good luck folks!

itzluku: well i use a print statement in a loop... and for the first iteration it prints an int and then on a bool

itzluku: xd

itzluku: no idea

itzluku: lol

Michael_Howard: Why is everyone worrying about xyz-coord hex grids when only the neighbour chain in each direction affects anything? Am I missing something?

itzluku: na i would also just traverse through neighbor cells with a depth

itzluku: btw i serialised 0 and 1 for is_mine to bool values somewhere so i have cells with -1 or True or False

itzluku: ..............

itzluku: why did i do that :D

alchemsti: Michael_Howard: shade

alchemsti: Good ole' trinary logic

alchemsti: (for itzluku -- search for 'true false file not found')

Michael_Howard: alchamesti yeah, only in the neighbour chain, which you can get easy.

Michael_Howard: Was wondering if everyone's doing advanced battlefield tactics where distance matters between cells that can't spook each-other.

itzluku: or wait

itzluku: is str(0)=False in python ???

itzluku: and str(1)=True

jacek: no

jacek: str(0) is "0"

jacek: and its not False

itzluku: :/

itzluku: hm

alchemsti: I'm currently only using distance to check what I can seed, but i'm also only at place ~300

itzluku: maybe is_mine input is not 0 and 1 but a bool value if that index is owned by anyone?

itzluku: idk i thought its -1,1 or 0

itzluku: but maybe its -1 True or False

itzluku: ?

jacek: is_mine = inputs[2] != "0"

itzluku: WTF

itzluku: fk me

itzluku: ty! xd

Zaphus: Wontonimo - we meet at last https://www.codingame.com/replay/549037639

Wontonimo: i bow to your greatness

Zaphus: :joy:

Wontonimo: :thumbsup:

Chainman: How do you get them to say things in the replay? lol

why_anonymous: allo

algeo: space + command

Wontonimo: instead of returning "WAIT", return "WAIT i will taunt you a second time"

xangma: Dumb question, when it says: "As long as you have enough sun points, you can take any number of actions." what does that mean specifically?

xangma: any of the 4 possible types?

xangma: any number of any type?

Thienu: you can take any number of any type of turn in a day

Zaphus: whatever you want - before you wait

xangma: Right ok, thanks

xangma: very much

Zaphus: but on separate game ticks (or whatever you call it)

Thienu: yes

Wontonimo: right

xangma: separate says?

xangma: days*

Wontonimo: no, the day only progresses once both players wait

Zaphus: some other games let you do "ACTION 1; ACTION 2; ACTION 3; WAIT" as a single response. This game only takes one action per loop

itzluku: its turn based

itzluku: in bronze u can make multiple actions per day

itzluku: war u in wood?

itzluku: are*

algeo: not at same time

xangma: hmmmm I'm in bronze, as soon as I start doing more than one action per day it starts saying I'm out of sync

Zaphus: a loop is not a day, dont mix the two up

xangma: OH

Wontonimo: just one action per turn

algeo: some turns = day

Wontonimo: the day doesn't roll over until you wait

xangma: OH I get it now

xangma: Right thanks

Wontonimo: it took me a while also tbh

xangma: Thanks very much

itzluku: jesus

itzluku: another bug because i compared a str with an int prepresentation

itzluku: ....

dreadylein: you can precalcutelate any possible shading/seeding in advance

dreadylein: woops

CGGCoder: Just a quick question, what does a 'Dormant Tree' mean?

martinpapa69: what can you precalculate in seeding ?

Marchete: thx for the tip dreadylein :D

Machinist: Hi Everyone.

Machinist: Have a good day

dreadylein: woops was for the late response chat was way scrolled up

dreadylein: :D

dbf: CGGCoder, from rules page: "Any tree impacted by one of your actions becomes dormant for the rest of the day. A dormant tree cannot be the subject of an action. "

CGGCoder: Thanks!

dbf: so it is a cooldown

itzluku: yes

itzluku: ->day24 growing a t2 to a t3 not worth

CGGCoder: true

CGGCoder: You should harvest all of the remaining trees

itzluku: is is_mine not getting updated for every turn?

itzluku: only initial?

ddreams: what would make you think that?

Wontonimo: it gets updated every turn

itzluku: i haven an index with 0 but that cell was completed from my opp some turns before

itzluku: meaning it wasnt updated or i overriden the updated cell somehow

Zaphus: Cells dont get updated, only trees - and if completed you just dont get a message about it next turn meaning it is not there

itzluku: is_mine = inputs[2]

itzluku: it does get updated every turn

Zaphus: but only for trees that exist at that turn

itzluku: oh

itzluku: hm

Zaphus: clear your cells of tree information between turns, then refresh it when loading (thats what I do)

Zaphus: but dont clear other cell info like neighbours

itzluku: yes ill try that, ty!

itzluku: sneaky

alchemsti: Yeah, I'm not sure if I have it in it's final form, but it took a bit of tweaking to nicely separate out the fixed stuff from the changing

VizGhar: how deep your searches are guys

VizGhar: ?

ZarthaxX: 1

ZarthaxX: :P

ItsNotABug: 0

VizGhar: noice :D

ZarthaxX: not doing the beam yet tho

Thienu: spent whole day implementing simulation here

ItsNotABug: Does silver open today or tomorrow?

VizGhar: I hopped into it in Dart lang and it was freaking mistake

VizGhar: now I'm reworking it into C++... never ever competitive dart

Wontonimo: Thienu woot! how's the sim going?

Default avatar.png cloudberry:

ZarthaxX: saw that dart took a lot for a bfs

Thienu: painful hahaha

Wontonimo: VizGhar , my search is 0 depth

ZarthaxX: :P

ZarthaxX: its technically depth 1..

VizGhar: So you are that if-else guy? :P

ZarthaxX: the one and only wonto

Wontonimo: no, i prefer sim just haven't got around to it for this competition

ZarthaxX: you can stay with if else

Wontonimo: i'm thinking my first sim implementation will be beam or DFS using my current if/else as the opponent logic

ZarthaxX: that's perfect :P

Marchete: that's a good idea

Marchete: ignoring enemy seems strange in this game

BlaiseEbuth: Zarthouuuuuuuu! Where's ze bear?

Wontonimo: well, it's an idea at least. it has the potential to try and overfit beating my if/else but the benefit of being fast for the opponent side of th calculation. I'll let you know how it goes

ZarthaxX: python n1 again

ZarthaxX: BlaiseEbuth oh man wait a sec :P

Wontonimo: i'll port to c++

ZarthaxX: gl :)

Wontonimo: haha , how is python N1 ?

ZarthaxX: if else is strong

Wontonimo: yeah, for sure

ZarthaxX: BlaiseEbuth bear mode on

BlaiseEbuth: Yéé!

BlaiseEbuth: I reload

Noyotens: someone know how to get neighbors rishness

ZarthaxX: :D

ZarthaxX: Noyotens save the data somewhere?

Noyotens: plz guys tell me how

BlaiseEbuth: Spy them

ZarthaxX: you got it on input

ZarthaxX: lol

VizGhar: ri what?

Wontonimo: yeah, Oioi (n1) bot returns in about the same time as my bot, so it doesn't seem to be doing much sim if it is

ZarthaxX: richness VizGhar

ZarthaxX: Wontonimo how do you know?

Noyotens: lol

ZarthaxX: the return time :P

Wontonimo: ZarthaxX I don't know it exactly, but in by selecting that bot as an opponent and running a few "Play my code" and using wall clock, it has the same wall clock as pitting my bot against itself.

Wontonimo: if it used all its compute resources then it would have used 1000ms + 100ms*127turns = a lot of seconds

Wontonimo: around 13 seconds

Wontonimo: but it returned in about 3

ZarthaxX: ahh ok

Oioi: Wontonimo : right, only heuristic right now

ZarthaxX: what a god

ZarthaxX: gz Oioi

Wontonimo: HEY Oioi !

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

Oioi: hi :-)

VizGhar: oioioi :) whats going on struc t?

VizGhar: at least you are not below 1k like me

struct: yeah, but I probably spent a lot more time on it

VizGhar: i dont think so... wrote it in dart and trown it away... so i'm starting over

struct: I tested the contest though

Chainman: hey :grin:

ZarthaxX: struct harder without opps

Chainman: if else to the top I guess here

struct: I will soon take revenge on all these if elses

Chainman: with else if?

struct: if it is what it takes

Wontonimo: go struct !

algeo: is it true that the center of grid contains most richest soli . i am in wood2

algeo: *always

Astrobytes: True AI go brrrr

algeo: go

algeo: ok

ZarthaxX: hi astrobytooo

Astrobytes: hey TreethaxX

Rabeeb: T

ZarthaxX: nice one :P

GameSurt: what is the best language for cyber security

ZarthaxX: i guess python

Astrobytes: HTML

ZarthaxX: LMAO

GameSurt: ))

VizGhar: ssh (they can hear you)

Astrobytes: hah

Wontonimo: no one can hear you on ssh, it's secure sh

Astrobytes: I thought that was the joke :/

Wontonimo: algeo i haven't seen a board yet where the center isn't the richest. but regardless, that info is provided as input to your bot

algeo: ok

Wontonimo: i'm slow Astrobytes

Astrobytes: :grin:

BlaiseEbuth: Wooooonntooooooniiiiiiiisloooowwww

Wontonimo: think slow, type fast. not a great combo on my work chat

jrke: i think there will be 5000+ bronzies when silver will open

itzluku: bronzies xd

itzluku: im losing against my old version xD

BlaiseEbuth: Wontonimo https://i.imgur.com/sXUhxx8.gif

Wontonimo: yeah, pretty much :D

algeo: wood 2 get minimum 6 points :p well if then i can first in unused languages by others

Default avatar.png Harsha.123: i am new joiner in this codingame

Default avatar.png Harsha.123: :raised_hand:

Wontonimo: hey :wave:

algeo: welcome to the world of bots

dreadylein: welcome

Wontonimo: have a great day coding everyone. I'm off to enjoy the sun while it lasts

Astrobytes: enjoy Wontonimo!

algeo: first i thought the hexagonal grid will hard to manage then realised it doesn't matter :)

struct: No sun until legend

Astrobytes: Gotta say, I'm struggling to find the motivation to do anything

ClockSort: awesome, more than 4k players in Bronze now

ClockSort: it's time to write some code.

Michael_Howard: How can I print something that will let me match console output to game screen? Can't just turn++ because don't get input when sleep.

Michael_Howard: Sometimes when it's halfway between it can get confusing which console output is for which video frame.

RoboStac: you can display messages on screen by putting them after your action (eg "COMPLETE 3 HELLO") - you could display your turn variable there so it matches between console and screen

Michael_Howard: Yeah I'm doing that, hoped there was a better way. OK, thanks :)

algeo: i won every match in wood2 now with the same code without running in this league i am 15 :o

ClockSort: you'll probably drop

algeo: :\ lol

algeo: WAIT command is not useful in every league ?

ItsNotABug: beating wood 2 is like beating a new born baby at tennis

algeo: for a new born baby it is like ..

jacek: oO

itzluku: xD

itzluku: my bot is worse if i consider shadows

Default avatar.png slamo: how do you print debug text in go?

RoboStac: fmt.Fprintln(os.Stderr, "Debug messages...")

Default avatar.png slamo: thank you!!

ItsNotABug: Consider shadows less?

algeo: dormant tree = size 3 ?

itzluku: no

algeo: oh

ItsNotABug: dormant is if its been used, or newly planted

algeo: oh ok

itzluku: used "that day"

itzluku: gets non dormant again next day

algeo: :thumbsup:

itzluku: lul now my bot won

itzluku: i only consider 1/3 of the remaining days

algeo: nice

itzluku: xd

Default avatar.png LouAndrejMosot: Where can i practice

itzluku: https://www.codingame.com/replay/549174185

itzluku: these games are so close...

itzluku: https://www.codingame.com/replay/549177312

itzluku: cmon :D

KelvinAndHubbles: is the bronze AI going to translate to the boss? If so, that's an incredibly weak boss

icecream17: no, default is always easy to beat

itzluku: does anyone know if new divisions add new features?

itzluku: uh i made top100 again

peerdb: no, this is the final ruleset @itzluku

itzluku: good xd

Default avatar.png VSD2807: Could anyone help me with a python line. What shall I place to make this work. If "SEED" in possible_actions, then continue, else go to next

Default avatar.png VSD2807: The problem is for finding the word SEED

tomatoes: if 'SEED' in line:

Default avatar.png VSD2807: Tried that already, SyntaxError: invalid syntax

icecream17: vsd, see: https://imgur.com/a/AckA7TM

icecream17: there shouldn't be an error

Default avatar.png VSD2807: http://prntscr.com/12ohu2o

Default avatar.png VSD2807: Have a look please

KelvinAndHubbles: thats checking if seed is in the list, not if seed is in an action in the list

algeo: u need to go through

algeo: the list

icecream17: python thinks that "block" is a set or object

icecream17: "not a function" - error

icecream17: *dict

icecream17: # Python parses it like this: http://chat.codingame.com/pastebin/6da5755d-1006-499b-9b85-c6466a3e1c2c

Default avatar.png VSD2807: Ah gotcha. Thanks for the help, no more error

GrekMaR: http://chat.codingame.com/pastebin/0699feb0-6e30-4aea-ab83-cc16097bd934

GrekMaR: ^ Anyone who does java code golf who knows how to shorten boilerplate code?

KelvinAndHubbles: get rid of spacing and put it on one line?

GrekMaR: ofc i do that when golfing, this is just for visibility I do spacing and lines ^^

KelvinAndHubbles: ahh, only other thing I do is change the variable name of the scanner to one char instead of two

KelvinAndHubbles: you can also replace the interface with class to shorten it more, unless your going for an interface

GrekMaR: using interface is actually shorter cause else main class needs to be public to compile :)

GrekMaR: but yes var name of scanner

KelvinAndHubbles: ahh, wow thanks shortening my golf codes :D

GrekMaR: haha cheers,

algeo: promoted to bronze :)

algeo: if i play invalid move i lost points ?

MoMaT: you loose the game.

algeo: :o i got 20 point but now it is a dash -

itzluku: https://www.codingame.com/replay/549221278

itzluku: xDDDD

algeo: :D

n4ou3r: xD

algeo: 10 / 3

algeo: that 3

itzluku: true

itzluku: rematch!

itzluku: :D

algeo: :)

cegprakash: anyone doing topcoder SRM?

algeo: i need some seach algorithm for bronze :\

KelvinAndHubbles: GrekMaR you might already know this one too, but change your System.out.println to System.out.print cuts off 2 characters per print

GrekMaR: KelvinAndHubbles ty actualy didn't think about that one :)

UndercoverToad: nope ceg. but codejam next week

AntiSquid: this seeding business is annoying @_@

itzluku: most games i lose have like a 10pt diff

algeo: :c

itzluku: -.-

BenjaminUrquhart: Welp good luck to people, came on just to check out this contest and I don't really find it that interesting

itzluku: euler got a weird strat

itzluku: spamm t3 trees on richness 1 cells

itzluku: and it works

itzluku: xD

UndercoverToad: i don't include richness in my scoring yet :D

itzluku: xD

itzluku: #?

algeo: when it is good to use seed ? when we have 1 tree left

itzluku: ifu want more trees ?:D

algeo: xd

UndercoverToad: when the seed is free (no other seed of yours on the map) is already a good time

itzluku: more trees more suns more points

jacek: is fluttershy a tree

DevLorenzo: Hi have a question with the Defibrillators small game

algeo: yes please

DevLorenzo: I have a code that works for the first and last example, but not second and third

DevLorenzo: I don't know why

algeo: share code :p

DevLorenzo: here the code: http://chat.codingame.com/pastebin/ae804f0b-9c16-4c58-9120-9be5ac27cc08

UndercoverToad: do you convert from degree to raidans?

algeo: oh that maybe it is wrong

UndercoverToad: would be a classic, a lot of users get the wrong

DevLorenzo: Thx

DevLorenzo: i try

Smelty: does a land lose fertility after you complete a tree on it

UndercoverToad: no

Smelty: ok

DevLorenzo: So I should convert to user longitude

and latitude in radian?

UndercoverToad: yes, sin and cos expect radians

Smelty: thanks btw

Rag: maybe its better to use t1 cells since shadow blocks you less overall? going for t3 cells is risky i guess

itzluku: u will get less gold in the early game

Smelty: meh my strat is to use outside for sun and inside for nutrient

itzluku: its a tradeoff

UndercoverToad: that makes it easier for the opponent to shadow you

itzluku: might be worth to go for a hybrid

itzluku: :)

itzluku: depends on the day

Smelty: hmmm\

Smelty: game gets more and more strategic the more you look at it

DevLorenzo: http://chat.codingame.com/pastebin/16ae4b40-090c-4bdf-a1b5-05fcd7fc9e4e

DevLorenzo: Continue to have an error. I have a wrong output with second and third.

Smelty: weird.

DevLorenzo: Other ideas?

algeo: wrong substring

algeo: spitting is wrong i think

Smelty: hm

algeo: ;; is not in everything

DevLorenzo: Sorry for the inconvenience but I've been there for like 1h

itzluku: won against euler, rank 69 is mine :D

Smelty: lol

Smelty: my goal is 420, no way im making it there

itzluku: u got this

itzluku: just weight neighbors for your seed spots

itzluku: if u can make a knight structure u are good to go

VizGhar: where is dbd r?

Smelty: whaaaT

Smelty: mr wonton told me to go knight

Smelty: but it crashed :(

itzluku: order possible seed options by nr of opponents and nr of own trees surrounding that spot, its important to have as little aligning team trees as possible

itzluku: imo

Smelty: wow

dbdr: VizGhar in submit...

VizGhar: :P

VizGhar: I simply want to see someone from top 50 implementing their solution... I simply can't take it easy

VizGhar: (don't know what incremental steps mean)

dbdr: there are some streams

dbdr: recurse did one for locam for instance

jrke: will recurse again do one submit legend?

VizGhar: Have to carefully look at it :) I mean... i'll most probably get to top 500 but can't see any way further

VizGhar: will recurse come? :)

UndercoverToad: DevLorenzo your input parsing has problems

jrke: he came last time when legend opened and he made legend with just one submit from wood

itzluku: top80 73% :o

UndercoverToad: you check for ";;" but sometimes there is a text between these two ;

DevLorenzo: Thank, I already solved thanks to Algeo

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

dbdr: what's up UndercoverToad?

UndercoverToad: you are up

UndercoverToad: i'm down around 50

VizGhar: noice

itzluku: i cant find u UndercoverToad :o

UndercoverToad: because that's an alt account

dbdr: he's undercover though

UndercoverToad: try to guess my real one

jrke: dbdr did you applied any algo or just heuristic?


UndercoverToad: sometimes i'm not sure if it's irony or not

itzluku: i mean there is no Toad

dbdr: beam search jrke

VizGhar: dbdr what depth can you reach?

dbdr: :zipper_mouth:

jrke: :grimacing:

VizGhar: well... i tried

VizGhar: I tried to befriend him and look... now I have to think myself

VizGhar: and it hurts

dbdr: I think, it was all strategy!

dbdr: *I see

struct: My nth_element was bugged

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

VizGhar: 666th

ZarthaxX: struct nOOOOO

struct: I had no idea that the second param was pointing to first param

struct: or w/e it is

struct: its confusing

ZarthaxX: what

struct: I had nth_element(&pool[start], &pool[start] + BEAM_WIDTH - 1, &pool[start + total], [&](const GameState& a, const GameState& b) { return a.evaluation > b.evaluation; });

ZarthaxX: second param is number of elements

struct: nth_element(&pool[start], &pool[0] + BEAM_WIDTH - 1, &pool[start + total], [&](const GameState& a, const GameState& b) { return a.evaluation > b.evaluation; });

ZarthaxX: i dont get your code

struct: correct should be the 2nd

DomiKo: template< class RandomIt > constexpr void nth_element( RandomIt first, RandomIt nth, RandomIt last );

DomiKo: https://en.cppreference.com/w/cpp/algorithm/nth_element

DomiKo: ZarthaxX second param isn't number of elements

struct: yeah domiko but I had no idea it needed to start at [0]

struct: for w/e reason

ZarthaxX: DomiKo but i saw examples where it was

ZarthaxX: mmhmm

ZarthaxX: https://www.geeksforgeeks.org/stdnth_element-in-cpp/

ZarthaxX: first example shows trhat

jrke: "Players that are asleep do not receive input." - does this means that if you waited then you will get input in next day?

DomiKo: jrke yes

DomiKo: ZarthaxX no?

VizGhar: One main problem that I have with my beam is, that I have to sort it every time beam size is exceeded (allways) Sort is really slow

ZarthaxX: no? lol

VizGhar: is there any way to surpass this?

AntiSquid: that's the fog of war they snuck in jrke

VizGhar: you guys implementing some weighted trees?

struct: use nth_element VizGhar

ZarthaxX: for first code he put the second arg as an iterator to the fifth element

ZarthaxX: and then the sort put the first 5

VizGhar: nth_element... hmm ill try to google a bit

ZarthaxX: VizGhar its a partial sort

ZarthaxX: so you get the first k elements sorted

UndercoverToad: https://en.cppreference.com/w/cpp/algorithm/nth_element

ZarthaxX: the first k elements

RoboStac: yeah, but it's a iterator to the fifth element, not the number of elements. Passing 5 there would be really bad

ZarthaxX: i know

ZarthaxX: but i meant iterator to the fifth lol

DomiKo: so you get the first k elements sorted

DomiKo: noooo

ZarthaxX: isnt the second parameter the one that determines how many

RoboStac: yeah

DomiKo: don't troll people ZarthaxX

DomiKo: first part won't be sorted

MSmits: do they get sorted? I thought they just got put into any order above the nth element?

ZarthaxX: im not trolling

DomiKo: MSmits you are right

ZarthaxX: im just experessing wrong

ZarthaxX: lol

struct: So which one is correct?

struct: https://tech.io/snippet/bFOFBbu

DaNinja: is it the same as partial_sort()?

ZarthaxX: whatever

struct: no DaNinja

UndercoverToad: i'm memorize that what i don't want to admit that i was wrong. "I'm just expressing wrong" :)

MSmits: I am wondering if i am using this correctly:

MSmits: std::nth_element(parents, parents + parentCount - 1, parents + BEAM_WIDTH, [](GS const& a, GS const& b) -> bool{ return a.eval > b.eval;}); \

ZarthaxX: lol toad

MSmits: some how i needed to do -1 on the parent count in the second param

struct: MSmits my problem is that on nth if i start on array[0]

struct: it still works

struct: Thats why im confused

struct: like the second param

MSmits: in my example, parents is an array too

MSmits: and &parents[0] is the same as parents

AntiSquid: UndercoverToad, more often used: "i think there's a misunderstanding / there's seems to be some misunderstanding / miscomunication"

struct: ah I see

MSmits: parnents + parentcount -1 is basically &parents[last index]

VizGhar: hmm so if I use that nth_element I'll get my nth_element in center and smaller on one size, larger on another right?

DomiKo: yes

MSmits: yeah VizGhar

ZarthaxX: oh so like the quicksort thing

ZarthaxX: sorry D:

VizGhar: this should work... Ok guys... just small steps... concentrate and breathe :D I'll make some stupid thing again

itzluku: release the kraken

MSmits: one iteration of quicksort, except instead of knowing the value of the pivot element, you know the position where you want the pivot element to be

ZarthaxX: right

AntiSquid: itzluku now that you mention it, where is kalamariking ? guess he is a bloody alt afterall @_@

VizGhar: Oh... thanks MSmits, now i know exactly what it's doing

MSmits: np, I still wondering if i am not off by 1 in my use though

struct: Maybe ill change my beam search, there is no use in storing all states

AntiSquid: oh he is on the leaderboard, nvm then

MSmits: struct nah, dont store all states

AntiSquid: gotta catch'em all

MSmits: just the last level and whatever action it started with, for each state

MSmits: you dont need to reproduce the entire path taken

struct: I save the action in the state

DomiKo: you can save id of action

MSmits: i only save the first actuon taken in the state

VizGhar: go MCTS what could possibly go wrong

dbdr: the path can be useful for debugging though :)

struct: yeah, I meant saved id in the state

DomiKo: dbdr true

MSmits: dbdr yeah and i guess i have plenty of room to actually save them

AntiSquid: VizGhar early silver promotion?

MSmits: btw, i am starting to think you need multiple algo's here

MSmits: bs is great for start

MSmits: but becomes less useful when shadows become more important

MSmits: (opponent shadows)

jrke: for what depth MS BS

AntiSquid: people here love BS ?

MSmits: i dont know what depth is best

solistice: guess I'm back for another challenge!

MSmits: it's just a number, i can set it to play till end of game if i want to

MSmits: BS has no depth limits

AntiSquid: wb solistice

solistice: thx!

solistice: been a while, trying to reach legend for once :D

jrke: i am a bad optimizer so can't get a lot of nodes...

solistice: if I find the time

MSmits: you dont need a lot

MSmits: just have to be smart about pruning and such

[0_o]Surya: http://chat.codingame.com/pastebin/c020da94-1439-4574-8d05-ba45c4add4c5

solistice: @AntiSquid I remember there being plugins for codingame previously, to link with IDE and stuff.. Does that still exist?

AntiSquid: yes somewhere

AntiSquid: search forums for tools

solistice: cool cool, will do! :)

MSmits: I have a 20 depth bs that only takes 5 ms... it's jus tbad because of bad eval and pruning, optimization doesnt help and more beam width doesnt either

VizGhar: click settings in CG IDE solistice

VizGhar: at the bottom

jrke: 20 in 5ms thats very gr8

VizGhar: 20depth in 5ms? wtf? :D all bitwise operations and crazy pruning?

Scarfield: beam width of 1? :p

MSmits: some pruning yeah

VizGhar: yeah... such a beamsearch is called hillclimb Scarfield

VizGhar: (not exactly, but still...)

MSmits: also very optimized i guess, but my point was that focusing on optimization is not a winning strategy here

MSmits: and I didnt actually. This was just the easiest way for me to code it

Scarfield: improved eval might change that though(?)

MSmits: yeah maybe, but i watched a couple games from the top 10, saw what they did, translated it to pruning and went from rank 1800 to rank 300-400

jrke: damn MS then if you coded hardly and optimized you will be doctor strange who saw all possible outcomes in infinity war

MSmits: lol, and only 1 that is a win, and it's outside of the beam... too bad :P

VizGhar: he's messing with us. come boys. we go home

MSmits: mmh that's lucky, won first 10 games on new submit :)

VizGhar: When you are talking about pruning. I understand it as removing nodes similar to another nodes (so exact copies but different path)

MSmits: no, not in this case VizGhar

VizGhar: so you are pruning before computation = dont seed from 2 trees

VizGhar: on same place

MSmits: pruning would be, for example: Not considering dropping a seed when there's already one. Or not growing another size 2 tree when you already have a bunch

VizGhar: or sth like that

MSmits: well i guess it's like compression, you have lossy compression and lossless compression

MSmits: pruning that removes branches that are provably bad or redundant is lossless

MSmits: but I was talking about lossy pruning

MSmits: removing branches that are very likely bad, but not 100%

jrke: pruning can be COMPLETING only after D days

VizGhar: ah... gotcha

MSmits: right good one jrke

MSmits: pretty sure most players have a rule like that

MSmits: or it's more fluid, like it depends on the nutrients, the number of trees they already have etc.

VizGhar: yeah... So what I'm doing currently is some early game hardcode (first 2-5 turns) then running simulation (single round=single depth) and all that pruning is done in my eval function... that is for sure slow

AntiSquid: number of states explodes with seeds, what makes seed placement bad @_@

VizGhar: I was too happy seeing that my simulation throws exactly the same "possible steps" as i was receiving in input

struct: maybe I can add that pruning

struct: Chuck to check how it changes

davi_bart: Probably is written in the text but I can't find it, are my shadows spooky also for my trees?

struct: just*

MSmits: davi_bart yeah

davi_bart: ok thanks

MSmits: you can shade your own trees

VizGhar: just look at some replays davi_bart you will see it immediately

MSmits: don't :poop: where you eat. Don't shade, where you tree

jrke: this game needs to have an good opponent interference + look at large depth

VizGhar: oh sheat that was neat

Murat_Eroglu: we cant see segmentation faults on game information screen, can we?

AntiSquid: maybe i should drop everything when i have too many states?

ClosetAI: I didn't realize at first that your own trees could shadow your other trees

VizGhar: and now you are a bit smarter go go Closet

jrke: finally i coded the game engine

jrke: but not if its bug free

jrke: not sure*

jrke: will be discovered as i will see the replays after applying the sim

ClosetAI: This engine is probably the easiest I had to code so far

VizGhar: painful right jrke? MSmits told me it's simple

Scarfield: i forgot about shadows not affecting smaller trees, luckily chat mentioned it

VizGhar: i cried :D

jacek: well he has experience with hex games

ClosetAI: Just hardcode the stuff that you get in input

jrke: he is a good, expierenced CS teacher so easy for him

algeo: i lost my code :|

algeo: oh it is there another tab

VizGhar: :D

algeo: :D

VizGhar: if you submit it or at least play, it will be stored

algeo: oh ok

jrke: happened once with me few months ago i lost my all code and i had to rewrite that whole 430 lines :(

Wontonimo: algeo you can use the "History" navigation on the left to see all your previous commits

MSmits: wait... the sim is relatively simple compared to other games. I don't mean coding a sim in general is simple

algeo: ok tnx

jrke: we are also talking for this game MS

VizGhar: we were talking about this game

MSmits: yeah i know

MSmits: compared to other games, i think this game has a simple sim

Wontonimo: :wave: MSmits

jrke: its easy to code if you have full 100% concentration + every minute rule in your mind

MSmits: yeah

MSmits: hi Wontonimo

Wontonimo: 2 words will help greatly in writing your sim : unit tests

MSmits: yeah, better than my method, which is staring at the same code for hours until you see the bug

jrke: http://chat.codingame.com/pastebin/b94fcb86-ae4b-4870-9728-d8bec12bc277

Scarfield: xD

Wontonimo: :D

MSmits: i did unit test action generations

MSmits: never unit tested the sim states

MSmits: probably should get on that

jrke: wait you mean testing every node you get in sim?

Wontonimo: another method of validating your sim is to use the previous board state and your and opponents actions and make sure it matches the new state every round, and DIE with a big warning when it does

RoboStac: it's really awkward to do that here though Wontonimo as they can have multiple turns when you wait

Default avatar.png MerryMentat: That approach is tricky because they don't give your opponent's moves.

MSmits: also, you dont get your opponent action as input

MSmits: MerryMentat beat me to it

Default avatar.png MerryMentat: But you can still do it

Wontonimo: oh, right ... well you can do that up to and including your wait. first action of new round is reset

RoboStac: yeah, but you just generate all possible moves and test each of them to see if it matches new state

MSmits: did you do that RoboStac?

RoboStac: not here

Default avatar.png MerryMentat: I just built something that parses the game replay and replays it into my simulator

jacek: you do that only in begining of contest to see if youe sim is alright

Default avatar.png MerryMentat: Because the game replay gives the opponent's moves.

RoboStac: but I quite often have in the past

MSmits: I think I am going to do what RoboStac suggests

Default avatar.png MerryMentat: You have to debug print out everything the game gives you, though.

Wontonimo: yeah, you are all correct about it being hard for this particular game. good point

Default avatar.png MerryMentat: Then you've got enough info to do it.

RoboStac: most of my mcts games do it because it's helpful for mcts tree reuse too

Westicles: does beam stack search ever apply to bot problems?

jacek: btw. i found my another bug - i written each tre gives 1 sun point. but it gives tree.size points :F

jrke: i will start from sim then i will change my algo after silver opening

MSmits: Basically, just take the current state, generate all your opponent actions. Select an action of your own, make a list of all resulting game states from all combinations of your move and the opponents moves and compare them all with the input state of next turn

Wontonimo: woot! I found another if/else to improve my bot.

MSmits: just dont do it when your action is wait

RoboStac: yeah

RoboStac: sounds like it should work

icecream17: https://www.codingame.com/share-replay/549323860 my bot spams throw at a cell (move 65)

MSmits: will do that then, thanks again RoboStac, great suggestion

jacek: another approach - make muzero and screw all the rules. who nees rules anyway

RoboStac: people without lots of memory / code space

jrke: gn gtg want to have some sleep

RoboStac: have you seen the input formats in muzero?!

Wontonimo: haha icecream17 ... that's fun

Wontonimo: gn jrke

Wontonimo: wow, rank stabilization just raised me from 73 up to 67. First i've seen my rank go up from stabilization.

jacek: so stable

Wontonimo: lol

Default avatar.png MerryMentat: What is stabilization?

Wontonimo: after your last battle, the scoring alters your rank one last time

Default avatar.png MerryMentat: Oh - I didn't realize there was a "last battle" - I'd assumed that it just kept having you battle over and over again

jacek: when you lead in points for most of the game... https://www.codingame.com/replay/549331813

Wontonimo: MerryMentat when you click "Test in Arena" your bot does about 96 battles of you vs others. When others submit their bot, your bot may be one of their "others". That's it.

Wontonimo: the stabilization of your score happens after your 96 battles that you triggered with the "test in arena"

Default avatar.png MerryMentat: Ah!

Default avatar.png MerryMentat: 96 is a lot!

Default avatar.png MerryMentat: I didn't know that's how it works

jacek: still more than community game :unamused:

MSmits: doesn't really matter at this stage in the contest anyways

Wontonimo: jacek that's a nice replay. reminds me i havent addressed that problem happening accidentily in my bot

struct: I think its time to turn on all the pcs in the house to bench

UndercoverToad: how many do you have?

jacek: thats why contests should be in winter

struct: 5

MSmits: he's even going to test his bot on his roomba

struct: Can smart fridges run it?

MSmits: try it

MSmits: maybe it will grow branches

Wontonimo: see if you can run it on your internet root-er

Wontonimo: was that too "dad" of me?

MSmits: yeah, but it's ok :)

jacek: ok fixing the bug yielded another 500 ranks up

Wontonimo: :tada:

itzluku: https://www.codingame.com/replay/549339967

itzluku: not even close

Thiesjoo: Hmmm there is no way to see where your code is timed out?

struct: you need to download the replay

MSmits: just to be clear, I never did that part. Some players here are proficient with downloading replays and automatically taking information from it

MSmits: euler showed me some of that with python, but I suck at this

Astrobytes: Am I the only one that finds this game completely unexciting?

jacek: !!!!

jacek: heresy

CGGCoder: Nope

jacek: how hex board game can be unexciting?

MSmits: mmh it's ok in that regard for me, i just find it frustrating that my usual tricks dont give me a better ranking so far :)

CGGCoder: It's complicated

Astrobytes: I just find it completely boring.

avdg: if reading is boring, it can be a factor

Astrobytes: Eh?

MSmits: well it's trees, they dont move

Default avatar.png JBM: hexagons? i barely noticed

MSmits: same, the fact that it's hex doesnt matter

avdg: otherwise its about getting excitement about maximalisation

CGGCoder: How do you make it so that when you do all of your actions and a new day arrives, the 'for' statement restarts?

Default avatar.png JBM: they give each cell's neighbors, you don't have to do any crazy hex math if you don't want to

Astrobytes: I told myself I would finish my sim today, but I only added a few lines. I cannot motivate myself.

Wontonimo: we need explosions for Astrobytes

struct: Should have played the tutorial

avdg: don't think too hard

Wontonimo: Astrobytes i haven't even started on my sim

Wontonimo: not even 1 line

CGGCoder: Wait what?

CGGCoder: You guys are making sims?

MSmits: Astrobytes i think it's because you did not pick this game. When you're playing on CG you currently have 30-40 games to pick from, so you're spoiled like that. Now you're forced to play the one they picked

Astrobytes: Well, that's not the reason I don't like it MSmits

avdg: I don't have a sim, though I'm trying to add functions to make it possible 1 by 1

jacek: column E is after fixing the bug. i think there are might still bugs https://i.imgur.com/TX7wGBW.png

avdg: but honestly, it's still far off

MSmits: true Astrobytes, but I remember when all these shiny boardgames werent on here, i enjoyed these contests more back then

Wontonimo: CGGCoder yeah, if you want to do search you need a good sim. Search is very powerful AI

Astrobytes: This one reminds me of the last one, but less interesting.

CGGCoder: ...

CGGCoder: ok?

MSmits: to me it's more interesting that the last one, but not more interesting than the boardgames :)

avdg: mine can't calculate the next state yet

Astrobytes: Just my opinion obviously ;)

LDami: Hey guys ! how are you ? :)

Wontonimo: so i found UTTT really interesting because it was so small in scope that it was all about maxing stuff out. This one is fairly close, so the maxing stuff is something i'm looking forward to

CGGCoder: I'm fine.

MSmits: yeah it's very much personal preference

CGGCoder: How do you make a for loop restart when a new day comes?

MSmits: i have no idea what that means CGGCoder

Astrobytes: Hm?

avdg: put a for loop in a for loop?

jacek: huh

LDami: I've just a little question for you ! How do you would name a variable containing the number of barracks ? "nbrOfBarracks" or "nbrBarracks", or something else ?

LDami: would you name *

Astrobytes: Call it TheNumberOfBarracksIHave if you like

jacek: numOfBarracks

CGGCoder: nbrBarracks

Astrobytes: It's your code

CGGCoder: I prefer shorter

Wontonimo: i like the variable name bob. go with that. or bobsNbrOfBracks

Default avatar.png JBM: resultOfApplyingABarrackFactoryCounterBean

jacek: or dupa

RoboStac: I'd probably call it n and then hate myself about 5 minutes later

Astrobytes: RoboStac :rofl:

Astrobytes: JBM: Classy!

Default avatar.png JBM: in a bad way ^^'

LDami: Astrobytes: I know but it's interresting to know how other people do :)

MSmits: why Bean JBM?

Default avatar.png JBM: i dunno

Default avatar.png JBM: it's a java thing i ever understood

Default avatar.png JBM: *never

Default avatar.png mororo250: Are there any way to save info into a file?

MSmits: oh beans from the island of java?

Default avatar.png JBM: they have "beans"

LDami: Thanks for answers :)

MSmits: dont they produce beans over there

Default avatar.png JBM: maybe they plant them

Default avatar.png JBM: well, java beans at least

MSmits: yeah

Astrobytes: LDami: well, I'd probably do bCnt or something

CGGCoder: ...

MSmits: there you go, mystery solved

Astrobytes: Coffee - Java - Beans

Default avatar.png JBM: thank you so much

Astrobytes: :P

Wontonimo: the randomness of this conversation reminds me of the NPC conversation in Simon the Sorcerer

CGGCoder: True

MSmits: it seems random

MSmits: but has a seed

Default avatar.png JBM: until you find its true meaning

Astrobytes: It's multithreaded.

jacek: Automaton2000 is it random?

Default avatar.png JBM: hmm lacks capitals

Automaton2000: because i was doing a clash

Default avatar.png JBM: Its True Meaning

Westicles: All these rules. If you were assigned this for work you'd try to wriggle out of it

CGGCoder: This is getting out of hand

Smelk: Hello!

Default avatar.png JBM: sowing usually does

Wontonimo: true Westicles , I'd talk with the BAs and push back

HungryBurger: A new challengers has appeared.

HungryBurger: Hello Smelk.

CGGCoder: Hello, don't mind the others

MSmits: BA's ? Battleaxes?

Smelk: Why can't I fight against my friend's IA, although we're both in Bronze league? I can't find him in the list.

Default avatar.png JBM: search better

Astrobytes: Yes MSmits. Battleaxes.

CGGCoder: Rank?

RoboStac: the list only shows the top 1000 as there were issues when leagues got too big

MSmits: :)

CGGCoder: I guess that makes sense

Wontonimo: Business Analysts , but BattleAxes would be better

Default avatar.png JBM: does it help to follow him?

Smelk: Oh, I thought using the Search field would search further than the top 1000

Smelk: I'm following him

Astrobytes: Battle Analysts > both

Wontonimo: Smelk you can use the search

MSmits: business analyst seems like a job that would have a high suicide rate

Wontonimo: hahhahahahahaa

CGGCoder: I guess. yeh

Astrobytes: lmao

Wontonimo: :d

MSmits: i cant imagine a more boring job

CGGCoder: Oh, so that's why they are always recruiting every week.

MSmits: well maybe i can, if i try, but i dont want to

CGGCoder: Ah yes, some peace finally

MSmits: ok i need to get on this sim verification thingy robo suggested

Wontonimo: luckily in my current contract the BA I work with is actually great. First time.

CGGCoder: Oh nevermind

avdg: glad the best bots aren't too good yet

CGGCoder: I'm currently trying to copy the bots with more or less a better strategy

avdg: quite easy yet to take over land of a top ai for now

Wontonimo: wait till legend opens

CGGCoder: Oh hell no

avdg: I will have less time this contest

avdg: though there are some extra holidays end of next week

CGGCoder: I'm currently imagining the IA's code being mostly calculations and looking into the future

CGGCoder: Like probability, and stuff

avdg: still 3 japanese in top 6

Wontonimo: CGGCoder have you ever written code to do something like mini-max ?

CGGCoder: No idea what that is

Wontonimo: oh, there are some really cool resources here on it

avdg: never wrote a mini max tree

avdg: got a bit closer to the math

Wontonimo: hmm ... can anyone suggest a link to a CG resource on it?

avdg: but I didn't pass the stage yet where I can say, I know it

jacek: math, not even once

avdg: you still compare :P

Wontonimo: Here is a practice exercise https://www.codingame.com/training/medium/minimax-exercise

Astrobytes: https://homepages.cwi.nl/~paulk/theses/Carolus.pdf

CGGCoder: like this?

CGGCoder: http://chat.codingame.com/pastebin/620d26ff-5551-4ab3-9489-c62f79eab98e

Astrobytes: Chess programming wiki also

Wontonimo: and here is a great video https://www.youtube.com/watch?v=STjW3eH0Cik

Astrobytes: There are some nice visualisations out there if you search too

CGGCoder: god i need to learn a lot more

Astrobytes: interactive trees

Astrobytes: *game trees

Astrobytes: for plain minimax + alpha beta pruning

jacek: game if about trees, why not use search tree algos

CGGCoder: I want to go to computer science classes but I'm not even at the grade to pass there

Astrobytes: Are you actually doing this contest jacek?

jacek: eeyup

Astrobytes: Impossibru

jacek: slowly but i think maybe ill get to silver this time

Astrobytes: Then I must do something at least.

CGGCoder: Imma look at the links, need to inform myself

Astrobytes: Also this video: https://www.youtube.com/watch?v=STjW3eH0Cik

Astrobytes: And the Sebastian Lague one too if you like posh accents

Wontonimo: ^ yeah, that's a really good one

ddreams: score of suns / 3 rounds up?

VizGhar: down

Wontonimo: that's called trunc where i come from

ddreams: right, yep

VizGhar: Players gain an extra 1 point for every 3 sun points they have at the end of the game.

ddreams: that's what I thought and programmed, but just misread the score in this game

VizGhar: ^from statement^

LightDarkness: http://chat.codingame.com/pastebin/a7e3fa01-7979-4b1b-b05c-3c0fdbf8a052

jacek: LightDarkness does pow returns float?

VizGhar: LightDarkness maybe you printed out decimals?

jacek: then the printing would be decimal

Astrobytes: ^

VizGhar: 2**3 -> 8.00 or something like that...

jacek: 0.8e2?

VizGhar: even better :)

VizGhar: LightDarkness say "thank you" :D

LightDarkness: lol

LightDarkness: i was checking, but no, it should be decimal

LightDarkness: and pow returns decimal

jacek: so it will print decimal with likely scientific notation or .

ddreams: missing return statement causes warning?

ddreams: not sure what subtracts points there

algeo: if we can beat boss in this play my code case can we get silver :p

LightDarkness: ermm do you program in c++? if so, what should i use instead of pow?

i mean i do a lot of problems in codeforces with c++ never faced a problem with pow

Astrobytes: Look the clash up here: https://eulerschezahl.herokuapp.com/codingame/puzzles/

jacek: LightDarkness (long long)pow()?

jacek: mostly no one uses c/c++ is clashes. it is mostlypython, ruby or js

LightDarkness: http://chat.codingame.com/pastebin/41d0bbfb-46a5-4951-9f59-48d9ecaceaa2

LightDarkness: why can't you write a code in this chat? :P

jacek: spoiler alert

LightDarkness: aha

VizGhar: LightDarkness too many newlines :) jacek is trolling sometimes

LightDarkness: I think it's fine, so just to make sure.. "score" in clash of code - reversed round is only about how many test cases are correct

VizGhar: oh jacek spoiler alert was about pyhton/ruby/js ... sry

VizGhar: I should not ping you that much right?

Astrobytes: pinging jacek is fine isn't it

Astrobytes: jacek

LightDarkness: lol, ok final newby question : D

how to you mention someone in this chat?

LightDarkness: @VizGhar

Astrobytes: Just type their name

Astrobytes: No @ required

VizGhar: Or start typing his name and press tab

LightDarkness: Astrobytes like this?

VizGhar: his/her

ddreams: yes LightDarkness

Astrobytes: Yes LightDarkness

LightDarkness: ah ok

MounirEnmeiRyuu: Hey dudes, A trick to win the "Shortest" #clash_of_code, in Python, convert your code to utf-16, it will reduce the number of chars of the original code by half. Finally we can execute the utf-16 binary using: exec(bytes(code_in_u16 ,'U16')

VizGhar: He has many names

LightDarkness: thank you do much guys

LightDarkness: so*

jacek: mhm

VizGhar: cheater... kick him :D

LightDarkness: ++

JSboss: Hi guys, one question - using JS for Clash is sometimes a pain because variables are initialized using "const" rather than "let" or "var" and so are immutable, so in fastest mode the init tags need to be changed or removed in order to change the var. Any way the default could be changed to "let" or "var" ?

JSboss: Well, in all modes, but in fastest mode it wastes time needing to do that

VizGhar: no JSboss... you have to deal with it

Westicles: You mean like is there a button somewhere that will do that for you?

Counterbalance: I don't think you even need to use var/let/const at all; they'll just be globa variables

VizGhar: maybe you can ask in forum for some plugin, that will translate stub for you :)

Counterbalance: control-H in the editor allows you to search/replace

itzluku: https://www.codingame.com/replay/549381756

JSboss: I am wondering why "Const" is the default (pre-printed) text used for inputs, i.e. why it's necessary to manually change it

JSboss: and just wondered if there is some possibility that this default could be changed to reduce the time disadvantage

UndercoverToad: sounds unlikely to me that they will change it (clash of code is not the only thing on this website) but feel free to request a change on the forum

jacek: "clash of code is not the only thing on this website" w00t?

JSboss: OK, I will do so, that tag has a specific use case and shouldnt be a default, whether CoC or other interface

JSboss: Thanks

jacek: well at least its 95%

JSboss: ^^

UndercoverToad: if they would care about 95% they would allow to select an IDE opponent below top1000

Xenoid: At a past job where I used JS, variables were typically declared with const, because the philosophy was that mutating variables was a horrible thing that should never ever ever be done

Xenoid: YMMV

Counterbalance: constant variables?? :D

Xenoid: Or just "constants," if you prefer. To me variable doesn't necessarily mean it has to vary, just that it's a placeholder that can hold a value that's specified at runtime

JSboss: variable = 'can be varied'

JSboss: It makes sense in that application, where mutating variables is categorically taboo, but that's not the case on this platform I would say

UndercoverToad: constant variable, thus a constable?

UndercoverToad: oh wait :cop:

JSboss: :rotating_light:

Westicles: you get rules like that when you are writing code together with a bunch of people you think are morons

Xenoid: I agree it's not a great idea to have const be the default for CoC, because it makes it harder to code stuff quickly

UndercoverToad: I still have nightmares from this https://github.com/louthy/language-ext

Xenoid: Seems to me that if someone wants to use a functional language, then they should use a functional language, not try to turn C# into one

SirLoxley: My bot is rank ~ 400 ... let's assume I slack for the rest of the competition, how likely is it to make gold?

Counterbalance: 1%?

UndercoverToad: exactly my feeling about that library

UndercoverToad: i say 5% gold chance

fvla: Imagine getting to legend with functional programming

Xenoid: Challenge accepted? But not for this contest, we're too far in

fvla: Even better, imagine getting to legend with functional programming *in C#*

Counterbalance: you're likely to get to silver if you stay in top 800 or so, but gold is top 150 or so (based on the fall challenge)

UndercoverToad: that few? :o I should write it down one day

UndercoverToad: I remember legend is about 10-15 on opening

jacek: AutomatonNN there?

SirLoxley: arf.

ShannonNorris97: I'm not sure if this is okay to ask or if anyone will want to answer since it's a competition, but are there any particular algorithms that you'd recommend to do well in the current contest?

jacek: most likely beam search

UndercoverToad: dbd r confirmed using a beam search

ShannonNorris97: Ooh I've never heard of that - I'll look into it. Cheers guys

jacek: i havent use it yet, mine is flat monte carlo with eval

Counterbalance: now i can finally put those 20 threads to good use

Marchete: I don't know, beam search seems to ignore enemies too much

AntiSquid: the words beam search were spammed in chat all day, maybe it works

Westicles: BULB

Marchete: but if top players say it, then it's true

Default avatar.png JBM: if it's true, it doesn't mean it's the major part of their strat

Marchete: or beam search*

Marchete: *terms apply

jacek: or they say its beam search so we waste time on that while they use something else

jacek: thats some meta isnt it

Marchete: that's a new low :D

itzluku: LETS GOOOOOOOOOOO

itzluku: won against #1

itzluku: https://www.codingame.com/replay/549426224

DomiKo: close one

DomiKo: gz

algeo: well done

Recovery_disaster: love the fact, that Oioi is using Python3 :) Even if I dont even know how to be in first place with it

itzluku: pushed my new version to the arena

itzluku: lets see :O

jthemphill: what makes beam search better than MCTS with a low exploration factor?

itzluku: whats the win/lose ratio for top10 bots ?

k4ng0u: itzluku it depends against who :p You can see the stats on their last matches here http://cgstats.magusgeek.com/app/spring-challenge-2021/Oioi

itzluku: dude 200-100 players are way harder than top100

struct: unlikely

Queuebee: would it be viable to give minimax a timelimit instead of a depth? or would the calls to time be inefficient?

Default avatar.png ahkoh: how to get into silver league?

itzluku: wait 2 days

Marchete: minimax with timelimit it's usually iterative deepening

jthemphill: @Queuebee it is efficient to call a timer, but you'll want to make sure your minimax is not depth-first

Marchete: do some depth, then if you have free time try a higher depth

jthemphill: ^

Astrobytes: ^

itzluku: ^

jthemphill: ^^

Queuebee: Okay well good to know. for whenever I ever manage to implement it ^^

Astrobytes: And search the best move from depth-1 first to save more time and increase depth

algeo: /|\

Queuebee: do you mean, keep continuing that branch in the next turns? instead of restarting each turn?

Marchete: no

Marchete: iterative deepening

Marchete: imo don't reinvent the wheel

jthemphill: @Queuebee so you start by completing a minimax with ply 2

Marchete: check google

jthemphill: then you check timer and see if you need to return the best move

Astrobytes: No, restart, but try that best move first, that you found on the previous depth

itzluku: imagine having the same score every 3d game and losing to 1 or 2 extra trees

jthemphill: then you deepen to minimax with ply 4, but you only look at the best moves that the ply-2 search returned

jacek: how often draws occur? in my local testing they never occurred :thinking:

Queuebee: golly

Queuebee: Okay thanks everyone I'll have to read up onn uhh everything. I really thought I was on the right track with minimax :')

jthemphill: glhf!

Astrobytes: Hey, it's a fun thing to explore

Numby: So eh... is opponent score not provided in the input? That would be so tedious having to implement keeping track of changes on each turn to calculate opp score ;/

Numby: Actually nvm, I'm blind

ddreams: pretty sure it's impossible to calculate it too

jacek: yes it is

jacek: you get it

Astrobytes: oppScore

Astrobytes: iirc

Astrobytes: ymmv depending on lang

Numby: I think it should be possible to calculate it too since you can check if a tree disappeared between each move but it would be a hassle for sure. Glad it's in the input (just didn't see it earlier)

ddreams: hmm.. yeah, actually it is possible

ddreams: I was thinking you could seed, grow and complete after the opponent waited, but the tree becomes dormant

ddreams: you can complete and seed again, but that's trackable

Default avatar.png GangstaKGK: sa

Default avatar.png MerryMentat: How many people typically get into Legend, out of curiousity?

Smelty: idk

struct: I think last contest was around 20 when it opened

Smelty: wow

icecream17: i just thought of an optimization: if a player has no trees, and the other player has more points, the other player automatically wins

jacek: :tada:

Wontonimo: 5000 players

CGGCoder: oof

tibithegreat: am I blind or in the normal game graphic there is no place to tell which day it is?

tibithegreat: the debug mode looks kinda ugly and the game information is also a bit annoying to track

Wontonimo: debug mode is the only place i see it

icecream17: https://www.codingame.com/share-replay/547822232 lol this wood 2 game

tibithegreat: Wontonimo :(

itzluku: what is the edge default for cell neighbor indices that are outside the 0-36 index grid? i thought its -1 but the defualt is 1 for me...

icecream17: you can always output the day in the message

Wontonimo: ^^ great idea

tibithegreat: it's only visible for one turn tho

tibithegreat: when you wait

itzluku: anyone?

Counterbalance: it's -1

itzluku: :/

Wontonimo: itzluku what kind of data type are you using? unsigned int?

itzluku: python

itzluku: no type

itzluku: XD

Counterbalance: there's no default, it's explicitly given in input

Wontonimo: it's -1 for me in python

Counterbalance: example init data:

Counterbalance: http://chat.codingame.com/pastebin/5ee612ee-74aa-449e-9bc2-626d3b33e8e3

itzluku: # neigh_0: the index of the neighbouring cell for each direction

itzluku: 404 Not Found

Whatever you were looking for is not here. It's behind you.

Wontonimo: do what Count_balance did itzluku and print out the values you read in

Counterbalance: there's neigh_0 .. neigh_5, one for each neighbour

Wontonimo: using the print( "debug stuff" , file=sys.stderr, flush=True)

itzluku: ah wait

miszu: good morning children

itzluku: the index is -1

Wontonimo: good morning teacher miszu

jacek: happy caturday

Astrobytes: Catty hapurday jacek

miszu: alright, time to code the solution to get out of wood 1

jacek: hint: print second available move if moves.size > 1

miszu: are you serious? That's all it takes?

iDash: +1

ClockSort: lol

miszu: I was about to use some badass strats to find the optimal tree to grow

Astrobytes: I sorted lexicographically but yes, it's literally a piece of p*** to get out of wood

iDash: It will bring you around: Bronze League Rank 2,151 4,339


miszu: some kernel recursion shits

jacek: welp i wouldnt take it seriously before final rules

itzluku: u will need the badass solution later anyway

itzluku: :P

iDash: working on it :)

miszu: my dumbass solution of wood 2 brought my to rank 123/465 in wood 1

Astrobytes: Just account for the added action and you're good to go

CGGCoder: what was your solution?

miszu: for wood 2?

CGGCoder: Yeah

fvla: please help me template metaprogram a spiral index to 2d graph D:

fvla: D :

miszu: chop chop the most rich richness tree

CGGCoder: oh

CGGCoder: same

CGGCoder: lol

fvla: wood 1 you just have to grow and then chop, or some variation

Astrobytes: Why bother with that. They gave us moves.

miszu: I wouldn't dare to chop chop the least rich richness tree. As a businessman I have standards

CGGCoder: For wood 2, I just done all of the commands possible in reverse so the WAIT is at the end.

CGGCoder: I'm currently at wood 1

Astrobytes: fvla: what?

iDash: lol

miszu: funny that first command it imputs is the WAIT command

miszu: so basically, take 2nd command

CGGCoder: Yeah no sense

CGGCoder: I do it reverse

CGGCoder: Most of them are random i guess

fvla: i can't believe you guys cheesing wood leagues using command list, lol

iDash: random geves worse result than secons ot even than last

fvla: i have standards

CGGCoder: Lazy goes a long way tho

Astrobytes: Why not? Wood is pointless. Need Bronze rules/

CGGCoder: yeah

fvla: ig

iDash: preffer grow over seed

miszu: let's do the 2nd move and see if I can best the mighty Ghiboss

fvla: it's still funny how this cheese actually just works

CGGCoder: I'm putting my own code

CGGCoder: So it's more efficient

Default avatar.png Saltron: yeet

miszu: CGGCoder with blackjack tables and hookers?

Astrobytes: Quit yeeting

CGGCoder: miszu - What?

miszu: you don't know the meme?

Astrobytes: Blackjack and hookers!

miszu: yeah

CGGCoder: Nope haven't been informed

miszu: ohhh

Astrobytes: Futurama... Bender...

miszu: I must educate you

miszu: lemme find it

Astrobytes: Educate him. I require a beer.

CGGCoder: ok wth

CGGCoder: I just googled it

jacek: meme noob

miszu: https://www.youtube.com/watch?v=e35AQK014tI

CGGCoder: No thx

miszu: wow ghiboss beat me by 1 pt

miszu: with the pick 2nd move strats

miszu: FB AI should hire me

CGGCoder: :regional_indicator_n: :regional_indicator_o: :regional_indicator_g: regional_indicator_o: regional_indicator_d:

CGGCoder: :regional_indicator_o:

CGGCoder: :regional_indicator_d:

miszu: so 3/4 I won vs Ghiboss

CGGCoder: r/softwaregore

CGGCoder: What's your technque again?

CGGCoder: Too lazy to scroll up

miszu: won 9/10 with the might strats

miszu: ok so basically

miszu: the list of all possibles moves, pick the 2nd one

miszu: if there is only 1 move then it's the WAIT move

CGGCoder: ok so just the one after the WAIT

miszu: correct

miszu: make sure you do bound check

CGGCoder: uhm

miszu: everyone knows you cannot forget that :)

CGGCoder: ok

miszu: https://www.codingame.com/replay/549521966

miszu: best him by 1 pt

Astrobytes: sort(moves.begin(), moves.end(), [](const string& a, const string& b){return a[0] < b[0];});

Astrobytes: ^

miszu: wayy to fancy man

MSmits: well my sim check found an error. Was a good idea to fully match opponent actions and sim states

miszu: if numPossiblesMoves <= 1, print wait

else, print 2nd move

CGGCoder: ok wth is this

miszu: yay I will be promoted!

CGGCoder: miszu yeah seems ok

Astrobytes: miszu that got me straight into Bronze

miszu: yeah I will go bronze now

miszu: joining the MLG now

Astrobytes: Other than that, I don't care much for this game

miszu: why not?

miszu: you don't like it?

Astrobytes: I find it quite boring.

jacek: MSmits what was it

Astrobytes: And just like a variation on the last one.

miszu: what I don't like is to code the engine and unit test it for bugs

NinjaDoggy: just code the engine without the unit test then :)

MSmits: i was giving richness bonuses as 1,2,3 , based on the richness. As opposed to 0, 2, 4

miszu: well you are asking for hours of debugging a silly mistake

Astrobytes: Anyway, don't let my opinion stop you, I'll do something at some point

Astrobytes: Nice bug MSmits

NinjaDoggy: nah this game is way more interactive than the last one

MSmits: yeah, i doubt it will change that much though

Astrobytes: NinjaDoggy: *Slightly

NinjaDoggy: it won't be a billion beam searches (that don't take into account of opponent) in legend i don't think

Astrobytes: Beam and Chokudai is the meta rn

jacek: keep in mind if both actions are COMPLETE players receive original nutrients

MSmits: i know

MSmits: another thing to think about is what happens when two players seed same hex

Astrobytes: I just don't like it

Astrobytes: You get your s**T back MSmits

MSmits: Yeah

Astrobytes: Well, both do

MSmits: and still go dormant right?

Astrobytes: Yep

jacek: eeyup

MSmits: which is good, that way you dont get infinite seeding

MSmits: i still remember the push locks in xmas rush

jacek: hmm technically you could

jacek: ah waiit, no

Astrobytes: Hah, yeah MSmits

Astrobytes: no jacek, I don't think a seeding-lock is possible

DaNinja: checking the referee, you dont get a refund

jacek: huh

DaNinja: ah my bad, you do

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

Astrobytes: BadNinja

AntiSquid: can't find the bug, maybe i should just drop it and do something meaningful

DaNinja: damn Java

MSmits: mmh i will need to check sim for sun points as well

MSmits: thats a separate check as both players last actions have to be waits

NinjaDoggy: just wait for a turn where your opponent is dormant

NinjaDoggy: and your action is wait :)

miszu: there is no AI for going to silver league?

MSmits: yeah

MSmits: miszu there will be

MSmits: when silver opens

miszu: ok not available yet

MSmits: a player at rank x is chosen (prolly 500 or so, maybe 800)

MSmits: that player becomes boss

AntiSquid: i have this ... red normal bot vs blue wait bot depth 20, can go even up to 100 @_@ that thing keeps taking a nap

AntiSquid: https://www.codingame.com/replay/549528395

miszu: imagine the top 500 are all legendary worthy code.... most people will be stuck in bronze

MSmits: do you mean it only considers wait as action and searches to depth 20?

AntiSquid: it considers everything

MSmits: my first beamsearch version would only do wait

MSmits: in my case both the max element and nth element had their sign wrong, picking the worst action

Nerchio: My beamsearch did same :(

struct: wait can cause problems with eval :)

Nerchio: its so disappointing after writing it for 10h or so

struct: specially if you multiply with day

MSmits: I also had a bug where I did * instead of & on a bitop

MSmits: bunch of bugs and every bug caused my bot to prefer wait

MSmits: it's like it was thinking, nope, sht happens when i dont wait

struct: MSmits on beam search am i supposed to also include parent states when selecting the best?

MSmits: why would you do that/

struct: I dont

MSmits: yeah but i mean, why would you consider that even?

MSmits: what makes you think it might be good

MSmits: it's a different depth level

fvla: i just programmed a constexpr function to transform indices to xy coordinates in 2d space lol

struct: true

MSmits: it's like finishing a minimax iteration and then picking the result from the previous iteration that searched less deepo

MSmits: fvla we all need hobbies

fvla: i'm learning metaprogramming so that i don't need ugly switch statements

fvla: to optimize my doce

NinjaDoggy: fvls why do you need x,y?

fvla: *code

MSmits: i dont think i ever had a switch statement in a bot :P

MSmits: if else if else if else if else :P

fvla: because i don't want to calculate distance through an inefficient graph

fvla: oh no

NinjaDoggy: why not precompute distances?

fvla: i am

fvla: through *metaprogramming*

MSmits: i don't use any distances at all

NinjaDoggy: I assume you precompute masks for each distance then

NinjaDoggy: (same as me)

MSmits: i just have a map of reachable seedhexes for every size

fvla: no bitboard just yet

MSmits: and every source hex

fvla: :(

struct: same

NinjaDoggy: bitboards is so much easier than non bit boards honestly

MSmits: if you are used to it, yes

MSmits: if not, it's just gonna give you a headache

struct: im not used to it and found it easier

MSmits: and cause many hard to find bugs

MSmits: if you've done it twice before that counts as being used to it :P

fvla: i'm transforming into bitboards after i get basic coordinates working

struct: I only did it for uttt

NinjaDoggy: co-ordinates is such an ineffecient way to do it :(

NinjaDoggy: both in terms of run time and coding time

MSmits: mmh uttt counts as being used to it too :P

MSmits: considering the time most people spend on a uttt bot

struct: MSmits also do you recomend to have player tree masks or trees[2][4]?

NinjaDoggy: LOL honestly yeh, UTTT is more than enough

MSmits: it's fine, i do it differently though

fvla: but coordinates are a nice abstraction when you learn to program it

MSmits: i have a single trees[4]

MSmits: and a owner

fvla: and they will translate nicely to bitboards

MSmits: (uint64_t)

MSmits: so 5x uint64_t instead of 8x

NinjaDoggy: genius...

NinjaDoggy: wait no

AntiSquid: same

icecream17: YES! generateLegalMoves... generated the legal moves!!!! finally!!!!

fvla: UTTT?

NinjaDoggy: you need an extra and operation each time though?

AntiSquid: do you bitboard shadows ? :P MSmits

MSmits: yeah you do NinjaDoggy, it's a tradeoff

MSmits: but shadows are easier

MSmits: less maps to shade from

MSmits: i do AntiSquid

MSmits: uint64_t shadeArray[3][6][37] = { 0 } ;

Michael_Howard: On submit why do I usually seem to lose the 1st 2 battles then win most of the next 30? Are the first 2 picked from higher up?

AntiSquid: cool me too

miszu: it's true that bitmapping the board is more difficult because of the hexagone shape

MSmits: not necessarily

AntiSquid: total element size of that is 666 MSmits

MSmits: if you do everything with lookups, it does not matter

MSmits: AntiSquid yeah

struct: you do shadows with lookup?

MSmits: yeah

miszu: makes sense

struct: and its faster?

miszu: yes

MSmits: i just use the first 37 bit of uint64_t

NinjaDoggy: you're still looping through every tree though right?

miszu: you just bitwise or all of them

MSmits: struct i have no clue

MSmits: it's all very very fast, performance is not limiting me

struct: I can shadow everything with << or >> shifts

struct: yeah you are right

MSmits: i am looping trees yes NinjaDoggy

struct: I didnt care about performance

Nerchio: tbh eval is the hard part

Nerchio: not bitset itself

miszu: what's a good resource for eval

AntiSquid: well . i have something else for shadows, was considering MSmits version first 3 * 6 * 37 but then picked something else, you do other kind of loops elsewhere so not sure which is best

miszu: honeslty the eval that makes sense is how many points you have

miszu: in that state

miszu: if you are able to go deep

MSmits: it's dangerous to use score points miszu

NinjaDoggy: no...

MSmits: you win this game by completing trees later

NinjaDoggy: in order to go super deep you have to prune

MSmits: early on you have to *have* trees

MSmits: if you eval score, then you're just going to delete your trees

Nerchio: if you don't simulate opponent your search is only useful until certain depth imo

MSmits: unless of course you get all the way to the end of the game in your search

MSmits: that last eval can be actual game score

struct: time to go depth 130

NinjaDoggy: are most people not simming opponent with beam search?

struct: im not

MSmits: i think most players just use heuristics

struct: but my bot is still the one from beta test

MSmits: but the most used search is probably bs

MSmits: ignoring opp yeah

MSmits: but top players could be doing anything really

NinjaDoggy: nah, then there should be a bigger gap

miszu: pick random moves

miszu: best start

AntiSquid: https://www.codingame.com/share-replay/549550334 oh look it made trees lmao ... -.-

Nerchio: similar problems AntiSquid its losing to my bot that has like 2 ifs

struct: Do eval slowly

struct: Like

struct: Make it plant seed first only

struct: then move to next step

struct: and so on

MSmits: AntiSquid seems like your progression is the same as mine, took me an hour or two to get it working after i finished coding first version

Waffle3z: any way to search clash of code problems to fix ones with problems?

DaNinja: tried this? https://eulerschezahl.herokuapp.com/codingame/puzzles/

MSmits: lol Waffle3z

Donald_D._Doge: someone mentioned clash during contest? ban / report / kick / execute automaton2000

Automaton2000: u need to get lucky

MSmits: it's contest time, lets spend it going through clashes and fixing them :P

itzluku: haha i am fixing bugs since 40g

itzluku: 40h*

Zenoscave: does overall score not work as a eval Struct?

Nerchio: no

Astrobytes: Now I KNOW that's a Westicles one Donald_D._Doge :rofl:

MSmits: Zenoscave only on the last turn

Zenoscave: hmmm...

MSmits: before that you need to eval having trees mostly

MSmits: and sun points to some degree

MSmits: i guess you can have score too, but make it small

struct: Also dont eval sun points very high

struct: or you will only wait

Westicles: Astrobytes, stop gaslighting me :P

Zenoscave: I'm going to start with pruning the search space before branching

Zenoscave: Westicles then stop making alts

MSmits: pruning helps a lot

Astrobytes: Never Westicles :D

Zenoscave: ;)

Donald_D._Doge: Astrobytes i'll shave your cat if you don't

Zenoscave: Also Hi all.

struct: hi

MSmits: gaslighting is when a buddy has a lighter and you ate some bad food right ?

Zenoscave: I wish MSmits

Astrobytes: I keep my pussies hairy, the fight is on

Astrobytes: And hiya Zeno

Donald_D._Doge: "manipulate (someone) by psychological means into doubting their own sanity." MSmits

MSmits: and then lighting their farts?

Zenoscave: Yes.

Zenoscave: then lighting their farts

Astrobytes: :/

Astrobytes: No, gaslighting is a serious issue. Here, in the context of Westicles, it is anything but

Astrobytes: WEsti + Doge

Zenoscave: gaslighting is definitely a serious issue. I just am not immune to a fart joke

Astrobytes: I admit to the same.

MSmits: :grin:

JSboss: I'm glad the term and the concept have entered the mainstream in the last couple years, no one talked much about gaslighting before 2017

MSmits: wait for it to be abused too much and lose all meaning

JSboss: and it happens often enough with serious enough ramifications that it behooves people to know abt it

JSboss: well it's already something of a buzzword i guess

JSboss: but still

Astrobytes: No, it's been a recognised issue over the years, I think the terminology only recently hit the mainstream

Astrobytes: Ah yes, sorry, just re-read your statement

Astrobytes: MSmits: when it matters it cannot lose meaning

MSmits: what i mean is, they will use it in situations where it's not really gaslighting

MSmits: therefore weakening the term

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

Astrobytes: Yes, and what I mean is that when it matters it cannot lose meaning.

Westicles: yeah, there was an SNL sketch recently making fun of just that MSmits

Astrobytes: Otherwise it's plainly redundant or false with even any sensible scrutiny

Astrobytes: -even

Westicles: https://www.youtube.com/watch?v=XZps0fR5TE4

Scarfield: you are HIV Aladeen

MSmits: Westicles i saw that

MSmits: the star trek one

MSmits: i think

MSmits: you're gaslighting me!!!

MSmits: right?

MSmits: spoiled teen girl voice

Westicles: yeah

Astrobytes: Yeah I mean I get that

Astrobytes: I cannot get on with these people with 0 life experience shouting about social justice and applying it to Every Single Thing.

Default avatar.png mororo250: Is multithreading available?

struct: no

Astrobytes: But that doesn't mean everyone should completely disown the ideas where they are applicable - unfortunately that is the side effect.

Astrobytes: Sure mororo250: Get several needles, couple of spools of cotton thread, good to go

Astrobytes: But no.

Westicles: Yeah, I keep telling my gfs... you are 18, you can't accuse me of grooming

AntiSquid: gfs ? as in multiple ones ?

Westicles: er, well imaginary ones of course

Astrobytes: Westicles: Your game is strong

Astrobytes: If a little sillyl

Astrobytes: *silly

AntiSquid: woah ! it flinched ! it's not rank 4k+++ anymore

Westicles: which it?

PatrickMcGinnisII: ok, i lost 1000 ranks in 36 hours

Astrobytes: Judging by the position I'd say it's down there with Pennywise

itzluku: i think i totally just made my bot worse

itzluku: xD

Astrobytes: That's par for the course, don't worry about it.

itzluku: but 1000 ranks?

itzluku: :D

Astrobytes: It's a contest.

Astrobytes: Unless you find a strong strategy that beats the current strong ones you're just gonna wobble up and down the leaderboard

PatrickMcGinnisII: I was gone, attending a college graduation

AntiSquid: gz ?

PatrickMcGinnisII: GF got her masters

Astrobytes: gz almost sounds like a nerve agent

Astrobytes: Massive congrats to yer gf PatrickMcGinnisII :tada:

Astrobytes: It's a labour of love getting it

PatrickMcGinnisII: gz = GF, could be... my nerves are frazzled

PatrickMcGinnisII: Turnt it up last night at a Tavern tho. ;)

Westicles: I hate those things. The president of mexico spoke at mine for undergrad. Talked about mexico for a half hour

Westicles: God knows what they go on about these days

Astrobytes: The President of Mexico?

Default avatar.png pluto-de: ok noob question time: `Warning: your code did not read all available input before printing an instruction [...]`. Is this my top priority to fix, or is it just mad at me for changing the starter code to read the input into an array and I should ignore it?

gangweed: i pissed myslef

gangweed: this website is run by psy op

PatrickMcGinnisII: they gave a medal to the dean of medicine.... smh.

PatrickMcGinnisII: 3+ hours of calling names...boring AF

Westicles: Astrobytes, yeah totally random choice

PatrickMcGinnisII: don

PatrickMcGinnisII: t ignore pluto-de

Astrobytes: Any awards ceremony is just grim

Astrobytes: Westicles: Very very fking random lol

Default avatar.png pluto-de: alright ty paddy

PatrickMcGinnisII: undergrads were kinda hot tho

Astrobytes: PatrickMcGinnisII: put it back in yer shorts

PatrickMcGinnisII: they got debt, i'm an old man...lalalala

Astrobytes: :expressionless:

Astrobytes: You have a daughter.

Default avatar.png pluto-de: can confirm, i'm his daughter

Default avatar.png pluto-de: hi dad

PatrickMcGinnisII: that's what a nintendo Switch and door locks are for

PatrickMcGinnisII: stop pluto, they'll think u r serious

Default avatar.png pluto-de: it's dark in here

Default avatar.png pluto-de: at least i have this switch lol

Astrobytes: Too much lmao

Smelty: lmao

Astrobytes: Anyway, laters :rofl:

twoeyes: hello! :) I cannot find a reference... how do I save a battle and reload it into the online IDE for later testing?

PatrickMcGinnisII: "Alexa, play Marvin Gaye, Sade, and Seal" . Daughter will disappear real quick

PatrickMcGinnisII: cya Astrobytes

Smelty: o.o

icecream17: ooh, codingame faq says Node is used for js

CGGCoder: FINALLY

CGGCoder: I managed to get my code to work

icecream17: `console.error(__filename)` gets `/tmp/Answer.js`

MSmits: hey, do you add a message to output with " message"

icecream17: y

MSmits: kk

icecream17: http://chat.codingame.com/pastebin/11af02f2-f8bf-4fcb-add7-f059600600ee

MSmits: yay i watched 20 replays and not a single sim error :)

MSmits: i output "SIM ERROR" as a message when my checks fail

MSmits: so warn me if you see it :)

MSmits: crap i found one

skotz: fixing a negative nutrients bug helped more than i expected

MSmits: ohh it's a 2 seed to the same hex situation

MSmits: thought i handled that

MSmits: oh right, negative nutrients, thats important as well

AntiSquid: this wreck is finally climbing

AntiSquid: i have no clue what i fixed or how btw

AntiSquid: just changed eval values and submit spam, tiny improvement Q_Q

MSmits: nice when that happens

Default avatar.png Emperatrice: moi je suis a ~800 avec 3 "if" pour mon algo mais je ne connais pas les truc CSB, XR, MCTS ou DUCT.

Default avatar.png Emperatrice: du coup je plafonne je ne vois pas quoi ameliorer

MSmits: btw, i recommend you check sim this way: https://www.codingame.com/replay/549625306

MSmits: literally takes me 3 seconds to check an entire game for sim errors

MSmits: message is so nice

struct: MSmits I check vs playing vs myself

AntiSquid: #fr Emperatrice

MSmits: ah, locally you mean

struct: For simultaneous actions

struct: no

struct: also on ide

struct: but yeah also works localy

MSmits: how is that better than messages?

struct: how can you test simultaneous actions?

struct: like seeding

struct: the same cell

AntiSquid: it's the scoring and selection not the sim

struct: ah ok

struct: I tested whole sim

AntiSquid: talking to smits

MSmits: struct what i do is, i sim my own action with all opponent actions

MSmits: i get like 15 new states

struct: ah makes sense

MSmits: then i check all of them on the next turn for equality

MSmits: if i find none, then i output SIM ERROR

MSmits: and i can scroll throug the frames in seconds and spot it

struct: I understand

MSmits: just found one again

MSmits: i keep bugging on the same seed thingy

MSmits: https://www.codingame.com/replay/549625539

MSmits: around frame 47

MSmits: it doesnt actually matter for my beamsearch, but its annoying

struct: it happens when both seed same cell?

MSmits: yeah

MSmits: maybe i coded it a bit sloppily

MSmits: what i did was, i just let both players seed there and remove the seed afterwards and refund

struct: Yeah, I also should fix my code

struct: currently I have 2 functions to apply actions

MSmits: only 2?

struct: 1 for actions of same type and another for different

struct: Well its if else inside it

NinjaDoggy: isn't refunding harder?

MSmits: you mean when both players do an action of the same type?

struct: yes

NinjaDoggy: because you have to properly count the number of seeds before the move?

MSmits: NinjaDoggy i didnt bother much with that, it's just a debug check

struct: I store action cost and gain

MSmits: yeah there's probably an easier way

struct: inside the action

NinjaDoggy: if you check they're seeding the same position, just put the 2 trees on cooldown and that's it

MSmits: i dont actually ever sim a double seed action, as my opponent is static

NinjaDoggy: true

MSmits: makes sense NinjaDoggy, i'll go change that

struct: yeah its what I do

struct: I think I have cost or something stored due to undoAction

MSmits: ohh i found the bug

MSmits: if (myAction == Seed && oppAction == Seed && myIndex == oppIndex)

MSmits: but the index is a combined index for source and target for the seed

MSmits: and my opponent has a different source

MSmits: so this check is never true

struct: you store source and target in same ?

MSmits: yeah, so i can use the same state

MSmits: state stores an action type and index

MSmits: but seed is the only one with 2

MSmits: so i just combine them

MSmits: could have also done index2 and make it -1 for the others

MSmits: i probably would not now have this bug :P

struct: so N bits of myIndex store source and some store target?

MSmits: sourceIndex + 37 * targetIndex

struct: ah right

MSmits: so myIndex % 37 = sourceIndex

MSmits: myIndex / 37 = targetIndex

MSmits: allright, fixed, i hope, let's try another 30 games in submit :P It's pretty rare

Default avatar.png vCamilx: yushu

Default avatar.png vCamilx: mi amor

struct: not sure if I rewrite or not :/

Alcheemist: is there anyone get this issue Oups Une erreur est survenue (#407) : "You reached the limit of plays for a period of time."

rafaelSorel: yep when you submit over 20 test in a row

rafaelSorel: or so

rafaelSorel: you get stuck for 5 minutes

Nerchio: so do you guys sometimes get random timeouts too or its just me

Nerchio: garbage collector should not take any time i dont really use objects

fvla: I use C++ so I can't relate

fvla: no but seriously, which language?

Nerchio: java

fvla: hm

fvla: there should be no such issue with an if/else bot

fvla: which algorithm?

Nerchio: not sure i always get these timeouts at the start of events and later they happen less but i dont know if its because i fix my bots or servers work better

fvla: I have no clue then, sorry

Nerchio: i got a beamsearch on bitsets with an object pool (so should not get garbage collected ever)

fvla: hm

DaNinja: no timeouts with c++ and a 98ms limit. YOu start your timer after reading the first inputs?

Nerchio: yeah

Nerchio: well sometimes it drops me even before the search starts so kinda weird

DaNinja: segfault maybe?

Xenoid: What is a good way to time C++? std::chrono::high_resolution_clock?

DaNinja: yes

fvla: yeah, std::chrono is great

Xenoid: ok cool, thanks

Nerchio: well i allocate 700k State objects on the first turn

fvla: uhhhhhh

fvla: as in using "new" 700k times?

Nerchio: yeah

fvla: i don't know enough about Java to help you much, but I can tell you that using "new" that many times in any language is a recipe for disaster

GibbonThatCodes: my question here would be .. but why?

GibbonThatCodes: Like newing up 700k things seems excessive o.O

fvla: if you do that in C++, every C++ programmer in this chat would slap you in the face one after anotehr

Nerchio: well you can't not use new in java so..

GibbonThatCodes: Right but like, why do you need 700k things?

fvla: yeah

Default avatar.png zach1502: lmao

fvla: and what are the things?

Nerchio: i had 300k state searches in the middle of the game and well more on the first turn i guess i will just try to lower it 2x

fvla: the hell

GibbonThatCodes: like, in total in my c sharp side of things right now I create like .. 40 - 45 things.. and thats it..

Default avatar.png zach1502: insane

Nerchio: but I didn't think it should be a problem with allocation

rafaelSorel: depends what you put/process on your state

Nerchio: last event i had 300k states allocated first turn and it worked

Nerchio: and that had 50ms limit

jsmurl: dumb question: can you do more than one action a turn? this line confusing me "As long as you have enough sun points, you can take any number of actions."

yuyu: 700k news != 1 new for 700k object, no idea how to it in Java but you should do the latter

Xenoid: You can do one action per turn, and multiple actions per day

jsmurl: how many turns are in a day?

rafaelSorel: if you just process the sun points + score you can process several states I guess

Xenoid: As many as needed until both players use the WAIT action

jsmurl: ohhh I see

jsmurl: thanks @Xenoid makes sense

Xenoid: No problem

rafaelSorel: but if you start adding things like shadow prediction and grow prediction, things will get slow I think

rafaelSorel: but yes 700k Nerchio seems pretty good

Nerchio: its not good if it randomly times out haha

rafaelSorel: beamsearch or MCTS ?

Nerchio: beamsearch

rafaelSorel: ok

Nerchio: but as you said, these numbers were at the start when not much evaluation went in

rafaelSorel: yep

Nerchio: but on good turns i still get 300k

Nerchio: and well if you go with C++ you can probably double it

rafaelSorel: yes if you don't free anything :D

Nerchio: anyway

Nerchio: eval in this game is kinda pain :D

rafaelSorel: yep for the timeout , you can stop your beamsearch if you start hitting 80ms or so

Nerchio: I do ofc but problem with garbage collector is it can spike for 30ms or so

rafaelSorel: ohh

Nerchio: maybe it did garbage collecting on states over 400k that were considered unused even if kept in array

rafaelSorel: no way to disable it in java ? like in python when can do gc disable

Nerchio: no you cant really control it

Nerchio: or some kind of memory rearrangement that took 30 ms

Nerchio: so if added to my beamsearch was going over the limit

Marchete: garbage collection of 400k states?

icecream17: hmm, I placed a seed, then I had 2 sun, and 3 seeds. But the game says I can still place seeds

Nerchio: I preallocated 700k states, but only first 400k were used after round1

Nerchio: so maybe it did some funny stuff with the last 300k

Marchete: but if you keep an array[] or list with these they won't go GC

Nerchio: thats what i mean

Nerchio: they are in an array

Nerchio: so nothing should happen

hyphz: 700k Nerchio? Starcraft?

Marchete: yeah

Nerchio: but i lowered it from 700k to 400k and i dont get timeouts

Nerchio: for now?

Kellthazar: Rust has no GC :D

Nerchio: weird

Marchete: if I recall I had these

Marchete: some static factory constructor

Marchete: so I called getNew()

Marchete: that took free objects from a list

Marchete: and release

Marchete: for the same

Marchete: 0 GC

Marchete: but a PITA

DaNinja: you checked the forum? Theres a couple of posts about GC

DaNinja: https://www.codingame.com/forum/t/timeout-in-tic-tac-toe-in-java/164930/6

Nerchio: thats what i am doing cause its kinda neccessary for GC languages that use searches

Marchete: C# has functions to try to minimize GC

Nerchio: if you try playing with too many objects in GC languages you are not going to have fun on Codingame :D

Nerchio: and I already got some experience from previous contests and it still surprises me

DaNinja: 700k width beamsearch? :D

icecream17: nevermind, it was my bug

Nerchio: i use width 700 now but didn't play around with it too much

icecream17: alright! generateLegalMoves is done (x2) so maybe search time?

icecream17: oh wait, i also have to implement "do action"

dreadylein: guts would tell me to check the move generation and search itself if something builds up gc pressure

dreadylein: the array shouldnt be the problem in theory

Nerchio: except preallocated State objects my search is all primitive types

Nerchio: so should be clean

dreadylein: hard to tell, guess your best bet is profiling the exact point

Default avatar.png SoyMicrah: q

Default avatar.png SoyMicrah: q

Default avatar.png SoyMicrah: q

Hydrazer: is perl a good language

pmor: I've had to deal with perl scripts that made my eyes bleed

Rag: :grin:

miszu: DaNinja that's my post!

miszu: I am famous

DaNinja: did you ever get it fixed? :)

icecream17: ok, i switched from js to typescript and fixed 1 bug. submitting

miszu: I fixed it by kicking java out of the window and coding it in c++

miszu: I was able to reach legendary in UTTT

NinjaDoggy: yep that's my experience too :)

miszu: reaching legendary gave me ptsd

DaNinja: a wise decision

miszu: the grind was real

miszu: I wonder if the strats here is simply spend 1/3 of days planting as many seeds then next third upgrade as many trees and last third chop everything

NinjaDoggy: no, upgrading trees give u more sun

NinjaDoggy: and planting costs more the more seeds u have

zenwraight: Hi guys I have a question, how can I print debug statements other than COmplete and wait commands

miszu: cerr << "ain't gonna give you up << endl;

DaNinja: print to stderr

NinjaDoggy: you can't print messages for seed or grow?

miszu: yeah

miszu: anything after the command is extra stuff

hexa8: never gunna giv u up! never gunna let u down..

miszu: so like: SEED 50 ain't gonna give you up

zenwraight: got it let me try

miszu: you will see your wizerd singing

PatrickMcGinnisII: do not rick A us

miszu: you're a wizerd Harry

zenwraight: thanks guys printing to err works

miszu: we accept donation via paypal or bitcoins for the help

zenwraight: it's my first time in this type of contest,I am a beginner

miszu: we provided

zenwraight: looking forward to learn from u guys

DaNinja: good luck learning anything from us!

zenwraight: do u guys take part in other challenges like on codeforces etc ?

miszu: as long as you don't ask for answers we will help

miszu: during ongoing challenges, don't expect too much help as everyone has the secret sauce

zenwraight: yes sure not during contest

DaNinja: the post mortems in the Forums are a good source of tips from previous challenges

zenwraight: Got it thanks a lot :) I will check it out once i get past the first league

miszu: especially the previous challenge

zenwraight: aah thanks for the hint

miszu: lots of strats are relevant here

zenwraight: since how long have u guys been taking part ?

miszu: I started yesterday

miszu: the challenge

zenwraight: nice

zenwraight: no i meant these kind of challenges

miszu: I am in bronze but I am discouraged of coding the engine for simulations

miszu: I did 2 competitions

miszu: and some outside of the competition time for education

zenwraight: got it

Default avatar.png slamo: how do you print debug text in go?

DaNinja: it should say in the default code comments

DaNinja: fmt.Fprintln(os.Stderr, "Debug messages...")

PatrickMcGinnisII: msmits, i decided to start using a lookup table for the shadows, u think adding an extra hex would save cpu cycles?

PatrickMcGinnisII: like sun position 0...index 1...tree size 3 ... change mask on board indexes 7,19,38 ... or just use neighbor stuff?

Smelty: o.O

PatrickMcGinnisII: maybe a need some tree spirit juju

PatrickMcGinnisII: earlier he said he was using 37 as the board size, I'm thinking an extra cell could be used to dump off board masks eliminating a condition statement

DaNinja: like shade[3][6][38] ?

PatrickMcGinnisII: nah, not so deep

PatrickMcGinnisII: if bits 0 and 1 are the treesize

DaNinja: I thought he said he pre-calculates shade[3][6][37]

PatrickMcGinnisII: hmm

DaNinja: 666 uint64

PatrickMcGinnisII: i was thinking shadebyindexdirection[37][6][3], lol

PatrickMcGinnisII: but if it trails off the board, then a cell index of 37 would just be a dumping ground for xor operations

DaNinja: why would it trail off?

PatrickMcGinnisII: so a board state size of 38 instead of 37

DaNinja: for the -1 neighbors?

PatrickMcGinnisII: tree size 3, on index 7...would shade 7,19, and then an offboard cell

PatrickMcGinnisII: elliminating the test for -1

PatrickMcGinnisII: not having to use the neighbor thing at all

PatrickMcGinnisII: i'm just thinking aloud

PatrickMcGinnisII: so 7,19,37

PatrickMcGinnisII: imma try it

DaNinja: dont think its needed if you just do shade[idx][dir][size] & (1<<cell)

PatrickMcGinnisII: i wanna mask right on the board

PatrickMcGinnisII: but i see what u are saying

PatrickMcGinnisII: the board has to be cloned/copied anyway...and i would be adding a bit op to the copy to reset the shadow

PatrickMcGinnisII: damned if i do and damned if i dont

Zenoscave: Struct what's your beam width

PatrickMcGinnisII: kinda personal there Zenoscave

PatrickMcGinnisII: sry

Zenoscave: Hes told his depth. Just figured I might ask ;)

Westicles: 200

Zenoscave: IS that troll westi?

Westicles: hey zeno

PatrickMcGinnisII: what's the max commands in a day any1 has encountered? I think i did 2 grows and a seed, but haven't seen more, anyone?

Zenoscave: hiya

Zenoscave: Theoretical max is 38

Notter: You can do more than one command a day?

PatrickMcGinnisII: I compute all the commands for an entire day

PatrickMcGinnisII: there can be multiple turns/day, but only 1 output per input cycle i believe

PatrickMcGinnisII: I haven't been able to compute optimal sun ramping spanning multiple days yet

DaNinja: yep, as long as you have enough sun points

PatrickMcGinnisII: i can drop 2 seeds in a day, but dropping 3 in a day is dumb

PatrickMcGinnisII: darn ok, i see a grow grow grow seed seed on round 14

CouscousAgha: Can you train vs a specific person ?

DaNinja: yes, delete the AI and select

DaNinja: but limited to the top 1000 in your league

Westicles: Zenoscave, this is from earlier on beamwidth

Westicles: struct: more than 1k less than 10k

PatrickMcGinnisII: in midgame i see a max of like 66 legal moves, it's just a matter of finding the best combo

Zenoscave: Ah yeah I fogot there's an index from and to on seeding

Rag: to find best combo u also simulate enemy moves?

Zenoscave: A rough estimate would be 18^2

PatrickMcGinnisII: i think the next step is just not grow on cell that will shadow anyway on next turn

PatrickMcGinnisII: darn, i grow and shadow my own trees as well which has a - overall effect

PatrickMcGinnisII: smh

AbsentMoon: I'm struggling to come up with an efficient way to calculate the possible locations for a tree to plant a seed. Does anyone have any suggestions?

icecream17: tree.neihbors.neihbors.nehibors, remove duplicates, remove self, remove non empty cells

Westicles: You are given a list of all possible moves

Bernard_Lowe: I agree with icecream. Be sure to keep unusable tiles though.

icecream17: O(n^3) solution. some peopl hardcoded it - so O(1)

icecream17: but i was too lazy to hardcode it

AbsentMoon: I am about halfway through hard coding it... but I'm lazy.

icecream17: if anyone has already hardcoded it plz plz share

PatrickMcGinnisII: finally

PatrickMcGinnisII: https://www.codingame.com/replay/549741887

PatrickMcGinnisII: I'm gonna submit and sleep

DaNinja: gg

PatrickMcGinnisII: i see u icecream17

Default avatar.png xuanwei-go: how can i join in the game that i have failed in clash of code just now?

PatrickMcGinnisII: 302nd from 801st ... not bad for piddlefarting around.

Smelty: dang

miszu: oh imposter of the vent, tell us your secret sauce

Smelty: *imposter kills you*

miszu: :(

PatrickMcGinnisII: the basics without more than a depth 1 day sim... is to count your trees by size... stay within certain proportions and it';s close to optimal... no quite, but close

PatrickMcGinnisII: g'nite, have fun

Smelty: my code doesnt run :((

Default avatar.png xuanwei-go: get go

miszu: btw guys, tomorrow is mother's day in case you forgot

icecream17: oh yeah time to look at https://www.chessprogramming.org/Search