TransWikia.com

Representing a 2d-grid around an agent

Data Science Asked on January 26, 2021

I’m trying to train a neural network-based model to play a game similar to Pac-Man, except there’s no maze. i.e., the player is in a 2-dimensional grid, with dots of food in some locations, and the player need to figure out walking to the cells with the food.

I’d like the player to only see the 11×11 cells around him, i.e. an array of 11×11 cells, with our player in the center, and either a food or no food in each cell.

I tried feeding that array as-is as input to my neural network, but it’s learning poorly. This makes sense, as this smells like a problem that you’d use convolution layers for, because this array is kind of like an image.

But unlike an image, we don’t care about contours at all. Unlike an image, the 2 cells to the left and right of the centermost cell have vastly different meanings: The position on the left and the right of the player. Food in the former should encourage going to the left, and food on the latter should encourage going to the right. Not so with any similarly-spaced cells in the input. Therefore I’m not seeing how CNN would be a good fit.

Can you think of a good way to represent this input to a neural network?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP