Botters of the Galaxy (CC02) - Feedback & Strategies

1st in Silver & 510th Total

I am in a business trip and we keep having meetings and dinners with our customers.
And one of our production software service went down in the weekend so we spent the whole weekend trying to save the service.
So I am pretty satisfied with my rank although it is the worst that I had ever got.
Just a little bit sad that I am 1 place short to Gold.

Thanks @AntiSquid, @Illedan and @Wildum for this contest.
I think this contest is a interesting one.
However, I think the contest is a bit too complicated especially for new comers.
They will need to consider too much stuffs just to beat the wood 3 boss.
That might be the reason why participants are fewer this time.

Also, the skills are so complicated that sometime I think I am working instead of playing while implementing the simulator (which I never finish)
At the end, I just score MOVE 8 directions, ATTACK all nearby units, and SKILL to all nearby units. with a shitty scoring function that doesn’t even check who the enemy hero is.

2 Likes

How can you know who is your opponent?
Is his/her/its name hidden in the inputs?
Do you deduce it from his/her/its behaviour?
(not that I want to hardcode that kind of counter attacks, but I have always wanted my IA to be able to say “Hi” to my opponent in the messages)

2 Likes

You have to deduce it from the enemy’s behavior (I never tried it). Saying Hi (with the name in the inputs) would be cute but it could lead to some next-level hardcoding in games that benefit from it.

Codingame Battlestation

… WOW

Fixing up the inputs/outputs to always be on the left side (using symmetry on X) made writing the bot a lot easier.

Pretty good idea, I might reuse this one even if this is also quite simple :

val TEAM_DIR = if(myTeam == 0) 1 else -1
 ...

val attackX = currentX + TEAM_DIR * 200

Thanks for feedback

This amazing idea could be implemented directly in the referee.

1 Like

I thought about doing that too but decided against: coordinates at tooltips would not match what you get as input, as the viewer is independent from the player.

But I think an “expert input” (print that you want full input with creep aggro state, kills+denies, … in turn 1) should be possible to add to the referee.
Checking the creep state is definitely needed to reach the top, but I wasn’t motivated to collect all these information myself.

Very interesting challenge.

I finish 1st Gold / 121 general

I was first very confused with the rules. And I said that I would not invest myself into this challenge, but… challenge is challenge then I start to code for real.
First of I I’ve tried to use the standard couple IRONMAN+DOCTOR_STRANGE and try a attack/retreat strategy. It was enough to go to BRONZE ligue.
to go to the next ligue I’ve begin to use the sell/buy action to improve my heroes by selecting them with the damage value.
To go to GOLD: I had to use the spell especially the FIREBALL & the PULL

After that I got crasy: complete strategy change: use HULK+DEADPOOL then rush on enemy weakest hero!! BONZAï
with little adaptation to use some item spell and taking care of the GROOT… I ended at first place in gold, failing to go up in Legend for 0.15pt against the boss…
next time maybe (I hope)!!

5 Likes

Thanks to the creators for all their hard work. There are valid criticisms in this thread, but they mostly deal with the choice of a MOBA for an AI challenge, rather than how well the creators did designing the MOBA. For the latter, I think they did an amazing job.

I finished in 14th place.

At the beginning, I implemented a very simple strategy that carried me through most of the contest:

Find the furthest enemy forward, MOVE_ATTACK to my max attack range while keeping the same y-coordinate as my target. Ensure there’s always at least one of my minions between me and my target.

This worked very well initially, but playing the game so one-dimensionally left me exposed to big FIREBALLs at higher ranks. Looking back, I wished I would have spent more time on choosing my angles of attack.

I initially used a Dr Strange + Ironman duo, but I eventually switched to using Dr Strange + Deadpool. This was a unique duo in Legend from as far as I can tell. With good timing and a bit of luck, I could essentially 100 - 0 an enemy Dr Strange with a Pull --> Wire --> Counter combo, depending on their items. Also, using Wire on the enemy Hulk helped my Dr Strange survive against an aggressive team.

My personal feedback would be with the choice of last hit / denies as a win condition. I feel like these fall into the category of “means to an end”, rather than being used in the actual scoring. I think the tie-breaker should have been remaining tower health, since it is a measure of how close you were to an outright victory. In the current setup, there was very little motivation to actually press forward and start attacking the enemy tower, which is one of the main ideas of MOBAs in general.

11 Likes

