« first day (1284 days earlier)      last day (2304 days later) » 

3:00 PM
I think I'd definitely omit the history
No, this is supposed to be a deadlock problem. The asymmetry (as Peter Taylor pointed out) is also interesting enough to motivate me to write it
@MartinBüttner do sharks fight after their first move? can they? do they just pass through an enemy?
...when a creature is breeded, who controls it?
@Sparr "The first move must be made into an empty cell or it will be ignored."
@NathanMerrill it's a new instance of the same bot
Ok, that's what I assumed, but that's never specified
3:01 PM
@MartinBüttner two sharks try to move to the same space as their first move, result?
I like each part of it...the strategies you could try with it are interesting
but there's too much, I think
but I don't know what to suggest to remove
because I like each part
@NathanMerrill thanks, will add it
@Sparr good question... both ignored I guess... seems simplest
@MartinBüttner do new nets spawn in the middle of the whale layer, or do they start off the map and move inwards starting with their edges?
3:04 PM
@NathanMerrill yeah, I'm afraid that might be the case. but then again, for simple strategies you can stick to your breeding ground and ignore all of the stuff going on elsewhere.
gonna stop tagging you :)
@NathanMerrill it's just that you can design more complex strategies that take everythin into account
Why would I ever move to another breeding ground?
if both sharks try to move horizontally in open water, they will get no indication of whether their first move was successful?
@NathanMerrill because you're at an advantage in other breeding grounds (if you want to go for an aggressive strategy)
3:05 PM
...I am?
why are you at an advantage?
@Sparr there is no "off the map"
@Sparr each hazard cancels the local species' boon
so in the bottom layer all bots are blind, but sharks can still try two moves and whales still have an advantage in numbers
err... is that documented?
3:06 PM
in the middle layer, squid can avoid the jellyfish because they can see them before being affected
@MartinBüttner Slight nitpick - "Your choice of animal determines where in which layer" => "Your choice of animal determines which layer"
I never caught onto the hazards cancelling the bonuses
@NathanMerrill initialliy it was a design accident :D
I don't see that in the spec
3:07 PM
@Sparr what part?
@MartinBüttner I would definitely make the mantis have two possible choices then
otherwise the squids have an advantage
cancelling bonuses
@Sparr well it's implied
whales: higher population vs insta-killing nets
3:08 PM
sharks: faster moves vs paralysis
I don't see anything even remotely close to that
squid: larger field of view vs blindness
oh, wait
you don't mean their ability is actually canceled
but blindness is total, right?
it doesn't just reduce squid to range 1
Ok...how tall are the nets, martin?
3:09 PM
@NathanMerrill ah yes, we were talking about this before... I think I just forgot to update that
the spec says nets are 5 tall
the full height of the layer
@Sparr no everyone...
@NathanMerrill what Sparr said
@MartinBüttner What happens when two jellyfish are adjacent? Are they stuck?
so if you are "in" a net, on the top layer when you see it, you're fucked
do the nets ever turn around?
3:10 PM
unless you can swim down and forward as fast as its moving forward?
@Rainbolt no they don't affect each other (well they fight if they step on the same cell, but they don't paralyse each other)
So they have a special immunity to other jellies?
I would point that out
@Sparr yes you can do that. also if you're really clever, there's a way to step through the net.
@NathanMerrill no, the board wraps around.
I need to make notes
(because I don't want to edit everything in one at a time now)
do nets move Y+1?
or faster?
that doesn't make sense Martin
3:12 PM
@Sparr one cell at a time
does successful breeding reset your 100 turn counter? failed breeding?
the net starts at the top, moves up, then appears with the squid?
@NathanMerrill you're confusing Y and Z
@NathanMerrill the nets are rendered in the spec from an overhead view. they are 5 layers deep, and they move north.
@Sparr ah damn, that's another thing I wanted to fix. successful breeding will probably reset it to 10, but I need to figure out the numbers for this.
oh, y is always up in my mind, and x and z are the other directions
3:14 PM
@MartinBüttner I really think that everyone is just going to stay in their breeding ground, avoid obstacles, and breed as often as possible.
x is east, y is north, z is up
y is south in some games with row/column maps
@Sparr I'm not sure that's the best strategy, because of overpopulation and things
but if you have suggestions for incentivising to leave the breeding ground let me know
The breeding grounds are perilous. It would be easier to survive in the regular layers once the mines have been cleared, then return later to breed
@MartinBüttner if the home layer gets full, you start sending out attackers, but until it's full there's no reason to leave
I think this is a pretty sweet challenge
thanks :)
3:16 PM
I still think the RPS thing is silly. You make a 'throw' every time you move? And unless you're fighting a shrimp you have random odds of win/draw/lose. Why not just make it random?
err, or a jellyfish
@Sparr when you step on a jellyfish, say, there is a chance that another bot does so to. in that case you have to decide whether you want to beat the jellyfish or the bot beating the jellyfish
so the only RPS strategy is predicting when you might run into a jellyfish or shrimp, which can't overlap, or when you might encounter a player who thinks they are about to encounter a jellyfish or shrimp
(since you have to use the same throw for all fights within one round)
if you lose to the jellyfish, you die, right?
I think you should take it out too. Give a specific odds of survival for each encounter. Say shrimp == 66%, jelly == 66%, player = 50%
Honestly, I should have done that too for Wolf
3:17 PM
yeah, I'm not too opposed to that idea
the RPS thing was a remnant of a challenge from a class I took that I really wanted to implement. Teaching us how to use enums and stuff
I vote up on removing RPS
I was wondering if I could give them asymmetric odds between species, but that would drive the sharks towards their more likely prey, whereas their victim would have to pass by the sharks to get to their easy prey
It would cut down on communication, which is a good thing since you are scraping for 3D surrounds. On a squid, that is going to cost you CPU time for sure
okay, it'll go
does anyone have an idea if I can make the asymmetric fights between bot species work without being unfair to either squid or whales?
3:20 PM
What would asymmetric odds looks like? I have a 66% chance of winning and you have a 34% chance of winning?
what I mean is
sharks beat squid, squid beat whales, whales beat sharks (in 66% of the cases, respectively)
you can't do that . Squid are at a distinct disadvantage
That seems as easy as you just wrote it.
if the world wrapped around z, then you could
@NathanMerrill right... but that's weird :D
3:21 PM
but squid will be trapped by the sharks before the whales even come close
Starred the post being discussed, for others who want to hop in and talk about it
@NathanMerrill yeah that I talked about earlier
@Rainbolt thanks
okay, no asymmetric odds, unless someone has a fair idea for it
(not so hidden agenda... I can be lazy now and refer to the transcript instead)
do you allow pass-throughs, Marin?
except... what if you're at an advantage in the other breeding grounds (because animals are totally unalert when in their breeding grounds)
3:23 PM
Like I move to you and you move to where I was?
@NathanMerrill meaning?
we are adjacent, both moving towards the other, and we miss each other
yeah that works
what happens in a 3 way battle with all three throws?
@Sparr a pair is picked randomly, the winner fights the remaining animal
I think that's in the spec
3:24 PM
it mentions ties, but I didn't know if that should count as a tie
ah the picking of pairs is missing
I checked. It doesn't say how they fight
Here was my wording from Wolf: If more than two Animals collide, two are pseudorandomly selected to fight until one remains.
@Rainbolt I actually wanted to copy that, but somehow missed it
I've since learned that random is synonymous with pseudorandom for the purposes of this site
@Rainbolt good point
So what do you guys think about being at a fighting disadvantage in your own breeding ground?
it would add another incentive to leave it and go hunting elsewhere
then again, you do die instantly anyway if you're breeding and someone attacks
3:26 PM
For those that like references to meta: meta.codegolf.stackexchange.com/a/1325/18487
What do you gain from fighting?
reducing the enemies population
If nobody cares about killing me specifically, I'm not motivated to flee the area where I am vulnerable
I was trying to design a divider in Marbelous, but my head exploded, time to go home
@MartinBüttner if I expect to fight a jelly and another player, I think I pick S, even if I expect the other player to also pick S.
@Sparr I think RPS is going to be ditched.
So that would just mean fixed odds.
3:30 PM
I can see moving to the regular layers, but why would I venture into someone else's perilous grounds just to kill them
@Rainbolt if your home and adjacent layers are completely populated
Oh, so this is like end game strategy
Yeah probably. Or you could set half your population on attacking and the other half on breeding.
Ok, I like the home disadvantage idea now. It gives your challenge a new depth called "end game"
3:31 PM
(if you notice that more bots breeding just lead to overpopulation)
@MartinBüttner So let's say all six cells surrounding me are populated and I spawn a child. What happens?
Expected value of my R/P/S throws
against a Jelly throwing P/s
and a player throwing R/P/S

      P     S
