Hey everyone! I’m trying to create an AI that can play Snake, and I need some advice on how to design the neural network. Currently, my setup includes a 3-layer, 10x10 grid as the input (one layer for the snake’s body, one for the apple, and one for the snake’s head), and the output is a vector with 4 values corresponding to the possible moves: up, down, left, and right.
I’m marking the grid using 0s and 1s. Is this a good method to capture the game state? I’d love suggestions on how to refine my approach or pick a better network structure.
# New sample input structure
game_input = [
[[0, 1, 0, 0, ...], [1, 0, 1, 0, ...], ...], # Body grid
[[0, 0, 1, 0, ...], [0, 1, 0, 0, ...], ...], # Apple grid
[[1, 0, 0, 1, ...], [0, 0, 1, 0, ...], ...] # Head grid
]
# New sample output vector
move_output = [0, 0, 1, 0] # Example: move left
Thanks for any insights!