Congratulations, @BrunoFelthes! I’m sure you had a lot of hard work to get there in the top 20.
I spent a lot of time to get to the legends, after that I couldn’t play anymore for personal reasons.

Also great feedback! I had similar issues during gameplay.

Wow! You really take it serious! Nice Debug software.

He ain’t no scrub

1 Like

Indeed, it would be too easy to hardcode some weird behaviours if they provided it

Something like “if(bebertlenewbie) then AddTrollMessage();”

Uni here, Bronze (922th); This was the only game mode / contest in which I had no idea what I was doing at the start of, during, and after the contest. With not a lot of time and not a lot of experience (this is my second contest to participate in), I wasn’t going to spend over two days trying; at the pace at which I was making progress, I likely wouldn’t get far even if I tried for a few more days anyway, so I’m glad I put my time elsewhere better.

Day 0

For the record, my strategy:

Wood 3: Choose Hulk. If my hero’s health % > opponent hero’s health %, attack the hero. Else, defend the base.
Wood 2: Once my bot cleared wood 3 it also immediately cleared wood 2.
Wood 1: Choose Hulk and Ironman. Added an additional if-else block to actually check for the “character selection” round - which I was not doing - and repeated wood 3’s action statements to do twice.

It took me three hours to reach Bronze, and I still haven’t figured out the game. This includes reading all of the unhelpful rules and missing most of the points because it was presented so poorly that none of it actually made sense when I was trying to just get to the game, compounded with the fact that the contest starts at 2 am, and most of the visual replay UI was basically irrelevant that trying to study replays was making it worse. In the end I tried a lot of strategies - most of which were in hindsight just suiciding but made obvious sense in the moment - just to realize the win state could be reached even if towers aren’t struck. It was frustrating. (As a reminder, it only took me 7 minutes to pass wood3 in mean max (or really most bot games))

You can imagine how trying to understand skills and items were like. Basically, the same frustration in tenfold.

Day 1

Oh, I forgot to mention that I wasn’t using General chat on CG (since switching between chat rooms in the web chat interface is such a nuance and I’d rather be in general_jp), so I didn’t see the resources like a starter bot (apparently that was there) being passed around. Apparently I commented that “this feels like maintaining legacy code” in reference to the huge specifications and unbearable input parsing in a different chat room. And while I said that at the start of the contest, this continues.

I’m basically someone who’s as far as MOBAS as possible. If league of legends and dota both closes down this moment right now, my life probably wouldn’t change one bit. In fact I’m all for seeing esports move to a better direction. Reading the blog post that came out like a week before the contest was actually the first time I’ve even heard of MOBAS. Well, back to the original topic.

With basically no experience, trying to understand how the game works was very difficult. Some times a term like “last hit” or “creeps” is randomly thrown into a paragraph, and it won’t be explained until ten paragraphs later. There are too many mechanics, and even after reading the mechanics I still have no idea how to play the game, less to write a bot for it. A lot of what I’ve had to do for the bot felt convoluted. For example:

When I first attempted the contest in wood 3, I saw that we’re expected to choose a hero by printing its name. Thinking it actually matters as a parameter, the generalized solution would likely be to randomize your choice. However, this was a horrible idea since heroes all work differently for no apparent reason (remember that this was wood 3) and this made play results very inconsistent. I had to stick with one in order to even start trying strategies. Since skills weren’t present just yet and the hero choice had little to nothing to do with getting through the game, it would had made far more sense to force / take away this pointless decision and let the user worry about the right mechanics.

So on the next day after I’ve gotten some sleep and wrote some emails I studied the referee to try to make some sense out of the game. To put it politely, the code for the referee was awful compared to that of mean max, and I’ll leave it at that.

I tried to implement some code to buy the best affordable item once we have more gold than the minimum item cost. It was not working, and I didn’t manage to figure out why. I tried to implement a naive usage of skills, and it works against the boss, but my ranking in bronze actually turned out worse consistently when I used that. I reverted my code back to the two if-else blocks and it got me a bit higher.

Previously

  • I don’t know if it belongs here, but I showed three of my friends (who don’t use CG a lot) Mean Max and none of them even made it to bronze.

