My bot to the Halite III Competition
- Make sure python version = 3.6.7 is installed
- Download python started kit here
- Put the scipts of this repo under the same folder of the starter kit
- Modify run_game.sh (inside starter kit) as below and run it
# Play with different parameters, setting RANDOM_SEED so it is reproducible
a="python3 5_.py --RANDOM_SEED 1"
b="python3 5_.py --RANDOM_SEED 1 --MIN_HALITE_TO_STAY 30"
c="python3 5_.py --RANDOM_SEED 1 --MIN_HALITE_TO_STAY 40"
d="python3 5_.py --RANDOM_SEED 1 --MIN_HALITE_TO_STAY 50"
./halite --replay-directory replays/ -vvv "$a" "$b" "$c" "$d"
[Pending]
Script | Rating | Ranking | Description |
---|---|---|---|
8_.py | 79.31 | 76 |
|
7_.py | 78.21 | 80 |
|
6_.py | 75.7 | 94 |
|
5_.py | 67.58 | 250 |
|
4_.py | 65.56 | 322 |
|
3_.py | 57.55 | 627 |
|
2_.py | 54.14 | 775 |
|
1_.py | 44.7 | 1369 | Based on starter code provided on halite website |
Apply logic below to ships 1 by 1
For distance d range from 0 to MAX_EXPECTED_HALITE_ROUND away from the ship:
- Found the cell (distance = d and not occupied) with max halite
- Calculate expected cost if move to that cell
- Calculate expected gain if stay in that cell and collect halite, minus the cost above
- Order the possible cells to move by expected gain (descending order)
For all possible cells from above:
- If there exists a naive move to that cell, do it, if not, try next possible cell
[Pending]
[Pending]