is it possible to find if our ship is inspired or not using the default hlt code . if not then is there any easy logic to determine this .
Take a window around the ships position.
def get_window(game_map, source, sz=4):
window = 
for y in range(-sz, sz + 1):
for x in range(-sz, sz + 1):
pos = source + Position(x, y)
Check for 2 enemies. In the window
You can also look into the game engine code for the inspiration - https://github.com/HaliteChallenge/Halite-III/blob/c8a48680a394e45b03d000fa3699755063862988/game_engine/core/HaliteImpl.cpp#L396
You should check all tiles
t such that
manh_dist(t, ship) <= 4, where
manh_dist is the Manhattan distance.
The area you are considering is wider than the actual inspired area.
The window ends up being 81 cells. 9x9 with ship at center. I guess the corners wouldn’t actually be within 4 tiles
Looks like the window should be 41 cells?
Lol this change alone should give me more time for pathing on my bot.
i guess the num of own ship within the manh dist also matters for determining whether our ship is inspired or not .