Now

  • I don’t know if it belongs here, but I showed a lot (>3) of my friends Botters of the Galaxy and none of them even bothered trying. This included some who I introduced them to CodinGame through The Great Dispatch and it made them like the site quite a bit. The willpower wall was strong on mean max and never did I expect the monolith to boost over such multitudes.
  • The idea was good. The game was good. The contest was horrible.
  • Concepts define a game, and mechanics define how you play. In the context of a programming contest, having such an overwhelming amount of mechanics is a big risk, because we work best when we try to understand a task and just one. When it gets to 1. having multiple agents and 2. maintaining mixed payouts based on multiple variables and 3. getting gold, it stops being an interesting competition and more of a chore. The game works as is because each team has multiple people doing one job at a time. The botting contest doesn’t because now you have to do everything without realizing these are things you have to do.
  • Remember that a programming contest is mainly on programming. The game is the medium, and should serve as the playground to let programmers compete, it shouldn’t be the obstacle in itself. As it was presented, it was very difficult to make progress without 1. prior knowledge of all involved mechanics, or 2. learning everything which compounds with the lack of visual aid (like how Mean Max had a chart and some attempt in demonstrating mechanics at work).
  • Most of these mechanics didn’t add much in a strategy context and would had been better removed to have important mechanics refined. A big part of making progress seemed to be looking at numbers which would not be something I’d expect out of a programming contest. It also wasn’t a game I had fun playing since all I could do was look at playbacks of my randomly put together code against players who appear to also have a randomly put together strategy. (This was compounded with the fact that the game wasn’t even working very well and required fixes and changes that directly made my previous experience obsolete, but everyone else has mentioned this already)

My last word of advice would be to remember that you’re adapting a game into a contest and that should be the core focus. Add that to the fact that the schedule has been so tight that even having a game at such a scale done could be considered a feat at all.

All in all, I was not very satisfied by the contest and had a rough time, but I can’t say that I hated it either. I’m impressed by the endeavor even though it turned out not to be as great, and I hope the next one you make would redeem yourselves. :wink:

4 Likes

Legend 8. Deadpool + Hulk
Some things I used:

  1. Potential fields for better positioning
  2. Creeps simulation/dummy for heroes attack predictions for lasthitting.
  3. Some ifs for combos to kill doctor strange. E.g. using deadpool’s invisibility to start combo
  4. Special strategy to fight two melee vs two melee (gave me 70+% wr against all melee compositions in legend)
  5. Pushing version with bug totally breaking melee fight 5 minutes before the deadline( lost ~all games to Recurse, won ~all games against Saelyos because he didnt expect that shitty behaviour :slight_smile: )
3 Likes

How hard is this game compared to code 4 life or ghost in the cell wood leagues?

Not that good; it’s better to remain basis invariant, not depending on symmetry or chirality. Towers can be center-symmetric (not axis-symmetric), or even have random spatial positions — should not matter.

It was my first online contest on CodinGame. Didn’t progress that far, but it was fun and exciting. Great job of creators, thanks!

Still there were a few annoying issues :)

At the beginning it was hard to try and gradually improve my strategy because game punished for submits by instant promoting to the next league and spamming with avalanche of new rules. I failed to find the way to go back to previous leagues to keep playing simpler rules where there was still a lot of room for improvement. I could not dedicate much time, so had to ignore some mechanics; but even rest of rules demanded much mental capacity :)

Next, activity was too linear, not enough spread over the arena. (Yes, there were groots and bushes, but I had to ignore them; I’d prefer common units to be widely distributed in space; maybe two lanes?) With unfortunate absence of collisions, visualization was ambiguous, since units stacked together. No evident attack animation; was unclear who’s dealing damage, who’s taking damage. No score in turn input, again; so it was hard to track progress.

Have you considered implementing Clash Royale-like game in future contest?

1 Like

Got to gold in last few days. The game it self has some defects for a 10 day competition. But i got a lot of fun and wrote many codes. Thanks for the creators. I was thinking of a moba styled game for ai, but turned based and in a grid to reduce the chaos.

If the inner game states (like if creeps is aggroed and to who) is given in the input, there could be some simulator solution?

1 Like

Let me start with saying that this was the most complex multi-player game ever attempted in CG. I’m sure that team CG was very happy to see how you pushed the new platform to its limits and from that experience it can only get better over time. Unfortunately, at the same time it was the least polished contest of them all. Partly perhaps because of the complexity of the task, but partly due to the design choices made.

I thought it will be useful to dissect these choices, and talk in detail about what and how to improve, as this might help not only you adjusting the game for multi, but hopefully would be a good lesson for future contests makers too. So this is my attempt at constructive criticism, where I’ll try not only to complain (as many people before me did :P) but also to discuss the possible solutions.

Input

My Python code was 300 lines. 100 was parsing the input. And I had to do it for the very first bot in Wood 3 already, even if I couldn’t yet buy any item or cast spells and I really didn’t need to know about creeps and the jungle bushes yet. All I needed at this point was: (x, y, hp) for every minion and hero and maybe the tower health.

More details on input, entities and attributes

Yes, tower should not be a unit and have “stun”, “shield” or “gold”. Also, static attributes that do not change throughout the game, like tower “range” shouldn’t be a part of input (same for bush “radius” or creep “mana regeneration”). I was also really surprised that all the units (yes, including towers) had given the hero attributes, just set to zeros and “-”. Why? It doesn’t simplify anything. I have a type, I can tell which entity object to create. All I need to do is:

unit_type, owner, *params = input().split()

if unit_type.startswith("H"):
  hero = Hero(params[0], *map(int, params[1:]))
  heroes[owner].append(hero)

if unit_type.startswith("T")
  tower = Tower(*map(int, params))
  towers[owner] = tower

if unit_type.startswith("M")
  minions = Minion(*map(int, params))
  minions[owner].append(minion)

Also, it would be great if string attributes are at the beginning (or at the end) of the attribute list, so I can easily convert the rest to numbers (see the Hero constructor in the example above).

And I don’t understand why we needed to have “roundType” when all you have to do is:

turn = 0
team, zones, items = init()

while True:
  me, enemy, creeps = read_state(team)
  turn += 1

  if turn == 1:
    print("DOCTOR_STRANGE")
    continue

  if turn == 2:
    print("IRONMAN")
    continue

Furthermore, I think the choice of a hero in the early leagues should be fixed. Use just one, same as boss is using. Then also fix the second hero, and only introduce all 5 in bronze (or later…). That would make the introduction into the contest much gentler.

I know there were several people asking for all input from the start in the past contests. But this is a bad idea. If you haven’t seen it so far, I hope you learned your lesson now. It’s much easier to start small and handle more input later when needed (and useful…).

Last thing, the score (here: last hits / denies / hero kills). Already mentioned by several people. The engine should track the score and provide it as input, letting the players focus on playing the game.

Description

Description was overwhelming. But if you take away bushes, neutral units, skills, items and limit the actions to “MOVE” and “ATTACK NEAREST”, and the input to heroes and minions “x, y, HP” and towers “HP”, it starts to look easy… Also the initial winning condition could be simply “kill all heroes or have more gold” and you can introduce the last hits and denies only when items become available. Really, nothing is more rewarding than being able to start simple and discover more depth as you go (which links to the leagues design, more on that later).

The biggest problem though, was the description formatting. You underused lists (itemisation) except in description of the skills (where you used them), which was begging to be a table. For my own sanity I actually made one, as I got tired of not being able to compare things quickly:

It should probably be combined with the tables given in the github readme. And I don’t really mind whether it is a part of the description or external resource with “detailed details”, as long as it’s all in one place, and easy to compare.

The other issue was the very description of the spells. It’s confusing and inaccurate. It took me long time before I understood why my opponents are able to escape the “instantly casted” WIRE. Surprise, surprise, it has a fly time of 0.3 and if enemy moves out of range, no hit. So it’s not really instant (like Hulk’s EXPLOSIVE SHIELD for example). I only found this out by reading the source code…

The biggest surprise though, was that I can’t “MOVE ATTACK” a predicted position of a charging hero while retreating. Simply, if I finish the move faster, I will fire out of range, while the other hero will still be “getting there”. The only way to attack in this turn was to move forward with “ATTACK” (bad idea when your goal is to retreat). That was really non-obvious, and it put an end to my 2 * melee sneaky strategy that (I thought) was my ticket to legend… So yeah, such side effects of the complex rules should either be explained, or rather avoided if possible (see more on that below).

Actions

I really liked the game concept. Co-op play with multiple objectives, hidden information and opponent moves prediction. All the best things my favourite contest – CodeBusters – had (I still remember the brilliance of Recar’s ghost hurding tactic :)).

On top of that, you added a time mechanic where actions take fractions of a turn time. It’s great idea but it should be implemented differently. Instead of fixed actions with specific
“time properties”, players should have the full control over time (in higher leagues). That is, be able to specify a list of actions to execute at each turn. Exactly like humans playing MOBA can do.

Why? Because “ATTACK” or “ATTACK NEAREST” are not that useful. I find myself doing “MOVE, ATTACK” a lot and really wishing for “ATTACK, MOVE” or “MOVE, SPELL, MOVE”. Because if you think about it, there is no reason why the number of actions per turn should be limited, when you have time. Time becomes the limit, and as long as you have it, you should be able to chain actions in any order you find useful.

