LEIAFlies

Flomb

Minesweeper · clues N, k and m.

Minesweeper
Help
012000
Preparing agent and board0 decisions
Brain · mushroom body
↑ Demo

·

Flomb

Flomb

Participants · LEIAFelipe Pacheco Zamorano

A neural learning model based on the of

An agent learns which squares to open and which to flag from nearby clues. It uses a model of the , a circuit associated with learning and memory in , and learns from the outcomes of its actions.

Project date
Model used
→ ·

What the agent receives

The goal is to open the safe squares without stepping on a mine. To evaluate a covered square, the agent observes the open clues next to it. Each clue is converted into three values: N, the clue's number; k, how many covered squares surround it; and m, how many of those squares the agent itself has flagged.

Mine locations remain hidden. A flag is the agent's prediction, not a confirmed mine.

FIGURE 1 / ONE NEIGHBORING CLUE
?1⚑011000

There is one mine among this clue's neighboring squares.

Learned value of this : +0.059
The triple (1, 2, 1) describes one clue, not the whole board. k includes flagged squares, because they are still covered. The value is a learned preference, not a probability that the square is safe.

How clues become a decision

N, k and m are encoded as artificial sensory signals. Wiring taken from mixes those signals in the ; keeps only a subset active. The output neurons, called , convert that pattern into an approach or avoidance value ().

FIGURE 2 / FROM TO VALUE
  1. N, k, mClue and local state
  2. Signals →
  3. mixing of signals
  4. Approach / avoidance readout
  5. ValueAverage over the neighboring clues
The purple block contains learned parameters: the → are adjusted during training.
The circuit is evaluated once per neighboring clue. When several are combined, the union of active cells can be larger than for a single odor.

Opening a square

The values of its neighboring clues are averaged. Among the available squares, the agent opens the one with the highest value. A square with no neighboring clues is assigned a value of 0.

V(square) = mean of its

Placing a flag

If the least favorable crosses a learned gate, the agent flags the square. The new flag changes m and can trigger further flags before a square is opened.

Flag A→Re-evaluate→Open B

What it learns. The outcome of opening a square provides reward or punishment. Training modifies the → associations, the context and the . The base wiring and the stay fixed. The demo uses the already trained .

The main result comes from a reference evaluation: the demo method was trained on 30 new (20–49), 20,000 games each, and evaluated with on that had never been used before. Every plays the same boards. A game is lost when the agent steps on a mine; every game starts with a safe cascading opening. The plays the same boards as a reference.

Reference evaluation · 30 · wins, []
Board []Rangeworst and best same boards
7 × 7 · 7 mines500 boards / 89.1% [88.3–89.9]85.0–93.0%90.0%
9 × 9 · 12 mines2,000 boards / 78.4% [77.1–79.7]70.8–84.0%81.8%
16 × 16 · 40 mines300 boards / 59.2% [56.0–62.3]35.7–70.0%68.0%
78.4% wins on 9 × 9 · 12 mines

of 30 , [77.1–79.7]. It falls 3.4 points below the on the same 2,000 boards. The gap grows on larger boards: 8.8 points on 16 × 16, a size that was not used for training (), where three of the 30 win less than 50%.

Variant comparison

To choose how to combine the , three variants of the same circuit and the were compared in an earlier, smaller evaluation: ten (10–19) and 500 9 × 9 boards per . Its percentages are not pooled or directly compared with the reference evaluation: that board set turned out to be easier (the won 84.8% there and 81.8% on the reference set).

FIGURE 3 / VARIANTS · WINS ON 9 × 9 · 12 MINESWins on 9 by 9: sum-cap 76.3% (95% CI 74.7 to 77.8); mean-cap 81.3% (80.0 to 82.7); Flomb 81.3% (78.8 to 83.8); local heuristic 84.8%.
Points: . Bars: across the ten training . Each is tested on the same 500 boards; these are not 5,000 different boards. The is a reference algorithm, not a human player; it was run once with fixed tie-breaking.
Variant comparison · 10 · wins, []
Method7 × 7 · 7 mines250 boards / 9 × 9 · 12 mines500 boards / 16 × 16 · 40 mines150 boards /
Sum sum-cap84.3% [82.9–85.7]76.3% [74.7–77.8]44.3% [38.7–49.8]
Mean mean-cap87.4% [86.5–88.4]81.3% [80.0–82.7]51.8% [47.8–55.8]
Per · demo88.3% [85.7–91.0]81.3% [78.8–83.8]57.3% [52.1–62.5]
91.2%84.8%61.3%

What changes. Sum combines the signals without them; Mean averages them. In Per sniff, each learns separately and their opinions are then averaged. All three variants use a learned with the same cap. The estimates risk from the clues and applies rules for opening and flagging.

+5.1 over Sum on 9 × 9

difference, computed before rounding the means: [1.5–8.7]. On this set, the demo method falls 3.5 points below the . No clear difference from Mean is observed: of the difference [−2.7–2.6].

False flags (a safe square flagged as a mine): recorded none across the 9,000 of the variant comparison, but 1,266 across the 84,000 of the reference evaluation; 21 of its 30 recorded none. Zero on one set does not guarantee zero on another.

Scope

The agent learns local associations; a flag is not a logical proof. The demo and the neural panel use the . The walking fly depicts the chosen actions; leg control is not part of the learning. The demo plays with one of the ten trainings from the variant comparison ( 10); each game shows how the agent decides but does not measure its performance. That measurement is in the above.