Thoughts on top 10 bots esp teccles playing style?


Watching some of #1 ranked teccles games any thoughts on special techniques he uses vs newbie bots? Anyone notice that teccles and TheDuck314 seem to have quite specific styles for ships coming into and out of the shipyard?

If anyone can point out how to use the api to download leaderboard games I can run some statistics and post them here. Mid range bots seem to have a very clean halite collecting style and top bots look a bit more jumpy.


Use this command line in htl_client and use -d xxx to put the files in the directory you want.

python -m hlt_client replay user -i 2807 -l 30000 -d teccles_games --decompress

I ran it yesterday, it downloaded 13722 json files for a total of 52 gb from 2018-10-27 to 2018-12-04 . I think there is a way to restrain dates, but it didn’t work when I tried it. It took few hours to download.


I noticed the top bots seem to have really good halite efficiency. I think the inspire mechanic is really big, so you gotta take advantage of that.

Theduck’s halite efficiency is really high, one strategy I saw is that theduck’s bot seems to send a bunch of ships to a halite-dense region in anticipation that a dropoff will be created there a few turns in the future.

I wonder how they implemented it. I am trying my hand at it by “forecasting” a dropoff at some location. I pretend that a dropoff exists at some location and make decisions off that; then once the first ship gets onto that square I create the dropoff.


I’m happy to answer (some) questions about my bot :slight_smile:. Though you may learn more through analysis; I definitely don’t know exactly what matters!


@teccles thx that would be awesome, any hints on what sort of value to optimize/loss function, and whether you use hand coded rules vs machine learning would be so helpful to many. You find better success with doing massive monte carlo simulations on simple principles or else following a list of rules/strategies?


I’m trying to find out when to build a dropoff. I am thinking of typing in a rule that says IF GAME.TURN_NUMBER >= 100 && sumhalite(5 radius area around ship) > N && distance from ship to shipyard > M && me.halite_amount >= 4000 then build a shipyard


@ScottChristensenHanp - my bot is hand coded rules. No machine learning beyond some light parameter optimisation. My guess is that this would be a good game for ML, but that to beat humans who are trying hard you would need both experts and lots of compute.

On what sort of value to optimize - my experience is that your algorithm should be principled wherever possible. Whenever I come up with a reasonable model of what’s going on, and implement something based on that, things tend to go well. So ask yourself what you’re trying to optimise, how to model it, and what algorithm that leads to.

The other hint I’d give on what to optimise is that most things can be quite local for this game. There’s no need to have some grand whole-map strategy to do well.


@teccles - how would you rate different aspects of the game in terms of their relative contribution to the final score?
E.g. in 4p games, I believe, inspiration >> dropoff (both placement and timing)


I don’t think I have any special expertise there, but in terms of what separates good from middling bots, I’d say:

Mining target selection (a very clear winner)
Collision management [4p]
Inspiration [4p]
Spawn timing
Collision management [2p]
Inspiration [2p]
When to return to base

Improvement in getting a first implementation in is a different question - there you might have something like mining target selection > pathfinding* > dropoffs > collisions [4p] > inspiration [4p] > spawning > collisions [2p] > inspiration [2p] > when to return home.

* By “pathfinding” I mean the ability of your ships to get from A to B fast without colliding with each other


Wow, it’s interesting to see how highly you rank inspiration. I was able to eek into platinum while still completely ignoring it. Hopefully by factoring it into my code I can move up a few ranks :slight_smile:.

I’m curious, as part of your collision management, do you simulate where you expect your opponent’s ships to move? Or do you just avoid where they are currently?


that’s a great list, reassuring these points are common sense sort of ones!

I have mathematically optimised pathfinding but see my bots spending loads of time in traffic jams or all trying to grab the same halite so #2 collision management the next step for me.

hmm…in a 4 person game, adjacent players cooperating for inspiration seems would be the right move. a 2 person game is closer to a zero sum game so not as negative to collide with one’s opponent.


That’s not one I’ll answer in detail. But I do more than just avoid where they are currently - it’s sometimes relevant to my bot’s decision if there’s an enemy adjacent to a square.

Yes - that’s why there’s a big difference between the importance of inspiration (and collisions) in the two. In 2p, it’s definitely possible to have your implementation of inspiration help your opponent more than it helps you!


Thx! I see now this is using the download CLI Client Tools, the file helped with selecting number of files,etc…

Download replays

  • By user: hlt replay user -i [USER_ID] -l [NUMBER_OF_FILES_WANTED] -d [DOWNLOAD_LOCATION]
    This command will download .hlt replay files of a user by id.

  • By date: hlt replay date -t [DATE] -d [DOWNLOAD_LOCATION]

    This command will download .hlt replay files of all gold ranked games on the given date. The date format is eight numbers YYYYMMDD.

    Adding the -a flag will include silver replays as well.

Adding the --decompress flag to the end of any replay download command will download .json instead of .hlt replay files.