Quote:
What I've done so far is to make it move itself trying to find and catch the apple, successfully.
This claim says that you already have the solution because after first level, there are walls in middle of play ground. This is unless you forgot to say something.
If your routing algorithm can already avoid hitting walls, including snake body and other bombs is only a little tweak.
Quote:
Problem #1: avoid eat itself
Problem #2: avoid circles
Those are only a different kind of walls.
Quote:
As about the 2nd problem, I have a lot of cells(1400 columns and 740 rows).How can I keep track of each cell and what is the algorithm to make it work?
Just to play manually the game, you already need to keep track of everything on play ground. Without your code, it is complicated for us to guess the reason why you can't, in automated play, use information that you use in another place in your code.
A play ground of 1400*740 is a bad idea, in snake, cells are scaled to screen as little rectangles containing different pictures for each kind of cells.
Automating is done by using a routing algorithm.
If your automated code is just doing the bee line to apple as the program plays, you are wrong.
A routing algorithm is what is used in GPS devices. When you are in A and want to go in B, the GPS prepare the route, if it knows a road is closed, it get around that road.
You code must do the same, every time there is a new goal (apple) or an obstacle is set (new bomb), you must set a new path or check that actual planned path is not disturbed by new event.