Important

Recipe Terminology:

PathFinding Terminology:

  • cost : How much is it going to cost the pather to walk through this cell

  • weight_array : a finalized grid(with added cost) passed to plotting

  • the optimal cost will be 1,

  • the worst cost would be numpy.inf (for non pathable cells)

you should keep that in mind if you want to create a complex influence map with different weights

Be sure to check out dummybot.py for example bot usage with some handy debug methods

Plotting - Recipes

Plot the map and view it in memory

>>> # map_data.plot_map()
>>> # map_data.show()
../../../_images/map_plot.png

Plot the map and save it to a file

>>> # map_data.plot_map()
>>> # map_data.save(filename='myplot.png')

Plot any Polygon

>>> my_base_raw_location = self.bot.townhalls[0].position
>>> my_region = self.where_all(my_base_raw_location)[0]
>>> # my_region.plot()
>>> # map_data.show()
../../../_images/region1_plot.png

Indices and tables