Left to Solve
Problems / MathOverflow (not formalized)

What’s the minimum number of moves needed to win the Google snake game?

Open, not yet stated in LeanMathOverflow (not formalized)CombinatoricsComputational Complexitydifficulty55/100

Statement

So I’ve been obsessing over this for a while now and could really use some help. I’m trying to figure out the minimum number of moves it would take to win the Google Snake game if you played perfectly.

Here’s the setup:

• Grid Size: 15x17 (so, 255 squares total).

• Rules:

• Snake starts at a random spot with 3 blocks.

• Apples spawn one at a time in random, unoccupied squares.

• Eating an apple makes the snake grow by 1 block.

• If the snake hits itself or the edge, game over

• Objective: Fill up the whole grid (255 blocks), which means eating 252 apples (since the snake starts with 3 blocks).

• Moves: One move = one step in any direction (up, down, left, or right).

THE QUESTION:

What’s the minimum number of moves needed to win?

The randomness of apple spawning makes this really tricky to calculate. For example:

• If apples conveniently spawn right in front of the snake, you’d need fewer moves.

• But if apples spawn on the other side of the grid (or in annoying spots), the snake has to take way more steps to get there.

• On top of that, the snake grows with every apple, so avoiding collisions with yourself adds another layer of complexity.

What I’ve Tried:

I’ve …

Posed by woodedbobolinks · co.combinatorics, algorithms, game-theory

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-486368.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-486368.lean

import Mathlib

/-!
# What’s the minimum number of moves needed to win the Google snake game?

Source: https://mathoverflow.net/questions/486368
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_486368

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_486368