Experiment Report

Can Gemini 3.5 Flash
Play Minesweeper on Android?

Evaluating LLM vision capabilities for mobile game automation via ADB โ€” a deep dive into three distinct approaches, three games played, and the surprising gap between chess mastery and spatial reasoning.

3
Games Played
0
Games Won
3
Approaches Tested
~55 min
Total Play Time

Watch the Games Unfold

Step through each game as the model played it. Use the controls to navigate, or hit play for an auto-advancing slideshow.

Game 1

๐Ÿ’ฅ Lost
Game 1 replay
โ–ถ AUTO
0 / 18
Steps: 19
Duration: ~23 min
Board: Classic UI
Mines: 38

Game 2

๐Ÿ’ฅ Lost
Game 2 replay
โ–ถ AUTO
0 / 16
Steps: 17
Duration: ~16 min
Board: Classic UI
Mines: 38

Game 3

๐Ÿ’ฅ Lost
Game 3 replay
โ–ถ AUTO
0 / 12
Steps: 13
Duration: ~15 min
Board: Classic UI
Mines: 38

Why This Experiment?

Building on the success of the LLM Chess Evaluation โ€” where Gemini 3.5 Flash demonstrated an estimated Elo of ~1900, competing with GPT-5.5 at a fraction of the cost โ€” we wanted to explore whether these capabilities extend to spatial reasoning tasks on real mobile devices.

How We Connected to Android

The harness establishes a closed-loop control system between the LLM and a real Android device. Here's the technology stack that makes it possible.

๐Ÿค–
Gemini 3.5 Flash
Vision LLM (via OpenAI API)
๐Ÿ“ฑ
ADB
Android Debug Bridge
๐Ÿ”ง
uiautomator2
Python Android automation
๐Ÿ–ผ๏ธ
Pillow
Coordinate grid overlay
๐Ÿ
Python 3.12+
Harness runtime
๐Ÿ”‘
OpenAI SDK
API client for Gemini

Architecture Flow

Each step in the game follows a deterministic loop: capture โ†’ overlay โ†’ reason โ†’ act โ†’ wait โ†’ repeat.

๐Ÿ“ฑ
Android Device
Minesweeper App
โ†’
๐Ÿ“ธ
Screenshot
adb exec-out screencap
โ†’
๐Ÿ“
Grid Overlay
100px coordinate grid
โ†’
๐Ÿง 
Gemini 3.5 Flash
Vision + Tool Calling
โ†’
๐Ÿ‘†
Execute Action
tap / long_press / zoom

Three Approaches Tested

The experiment iterated through three distinct architectures, each progressively giving the model more agency and better tools.

01
๐Ÿ”—

Dual-Agent System

A two-model pipeline: the first model (vision) analyzed the screen and extracted coordinates, then passed them to a second model (reasoning) to decide the next move. Complete failure โ€” the reasoning agent couldn't interpret coordinates or understand the game state passed to it from the vision agent.

โœ• Complete Failure
02
๐Ÿ“‹

Single Model + JSON Output

Following the chess harness pattern: a single vision model receives the full screen and outputs structured JSON describing its next move. The model could engage with the game but still struggled with accurately mapping visual positions to precise coordinates without spatial reference aids.

โš  Partially Worked
03
๐Ÿ› ๏ธ

Single Model + Tool Calling

The final architecture: a single vision model with explicit tools (tap, long_press, zoom_in, zoom_out) โ€” each with an optional reason parameter for the model to explain its logic โ€” plus a coordinate grid overlay on every screenshot. This was the only approach that actually got the model playing โ€” though it still lost every game.

โœ“ Best Approach (used)

Classic UI vs. Modern UI

Two different Minesweeper app UIs were tested. The model's performance was highly sensitive to UI design.

Classic / Retro UI
Classic Minesweeper App UI

Windows 95-era Minesweeper aesthetic with raised 3D tile borders, clear grid lines, and high-contrast colors. The model was able to initiate the game and play moves, though it ultimately lost all three games.

โš  Playable but Lost All

โ–ถ Play Store โ†—
Modern / Flat UI
Modern Minesweeper App UI

A modern, flat-design Minesweeper app with minimal borders and softer colors. The model couldn't even initiate the game โ€” it took 10+ attempts just to click on a single cell. Without the coordinate grid, it hallucinated coordinates entirely.

โœ• Could Not Play

โ–ถ Play Store โ†—

LLM Reasoning Traces

Each tool call includes an optional reason parameter where the model explains its Minesweeper logic. Game 1 provided no explanations, but Games 2 and 3 show surprisingly sophisticated deductive reasoning โ€” even though the model still lost.

Game 1 โ€” The model made all 18 moves without providing any reasoning (the reason parameter was not used). 0 of 18 tool calls included explanations.
Game 2 Move 1 โ†’ tap(550, 1150)
Starting tap near the center of the board to open up some space.
Game 2 Move 6 โ†’ tap(50, 1250)
C1, R13 is safe because C2, R13 is 1 and its only mine neighbor must be C2, R14 (which is the sole closed neighbor of C3, R13 = 1).
Game 2 Move 9 โ†’ tap(150, 1150)
C2, R12 is a mine because C1, R12 (1) only has C2, R12 as a covered neighbor. Thus C1, R11 (1) has its mine at C2, R12, which makes C1, R10 and C2, R10 safe.
Game 2 Move 15 โ†’ tap(250, 1750)
Using 1-1 pattern logic: C1,R18 (1) has covered neighbors in {C1,R17, C2,R17}, so the mine is there. C2,R18 (1) is adjacent to those two and also to C3,R18 and C3,R19. Thus, C3,R18 must be safe.
Game 2 Move 16 โ†’ tap(750, 1950) ๐Ÿ’ฅ
Using 1-1 pattern on C10, R19 (1) and C9, R19 (1), the closed neighbors of C10, R19 are a subset of C9, R19's closed neighbors, which means C8, R20 must be safe.
Game 3 Move 1 โ†’ tap(550, 1150)
Start the game by tapping a cell near the center of the grid.
Game 3 Move 4 โ†’ tap(300, 1400)
Row 14 Col 3 is safe because Row 13 Col 3 is 1 and its only mine neighbor is Row 12 Col 2 (which is a mine since Row 12 Col 3 is 2 and has only two unopened neighbors).
Game 3 Move 7 โ†’ tap(550, 1550)
Row 16, Col 5 is safe based on the deduction M(16,5) + M(16,7) = 0 from the adjacent 2s in Col 6.
Game 3 Move 8 โ†’ tap(450, 1550)
Row 16 Col 4 is safe because the set of unopened neighbors of the '2' at Row 15 Col 5 is a superset of the unopened neighbors of the '2' at Row 14 Col 5, meaning the extra neighbors must contain 0 mines.
Game 3 Move 12 โ†’ tap(150, 950) ๐Ÿ’ฅ
Col 2 Row 9 is safe because the adjacent '1' at Col 3 Row 10 is already satisfied by the mine at Col 2 Row 10.

The Perception Gap

These case studies visually prove the core hypothesis: the model's logical deductions were correct, but its spatial perception and coordinate mapping were flawed.

Case 1: Click Coordinate Shift

Game 3 ยท Step 11
Game 3 Step 11 Crop
Step 11 (Grid)
Game 3 Step 12 Crop
Step 12 (Mine)
The Sound Reasoning

The model correctly deduced that Row 9, Column 2 was safe because the adjacent '1' at Row 10, Column 3 was already satisfied by a mine at Row 10, Column 2.

The Perception Shift

Instead of outputting the correct coordinate of (150, 1050) for Row 9, the model mapped Row 9 to y=950, which is actually Row 8. By calling tap(150, 950), it clicked the wrong row, hitting a mine and triggering an immediate Game Over.

Logical Target: Row 9, Col 2 → (150, 1050)
Clicked Coordinate: Row 8, Col 2 → (150, 950) (Mine!)

Case 2: Screen Edge Blindspot

