SYSTEMS / ARTIFICIAL INTELLIGENCE

Back to Systems

Three ways to model a chess mind.

I build AI systems that think about chess the way people do: with explicit rules, with chunks of remembered experience, and with learned intuition. Each project tests a different idea about how human expertise works.

01 · SYMBOLIC AI

A logic engine that sees chess motifs.

Strong players recognise patterns such as a bishop pair, a pin, or a bad bishop at a glance. My logic engine makes that knowledge explicit: each motif is defined as a logical rule over pieces, squares, and the relations between them.

How it works

  1. Facts. A position is translated into facts: which piece stands on which square, what each piece attacks and defends, and how mobile it is.
  2. Rules. Each motif is a rule that combines these facts. If the conditions of a rule hold, the motif is present.
  3. Explanation. Because the rules are explicit, the engine can show exactly which squares form the motif and why it matters, unlike a black-box evaluation.

Each rule is a simple checklist. If every item on the list is true, the engine has found that pattern on the board. :- means "if" and a comma means "and". The grey text explains each line.

Example rules
% A side keeps both of its bishops
bishop_pair(Side) :-                       % Side has the bishop pair if...
    bishop(B1, Side), light_square(B1),   % it has a bishop on a light square
    bishop(B2, Side), dark_square(B2).    % and another bishop on a dark square

% A bishop hemmed in by its own pieces
bad_bishop(B) :-                           % Bishop B is a bad bishop if...
    bishop(B, Side),                      % B is a bishop belonging to Side
    defends_own(B, N), N > 1,             % it defends more than one of its own pieces
    mobility(B, M), M < 5.                % and it has fewer than 5 legal moves
Engine output Italian Game · White to move

Select a detected motif to highlight its squares.

Try the live engine

Paste any position in FEN notation and see which motifs the engine finds.

IN DEVELOPMENT · INDUCTIVE LOGIC PROGRAMMING

From writing rules to learning them.

Hand-written rules only capture what I already know. With inductive logic programming (ILP), the program compares chess positions and learns the rules itself, including new concepts that nobody gave it.

1

Examples

Positions that contain a motif, and positions that do not.

2

Background knowledge

Basic facts the learner can build on.

  • piece/3
  • attacks/2
  • defends/2
  • same_colour/2
3

Learned rule

A rule that covers the positive examples and none of the negative ones.

motif(B) :-
    bishop(B, S),
    inv_1(B, P),
    pawn(P, S).

inv_1(B, P) :-
    on_diagonal(B, P),
    blocks(P, B).

Predicate invention

The most interesting part is predicate invention: the learner can create helper concepts, such as inv_1 above, that do not exist in its background knowledge. Here it has invented something like "a pawn blocking the bishop's diagonal", which a human would call a key idea behind a bad bishop.

Why it matters

If a program can invent the same concepts that chess players use, it suggests how such concepts might be learned from experience. If it invents different ones, it may reveal patterns that players have never named.

The learned rule above is an illustration. Add the ILP system you use (for example Popper, Aleph, or your own) and a real learned rule when you have one.

02 · COGNITIVE ARCHITECTURE

CHREST: how experts remember positions.

CHREST (Chunk Hierarchy and REtrieval STructures), developed by Fernand Gobet and colleagues, is a computational model of human perception, learning, and memory. It explains one of the best-known findings in expertise research: masters can reproduce a game position after a few seconds, but not a random one.

Chunks

Familiar groups of pieces, such as a castled king with its pawns, learned through experience.

Long-term memory

A discrimination network that grows as the model sees more positions. Experts hold many large chunks.

Short-term memory

Holds only about four chunks. Bigger chunks mean more pieces remembered in the same space.

Templates

Frequently seen chunks become templates with slots, which let experts encode positions even faster.

Interactive · CHREST in miniature A simplified illustration of how CHREST works
Model
Position

Position shown

Short-term memory (4 slots)

    Pieces recalled –
    Your runs
    GameRandom
    Novice––
    Expert––

    The expert's advantage comes from recognising large, familiar chunks. In a random position there is nothing familiar to recognise, so the expert does no better than the novice. This mirrors the results of Chase and Simon (1973) that CHREST was built to explain. This demo was written for this page and is not the CHREST software itself.

    What I am working on

    I use CHREST to model how chess players perceive and memorise positions, and to compare its behaviour with data from my experiments on expertise and the Einstellung effect.

    The open question

    CHREST learns which groups of pieces belong together, but not what they mean. My logic engine knows what motifs mean, but not how they are learned. I am exploring how to combine the two, so that perceptual chunks can be linked to explicit, explainable concepts.

    Add which CHREST implementation you use, what you have simulated so far, and any results or screenshots of your model.

    03 · WORK IN PROGRESS · NEURAL NETWORKS

    Same experience, same rating: human or machine?

    MAIA is a neural chess engine trained to play like humans of a specific rating, rather than to play perfectly. I am using it to ask a sharper question: if a model and a human share the same rating and the same chess experience, do they think alike?

    Human player

    A player with a given Elo rating, and the games and positions they have learned from.

    Same Elo Same training data Same test positions

    MAIA model

    A model trained on data that represents what that player has seen, so both share the "same" memory.

    1. 01

      Build the data

      Collect games that represent a player of a certain rating and their chess experience.

    2. 02

      Train MAIA

      Train or fine-tune the model on that data, so it reflects the same knowledge.

    3. 03

      Test both

      Give the human and the model the same positions, including problems designed to trigger typical errors.

    4. 04

      Compare

      Compare move choices, mistakes, and patterns of thinking between human and machine.

    Add your current progress, the data you are using, and which comparisons you plan to report.

    THE BIG PICTURE

    Three models, one question.

    Each project captures a different side of chess expertise. Together they ask what kind of knowledge makes an expert, and whether a machine can acquire it the way people do.

    Explicit knowledge

    Logic engine & ILP

    Concepts as rules that can be read, explained, and learned.

    Perception & memory

    CHREST

    Expertise as a large store of chunks built from experience.

    Learned intuition

    MAIA

    Human-like move choice learned from data by a neural network.