[Python] Ship rotation


#1

Hi there!

I’m having troubles with first turns. Just a turn after i spawn a ship, it sometimes move inmediatly but other times just rotate, loosing a turn, to then moving. I wrote a function thats returns a move to the MapCell with the most amount of halite from the avaliable ones, then I pass it to command_queue with ship.move() method. What can be the problem?
Sorry for my english. I’m not native speaker and i never took classes :P, so I really will gratefull for all the corrections!

PD: Can we change the hlt files to add some attributes and properties??


#2

I don’t have an answer for your first question, the only thing I could think of is if your function is returning a corner piece like (1,1)… however for your second question, yes you can edit the HLT files as much as you want.

EDIT:

For your ships starting off just have them move out in each direction so that you optimize the spawn time for all five ships to 6 moves


#3

I don’t know exactly what is the issue with your code, but there is a misunderstanding here.
The ships only have position, they don’t have orientations, therefore they can’t rotate. What you see in the replay managers as rotation is basically just an eye candy.
With this in mind, if you have a second look on the problematic replays, then I am pretty sure you will figure it out. If you need further help, then please post more information about your issue


#4

This probably should have been spelled out clearly, but here it is:

Move: North, South, East, West Cost: 10% of halite available at turn origin cell is deducted from ship’s current halite.

In short - not enough halite, no move.


#5

its probably trying to move into a spot with another ship, and another part of your code is blocking the move?