-
Notifications
You must be signed in to change notification settings - Fork 1
analytics.py
analytics.py holds, of course, the methods and objects required for analyzing different facets of the game play in order to determine the best moves possible. There may be some overlap with seek_n_nav.py, we'll have to see when analysis of the code has gone that far.
Information on objects contained within follows:
The MapChunk was proposed by a different GitHub user here in order to handle some of the navigation and other local area game play details for short-term analysis. For example, each particular ship could have a 3x3 MapChunk
detailing the important bits about the local environment; ie best halite source, whether or not it is occupied, whether or not there are any enemies in the local environment, structures present, etc. This could, potentially, be used for subdividing the entire map for chunk analysis to compare things, but I've not really gotten far enough into that to do much, yet. However, if it becomes possible in the future to analyze for local maxima, chunk analysis around each particular maxima site could make mining much more profitable, as well as keep the ships close enough together to potentially reap rewards from each others' presence, if I remember that rule of bonuses in the new game play correctly.
Width
Height
x_start
y_start
-
cell_data
- a 2 dimensional array holding the halite content of each x/y position has_shipyard
has_dropoff
-
__init__
- takes thex_init
andy_init
arguments as positions to begin when breaking off this particular map chunk and initializes the rest of the data -
mark_devoid_cells
- goes through and marks any cells that have no halite as 'unsafe' for usage withnaive_navigate
's routines on a per-ship basis -
create_centered_chunk
- creates a chunk (with an odd # of cells in width & height) centered around the current ship's position
Contains different static methods for analyzing the halite content of the map in general and other non-MapChunk
situations. I'm not sure at this point, but all of this may be better placed under the current MapChunk
object structure, especially if history is going to be saved for potential deep learning usage later on in the iterations once the dumb routines are figured out.
-
find_best_dir
- method will use the ship's position and scan the 4 cardinal directions for the most profitable halite move. Returns the direction of that most profitable cell. This takes into account whether or not that cell is currently occupied.