Gameplay visualisation

First rule of visualisation is “more is less”. I understand that plain geometric objects (like in reCurse’s battle station) are not very exciting, but this is why we have the debug mode option. You should use it to show unit IDs, movement and attack vectors, spells and damage / health, all at ones, without a need for mouse hovering for tooltips. Everyone would love you for it :slight_smile:

Another thing is stepping turns vs. continuous play. I understand that due to the time mechanics some events happen in the middle of a turn and looking only at the end point (which happens while you’re stepping through) doesn’t give a full picture. But I would argue that it should, to make the game analysis easier. That is, for every action regardless of the exact time, there should be a visible indicator that it has taken place this turn, at the final animation frame. So that, when I step through a game, I can still tell what happened. Evaporating damage numbers are a good anti-example here.

Also, attack and move speed are not the key stats. HP and mana should take their place rather than being written with white font over a bright bar… (at least use a black font). And it would be great to have a small text notifying of the effect of spells (e.g. “hit by WIRE”, “shield activated” or “pulled to (x, y)”). It would help tracking the action and especially, identifying cases when a spell failed.

Leagues and Bosses

The key to success here, is to gradually uncover the complexity. Introduce new rules, actions and input as people advance through the leagues and write bosses that use the new things and are difficult to beat without some improvements. I remember that Wood 1 boss was extremely weak. I’ve just added a 2nd hero doing exactly the same thing as the first one and rolled over it (I wondered if 2-hero Wood 2 boss wouldn’t be stronger). It should at least challenge me to buy items or maybe even trigger root aggro so I have to stop ignoring the creeps.

Anyway, if I was designing the leagues I would do something like this:

       | ACTIONS              | HEROES       | WIN CONDITIONS
--------------------------------------------------------------------------------
WOOD 3 | attack nearest, move | 1, no spells | kill heroes/tower or more gold
WOOD 2 | attack, move attack  | 1, 1 spell   | kill heroes/tower or more gold
WOOD 1 | buy, sell            | 2, 1 spell   | more kills (instead of more gold)
BRONZE | action chains        | 2, 3 spells  | last hits (instead of more kills)
SILVER |                      | 5, 3 spells  | denies

I’m quite convinced that it would help if in lower leagues taking down the tower was easier than later (was it like that already?). And probably in general the towers should be weaker, so that they have to be defended more carefully. I would also make the creeps weaker to incentivise the jungle play and make more strategic shopping possible.

Competition

I don’t share the sentiment expressed by Magus, Agade and Neumann, that optimising a clear objective is more fun than constantly tracking the META and countering opponents strategies. I enjoy the battle of the wits a lot, even if I’m not particularly great at it :slight_smile:

I also don’t see anything wrong with “hard coding” a behaviour to counter specific strategies. This is a multi-player game, not an optimisation puzzle, so you need to adapt to the opponents play. And the rock-paper-scissors effect in the ranking, is an evidence that it was hard to win with a single strategy. You need to do variety of things to be hard to counter, and also, constantly improve your bot, when other people challenge you. I see why reCurse didn’t like it, but when you are not in the top 10 for the entire 10 days, you see this as a chance!

I also don’t agree with Unihedron that the contest should be about programming. It’s not that we implement to specification and go home (would that be fun?). We play a game! And part of playing it, is to figure out what is going on, develop a strategy, outsmart the opponents. However, I agree that the learning curve could be more kind, but that can be solved with a better leagues design.

Personal experience

I started this contest feeling I will hate it. I don’t play MOBA and I had no strategic intuition of what should my hero do. My very simple approach just blasted me to bronze and I didn’t have time to feel the game and understand the mechanics. So I watched how other bots play, and started trying out all sort of sneaky tactics, understanding the mechanics by trial and error (and some reading of the engine code). My efforts where not extremely successful, my initial range bot was still ranked higher than all the sneakiness, but I enjoyed the process a lot!

So thank you @AntiSquid, @Illedan, @Wildum for all your efforts, staying on chat patiently answering questions, fixing bugs, trying to make everyone happy. I think you did great job and a few of the shortcomings listed above, should not overshadow that.


Note to the CG Team

Please make the engine usable in an “old referee” mode, that is to run local games from command line. It’s a win/win situation if we can test locally, as we don’t abuse CG servers with multiple submits through greasemonkey scripts…

11 Likes