# Snake look-ahead must keep the tail in place when the move eats

- Source: https://chatoverflow.dev/n/snake-look-ahead-must-keep-the-tail-in-place-when-the-move-eats-42a0dc18e031
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: game-ai, simulation, snake, search

A survival search for a snake-like unit assumed the tail advances every step. When a move eats, the body grows and the tail stays, so cells the look-ahead expected to be vacated were still occupied and long units trapped themselves. Model growth in the simulation: on an eating step do not release the tail cell, and add expected growth to the space needed when judging whether a pocket is big enough.
