dgets / nightMiner

Halite III Bot - rewriting Halite III bot from scratch with better project structure plans
6 stars 1 forks source link

Blocking ships should not end up on shipyards; don't let them eat our pringles #43

Open dgets opened 5 years ago

dgets commented 5 years ago

Leaving our ships open for a collision with another ship over the dropoff/shipyard of the opposing player leaves them open to collect any halite, as well as the halite that their own ship is carrying at that point. Any bot smart enough is going to know that and juice suicide smash 'em, leaving a space for us to take another load in for 'em to be combined with their winnings, etc...

dgets commented 5 years ago

So that leaves us in a setting where the following action would be best, as far as I can tell:

  1. do we have 4 times the other number of players ships in play?
  2. if not we need to prioritize ships to fill up the spots starting with the closest opponent to the ships
  3. each will have to be given a unique coordinate destination with one of the other players' shipyard lanes of entry to block
  4. ships proceed there once empty, utilizing a new mission flag as mentioned in #42

This should keep the majority of our halite (and theirs) out of their shipyards more effectively. Both bots too stupid and smart enough are going to be beating this one due to this flaw.

emilmirzayev commented 5 years ago

This is a good strategy at first sight. We can also take into account the halite amount we have and the enemy has. Even if we have many ships we should wait a bit so that the cost of the creation of the ships pays off and then send ships to the mission? In general, send the ship to block as soon as ship does its duty? only theory though

dgets commented 5 years ago

Well, in the game, the only time I'm currently implementing this is after the main dropoff at the game ending. The numbers need some tweaking, presumably, because the ships end up just sitting around for a bit afterwards, at least for testing purposes. I mean there will have to be some idle time, otherwise we're not going to be able to stop the other players from making some of their drops by the end of the game, but some testing is required to see what performs the best (against other bots, not just my own) probably.

As far as whether or not it'll be worth it, I do have limitation built into the bot so that ships aren't made after a certain turn number in the game. I seem to get a good number of ships out and about before this happens, usually, but [again] more testing would definitely be a good thing. The ships going out on this mission at the end have already [presumably] paid for themselves, there. Definitely open for ways to improve the algorithm, though.

Let me know if I misunderstood anything. I'd post some of the specifics from the code, but that's going to have to wait for awhile. I don't even have the project open right now, and I've got to be getting ready for work soon here. It's actually been a couple of days since I've worked on the project, I needed a little break from it, so I've been working on some django sites, instead, but I've had some good ideas that I'll throw into the issues as soon as I can here...

dgets commented 5 years ago

I was reading in a strategy update that the game-wide strategy (like I think you were talking about) was working well in either the 2 or 4 game strategies... Maybe we should try to implement something along these lines for play and test it on both 2 & 4... It was listed in the top most effective techniques...