I’m just starting out with AI and deep learning. I want to build a bot that can learn how to play the Snake game but I’m stuck on what kind of network design to use.
My game state is represented as a 10x10x3 array. Each of the 3 channels shows different info about the game. The first channel has 1s where the snake body is and 0s everywhere else. The second channel marks where the food appears. The third channel shows the snake head location.
I need the network to output 4 numbers that represent the probability of moving in each direction (up, down, left, right).
Can anyone suggest what type of network architecture would work well for this setup? Also wondering if my way of representing the game state makes sense or if there’s a better approach.
Your game state representation looks solid. The 3-channel approach gives the network clear info about all the key elements.
For architecture, go with a simple CNN plus dense layers. Start with 2-3 conv layers to catch spatial patterns, then flatten and add a couple dense layers before your 4-unit output with softmax.
Something like:
Conv2D(32, 3x3) → ReLU
Conv2D(64, 3x3) → ReLU
Flatten
Dense(128) → ReLU
Dense(4) → Softmax
Honestly though, you’ll spend most time on training pipeline, reward systems, and hyperparameter tuning. Don’t code all that from scratch - automate the whole workflow.
I use Latenode to chain together data preprocessing, model training, evaluation runs, and result tracking. You can set up automated experiments testing different architectures and hyperparameters while focusing on the fun stuff like reward engineering.
The visual workflow builder makes connecting your game environment to training loops and monitoring dashboards super easy. Way more efficient than managing scripts manually.