Halite Home

Wrong Strengths in Visualizer


#1

After trying to figure out why my bots were not behaving as they were told, I have compared logs of the strengths received during play to the strengths shown in the visualizer, and they don't match up for owned squares.


#2

What language starter package are you using?


#3

Python on Windows.


#4

perhaps you have x and y mixed up


#5

x, and y are fine because all neutral territory have the correct strength.


#6

More specifically, it appears that the visualizer is no longer showing owned squares with strength 0 as strength 0. Instead it immediately gives them the production strength. This only happens if the square does not move that turn. If it does move, the correct strength is shown.

For example in https://2016.halite.io/game.php?replay=ar1483415861-2876991088.hlt:
At frame #7 both squares have moved, but they already have their production strength.
At frame #8 location 20,10 now has strength 10, when it should be 5.
At frame #9 it is 15.
At frame #10 it is 15 again - this time it has the correct strength because it is making a move.


#7

@truell20 This may be due to https://github.com/HaliteChallenge/Halite/commit/b4de539cc8bb1294802fd10cbba4b365bfbbe4e1.


#8

Oops, I missed a way the gameMap could be indirectly mutated. Testing a fix now.

Ok, fix is now at https://github.com/HaliteChallenge/Halite/pull/377


#9

Yup. Fixes the example that @samuelfekete linked. (Make sure to force refresh with ctrl + shift + r to get new js files)


#10

Thanks @Janzert, looks good now.