Halite Home

Neighbors of a Square


#1

I want to look at the neighbours of a certain square and compare the attributes of the neighbours to each other and the original square, how would I do that? I'm working in Python.


#2

start by reading Improving the Random bot and So you’ve Improved the Random Bot. Now what?

those two very well made guides should give you a good idea of how the initial bots are set up, including exactly what you're asking.

Or you can have a look at the python code for the bots from the second link, which shows you exactly how to use it.