M R 0/0/2 3/2/6 13
e P 3/2/0 2/0/0  7
  S 2/6/3 0/3/2 16
so... the odds would be: 0% vs nets, 66% vs jellyfish and shrimp, 50% vs other animals UNLESS you're in your breeding ground, in which case it's 33%
@MartinBüttner so, thematically, why are we vulnerable in our breeding ground? it seems like it would be our ideal environment
@Rainbolt 6 cells? I count 26
3:33 PM
6... sorry. above, below, left, right, front, back
You mean diagonally adjacent?
including compound diagonals
yeah, it's that for all other mechanics
@Sparr I know, it's a bit weird...
Ok let me rephrase. I am surrounded on 26 sides and I spawn a child. What happens?
@Rainbolt it fights?
Oh duh
3:34 PM
it couldn't fight before you got rid of RPS :p
nice timing
Honestly, I think you should commit your probably massive edit then call for looks again
Cuz this is gonna be super fun if you get it just right
@MartinBüttner what do jellyfish do if one of their upwards or downward moves would leave the shark layers?
@Rainbolt okay, I'll do that as soon as I get home
@Sparr it doesn't... they just go up up down down up up down down
ah I see why you asked
there's another spec fix missing
basically they always do up up down down... but they will pick a player's cell if theres one diagonally above or below
(which ever direction they are currently moving)
@MartinBüttner You have two special moves that are invalid that weren't present with Wolf. If you move up on the top layer, or if you move down on the bottom layer. I don't know if you need to specify what happens when you make an illegal move. Perhaps default to "Do nothing"?
3:38 PM
I'll specify that precisely later
so if there's a jelly at the top of the shark layer, and I'm above it, it doesn't chase me?
@Sparr it doesn't even get there, but no it doesn't even chase you in the top shark layer
jumping should totally be allowed! moving diagonally upwards at the top layer should hop over a space! :)
@Rainbolt either that, or the vertical component is ignored
@Sparr lol ... sounds like a fun idea, but that would just be an unnecessary complication I guess
3:40 PM
I think it would be weird to move the player to a place they didn't exactly specify. I would say an illegal move should be outright ignored. It's easier for you too, instead of parsing the x and y components out of an illegal move
can two nets be nested, randomly?
@Rainbolt it probably won't matter for me but not moving to a cell you didn't specify is a good point
N     N
@Sparr nah, I'll avoid that when placing them
can they touch, side to side?
3:41 PM
Aww no random super nets displacing the entire level lol
hm, that might happen, yes
will two nets ever collide in opposite directions?
Oh nevermind. Super nets ftw!
@Sparr I'll avoid that too
Killing my twisted dreams here Martin
3:42 PM
if the map wraps around in X and Y, where do nets come from?
Hahahahaha that is an awesome question!
do they just always exist?
is this a religious question for the whale philosophers?
nets just exist
they've always existed since the beginning of time
(which was about 6500 rounds ago)
roger that :)
I assume you can spawn adjacent to a net? In that case, are you running for your life for all eternity, destined to never breed?
3:44 PM
mines allow suicide attacks...
do more mines ever spawn?
@Rainbolt there are two ways to dodge them
ditto more shrimp / jelly?
@Sparr no, I think the game is short enough for that
Oh wait I just realized you can swap levels to avoid nets. Thats far less scary now
that also gives the later rounds the distinct endgame feeling ^^
3:45 PM
I'm still in 2D over here
@MartinBüttner 1 chessboard distance means 6 neighbors?
@Rainbolt that's one way
the other one is for pro-gamers
@Sparr that's manhattan distance
@Rainbolt nets are 5 layers tall, you have to get out of the whale layers to get below them
chessboard distance is chebyshev distance
got it
so one suicide bomber could kill 26 enemies, if he's smart/lucky
3:46 PM
We should have an info page with common "terms" that people can use in their posts
I think we were contemplating mine chain reactions but ditched for being too crazy
because many KoTH have similar ideas
@NathanMerrill Rainbolt posted just that like 10 minutes ago
Someone should totally post the link again and then remove it.
3:47 PM
I like it
thanks a lot all of you... that was really helpful!
I'll edit in all the changes later and let you know so you can have another look if you like
@Rainbolt so... dining philosophers... what do you say about no history at all... only the current state and messages from other bots?
4:04 PM
dining philosophers, no messages!
No history, allowed persistence (I will strangle the next person that posts a comment about how allowing persistence breaks all that is holy), and I'll pass the current state. I don't think I'll allow messages. You don't to take the easy way out and say "I'm hungry, my turn to eat now."
Then you get into all sorts of mess like "How many messages can you pass?", "Do we all speak at the same time?", "How do I check my messages?", etc.
Plus, allowing communication doesn't help make asymmetrical decisions. All three bots could say "Give me your fork." Same problem as before, right?
yeah okay
so only the current state and persistence
For Java entries, I guess that means static variables. Maybe I should point that out
I mean they could print to a file if they wanted
for java entries you might as well keep an instance alive
take the Dogfight approach, one instance of their class that is never killed
4:09 PM
(it's the first time I'm not getting ninja'd today)
Yea ok. So this will be weird. Java entries are persisted, and non java entries are called and then killed repeatedly.
The alternative would be to persist the non java entries as well
that's a good idea anyway
that will speed up test runs considerably
But then they have to learn to how watch and wait for input. And that eats up CPU time too.
My pacman works quite fast
@NathanMerrill what does that use?
4:11 PM
I really don't think persistence with other processes is a problem
What language?
Sharing is caring!
I've tested 250 concurrent instances
Actually, I broke it out in a class so that it can be shared with other people\
with the 250, I started to get a bit of a slowdown
Luckily I only have three participants ever. So that's four processes maximum.
4:13 PM
given, they weren't doing much calculation
Oh I know. I'm going to learn multithreading for real this time
I can ask all three philosophers for a decision at once!
Granted - I can't impose a time limit if they are sharing resources
Perhaps I can time limit the entire group? This is a cooperative exercise after all
@Rainbolt I'm not sure that'll give a speed up if you need to sync after each round
but you can run all the tables in parallel
I meant call upon every philosopher in parallel, then wait for all three answers to come back
The work being crunched by each philosopher would then be done in parallel, saving time
anyone here know R?
4:15 PM
oh wait
bookmarked... thanks
that's not complete
@Rainbolt I get that... I think that won't help in 98% of the cases
you can parallelise better if you just run the different tables in parallel
especially since they definitely don't need to share anything
@Rainbolt check out my wrapper class for the Dogfight contest. A java wrapper for a non-java process, which can persist.
Oh I see what you mean
4:16 PM
and you can just pick the test runs from a queue in case one table finishes faster than the others
pacman does similar
Ok. There's the full code
calling read_players() will return a list of communicators with 1 of each bot, each in its own process
@Sparr I have both a persistent and non persistent Java wrapper. I haven't covered the communication part though, which is what I wanted to study Nathan's code for
And since I know Python, it's convenient
Thanks @NathanMerrill
if someone here knows R, I've got a great tip for you to get a winning answer to a code-golf
4:19 PM
Are R and RScript the same thing?
@Sparr built-ins and external libraries are disallowed
grumble grumble
the spec currently only says built-ins
I think he should fix that
I am annoyed that golfing the output is the main part of the challenge
This guy knows R (assuming RScript is the same thing) codegolf.stackexchange.com/a/25377/18487
4:20 PM
@Sparr that's the best thing about the challenge :D
and so far only the ASCII submissions got it right
I think the data manipulation to convert three lists into the venn sets is a much more interesting problem to golf :(
@Sparr hm really? I don't know... it's just a bunch of intersections and differences
sure, in languages with set intersection and difference operations :p
my entry handles it a little differently
hehe okay
I actually do bit masking operations to determine which area each number belongs in
4:24 PM
I see
I still need to beat you on that :D
I've got one idea that might save quite a lot, but probably not 20 characters
but I also don't wanna ruin how perfect the result looks :D
FML I can't even copy a database from my own machine to my own machine without problems. Why are all the useful error messages sent straight to the Windows Event Log? It's like SQL Server 2012 was invented in the 90s
I.... have a problem.
I have a good idea for a 2v2 challenge.
Upon mathing, I've discovered that for complete coverage of all pairs vs all other pairs, I need 3C(n,4) matches.
Unfortunately, I estimate match length to be longer than this can accomodate.
pick as many pseudorandom matches as feasible?
That was my first thought, but I'm not sure how many would be necessary to be "fair".
split them up into teams?
4:31 PM
@Geobits tournament brackets. split up into groups of 8, have all the 2v2 matches there, send the top 4 along, repeat.
I suppose I don't always fight with the same guy?
Right. Each entry is paired up with all other entries.
do the whole bracket a few times
I like that
4:33 PM
group size and number that advance are variables you can tinker with
I'd have to handle byes, since not all C(n,2) are divisble by 8/16/whatever.
but that structure will cut your total time down tremendously
you're going to get crap entries
seed in an arbitrary number of dumb bots
Of course I am :D
4:34 PM
pre-specify how the dumb bots will work. sit still, move at random, etc.
relevant to strategy since you'll get paired up with a dumb bot slightly more often than with any other individual
That's not a bad idea.
lol someone didn't like my vulcan (codegolf.stackexchange.com/a/35085/8478)
not sure what that was about...
New meta post, I hope it becomes useful :P
...is the bot down?
It takes a few minutes. Supposedly up to ten.
@NathanMerrill No, it just takes some time before the feed posts the question.
4:39 PM
A: Interacting with persistent programs

Nathan MerrillPython This controller pipes to/from STDIN/STDOUT. In order to use it, you must: Have a directory bots in the same directory as your controller For each bot, create another folder with the bot's name within bots In each folder, create a command.txt containing a line with the command of how to...

Q: Interacting with persistent programs

Nathan MerrillIn KoTH (and possibly other problems), you may want to be able to have 2 way communication with other programs, and for all of them to be persistent (they stay alive, waiting for information, and can return information) This is not simple code to write. Hence, I am looking to build a library ...

you got ninja'd by the bot :)
it just refreshes every ten minutes
it's also relevant that Rainbolt and I would like to write just such a thing (but of course if a challenge host doesn't like the language we pick, having solutions ready in other languages would be nice)
4:41 PM
yeah, both are relevant
but mine is actually where you would post the code
@Geobits wow I was searching for this when I wrote the KotH tag wiki and just couldn't find it
@MartinBüttner About that... why not let the host use whatever language he wants? The framework can communicate with a controller just as easily as with a bot.
Instead of having an empty "fill me out" function for each turn, just have it pass the input/output back and forth.
that would work too
Then you can just write template controllers for many languages without duplicating the framework itself.
good idea
4:43 PM
...there's a problem with that
@Rainbolt ^ the last 5 messages
I thought about it
@NathanMerrill ?
...you have 1 controller, many bots
you need a way to specify to the controller which bot is sending the message, and which bot the outgoing message should go to
Sure, there would need to be some basic protocol.
4:45 PM
hm depending on how much communication you have between controller and bots, that additional indirection could really become a problem
also, consider that you can have multiple of each bot
do I pass in a name + unique identifier for each bot?
there's just a bunch of protocol needed for that
GUID should be enough
no...because often I care about if the bots are different types or the same type
integers should be enough
you tell the controller what type a new entry is when its created
which would work...there's just quite a bit of protocol
4:48 PM
@MartinBüttner The additional time could be a problem for some challenges. Perhaps make it optional? If a user wants to use another language, they can. If not, let them plug it in.
lol okay... the levels of indirection just make me chuckle...
so we have this framework as an abstraction where you just plug in your controller functions in the right places and can use a few helpers
now for people not wanting to do that, we implement one such controller which reads and sends data from a separate process instead
(like the wrapper for the Wolf bots)
Something like that :D
but because we don't want people to deal with the ugly protocol, we implement such a separate-process controller in as many languages as we can, providing convenient functions to hide the protocol
Alternatively, just provide one or two and crowdsource the rest.
well yes, but the idea is the same ^^
4:51 PM
Still sound less complicated than a LAMP stack when you get right down to it :p
Ok...more questions
...if a bot returns a message, where does the ID go?
on the first line?
at the beginning of each line passed?
It doesn't matter as long as it's consistent. Just define the protocol and work with it.
mmm...it must be at the beginning of the line
because if its a multi-line message, you don't know when the bot starts and when the controller starts
That's only relevant if you're reading it line by line, really.
If you read it as characters/bytes (until some terminal signal), you can send as many lines as you want in one message.

« first day (1284 days earlier)      last day (2304 days later) »