I've got a task for job application to create a snake AI that can defeat their basic AI. Searching in this topic I've found that it's very similar to Tron and it's solved mostly by minimax algorithm. But my problem is that I've got an interface defined, and I can only acces these from the AI class:
public interface Data
{
Point getFoodPosition();
Body getSnake(int i);
int getSnakePiece();
BoardElements getBoardElement(int x, int y);
Size getBoardSize();
}
public interface Body
{
Point getHead();
int getLength();
Directions getDirection();
Point? getBodyPiece(int i);
Point getEnd();
void setSnakeColor(Color color);
}
I can't see their AI's code, because it's in a DLL. I can't access the whole map to then pass it. I could get each element from the map, but that would be a dirty solution in my opinion. But without it I can only do ineffective solutions. I've tried to create a heuristic based on distance of the food, but it seems not complex enough. What do you think, how should I approach this problem?
defeat their basic AI
on what metric? \$\endgroup\$getSnakePiece
is meant to do. \$\endgroup\$