AI approach for exploring a static grid environment I have a grid environment which contains in each cell a static agent. When my agent enters a cell, the static agent in this cell might take points away from me, give me points, or do nothing. My agent can not observe adjacent cells until it moves into one them, it can only move up, down, left or right.

This agent can not learn whilst it is exploring. It enters the grid from a particular corner, and may only leave from that corner. If the agent manages to successfully explore the environment and return back to the corner with positive health, then it can learn from its collected experience, which includes the (row, column) positions it visited, and the properties of the static agents located in those positions. If the agents' health drops to zero whilst exploring, game over. But I can restart the exploration as many times as I want.

Each static agent has one of three shapes, one of three colours, and one of two sizes. It also has an associated "reward", indicating how many points it adds/removes from me.

Each move in this environment costs me one point. I want to design an agent that correctly recognises the reward associated with each type of static agent in this grid.

Please may someone recommend a learning and/or evolutionary approach to solving this problem? I'm stuck at the moment because of the restriction that agent may not observe adjacent squares. I'm not sure how I can learn anything from this testing environment from the (row, column) and static agent properties encountered alone.
Obviously one of the best learning methods that matches this problem is the Reinforcement Learning and to be more specific Q-Learning.
You'll find a good starting point here.
Hints: Q-learning is quite well-known and I don't repeat others here, but I give you the key point here.

At each step keep track of what happens (reward/punishment - no need to agent types,... if the environment stays fixed and you want to learn this Env. not the agents) using for example an array (Fortunately you're not learning anything so far!). Keep doing this until the agent stops, that as you said can have two reasons :


Agent's health drops to zero : Do nothing! (discard the array)
Agent leaves from the other corner : Apply the following rule with the values in the array