last day (23 days later) » 

3:39 PM
Good luck to anyone competing; I think this challenge might be pretty interesting.
Lots of room for strategy
 
3:53 PM
@RedwolfPrograms So wait, how is the 1st example bot attacking at random? is the UID array randomized? Otherwise, wouldn't it just slap the same guy until he dies?
 
@Veskah Yes, the UID array is randomized so that bots can't specifcally target other AIs without tracking UIDs (and those UIDs change every round)
 
I saw it was randomized each round but then you said each round is made of up to a 1000 turns
So I figured it was randomized each tourney round
Which is fine and makes sense but doesn't address Lvl5Bot always attacking others[0].
 
No, I just shuffled the UID array each turn. The UIDs mapped to each bot is what changes each round. Doesn't change much from a bot's perspective, just helps to lower "ganging up"
If a bot wanted to target a specific other bot, it could save the UID in the storage variable, or just sort the UID array.
 
Fair enough, I guess. Might want to make a note of that.
 
I edited the description stating it's a shuffled array of UIDs. Thanks for letting me know!
 
4:02 PM
Also, it doesn't seem like you get the enemy state so you're just kinda throwing actions into the void
 
@Veskah I kind of debated how much information to give bots about opponents. What do you think is fair? I'm considering adding HP and total worth.
 
Hmm, it is a good question. As a quick aside, you should probably add the turn count to the input self-parameter, otherwise you can't detect if you've been stunned
 
There's the turn() function
 
Or at least make a getTurn()
 
> To get the current turn number (starts at 1), use turn().
 
4:07 PM
Oh, skimmed that line, my bad
 
I think I'm going to add HP and either worth, levels, or both.
 
Is it going to be HP/Shield, HP+Shield or just HP?
 
I'll do HP+Shield, since it doesn't make a difference to other bots
Maybe I'll do worth and attack level. That makes sense to me
 
Also, how does stunning a stunned bot work? E.g. Bot A and B both stun C on the same turn
 
Bot C gets stunned for one turn. It doesn't stack
That could get confusing and annoying if a bot gets ganged up on
There, updated information given to bots
 
4:16 PM
You should also add a malformed return action rule (e.g. bot dies, does nothing, etc)
Unless that's what you meant by " or return a falsy value."
 
If the controller doesn't understand the return value, it skips the turn
I've added a rule that unknown return values are not allowed, since I'm worried it could break something.
 
You probably could rewrite the "var move = code => {#cases}" block as a switch and have the default be skip()
Also, that same block uses Title-case (e.g. "Shielded") whereas the block that applies the move looks to be using all lowercase
 
@Veskah I like the if/else chain, I guess that makes me weird.
The "Shielded" is for the event log
 
Good thing I can read
 
 
2 hours later…
6:18 PM
@RedwolfPrograms I think your UID system has some bugs. I made a simple BullyBot and am getting some funky results
 
Interesting, the log shows it to be shielding, attacking, etc.
 
Or at least Stun does while interacting with it
 
I've just added a breakpoint, I'll see what the move outputs are
Oh, hold on. I think it's able to attack itself because the new second argument is being improperly filtered
@Veskah Ah, found it. It was a sneaky little bug with stunning. A stunned bot wouldn't move, so the move variable wouldn't have a chance to reset, so the last bot's move would copy over.
 
6:33 PM
I see
 
I've updated the gist. Thanks for letting me know about the issue.
 
No problem, also. Could you quick refactor out the number of rounds and turns into a variable? It's nice to run a short tourney while monkey around without repeatedly finding it
 
6:56 PM
You can specify the number of rounds with runGame(rounds). If you'd like, I can add a custom max-turns argument
 
Man, I'm slacking, I haven't played with default values in so long, my brain just read it as another variable
 
I think I'll change the default to 1 instead of 100 games, to make debugging easier
 
7:25 PM
if two bots kill a bot on the same turn, do they both get gold?
 
@AndrewBorders They both did, but you've just made me realize I accidentally removed that when changing the combat. Let me fix that really quickly.
@AndrewBorders Actually, never mind. They both get the full value. Still not optimal, but not too bad. I'm keeping it.
 
8:06 PM
if my bot dies, do i lose chances of winning or do i just stop being able to make moves?
 
Winners are judged by total gold gained, so you lose the ability to move, which means you can't get any more gold. You can still win, but it makes it a little harder.
@AndrewBorders I made a few edits to your answer (one bug and the name forgotten at the top). You can decline it if you'd like, just making sure you knew
 
8:30 PM
Is there a way to know the level of the abilities from other bots?
or maybe steal gold with every attack
 
@RedwolfPrograms Thank you for the edits. Javascript is not my best language.
 
@LuisfelipeDejesusMunoz You can find another bot's attack level (others[i].attack), if that's what you're asking
 
@LuisfelipeDejesusMunoz you cannot find the other levels, though
 
@AndrewBorders You're welcome. A lot of the time I try to allow Python submissions, but it gets complicated really quickly
 
@RedwolfPrograms haha. I am even worse in python. I tend to stick with the ones that start with a c
 
8:43 PM
@LuisfelipeDejesusMunoz As for stealing gold, I thought about that, but it would make farming an inferior move compared to attacking, unless the amount stolen had little to no influence on the game
@AndrewBorders I tried learning C++ once, but I found it a bit too low-level after being a Javascripter for so long
 
@RedwolfPrograms I work with servers, so low level is what i do
 
and can i keep track of my moves? I mean, in turn 560, do I have a way to kno what I did in the previous turns?
 
@LuisfelipeDejesusMunoz You can track that with the storage object, though it might complicate your code a little (though it could be easier to just track things by turn count)
@AndrewBorders I mostly just make web games in my free time. I bought a used server a year or so ago, so I'm getting a bit more used to low level as I go
 
 
1 hour later…
10:01 PM
@RedwolfPrograms i finally overtook the legendary unkillablebot
 
@AndrewBorders Really?
What'
s the strategy?
 
Oh, hey Redwolf, you might want to make a note that the others[0].hp is not the same as yours and is instead effective HP
(I know it's in the OP comments but usually you want to edit that stuff into the OP itself)
 
@Veskah Okay, I
''ll do that
I keep hitting the enter key and the apostrophe key at the same time
It
's kind of annoying
 
heh
 

  last day (23 days later) »