Game 2 ยท Step 15
Game 2 Step 15 Crop
Step 15 (Grid)
Game 2 Step 16 Crop
Step 16 (Mine)
The Flawed Logic & Visual Misread

The model based its logic on a 1-1 pattern between C10, R19 (1) and C9, R19 (1). However, look closely at the crop: C9, R19 contains a green "2", not a "1"! The actual "1" was at C11, R19. Because it misread C9 as "1", its logical deduction was mathematically flawed from the start.

The Double Irony: Safe Deduction, Wrong Click

Here lies a double irony: despite its flawed logic, the model magically arrived at a correct conclusionโ€”C8, R20 actually was safe (mine-free in reality, as revealed on game-over!). Yet, it still failed: it mapped Row 20 to y=1950 instead of y=2050. By calling tap(750, 1950), it clicked the wrong row (C8, R19), hitting a mine and triggering the explosion anyway.

C9, R19 Value: Hallucinated 1 (Actually 2)
C8, R20 Target: Safe logical target → (750, 2050) (Actually Safe!)
Clicked Coordinate: C8, R19 → (750, 1950) (Mine!)

Game Results Summary

All three games ended in a loss. The model consistently hit mines within 12-18 moves, despite the coordinate grid overlay and tool-calling architecture.

GameModelStepsDurationMinesUI StyleReasons GivenResult
Game 1Gemini 3.5 Flash19~23:3538Classic (Retro)0 / 18โœ• Lost
Game 2Gemini 3.5 Flash17~15:5438Classic (Retro)16 / 16โœ• Lost
Game 3Gemini 3.5 Flash13~15:2338Classic (Retro)12 / 12โœ• Lost

Key Takeaways

Three critical insights emerged from this experiment, each with significant implications for the future of AI-driven mobile automation.

Takeaway 01

Coding Agents Can Automate Mobile, Not Just Browsers

The fact that an LLM could connect to a real Android device via ADB/uiautomator2, capture screenshots, reason about the UI, and execute touch actions demonstrates that mobile automation through coding agents is viable . This exposes a dramatic new set of capabilities beyond browser automation.

Takeaway 02

Vision-Based Computer Use Is Still Fragile

Despite Gemini 3.5 Flash being a strong vision model, it struggled with Minesweeper โ€” a game that's conceptually straightforward. Vision-based "computer use" through screenshots alone is still unreliable. Just as CDP (Chrome DevTools Protocol) was a breakthrough for browser agents over pure screenshot-based approaches, mobile agents will need structured data access (like a DOM-equivalent for mobile apps) to be reliable.

Takeaway 03

Data Format Is The Key Differentiator

When given Minesweeper as text/ASCII (like the chess experiment), the model would likely solve it easily. The failure isn't in reasoning โ€” it's in visual spatial perception. This underscores that finding ways to extract structured data from mobile UIs (rather than relying on screenshots) will be the key enabler for practical mobile AI agents.

System Prompt & Tools

The minimal prompt and tool definitions used for the final (tool-calling) approach.

System Prompt

"You are playing Minesweeper on an Android screen.
Analyze the current grid-overlaid screenshot and use your tools to play the game.
If you win or lose the game, do not call any more tools and output a message explaining the final result."

Available Tools

๐Ÿ‘†
tap(x, y, reason?)
Tap at screen coordinates
๐Ÿ‘‡
long_press(x, y, ms?, reason?)
Long press for flagging
๐Ÿ”
zoom_in(reason?)
Pinch-out to zoom in
๐Ÿ”ญ
zoom_out(reason?)
Pinch-in to zoom out

Coordinate Grid System

Every screenshot was overlaid with a 100px red coordinate grid before being sent to the model. This grid draws lines every 100 pixels, labels axis values along the edges, and plots coordinate text labels (e.g., "200,400") at every 100px intersection with a white dot marker. This was crucial โ€” without it, the model hallucinated coordinates entirely and couldn't interact with the game at all. The Python implementation for generating this coordinate overlay can be viewed in image_utils.py โ†— .