Giter Club home page Giter Club logo

halite3's Introduction

Halite3

Source Code for all version of Halite 3 bots (User:ninilo97)

Version Details

MyBot2 - Random direction and return to base if 75% full
MyBot3 - Random direction with range=2 scan and a bit optimized logic for return to base. (Beware : Horribly written code)
MyBot4 - ProSearch function to scan nearby cells (written in gameMap), endgame-kamikaze and 90% full return to base added.
MyBot5 - Dropoff creation logic added. Return to nearest dropoff logic added. Range=5 scanner added. Kamikaze-if-stuck logic added.
MyBot6 - Hyperparameter optimized for all possible maps sizes and halite density added. Rudimentary pass ship swap function added (Fails in rare cases ~4ships lost per 100 created). Range=7 scanner added (in gameMap).

Final Version Details

First makes sure no other player blocks myShipyard by marking myShipyard as empty if occupied by other player's ships.
If ship at myShipyard increase its counter (this check is for stuck condition)
Move only if ShipHalite is greater than 10% of current CellHalite at ShipPosition (to avoid warnings during tests)
Kamikaze to nearest dropoff/shipyard if end of game is near.
If ship is stuck swap position with ship at west direction.
If ship is full return to shipyard else do one of the following:

  1. Scan all cells within Range=7 if density of area is high create a dropoff
  2. Scan all cells within Range=7 and select the unoccupied cell with highest halite.

For ship creation:

  1. First 6 moves keep creating ships.
  2. If X% of map is mined don't create anymore ships.
  3. Atleast 1 cell adjacent to shipyard must be empty.

Following hyperparameters are used to optimise all possible number of players and size of maps:

  1. DeepCollect - How much halite should remain in current cell before finding next target location
  2. maxCollect - Minimun number of halite required for ship to return to nearest shipyard/dropoff
  3. cs - Cutoff percentage of map mined for ship creation to stop
  4. maxDo - Used to determine how far dropoffs should be placed from dropoff/shipyards.

Final Stats

Rank : 207/4014
Medal : Platinum Tier (Top 5%)

halite3's People

Contributors

ninilo97 avatar

Watchers

 avatar

Forkers

data-system-ai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.