dgets / d4m0b0t

Halite II Bot Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reformat telemetry data structure

dgets opened this issue · comments

Telemetry data should be held in an associative array by id, not in a list. This will greatly accelerate running through that mess with every turn.

It's also time to add a 'potential target' to the structure, along with a weight for that projection probability. At this point I'm thinking of an associative array by id to another holding the enemy Entity (so we just have all ship data accessible easily), along with a pointer to the Entity that will hold the probable target, if any.

With the last commit (059cea7), the new additions to EnemyData have been made. Until I've verified whether or not it will help for any reasons, EnemyData.id still exists; however, it now also has .target_weight and .ship_entity.

It's definitely time to find out how Python3 handles passing data, especially anything large, such as referenced Entity objects. This could be a big enough performance hit due to the amount of references we will be making to cause timeouts, especially if their Linux64 server is running more than a handful of simulations at a time.